Re: CVS commit: src/sys/arch/x86/x86

2024-09-16 Thread Valery Ushakov
On Wed, Sep 11, 2024 at 05:17:45 +, matthew green wrote:

> Module Name:  src
> Committed By: mrg
> Date: Wed Sep 11 05:17:45 UTC 2024
> 
> Modified Files:
>   src/sys/arch/x86/x86: intr.c
> 
> Log Message:
> apply some more diagnostic checks for x86 interrupts

How does this mix with KDTRACE_HOOKS?  To paraphrase:

#define IS_I8254_CLOCKINTR \
(handler == __FPTRCAST(int (*)(void *), i8254_clockintr))

#ifdef KDTRACE_HOOKS
if (!IS_I8254_CLOCKINTR) {
ih->ih_fun = intr_kdtrace_wrapper;
ih->ih_arg = ih;
}
#endif
#ifdef MULTIPROCESSOR
if (!mpsafe) {
KASSERT(!IS_I8254_CLOCKINTR);
ih->ih_fun = intr_biglock_wrapper;
ih->ih_arg = ih;
}
#ifdef DIAGNOSTIC   /* wrap all interrupts */
else if (!IS_I8254_CLOCKINTR) {
ih->ih_fun = intr_wrapper;
ih->ih_arg = ih;
}
#endif
#endif /* MULTIPROCESSOR */

and MULTIPROCESSOR case overwrites whatever KDTRACE_HOOKS did, doesn't
it?

-uwe


CVS commit: src/sys/arch/sparc/conf

2024-09-15 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Sep 15 19:19:58 UTC 2024

Modified Files:
src/sys/arch/sparc/conf: KRUPS

Log Message:
sparc/conf/KRUPS: sync with GENERIC clean up

Not much to do to actually sync it, as changes done to GENERIC were
also applied to KRUPS, but update the GENERIC version we are supposed
to be in sync with.

While here, comment out most of the more exotic file-system and all
verbose options.

Leave the wsconf section as is.  The one in GENERIC is messy and is
not in sync with other wsons ports.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/sparc/conf/KRUPS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc/conf/KRUPS
diff -u src/sys/arch/sparc/conf/KRUPS:1.81 src/sys/arch/sparc/conf/KRUPS:1.82
--- src/sys/arch/sparc/conf/KRUPS:1.81	Fri Apr 26 22:46:04 2019
+++ src/sys/arch/sparc/conf/KRUPS	Sun Sep 15 19:19:58 2024
@@ -1,5 +1,5 @@
-# $NetBSD: KRUPS,v 1.81 2019/04/26 22:46:04 sevan Exp $
-# From: NetBSD: GENERIC,v 1.197 2006/12/04 23:43:35 elad Exp
+# $NetBSD: KRUPS,v 1.82 2024/09/15 19:19:58 uwe Exp $
+# From  NetBSD: GENERIC,v 1.273 2023/02/12 14:50:41 abs Exp
 #
 # Krups (JavaStation-NC) machine description file
 #
@@ -8,7 +8,7 @@ include 	"arch/sparc/conf/std.sparc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"KRUPS-$Revision: 1.81 $"
+#ident 		"KRUPS-$Revision: 1.82 $"
 
 maxusers	32
 
@@ -55,7 +55,10 @@ options 	SYSVSEM		# System V semaphores
 #options 	SEMUME=10	# max number of undo entries per process
 #options 	SEMMNU=30	# number of undo structures in system
 options 	SYSVSHM		# System V shared memory
+#options 	SHMMAXPGS=1024	# default is max(%25 physmem, 1024 pages)
 
+options 	MODULAR		# new style module(7) framework
+options 	MODULAR_DEFAULT_AUTOLOAD
 #options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
@@ -143,7 +146,7 @@ makeoptions	CPUFLAGS="-mcpu=supersparc"
 #options 	LOCKDEBUG
 #options 	SYSCALL_DEBUG
 
-options 	MIIVERBOSE	# verbose PHY autoconfig messages
+#options 	MIIVERBOSE	# verbose PHY autoconfig messages
 
 ## `INSECURE' turns off the kernel security level (securelevel = 0 always).
 ## This allows writing to /dev/mem, loading kernel modules while multi-user,
@@ -167,19 +170,19 @@ include 	"conf/compat_netbsd10.config"
 options 	COMPAT_SUNOS	# SunOS 4.x binary compatibility
 
 ## File systems.  You probably need at least one of FFS or NFS.
-file-system	FFS		# Berkeley Fast Filesystem
+#file-system	FFS		# Berkeley Fast Filesystem
 file-system	NFS		# Sun NFS-compatible filesystem client
 file-system	KERNFS		# kernel data-structure filesystem
-file-system	NULLFS		# NULL layered filesystem
-file-system 	OVERLAY		# overlay file system
-file-system	MFS		# memory-based filesystem
-file-system	FDESC		# user file descriptor filesystem
-file-system	UMAPFS		# uid/gid remapping filesystem
+#file-system	NULLFS		# NULL layered filesystem
+#file-system 	OVERLAY		# overlay file system
+#file-system	MFS		# memory-based filesystem
+#file-system	FDESC		# user file descriptor filesystem
+#file-system	UMAPFS		# uid/gid remapping filesystem
 #file-system	LFS		# Log-based filesystem (still experimental)
 file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
 file-system	PROCFS		# /proc
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
-file-system	UNION		# union file system
+#file-system	UNION		# union file system
 #file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
 #file-system	CODA		# Coda File System; also needs vcoda (below)
 file-system	PTYFS		# /dev/pts/N support
@@ -220,7 +223,7 @@ msiiep0	at mainbus0	# microSPARC-IIep PC
 
 mspcic0	at msiiep0	# PCI tree
 pci0	at mspcic0
-options 	PCIVERBOSE
+#options 	PCIVERBOSE
 #options 	PCI_CONFIG_DUMP	# hangs reading IGA1682 config past offset 64
 
 ebus*	at pci?	dev ? function ?		# ebus devices
@@ -245,13 +248,13 @@ com*	at ebus?
 ## A disk-like interface to files.  Can be used to create floppy, CD,
 ## miniroot images, etc.
 
-#pseudo-device	vnd	
+#pseudo-device	vnd
 #options 	VND_COMPRESSION		# compressed vnd(4)
 
 ## Memory disk device, used on boot floppies with compressed
 ## kernel-plus-root-disk images.
 
-#pseudo-device	md	
+#pseudo-device	md
 
 
  Network interfaces
@@ -266,17 +269,17 @@ qsphy*		at mii? phy ?		# Quality Semicon
 pseudo-device	loop
 
 ## SLIP and CSLIP interfaces, for IP over a serial line.
-#pseudo-device	sl		
+#pseudo-device	sl
 
 ## PPP, the successor to SLIP.  See pppd(8).
-#pseudo-device	ppp		
+#pseudo-device	ppp
 
 ## PPP over Ethernet (RFC 2516)
 #pseudo-device	pppoe
 
 ## Network "tunnel" device, allowing protocol stacks to run in the userland.
 ## This is used by the third-party user-mode "ppp" program, and others.
-#pseudo-device	tun		
+#pseudo-device	tun
 #pseudo-devi

CVS commit: src/sys/arch/sparc/conf

2024-09-15 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Sep 15 19:19:58 UTC 2024

Modified Files:
src/sys/arch/sparc/conf: KRUPS

Log Message:
sparc/conf/KRUPS: sync with GENERIC clean up

Not much to do to actually sync it, as changes done to GENERIC were
also applied to KRUPS, but update the GENERIC version we are supposed
to be in sync with.

While here, comment out most of the more exotic file-system and all
verbose options.

Leave the wsconf section as is.  The one in GENERIC is messy and is
not in sync with other wsons ports.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/sparc/conf/KRUPS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/locale

2024-09-09 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Sep  9 14:21:37 UTC 2024

Modified Files:
src/lib/libc/locale: mbsrtowcs.3 wcsrtombs.3

Log Message:
mbsnrtowcs(3), wcsnrtombs(3): brush ip markup


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/locale/mbsrtowcs.3
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/locale/wcsrtombs.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/locale/mbsrtowcs.3
diff -u src/lib/libc/locale/mbsrtowcs.3:1.13 src/lib/libc/locale/mbsrtowcs.3:1.14
--- src/lib/libc/locale/mbsrtowcs.3:1.13	Mon Sep  9 11:30:05 2024
+++ src/lib/libc/locale/mbsrtowcs.3	Mon Sep  9 14:21:37 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: mbsrtowcs.3,v 1.13 2024/09/09 11:30:05 riastradh Exp $
+.\" $NetBSD: mbsrtowcs.3,v 1.14 2024/09/09 14:21:37 uwe Exp $
 .\"
 .\" Copyright (c)2002 Citrus Project,
 .\" All rights reserved.
@@ -38,13 +38,26 @@
 .Lb libc
 .\" --
 .Sh SYNOPSIS
+.
 .In wchar.h
+.
 .Ft size_t
-.Fn mbsrtowcs "wchar_t * restrict pwcs" "const char ** restrict s" "size_t n" \
-"mbstate_t * restrict ps"
-.Fn mbsnrtowcs "wchar_t * restrict pwcs" "const char ** restrict s" \
-"size_t nmc" "size_t n" \
-"mbstate_t * restrict ps"
+.Fo mbsrtowcs
+.Fa "wchar_t * restrict pwcs"
+.Fa "const char ** restrict s"
+.Fa "size_t n"
+.Fa "mbstate_t * restrict ps"
+.Fc
+.
+.Ft size_t
+.Fo mbsnrtowcs
+.Fa "wchar_t * restrict pwcs"
+.Fa "const char ** restrict s"
+.Fa "size_t nmc"
+.Fa "size_t n"
+.Fa "mbstate_t * restrict ps"
+.Fc
+.
 .\" --
 .Sh DESCRIPTION
 The
@@ -80,9 +93,10 @@ if
 is not a null pointer,
 the pointer object pointed to by
 .Fa s
-is a null pointer (if the conversion is stopped due to reaching a
-nul byte) or the first byte of the character just after the last
-character converted.
+is a null pointer
+.Pq if the conversion is stopped due to reaching a nul byte
+or the first byte of the character just after the last character
+converted.
 .Pp
 If
 .Fa pwcs
@@ -100,10 +114,12 @@ is affected by the
 category of the current locale.
 .Pp
 These are the special cases:
-.Bl -tag -width 012345678901
-.It "s == NULL || *s == NULL"
+.Bl -tag -width Li
+.
+.It Li "s == NULL || *s == NULL"
 Undefined (may cause the program to crash).
-.It "pwcs == NULL"
+.
+.It Li "pwcs == NULL"
 The conversion has taken place, but the resulting wide-character string
 was discarded.
 In this case, the pointer object pointed to by
@@ -111,7 +127,8 @@ In this case, the pointer object pointed
 is not modified and
 .Fa n
 is ignored.
-.It "ps == NULL"
+.
+.It Li "ps == NULL"
 The
 .Fn mbsrtowcs
 uses its own internal state object to keep the conversion state,
@@ -141,8 +158,8 @@ The
 and
 .Fn mbsnrtowcs
 functions return:
-.Bl -tag -width 012345678901
-.It 0 or positive
+.Bl -tag -width Li
+.It Li 0 , No or positive
 The value returned is the number of elements stored in the array
 pointed to by
 .Fa pwcs ,
@@ -160,7 +177,7 @@ If
 .Fa pwcs
 is a null pointer, the value returned is the number of elements to contain
 the whole string converted, except for a terminating nul wide character.
-.It (size_t)-1
+.It Li "(size_t)-1"
 The array indirectly pointed to by
 .Fa s
 contains a byte sequence forming invalid character.

Index: src/lib/libc/locale/wcsrtombs.3
diff -u src/lib/libc/locale/wcsrtombs.3:1.14 src/lib/libc/locale/wcsrtombs.3:1.15
--- src/lib/libc/locale/wcsrtombs.3:1.14	Mon Sep  9 11:30:05 2024
+++ src/lib/libc/locale/wcsrtombs.3	Mon Sep  9 14:21:37 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: wcsrtombs.3,v 1.14 2024/09/09 11:30:05 riastradh Exp $
+.\" $NetBSD: wcsrtombs.3,v 1.15 2024/09/09 14:21:37 uwe Exp $
 .\"
 .\" Copyright (c)2002 Citrus Project,
 .\" All rights reserved.
@@ -37,13 +37,25 @@
 .Lb libc
 .\" --
 .Sh SYNOPSIS
+.
 .In wchar.h
+.
 .Ft size_t
-.Fn wcsrtombs "char * restrict s" "const wchar_t ** restrict pwcs" \
-"size_t n" "mbstate_t * restrict ps"
+.Fo wcsrtombs
+.Fa "char * restrict s"
+.Fa "const wchar_t ** restrict pwcs"
+.Fa "size_t n" "mbstate_t * restrict ps"
+.Fc
+.
 .Ft size_t
-.Fn wcsnrtombs "char * restrict s" "const wchar_t ** restrict pwcs" \
-"size_t nwc" "size_t n" "mbstat_t * restrict ps"
+.Fo wcsnrtombs
+.Fa "char * restrict s"
+.Fa "const wchar_t ** restrict pwcs"
+.Fa "size_t nwc"
+.Fa "size_t n"
+.Fa "mbstat_t * restrict ps"
+.Fc
+.
 .\" --
 .Sh DESCRIPTION
 The
@@ -81,9 +93,10 @@ if
 .Fa s
 is not a null pointer, the pointer object pointed to by
 .Fa pwcs
-is a null pointer (if the conversion is stopped due to reaching a
-nul wide character) or the first byte of the character just after
-the last character converted.
+is a null pointer
+.Pq if the conversion is stopped due to reaching a nul wide char

CVS commit: src/lib/libc/locale

2024-09-09 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Sep  9 14:21:37 UTC 2024

Modified Files:
src/lib/libc/locale: mbsrtowcs.3 wcsrtombs.3

Log Message:
mbsnrtowcs(3), wcsnrtombs(3): brush ip markup


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/locale/mbsrtowcs.3
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/locale/wcsrtombs.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/brconfig

2024-09-03 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Sep  3 10:42:58 UTC 2024

Modified Files:
src/sbin/brconfig: brconfig.8

Log Message:
brconfig(8): tweak markup


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sbin/brconfig/brconfig.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/brconfig/brconfig.8
diff -u src/sbin/brconfig/brconfig.8:1.21 src/sbin/brconfig/brconfig.8:1.22
--- src/sbin/brconfig/brconfig.8:1.21	Tue Sep  3 08:00:30 2024
+++ src/sbin/brconfig/brconfig.8	Tue Sep  3 10:42:58 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: brconfig.8,v 1.21 2024/09/03 08:00:30 ozaki-r Exp $
+.\"	$NetBSD: brconfig.8,v 1.22 2024/09/03 10:42:58 uwe Exp $
 .\"
 .\" Copyright 2001 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -68,13 +68,13 @@ Ethernet and Token Ring together.
 Bridge interfaces are created using the
 .Xr ifconfig 8
 command's
-.Dq create
+.Cm create
 sub-command.
 All other bridge configuration is performed using
 .Nm .
 .Pp
 The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width Fl
 .It Fl a
 Display the status of all bridge devices present on the system.
 This flag is mutually exclusive with all other sub-commands.
@@ -84,7 +84,7 @@ All other operations require that a brid
 If a bridge is specified with no sub-commands,
 the status of that bridge is displayed.
 The following sub-commands are available:
-.Bl -tag -width indent
+.Bl -tag -width Cm
 .It Cm up
 Start forwarding packets on the bridge.
 .It Cm down
@@ -232,11 +232,11 @@ The minimum is 0 and the maximum is 6553
 The following, when placed in the file
 .Pa /etc/ifconfig.bridge0 ,
 will cause a bridge called
-.Sq bridge0
+.Ql bridge0
 to be created, add the interfaces
-.Sq ray0
+.Ql ray0
 and
-.Sq fxp0
+.Ql fxp0
 to the bridge, and then enable packet forwarding.
 Such a configuration could be used to implement a simple
 802.11-to-Ethernet bridge (assuming the 802.11 interface is
@@ -277,6 +277,7 @@ The
 utility first appeared in
 .Nx 1.6 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Xr bridge 4
 driver and



CVS commit: src/sbin/brconfig

2024-09-03 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Sep  3 10:42:58 UTC 2024

Modified Files:
src/sbin/brconfig: brconfig.8

Log Message:
brconfig(8): tweak markup


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sbin/brconfig/brconfig.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-08-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 27 17:38:52 UTC 2024

Modified Files:
src/share/man/man4: rnd.4

Log Message:
rnd(4): tweak markup a bit, consistently use .Li for sysctl vars


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man4/rnd.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/rnd.4
diff -u src/share/man/man4/rnd.4:1.42 src/share/man/man4/rnd.4:1.43
--- src/share/man/man4/rnd.4:1.42	Tue Aug 27 11:21:02 2024
+++ src/share/man/man4/rnd.4	Tue Aug 27 17:38:52 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rnd.4,v 1.42 2024/08/27 11:21:02 riastradh Exp $
+.\"	$NetBSD: rnd.4,v 1.43 2024/08/27 17:38:52 uwe Exp $
 .\"
 .\" Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -42,14 +42,14 @@ and
 .Pa /dev/urandom
 devices generate bytes randomly with uniform distribution.
 Every read from them is independent.
-.Bl -tag -width /dev/urandom
-.It Pa /dev/urandom
-Never blocks.
-.It Pa /dev/random
-Sometimes blocks.
-Will block early at boot if the system's state is known to be
+.Pp
+.Pa /dev/urandom
+never blocks.
+.Pp
+.Pa /dev/random
+sometimes blocks.
+It will block early at boot if the system's state is known to be
 predictable.
-.El
 .Pp
 Applications should read from
 .Pa /dev/urandom ,
@@ -59,12 +59,10 @@ variable
 .Li kern.arandom ,
 when they need randomly generated data, e.g. key material for
 cryptography or seeds for simulations.
-(The
-.Xr sysctl 7
-variable
+The
 .Li kern.arandom
-is limited to 256 bytes per read, but is otherwise equivalent to
-reading from
+variable is limited to 256 bytes per read, but is otherwise equivalent
+to reading from
 .Pa /dev/urandom
 and always works even in a
 .Xr chroot 8
@@ -72,7 +70,7 @@ environment without requiring a populate
 .Pa /dev
 tree and without opening a file descriptor, so
 .Li kern.arandom
-may be preferable to use in libraries.)
+may be preferable to use in libraries.
 .Pp
 Systems should be engineered to judiciously read at least once from
 .Pa /dev/random
@@ -105,12 +103,13 @@ the outputs to
 to guarantee your system is in a state that nobody but you and the
 bored security guard watching the surveillance camera in your office
 can guess:
-.Bd -literal -offset abcd
-% echo tththhhththttthtththttth... > /dev/random
-.Ed
 .Pp
-(Sequence generated from a genuine US quarter dollar, guaranteed
-random.)
+.Dl % echo tththhhththttthtththttth... > /dev/random
+.Pp
+.Po
+Sequence generated from a genuine US quarter dollar, guaranteed
+random.
+.Pc
 .\"
 .Sh SECURITY MODEL
 The
@@ -134,7 +133,7 @@ means a single read, no matter how short
 .Pp
 .Sq Cannot predict
 means it is conjectured of the cryptography in
-.Fa /dev/random
+.Pa /dev/random
 that any computationally bounded attacker who tries to distinguish
 outputs from uniform random cannot do more than negligibly better than
 uniform random guessing.
@@ -161,7 +160,8 @@ or
 .Em entropy
 for short in cryptography.
 For example:
-.Bl -bullet -offset abcd -compact
+.Pp
+.Bl -bullet -offset indent -compact
 .It
 A fair coin toss has one bit of entropy.
 .It
@@ -173,9 +173,9 @@ The toss of a pair of fair coins that ar
 entropy.
 .It
 A uniform random distribution with
-.Fa n
+.Ar n
 possibilities has log_2
-.Fa n
+.Ar n
 bits of entropy.
 .It
 An utterance from an accounting troll who always says
@@ -222,7 +222,7 @@ kernel has started.
 For those that don't, the
 .Xr rndctl 8
 command can do it once userland has started, for example by setting
-.Dq Li random_seed=YES
+.Ql random_seed=YES
 in
 .Pa /etc/rc.conf ,
 which is enabled by default; see
@@ -322,7 +322,7 @@ typedef struct {
 .Ed
 .Pp
 Fill the
-.Fa sources
+.Fa source
 array with information about up to
 .Fa count
 entropy sources, starting at
@@ -345,7 +345,7 @@ Fill
 with information about the entropy source named
 .Fa name ,
 or fail with
-.Dv ENOENT
+.Er ENOENT
 if there is none.
 .It Dv RNDCTL Pq Vt rndctl_t
 .Bd -literal
@@ -413,7 +413,7 @@ variables provided by
 .Nm
 can be set by privileged users:
 .Bl -tag -width abcd
-.It Dv kern.entropy.collection Pq Vt bool
+.It Li kern.entropy.collection Pq Vt bool
 (Default on.)
 Enables entering data into the entropy pool.
 If disabled, no new data can be entered into the entropy pool, whether
@@ -424,7 +424,7 @@ or
 or by the
 .Dv RNDADDDATA
 ioctl.
-.It Dv kern.entropy.depletion Pq Vt bool
+.It Li kern.entropy.depletion Pq Vt bool
 (Default off.)
 Enables
 .Sq entropy depletion ,
@@ -434,9 +434,11 @@ the system entropy.
 This is not justified by modern cryptography \(em an adversary will
 never guess the 256-bit secret in a Keccak sponge no matter how much
 output from the sponge they see \(em but may be useful for testing.
-.It Dv kern.entropy.consolidate Pq Vt int
+.It Li kern.entropy.consolidate Pq Vt int
 Trigger for 

CVS commit: src/share/man/man4

2024-08-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 27 17:38:52 UTC 2024

Modified Files:
src/share/man/man4: rnd.4

Log Message:
rnd(4): tweak markup a bit, consistently use .Li for sysctl vars


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man4/rnd.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2024-08-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Aug 25 11:29:38 UTC 2024

Modified Files:
src/sys/dev: mm.c

Log Message:
mm.c: g/c duplicate mm_ioctl declaration


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/mm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2024-08-25 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Aug 25 11:29:38 UTC 2024

Modified Files:
src/sys/dev: mm.c

Log Message:
mm.c: g/c duplicate mm_ioctl declaration


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/mm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mm.c
diff -u src/sys/dev/mm.c:1.24 src/sys/dev/mm.c:1.25
--- src/sys/dev/mm.c:1.24	Tue Feb  5 11:33:13 2019
+++ src/sys/dev/mm.c	Sun Aug 25 11:29:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mm.c,v 1.24 2019/02/05 11:33:13 mrg Exp $	*/
+/*	$NetBSD: mm.c,v 1.25 2024/08/25 11:29:38 uwe Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.24 2019/02/05 11:33:13 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.25 2024/08/25 11:29:38 uwe Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -55,7 +55,6 @@ static vaddr_t		dev_mem_addr	__read_most
 
 static dev_type_open(mm_open);
 static dev_type_read(mm_readwrite);
-static dev_type_ioctl(mm_ioctl);
 static dev_type_mmap(mm_mmap);
 static dev_type_ioctl(mm_ioctl);
 



CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 18:35:19 UTC 2024

Modified Files:
src/lib/libc/locale: c8rtomb.3 mbrtoc8.3

Log Message:
c8rtomb(3), mbrtoc8(3): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/locale/c8rtomb.3 \
src/lib/libc/locale/mbrtoc8.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/locale/c8rtomb.3
diff -u src/lib/libc/locale/c8rtomb.3:1.1 src/lib/libc/locale/c8rtomb.3:1.2
--- src/lib/libc/locale/c8rtomb.3:1.1	Thu Aug 15 21:19:45 2024
+++ src/lib/libc/locale/c8rtomb.3	Fri Aug 16 18:35:19 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: c8rtomb.3,v 1.1 2024/08/15 21:19:45 riastradh Exp $
+.\"	$NetBSD: c8rtomb.3,v 1.2 2024/08/16 18:35:19 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,11 +36,15 @@
 .Lb libc
 .\"
 .Sh SYNOPSIS
+.
 .In uchar.h
+.
 .Ft size_t
-.Fn c8rtomb "char * restrict s" \
-"char8_t c8" \
-"mbstate_t * restrict ps"
+.Fo c8rtomb
+.Fa "char * restrict s"
+.Fa "char8_t c8"
+.Fa "mbstate_t * restrict ps"
+.Fc
 .\"
 .Sh DESCRIPTION
 The
@@ -93,23 +97,23 @@ NUL-terminate it, and print it:
 char8_t c8[] = { 0xf0, 0x9f, 0x92, 0xa9 };
 char buf[__arraycount(c8)*MB_CUR_MAX + 1], *s = buf;
 size_t i;
-mbstate_t mbs = {0};	/* initial conversion state */
+mbstate_t mbs = {0};/* initial conversion state */
 
 for (i = 0; i < __arraycount(c8); i++) {
-	size_t len;
+size_t len;
 
-	len = c8rtomb(s, c8[i], &mbs);
-	if (len == (size_t)-1)
-		err(1, "c8rtomb");
-	assert(len < sizeof(buf) - (s - buf));
-	s += len;
+len = c8rtomb(s, c8[i], &mbs);
+if (len == (size_t)-1)
+err(1, "c8rtomb");
+assert(len < sizeof(buf) - (s - buf));
+s += len;
 }
-*s = '\e0';		/* NUL-terminate */
+*s = '\e0'; /* NUL-terminate */
 printf("%s\en", buf);
 .Ed
 .\"
 .Sh ERRORS
-.Bl -tag -width ".Bq Er EILSEQ"
+.Bl -tag -width Bq
 .It Bq Er EILSEQ
 A surrogate code point was passed as
 .Fa c8
@@ -177,7 +181,7 @@ in the standard which suggests that pass
 should unconditionally store a null byte and reset
 .Fa ps
 to the initial conversion state:
-.Bd -offset indent
+.Bd -filled -offset indent
 If
 .Fa c8
 is a null character, a null byte is stored, preceded by any shift
Index: src/lib/libc/locale/mbrtoc8.3
diff -u src/lib/libc/locale/mbrtoc8.3:1.1 src/lib/libc/locale/mbrtoc8.3:1.2
--- src/lib/libc/locale/mbrtoc8.3:1.1	Thu Aug 15 21:19:45 2024
+++ src/lib/libc/locale/mbrtoc8.3	Fri Aug 16 18:35:19 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mbrtoc8.3,v 1.1 2024/08/15 21:19:45 riastradh Exp $
+.\"	$NetBSD: mbrtoc8.3,v 1.2 2024/08/16 18:35:19 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,12 +36,16 @@
 .Lb libc
 .\"
 .Sh SYNOPSIS
+.
 .In uchar.h
+.
 .Ft size_t
-.Fn mbrtoc8 "char8_t * restrict pc8" \
-"const char * restrict s" \
-"size_t n" \
-"mbstate_t * restrict ps"
+.Fo mbrtoc8
+.Fa "char8_t * restrict pc8"
+.Fa "const char * restrict s"
+.Fa "size_t n"
+.Fa "mbstate_t * restrict ps"
+.Fc
 .\"
 .Sh DESCRIPTION
 The
@@ -157,13 +161,16 @@ uses an internal
 .Vt mbstate_t
 object with static storage duration, distinct from all other
 .Vt mbstate_t
-objects (including those used by
+objects
+.Po
+including those used by
 .Xr mbrtoc16 3 ,
 .Xr mbrtoc32 3 ,
 .Xr c8rtomb 3 ,
 .Xr c16rtomb 3 ,
 and
-.Xr c32rtomb 3 ) ,
+.Xr c32rtomb 3
+.Pc ,
 which is initialized at program startup to the initial conversion
 state.
 .\"
@@ -171,20 +178,20 @@ state.
 The
 .Nm
 function returns:
-.Bl -tag -width ".Li (size_t)-3" -offset indent
+.Bl -tag -width Li
 .It Li 0
-[null]
+.Bq null
 if within the next
 .Fa n
 bytes at
 .Fa s
 the first multibyte character is null.
-.It Fa i
-[code unit]
+.It Ar i
+.Bq code unit
 where
 .Li 0
 \*(Le
-.Fa i
+.Ar i
 \*(Le
 .Fa n ,
 if either
@@ -194,12 +201,12 @@ is in the initial conversion state or th
 with
 .Fa ps
 had not yielded an incomplete UTF-8 code unit, and within the first
-.Fa i
+.Ar i
 bytes at
 .Fa s
 a Unicode scalar value was decoded.
 .It Li (size_t)-3
-[continuation]
+.Bq continuation
 if the previous call to
 .Nm
 with
@@ -208,7 +215,7 @@ had yielded an incomplete UTF-8 code uni
 outside the US-ASCII range; no additional input is consumed in this
 case.
 .It Li (size_t)-2
-[incomplete]
+.Bq incomplete
 if either
 .Fa ps
 is in the initial conversion state or the previous call to
@@ -222,7 +229,7 @@ bytes at
 inclu

CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 18:35:19 UTC 2024

Modified Files:
src/lib/libc/locale: c8rtomb.3 mbrtoc8.3

Log Message:
c8rtomb(3), mbrtoc8(3): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/locale/c8rtomb.3 \
src/lib/libc/locale/mbrtoc8.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 12:54:08 UTC 2024

Modified Files:
src/lib/libc/locale: c16rtomb.3 c32rtomb.3

Log Message:
c16rtomb(3), c32rtomb(3): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/c16rtomb.3 \
src/lib/libc/locale/c32rtomb.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 12:54:08 UTC 2024

Modified Files:
src/lib/libc/locale: c16rtomb.3 c32rtomb.3

Log Message:
c16rtomb(3), c32rtomb(3): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/c16rtomb.3 \
src/lib/libc/locale/c32rtomb.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/locale/c16rtomb.3
diff -u src/lib/libc/locale/c16rtomb.3:1.2 src/lib/libc/locale/c16rtomb.3:1.3
--- src/lib/libc/locale/c16rtomb.3:1.2	Thu Aug 15 14:58:00 2024
+++ src/lib/libc/locale/c16rtomb.3	Fri Aug 16 12:54:07 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: c16rtomb.3,v 1.2 2024/08/15 14:58:00 riastradh Exp $
+.\"	$NetBSD: c16rtomb.3,v 1.3 2024/08/16 12:54:07 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,11 +36,15 @@
 .Lb libc
 .\"
 .Sh SYNOPSIS
+.
 .In uchar.h
+.
 .Ft size_t
-.Fn c16rtomb "char * restrict s" \
-"char16_t c16" \
-"mbstate_t * restrict ps"
+.Fo c16rtomb
+.Fa "char * restrict s"
+.Fa "char16_t c16"
+.Fa "mbstate_t * restrict ps"
+.Fc
 .\"
 .Sh DESCRIPTION
 The
@@ -105,23 +109,23 @@ NUL-terminate it, and print it:
 char16_t c16[] = { 0xd83d, 0xdca9 };
 char buf[__arraycount(c16)*MB_CUR_MAX + 1], *s = buf;
 size_t i;
-mbstate_t mbs = {0};	/* initial conversion state */
+mbstate_t mbs = {0};/* initial conversion state */
 
 for (i = 0; i < __arraycount(c16); i++) {
-	size_t len;
+size_t len;
 
-	len = c16rtomb(s, c16[i], &mbs);
-	if (len == (size_t)-1)
-		err(1, "c16rtomb");
-	assert(len < sizeof(buf) - (s - buf));
-	s += len;
+len = c16rtomb(s, c16[i], &mbs);
+if (len == (size_t)-1)
+err(1, "c16rtomb");
+assert(len < sizeof(buf) - (s - buf));
+s += len;
 }
-*s = '\e0';		/* NUL-terminate */
+*s = '\e0'; /* NUL-terminate */
 printf("%s\en", buf);
 .Ed
 .\"
 .Sh ERRORS
-.Bl -tag -width ".Bq Er EILSEQ"
+.Bl -tag -width Bq
 .It Bq Er EILSEQ
 A surrogate code point was passed as
 .Fa c16
@@ -185,7 +189,7 @@ in the standard which suggests that pass
 should unconditionally store a null byte and reset
 .Fa ps
 to the initial conversion state:
-.Bd -offset indent
+.Bd -filled -offset indent
 If
 .Fa c16
 is a null wide character, a null byte is stored, preceded by any shift
Index: src/lib/libc/locale/c32rtomb.3
diff -u src/lib/libc/locale/c32rtomb.3:1.2 src/lib/libc/locale/c32rtomb.3:1.3
--- src/lib/libc/locale/c32rtomb.3:1.2	Thu Aug 15 14:58:00 2024
+++ src/lib/libc/locale/c32rtomb.3	Fri Aug 16 12:54:07 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: c32rtomb.3,v 1.2 2024/08/15 14:58:00 riastradh Exp $
+.\"	$NetBSD: c32rtomb.3,v 1.3 2024/08/16 12:54:07 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,11 +36,15 @@
 .Lb libc
 .\"
 .Sh SYNOPSIS
+.
 .In uchar.h
+.
 .Ft size_t
-.Fn c32rtomb "char * restrict s" \
-"char32_t c32" \
-"mbstate_t * restrict ps"
+.Fo c32rtomb
+.Fa "char * restrict s"
+.Fa "char32_t c32"
+.Fa "mbstate_t * restrict ps"
+.Fc
 .\"
 .Sh DESCRIPTION
 The
@@ -63,7 +67,7 @@ of surrogate code points.
 .Pp
 If a surrogate code point is passed,
 .Nm
- will return
+will return
 .Li (size_t)-1
 to denote failure with
 .Xr errno 2
@@ -88,23 +92,23 @@ NUL-terminate it, and print it:
 char32_t c32[] = { 0x1f4a9, 0x20ac, 0x21 };
 char buf[__arraycountb(c32)*MB_CUR_MAX + 1], *s = buf;
 size_t i;
-mbstate_t mbs = {0};	/* initial conversion state */
+mbstate_t mbs = {0};/* initial conversion state */
 
 for (i = 0; i < __arraycount(c32); i++) {
-	size_t len;
+size_t len;
 
-	len = c32rtomb(s, c32[i], &mbs);
-	if (len == (size_t)-1)
-		err(1, "c32rtomb");
-	assert(len < sizeof(buf) - (s - buf));
-	s += len;
+len = c32rtomb(s, c32[i], &mbs);
+if (len == (size_t)-1)
+err(1, "c32rtomb");
+assert(len < sizeof(buf) - (s - buf));
+s += len;
 }
-*s = '\e0';		/* NUL-terminate */
+*s = '\e0'; /* NUL-terminate */
 printf("%s\en", buf);
 .Ed
 .\"
 .Sh ERRORS
-.Bl -tag -width ".Bq Er EILSEQ"
+.Bl -tag -width Bq
 .It Bq Er EILSEQ
 A surrogate code point was passed as
 .Fa c32 .



CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 12:41:21 UTC 2024

Modified Files:
src/lib/libc/locale: mbrtoc16.3 mbrtoc32.3

Log Message:
mbrtoc16(3), mbrtoc32(3): brush up markup

Split long .Fn lines into Fo/Fa/Fc.  Dont indent the list of return
values.  Don't use artisanal -width.

Untabify code examples - indented literal displays don't have correct
tab stops consistent with tab stops in the fixed font code, so the
lines end up misaligned in the PostScript output.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/mbrtoc16.3 \
src/lib/libc/locale/mbrtoc32.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/locale/mbrtoc16.3
diff -u src/lib/libc/locale/mbrtoc16.3:1.2 src/lib/libc/locale/mbrtoc16.3:1.3
--- src/lib/libc/locale/mbrtoc16.3:1.2	Thu Aug 15 14:42:20 2024
+++ src/lib/libc/locale/mbrtoc16.3	Fri Aug 16 12:41:21 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mbrtoc16.3,v 1.2 2024/08/15 14:42:20 riastradh Exp $
+.\"	$NetBSD: mbrtoc16.3,v 1.3 2024/08/16 12:41:21 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,12 +36,16 @@
 .Lb libc
 .\"
 .Sh SYNOPSIS
+.
 .In uchar.h
+.
 .Ft size_t
-.Fn mbrtoc16 "char16_t * restrict pc16" \
-"const char * restrict s" \
-"size_t n" \
-"mbstate_t * restrict ps"
+.Fo mbrtoc16
+.Fa "char16_t * restrict pc16"
+.Fa "const char * restrict s"
+.Fa "size_t n"
+.Fa "mbstate_t * restrict ps"
+.Fc
 .\"
 .Sh DESCRIPTION
 The
@@ -158,11 +162,14 @@ uses an internal
 .Vt mbstate_t
 object with static storage duration, distinct from all other
 .Vt mbstate_t
-objects (including those used by
+objects
+.Po
+including those used by
 .Xr mbrtoc32 3 ,
 .Xr c16rtomb 3 ,
 and
-.Xr c32rtomb 3 ) ,
+.Xr c32rtomb 3
+.Pc ,
 which is initialized at program startup to the initial conversion
 state.
 .\"
@@ -170,20 +177,20 @@ state.
 The
 .Nm
 function returns:
-.Bl -tag -width ".Li (size_t)-3" -offset indent
+.Bl -tag -width Li
 .It Li 0
-[null]
+.Bq null
 if within the next
 .Fa n
 bytes at
 .Fa s
 the first multibyte character is null.
-.It Fa i
-[code unit]
+.It Ar i
+.Bq code unit
 where
 .Li 0
 \*(Le
-.Fa i
+.Ar i
 \*(Le
 .Fa n ,
 if either
@@ -198,7 +205,7 @@ bytes at
 .Fa s
 a Unicode scalar value was decoded.
 .It Li (size_t)-3
-[continuation]
+.Bq continuation
 if the previous call to
 .Nm
 with
@@ -207,7 +214,7 @@ had yielded a high surrogate code point 
 outside the Basic Multilingual Plane; no additional input is consumed
 in this case.
 .It Li (size_t)-2
-[incomplete]
+.Bq incomplete
 if either
 .Fa ps
 is in the initial conversion state or the previous call to
@@ -221,7 +228,7 @@ bytes at
 including any previously buffered input, no complete Unicode scalar
 value could be decoded.
 .It Li (size_t)-1
-[error]
+.Bq error
 if any encoding error was detected;
 .Xr errno 2
 is set to reflect the error.
@@ -232,37 +239,37 @@ Print the UTF-16 code units of a multiby
 .Bd -literal -offset indent
 char *s = ...;
 size_t n = ...;
-mbstate_t mbs = {0};	/* initial conversion state */
+mbstate_t mbs = {0};/* initial conversion state */
 
 while (n) {
-	char16_t c16;
-	size_t len;
+char16_t c16;
+size_t len;
 
-	len = mbrtoc16(&c16, s, n, &mbs);
-	switch (len) {
-	case 0:		/* null terminator */
-		assert(c16 == L'\e0');
-		goto out;
-	default:	/* scalar value or high surrogate */
-		printf("U+%04"PRIx16"\en", (uint16_t)c16);
-		break;
-	case (size_t)-3: /* low surrogate */
-		printf("continue U+%04"PRIx16"\en", (uint16_t)c16);
-		break;
-	case (size_t)-2: /* incomplete */
-		printf("incomplete\en");
-		goto readmore;
-	case (size_t)-1: /* error */
-		printf("error: %d\en", errno);
-		goto out;
-	}
-	s += len;
-	n -= len;
+len = mbrtoc16(&c16, s, n, &mbs);
+switch (len) {
+case 0: /* null terminator */
+assert(c16 == L'\e0');
+goto out;
+default:/* scalar value or high surrogate */
+printf("U+%04"PRIx16"\en", (uint16_t)c16);
+break;
+case (size_t)-3: /* low surrogate */
+printf("continue U+%04"PRIx16"\en", (uint16_t)c16);
+break;
+case (size_t)-2: /* incomplete */
+printf("incomplete\en");
+goto readmore;
+case (size_t)-1: /* error */
+printf("error: %d\en", errno);
+goto out;
+}
+s += len;
+n -= len;
 }
 .Ed
 .\"
 .Sh ERRORS
-.Bl -tag -width ".Bq Er EILSEQ"
+.Bl -tag -width Bq
 .It Bq Er EILSEQ
 The multibyte sequence cannot be

CVS commit: src/lib/libc/locale

2024-08-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Aug 16 12:41:21 UTC 2024

Modified Files:
src/lib/libc/locale: mbrtoc16.3 mbrtoc32.3

Log Message:
mbrtoc16(3), mbrtoc32(3): brush up markup

Split long .Fn lines into Fo/Fa/Fc.  Dont indent the list of return
values.  Don't use artisanal -width.

Untabify code examples - indented literal displays don't have correct
tab stops consistent with tab stops in the fixed font code, so the
lines end up misaligned in the PostScript output.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/mbrtoc16.3 \
src/lib/libc/locale/mbrtoc32.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/distrib/sets/lists/man

2024-08-16 Thread Valery Ushakov
On Fri, Aug 16, 2024 at 19:06:15 +0900, Rin Okuyama wrote:

> I've changed mknative-gdb to generate *.info by using makeinfo(1)
> provided by pkgsrc-2024Q2:
> 
> https://github.com/IIJ-NetBSD/netbsd-src/compare/master...rokuyama:netbsd-src:exp/mknative-gdb-makeinfo
> 
> Then, pre-generated infos are installed for normal builds.

I haven't looked at the actual code, but as an emacs user I'm obviolsy
all for shipping the info files.  Thanks.

-uwe


CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 23:24:23 UTC 2024

Modified Files:
src/usr.bin/config: config.5

Log Message:
config(5): bump date for and fix typo in previous

PR bin/58583


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/config/config.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/config.5
diff -u src/usr.bin/config/config.5:1.49 src/usr.bin/config/config.5:1.50
--- src/usr.bin/config/config.5:1.49	Tue Aug 13 15:01:52 2024
+++ src/usr.bin/config/config.5	Tue Aug 13 23:24:23 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: config.5,v 1.49 2024/08/13 15:01:52 uwe Exp $
+.\" $NetBSD: config.5,v 1.50 2024/08/13 23:24:23 uwe Exp $
 .\"
 .\"  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\"  All rights reserved.
@@ -24,7 +24,7 @@
 .\"  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\"  POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 17, 2024
+.Dd August 13, 2024
 .Dt CONFIG 5
 .Os
 .Sh NAME
@@ -744,7 +744,7 @@ Used instead of
 .Ic machine
 in config file snippets for kernel modules to generate just the
 .Pa ioconf.c
-definions.
+definitions.
 The generated file contains subtrees that start with attachments
 declared with
 .Ic pseudo-root .



CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 23:24:23 UTC 2024

Modified Files:
src/usr.bin/config: config.5

Log Message:
config(5): bump date for and fix typo in previous

PR bin/58583


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/config/config.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 15:01:52 UTC 2024

Modified Files:
src/usr.bin/config: config.5

Log Message:
config(5): mention ioconf and pseudo-root

Add barebones descriptions for ioconf and pseudo-root added by pooka@
long time ago for rump and kmods.  Definitely could be improved and
expanded, so feel free...

PR bin/58583


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/config/config.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/config.5
diff -u src/usr.bin/config/config.5:1.48 src/usr.bin/config/config.5:1.49
--- src/usr.bin/config/config.5:1.48	Thu Jan 18 04:41:37 2024
+++ src/usr.bin/config/config.5	Tue Aug 13 15:01:52 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: config.5,v 1.48 2024/01/18 04:41:37 thorpej Exp $
+.\" $NetBSD: config.5,v 1.49 2024/08/13 15:01:52 uwe Exp $
 .\"
 .\"  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\"  All rights reserved.
@@ -739,6 +739,16 @@ the
 and each of the
 .Ar subarch .
 .\"
+.It Ic ioconf Ar name
+Used instead of
+.Ic machine
+in config file snippets for kernel modules to generate just the
+.Pa ioconf.c
+definions.
+The generated file contains subtrees that start with attachments
+declared with
+.Ic pseudo-root .
+.\"
 .It Ic package Ar path
 Simpler version of:
 .Bd -literal -offset indent
@@ -844,6 +854,24 @@ Removes
 .Ar name
 from the list of kernel binaries to compile from the configuration file.
 .\"
+.It Ic pseudo-root Ar instance
+Used in conjunction with
+.Ic ioconf
+in kernel modules.
+Declares an instance of a device that serves as the root for a subtree
+described in the module config.
+The declared
+.Ar instance
+can then be used as an
+.Ar attachment
+for devices in the kernel module.
+Multiple such attachment points may be declared in the config file.
+.Ar instance
+may name a device
+.Pq e.g. Ql pci*
+an interface attribute
+.Pq e.g. Ql audiobus*
+.\"
 .It Ar instance Ic at Ar attachment Op Ar locator-specifications ...
 Configures an instance of a device attaching at a specific location in the
 device tree.



CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 15:01:52 UTC 2024

Modified Files:
src/usr.bin/config: config.5

Log Message:
config(5): mention ioconf and pseudo-root

Add barebones descriptions for ioconf and pseudo-root added by pooka@
long time ago for rump and kmods.  Definitely could be improved and
expanded, so feel free...

PR bin/58583


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/config/config.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 10:14:04 UTC 2024

Modified Files:
src/usr.bin/config: scan.l

Log Message:
config: fix ctype(3) argument casts

See CAVEATS.  Doesn't matter here in practice, but that's not an
excuse to set a bad example.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/scan.l
diff -u src/usr.bin/config/scan.l:1.35 src/usr.bin/config/scan.l:1.36
--- src/usr.bin/config/scan.l:1.35	Thu Jan 18 04:41:37 2024
+++ src/usr.bin/config/scan.l	Tue Aug 13 10:14:04 2024
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: scan.l,v 1.35 2024/01/18 04:41:37 thorpej Exp $	*/
+/*	$NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: scan.l,v 1.35 2024/01/18 04:41:37 thorpej Exp $");
+__RCSID("$NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $");
 
 #include 
 #include 
@@ -575,9 +575,9 @@ getincludepath(void)
 	ptrdiff_t len;
 	const char *e;
 
-	while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && !isspace((unsigned char)*p))
 		p++;
-	while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && isspace((unsigned char)*p))
 		p++;
 	if (!*p)
 		return 0;
@@ -587,8 +587,8 @@ getincludepath(void)
 		if (!e) return 0;
 	} else {
 		e = p;
-		while (*e && isascii((unsigned int)*e)
-		&& !isspace((unsigned int)*e))
+		while (*e && isascii((unsigned char)*e)
+		&& !isspace((unsigned char)*e))
 			e++;
 	}
 
@@ -649,12 +649,12 @@ getcurifdef(void)
 {
 	char *p = yytext, *q;
 
-	while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && !isspace((unsigned char)*p))
 		p++;
-	while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && isspace((unsigned char)*p))
 		p++;
 	q = p;
-	while (*q && isascii((unsigned int)*q) && !isspace((unsigned int)*q))
+	while (*q && isascii((unsigned char)*q) && !isspace((unsigned char)*q))
 		q++;
 	*q = '\0';
 



CVS commit: src/usr.bin/config

2024-08-13 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug 13 10:14:04 UTC 2024

Modified Files:
src/usr.bin/config: scan.l

Log Message:
config: fix ctype(3) argument casts

See CAVEATS.  Doesn't matter here in practice, but that's not an
excuse to set a bad example.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2024-08-10 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Aug 10 19:21:32 UTC 2024

Modified Files:
src/bin/sh: sh.1

Log Message:
sh(1): fix up formatting of syntax examples

.Bd -literal with all lines explicitly formatted (usually with .Ic)
doesn't seem to work too well with mandoc shipped with the heirloom
doctools - the next paragraph after the display remains literal.
Use .Bd -unfilled instead.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/bin/sh/sh.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.262 src/bin/sh/sh.1:1.263
--- src/bin/sh/sh.1:1.262	Sat Jul 13 13:43:58 2024
+++ src/bin/sh/sh.1	Sat Aug 10 19:21:32 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sh.1,v 1.262 2024/07/13 13:43:58 kre Exp $
+.\"	$NetBSD: sh.1,v 1.263 2024/08/10 19:21:32 uwe Exp $
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -1510,12 +1510,12 @@ These commands are instances of compound
 The syntax of the
 .Ic if
 command is
-.Bd -literal -offset indent
+.Bd -unfilled -offset indent
 .Ic if Ar list
 .Ic then Ar list
-.Ic [ elif Ar list
-.Ic then  Ar list ] No ...
-.Ic [ else Ar list ]
+.Oo Ic elif Ar list
+.Ic then  Ar list Oc No ...
+.Op Ic else Ar list
 .Ic fi
 .Ed
 .Pp
@@ -1536,7 +1536,7 @@ reserved word, if any, is executed.
 The syntax of the
 .Ic while
 command is
-.Bd -literal -offset indent
+.Bd -unfilled -offset indent
 .Ic while Ar list
 .Ic do Ar list
 .Ic done
@@ -1555,7 +1555,7 @@ which causes it to repeat until the exit
 The syntax of the
 .Ic for
 command is
-.Bd -literal -offset indent
+.Bd -unfilled -offset indent
 .Ic for Ar variable Op Ic in Ar word No ...
 .Ic do Ar list
 .Ic done
@@ -1586,7 +1586,7 @@ The syntax of the
 and
 .Ic continue
 commands is
-.Bd -literal -offset indent
+.Bd -unfilled -offset indent
 .Ic break Op Ar num
 .Ic continue Op Ar num
 .Ed
@@ -1616,7 +1616,7 @@ If not given, 1 is used.
 The syntax of the
 .Ic case
 command is
-.Bd -literal -offset indent
+.Bd -unfilled -offset indent
 .Ic case Ar word Ic in
 .Oo Ic \&( Oc  Ar pattern Ns Ic \&) Oo Ar list Oc Ic \&;&
 .Oo Ic \&( Oc  Ar pattern Ns Ic \&) Oo Ar list Oc Ic \&;;



CVS commit: src/bin/sh

2024-08-10 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Aug 10 19:21:32 UTC 2024

Modified Files:
src/bin/sh: sh.1

Log Message:
sh(1): fix up formatting of syntax examples

.Bd -literal with all lines explicitly formatted (usually with .Ic)
doesn't seem to work too well with mandoc shipped with the heirloom
doctools - the next paragraph after the display remains literal.
Use .Bd -unfilled instead.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/bin/sh/sh.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/printf

2024-08-06 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug  6 17:23:01 UTC 2024

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
printf(1): misc tweaks

Move the advise about getopt's "--" to where the format is disussed.
Use .Vt for types.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/printf/printf.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.39 src/usr.bin/printf/printf.1:1.40
--- src/usr.bin/printf/printf.1:1.39	Tue Aug  6 17:18:00 2024
+++ src/usr.bin/printf/printf.1	Tue Aug  6 17:23:01 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.39 2024/08/06 17:18:00 uwe Exp $
+.\"	$NetBSD: printf.1,v 1.40 2024/08/06 17:23:01 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -56,13 +56,24 @@ are converted and copied to the standard
 each of which causes printing of the next successive
 .Ar argument  .
 .Pp
+If the first character of
+.Ar format
+is a dash,
+.Ar format
+must be preceded by a word consisting of two dashes
+.Pq Sq Fl Fl
+to prevent it
+from being interpreted as an option string.
+See
+.Xr getopt 3 .
+.Pp
 The
 .Fl L
 option causes all floating point values resulting from format
 conversions to be printed using
-.Em long double
+.Vt long double
 formats, rather than the default
-.Em double .
+.Vt double .
 .Pp
 The
 .Ar arguments
@@ -424,17 +435,6 @@ precision is omitted, all characters in 
 In no case does a non-existent or small field width cause truncation of
 a field; padding takes place only if the specified field width exceeds
 the actual width.
-.Pp
-If the first character of
-.Ar format
-is a dash,
-.Ar format
-must be preceded by a word consisting of two dashes
-.Pq Sq Fl Fl
-to prevent it
-from being interpreted as an option string.
-See
-.Xr getopt 3 .
 .Sh EXIT STATUS
 .Ex -std
 .Sh SEE ALSO



CVS commit: src/usr.bin/printf

2024-08-06 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug  6 17:23:01 UTC 2024

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
printf(1): misc tweaks

Move the advise about getopt's "--" to where the format is disussed.
Use .Vt for types.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/printf/printf.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/printf

2024-08-06 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug  6 17:18:01 UTC 2024

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
printf(1): move \e description to its lexicographic place


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/printf/printf.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.38 src/usr.bin/printf/printf.1:1.39
--- src/usr.bin/printf/printf.1:1.38	Tue Aug  6 14:55:48 2024
+++ src/usr.bin/printf/printf.1	Tue Aug  6 17:18:00 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.38 2024/08/06 14:55:48 kre Exp $
+.\"	$NetBSD: printf.1,v 1.39 2024/08/06 17:18:00 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -92,10 +92,6 @@ Character escape sequences are in backsl
 .St -ansiC .
 The characters and their meanings are as follows:
 .Bl -tag -offset indent -width Cm
-.It Cm \ee
-Write an
-.Aq escape
-character.
 .It Cm \ea
 Write a
 .Aq bell
@@ -104,6 +100,10 @@ character.
 Write a
 .Aq backspace
 character.
+.It Cm \ee
+Write an
+.Aq escape
+character.
 .It Cm \ef
 Write a
 .Aq form-feed



CVS commit: src/usr.bin/printf

2024-08-06 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Aug  6 17:18:01 UTC 2024

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
printf(1): move \e description to its lexicographic place


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/printf/printf.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-08-05 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Aug  5 13:40:51 UTC 2024

Modified Files:
src/share/man/man9: acct_process.9

Log Message:
acct_process(9): fix markup glitches, g/c pasto


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/acct_process.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-08-05 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Aug  5 13:40:51 UTC 2024

Modified Files:
src/share/man/man9: acct_process.9

Log Message:
acct_process(9): fix markup glitches, g/c pasto


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/acct_process.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/acct_process.9
diff -u src/share/man/man9/acct_process.9:1.1 src/share/man/man9/acct_process.9:1.2
--- src/share/man/man9/acct_process.9:1.1	Mon Aug  5 13:02:46 2024
+++ src/share/man/man9/acct_process.9	Mon Aug  5 13:40:51 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: acct_process.9,v 1.1 2024/08/05 13:02:46 christos Exp $
+.\"	$NetBSD: acct_process.9,v 1.2 2024/08/05 13:40:51 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -31,7 +31,7 @@
 .Dt ACCT_PROCESS 9
 .Os
 .Sh NAME
-.Nm acct_process 
+.Nm acct_process
 .Nd populate and write the process accounting record
 .Sh SYNOPSIS
 .In sys/acct.h
@@ -44,7 +44,7 @@ function is called when the process exit
 If accounting is turned off, it returns immediately.
 If accounting is turned on via
 .Xr acct 2 ,
-then the 
+then the
 .Nm
 populates the accounting structure described in
 .Xr acct 5 ,
@@ -52,13 +52,10 @@ then writes the accounting record to the
 .Xr acct 2 .
 .Sh RETURN VALUES
 .Nm
-returns
-.Dv 0
-on success and the same error codes as
+returns 0 on success and the same error codes as
 .Xr vn_rdwr 9
 on failure.
-All three functions return the computed checksum value.
 .Sh SEE ALSO
 .Xr acct 2 ,
 .Xr acct 5 ,
-.Xr vn_rdwr 9.
+.Xr vn_rdwr 9 .



Re: CVS commit: src/share/man/man5

2024-08-04 Thread Valery Ushakov
On Sun, Aug 04, 2024 at 13:18:01 -0400, Christos Zoulas wrote:

> It should say acct_process(9), but we don't have a man page for it
> (yet).

A dangling reference is much better than the current incorrect and
confusing wording.  Please, can you fix it?


> > On Aug 4, 2024, at 1:02 PM, Valery Ushakov  wrote:
> > 
> > On Sat, Aug 03, 2024 at 19:49:06 -0400, Christos Zoulas wrote:
> > 
> >> Modified Files:
> >>src/share/man/man5: acct.5
> >> 
> >> Log Message:
> >> PR/58515: Kouichi Hashikawa: Sync with the header file
> > 
> > I notice that the man page says:
> > 
> > ... If a process terminates, and accounting is enabled, the kernel
> > calls the acct(2) function call to prepare and append the record to the
> > accounting file.
> > 
> > which doesn't make any sense to me, as acct(2) is a syscall that is
> > called by superuser once to enable accounting.  Any ideas what it's
> > meant to be said here?
> > 
> > -uwe

-uwe


CVS commit: src/share/man/man4/man4.mac68k

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 14:59:38 UTC 2024

Modified Files:
src/share/man/man4/man4.mac68k: ascaudio.4

Log Message:
ascaudio(4): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.mac68k/ascaudio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4/man4.mac68k

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 14:59:38 UTC 2024

Modified Files:
src/share/man/man4/man4.mac68k: ascaudio.4

Log Message:
ascaudio(4): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.mac68k/ascaudio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/man4.mac68k/ascaudio.4
diff -u src/share/man/man4/man4.mac68k/ascaudio.4:1.1 src/share/man/man4/man4.mac68k/ascaudio.4:1.2
--- src/share/man/man4/man4.mac68k/ascaudio.4:1.1	Thu Aug  1 13:41:14 2024
+++ src/share/man/man4/man4.mac68k/ascaudio.4	Thu Aug  1 14:59:38 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ascaudio.4,v 1.1 2024/08/01 13:41:14 nat Exp $
+.\"	$NetBSD: ascaudio.4,v 1.2 2024/08/01 14:59:38 uwe Exp $
 .\" Copyright (c) 2024  Nathanial Sloss 
 .\" All rights reserved.
 .\"
@@ -28,12 +28,14 @@
 .Os
 .Sh NAME
 .Nm ascaudio
-.Nd MAC68K Apple Sound Chip (ASC) built-in audio.
+.Nd MAC68K Apple Sound Chip
+.Pq Tn ASC
+built-in audio.
 .Sh SYNOPSIS
-.Cd ascaudio*	at obio? flags 0x00
-.Cd audio*	at audiobus?
-.Cd spkr*	at audio?
-.Cd wsbell*	at spkr?
+.Cd ascaudio* at obio? flags 0x00
+.Cd audio* at audiobus?
+.Cd spkr* at audio?
+.Cd wsbell* at spkr?
 .Sh DESCRIPTION
 .Nm
 provides an audio device for the (Enchanced) Apple Sound Chip.
@@ -49,14 +51,15 @@ for use in
 .Xr config 1
 files:
 .Pp
-.Bl -tag -compact -width "quality:"
-.It  0x0 (DEFQUALTY) :
-22257Hz Monaural playback.
-.It  0x1 (LOWQUALITY) :
+.Bl -tag -offset indent -width Dv
+.It Li 0x0 Pq Dv DEFQUALTY :
+22257\^Hz Monaural playback.
+.It Li 0x1 Pq Dv LOWQUALITY :
 Half playback rate.
 Monoaural, intended for machines with slower clock rates.
-.It 0x2 (HIGHQUALITY) :
-Best Quality supported by ASC.
+.It Li 0x2 Pq Dv HIGHQUALITY :
+Best Quality supported by
+.Tn ASC .
 This would be stereo on equipped machines.
 .El
 .\"



CVS commit: src/share/man/man4

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 09:38:50 UTC 2024

Modified Files:
src/share/man/man4: virtio.4

Log Message:
virtio(4): add viocon to yet another list of devices

While here, add the reference to the VirtIO 1.0 spec.
PR kern/58533


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/virtio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/virtio.4
diff -u src/share/man/man4/virtio.4:1.10 src/share/man/man4/virtio.4:1.11
--- src/share/man/man4/virtio.4:1.10	Thu Aug  1 09:24:31 2024
+++ src/share/man/man4/virtio.4	Thu Aug  1 09:38:50 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: virtio.4,v 1.10 2024/08/01 09:24:31 uwe Exp $
+.\"	$NetBSD: virtio.4,v 1.11 2024/08/01 09:38:50 uwe Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -51,9 +51,12 @@ available to the virtual machine.
 .Nm
 driver itself provides the core infrastructure to communicate
 with the hypervisor (called virtqueues) and supports the following devices:
-.Bl -tag -width x
+.Pp
+.Bl -tag -width Xr -compact
 .It Xr ld 4
 A Disk device.
+.It Xr viocon 4
+Console device.
 .It Xr vioif 4
 An Ethernet device.
 .It Xr viomb 4
@@ -77,6 +80,10 @@ A SCSI adapter.
 .%T Virtio PCI Card Specification
 .%U http://ozlabs.org/~rusty/virtio-spec/
 .Re
+.Rs
+.%T Virtual I/O Device (VIRTIO) Version 1.0
+.%U https://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.html
+.Re
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 09:38:50 UTC 2024

Modified Files:
src/share/man/man4: virtio.4

Log Message:
virtio(4): add viocon to yet another list of devices

While here, add the reference to the VirtIO 1.0 spec.
PR kern/58533


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/virtio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 09:24:31 UTC 2024

Modified Files:
src/share/man/man4: virtio.4

Log Message:
virtio(4): add references to viocon (PR kern/58533)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/virtio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/virtio.4
diff -u src/share/man/man4/virtio.4:1.9 src/share/man/man4/virtio.4:1.10
--- src/share/man/man4/virtio.4:1.9	Thu Jun  7 12:32:26 2018
+++ src/share/man/man4/virtio.4	Thu Aug  1 09:24:31 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: virtio.4,v 1.9 2018/06/07 12:32:26 jakllsch Exp $
+.\"	$NetBSD: virtio.4,v 1.10 2024/08/01 09:24:31 uwe Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -34,6 +34,7 @@
 .Cd "virtio* at fdt?"
 .Cd "virtio* at pci? dev ? function ?"
 .Cd "ld* at virtio?"
+.Cd "viocon* at virtio?"
 .Cd "vioif* at virtio?"
 .Cd "viomb* at virtio?"
 .Cd "viornd* at virtio?"
@@ -65,6 +66,7 @@ A SCSI adapter.
 .Sh SEE ALSO
 .Xr ld 4 ,
 .Xr pci 4 ,
+.Xr viocon 4 ,
 .Xr vioif 4 ,
 .Xr viomb 4 ,
 .Xr viornd 4 ,



CVS commit: src/share/man/man4

2024-08-01 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  1 09:24:31 UTC 2024

Modified Files:
src/share/man/man4: virtio.4

Log Message:
virtio(4): add references to viocon (PR kern/58533)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/virtio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-07-29 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jul 29 14:09:17 UTC 2024

Modified Files:
src/share/man/man4: mainbus.4

Log Message:
mainbus(4): brush up markup, sort SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/mainbus.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/mainbus.4
diff -u src/share/man/man4/mainbus.4:1.7 src/share/man/man4/mainbus.4:1.8
--- src/share/man/man4/mainbus.4:1.7	Mon Jul 29 11:42:48 2024
+++ src/share/man/man4/mainbus.4	Mon Jul 29 14:09:16 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: mainbus.4,v 1.7 2024/07/29 11:42:48 bad Exp $
+.\" $NetBSD: mainbus.4,v 1.8 2024/07/29 14:09:16 uwe Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,16 +32,17 @@
 .Os
 .Sh NAME
 .Nm mainbus
-.Nd pseudo top level "bus"
+.Nd top level pseudo
+.Dq bus
 .Sh SYNOPSIS
-.Cd "mainbus0 at root"
-.Cd "XX   at mainbus0"
+.Cd mainbus0 at root
+.Ar instance Cd at mainbus0
 .Sh DESCRIPTION
 The
 .Nm
 is not a real bus, but serves as the top level device to which other
 busses and drivers attach.
 .Sh SEE ALSO
-.Xr config 1 ,
-.Xr autoconf 9 ,
-.Xr intro 4
+.Xr intro 4 ,
+.Xr config 5 ,
+.Xr autoconf 9 .



CVS commit: src/share/man/man4

2024-07-29 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jul 29 14:09:17 UTC 2024

Modified Files:
src/share/man/man4: mainbus.4

Log Message:
mainbus(4): brush up markup, sort SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/mainbus.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-07-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 27 13:14:04 UTC 2024

Modified Files:
src/share/man/man4: ksyms.4

Log Message:
ksyms(4): untabify one tab missed in previous


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/ksyms.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/ksyms.4
diff -u src/share/man/man4/ksyms.4:1.9 src/share/man/man4/ksyms.4:1.10
--- src/share/man/man4/ksyms.4:1.9	Sat Jul 27 13:13:25 2024
+++ src/share/man/man4/ksyms.4	Sat Jul 27 13:14:04 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: ksyms.4,v 1.9 2024/07/27 13:13:25 uwe Exp $
+.\" $NetBSD: ksyms.4,v 1.10 2024/07/27 13:14:04 uwe Exp $
 .\"
 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -84,7 +84,7 @@ contains the symbol value.
 Returns the complete symbol for the given symbol name.
 .Bd -literal -offset indent
 struct ksyms_gsymbol {
-	const char *kg_name;
+const char *kg_name;
 void *kg_sym;
 };
 .Ed



CVS commit: src/share/man/man4

2024-07-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 27 13:14:04 UTC 2024

Modified Files:
src/share/man/man4: ksyms.4

Log Message:
ksyms(4): untabify one tab missed in previous


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/ksyms.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-07-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 27 13:13:25 UTC 2024

Modified Files:
src/share/man/man4: ksyms.4

Log Message:
ksyms(4): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/ksyms.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/ksyms.4
diff -u src/share/man/man4/ksyms.4:1.8 src/share/man/man4/ksyms.4:1.9
--- src/share/man/man4/ksyms.4:1.8	Sat Jul 27 11:19:30 2024
+++ src/share/man/man4/ksyms.4	Sat Jul 27 13:13:25 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: ksyms.4,v 1.8 2024/07/27 11:19:30 tnn Exp $
+.\" $NetBSD: ksyms.4,v 1.9 2024/07/27 13:13:25 uwe Exp $
 .\"
 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -60,27 +60,27 @@ command codes below are defined in
 The (third) argument to the
 .Xr ioctl 2
 should be a pointer to the type indicated.
-.Bl -tag -width indent -offset indent
-.It Dv KIOCGSIZE (int)
+.Bl -tag -width Dv -offset indent
+.It Dv KIOCGSIZE Pq Vt int
 Returns the total size of the current symbol table.
 This should be used when allocating a buffer to read in the
 whole symbol table to memory.
-.It Dv KIOCGVALUE (struct ksyms_gvalue)
+.It Dv KIOCGVALUE Pq Vt struct ksyms_gvalue
 Returns the value for the given symbol name in a symtab-independent
 fashion.
 .Bd -literal -offset indent
 struct ksyms_gvalue {
-	const char *kv_name;
-	uint64_t kv_value;
+const char *kv_name;
+uint64_t kv_value;
 };
 .Ed
 .Pp
-The struct element
-.Va kv_name
+The struct member
+.Fa kv_name
 should be set to the name of the requested value, and upon return
-.Va kv_value
+.Fa kv_value
 contains the symbol value.
-.It Dv KIOCGSYMBOL (struct ksyms_gsymbol)
+.It Dv KIOCGSYMBOL Pq Vt struct ksyms_gsymbol
 Returns the complete symbol for the given symbol name.
 .Bd -literal -offset indent
 struct ksyms_gsymbol {
@@ -89,17 +89,17 @@ struct ksyms_gsymbol {
 };
 .Ed
 .Pp
-The struct element
-.Va kg_name
+The struct member
+.Fa kg_name
 should be set to the name of the requested symbol, and the found
 symbol will be written to the
-.Va kg_sym
+.Fa kg_sym
 address.
 It is the callers responsibility to ensure that enough space
 for the symbol is allocated.
 .El
 .Sh FILES
-.Bl -tag -width /dev/ksymsX
+.Bl -tag -width Pa
 .It Pa /dev/ksyms
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man4

2024-07-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 27 13:13:25 UTC 2024

Modified Files:
src/share/man/man4: ksyms.4

Log Message:
ksyms(4): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/ksyms.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-07-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul 24 12:48:17 UTC 2024

Modified Files:
src/share/man/man9: crashme.9

Log Message:
crashme(9): brush up markup, reword cn_fn slightly for clarity


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/crashme.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/crashme.9
diff -u src/share/man/man9/crashme.9:1.5 src/share/man/man9/crashme.9:1.6
--- src/share/man/man9/crashme.9:1.5	Sat Dec 11 23:47:53 2021
+++ src/share/man/man9/crashme.9	Wed Jul 24 12:48:17 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: crashme.9,v 1.5 2021/12/11 23:47:53 riastradh Exp $
+.\" $NetBSD: crashme.9,v 1.6 2024/07/24 12:48:17 uwe Exp $
 .\"
 .\" Copyright (c) 2019 Matthew R. Green
 .\" All rights reserved.
@@ -46,20 +46,21 @@ These nodes are simply named callbacks t
 system to crash.
 .Pp
 The crashme functionality is only available in kernels with the
-.Xr options 4
-.Dv DEBUG
-option set.
+.Ic options DEBUG
+set in the kernel
+.Xr config 5
+file.
 .Pp
 Each crashme node is maintained in a
 .Vt crashme_node
 structure which has the following public members:
-.Bd -literal
-typedef int (*crashme_fn)(int);
+.Bd -literal -offset indent
+typedef int (*crashme_fn)(int /* flags */);
 
 typedef struct crashme_node {
-	const char	*cn_name;
-	const char	*cn_longname;
-	crashme_fn	 cn_fn;
+const char *cn_name;
+const char *cn_longname;
+crashme_fn  cn_fn;
 } crashme_node;
 .Ed
 .Pp
@@ -72,17 +73,19 @@ and
 members.
 .Pp
 The
+.Fa cn_fn
+function is passed
 .Ar flags
-parameter is passed from sysctl.
-The return value is 0 upon success or non zero for failure.
+parameter from sysctl.
+It shall return 0 upon success or non zero on failure.
 .Sh SYSCTL SUPPORT
 The following
 .Xr sysctl 8
 variables are provided by the
 .Nm
 subsystem:
-.Bl -tag -width Li
-.It Li debug.crashme_enable
+.Bl -tag -offset indent -width Va
+.It Va debug.crashme_enable
 Must be set to 1 for any
 .Nm
 node to be executed.
@@ -90,28 +93,29 @@ node to be executed.
 .Pp
 The following
 .Xr sysctl 8
-nodes trigger crashes in different ways when written:
-.Bl -tag -width ".Li debug.crashme.null_deref"
-.It Li debug.crashme.panic
+variables trigger crashes in different ways when written to:
+.Bl -tag -offset indent -width Va
+.It Va debug.crashme.panic
 Call
 .Xr panic 9 .
-.It Li debug.crashme.null_deref
+.It Va debug.crashme.null_deref
 Dereference a null pointer.
-.It Li debug.crashme.null_jump
+.It Va debug.crashme.null_jump
 Call a null function pointer, i.e., jump to the instruction address
 zero.
-.It Li debug.crashme.ddb
+.It Va debug.crashme.ddb
 Enter
-.Xr ddb 9
+.Xr ddb 4
 directly by calling
-.Xr Debugger 9 .
+.Fn Debugger .
 Requires
-.Xr options 4
-.Dv DDB .
+.Ic options DDB .
 .El
 .Sh SEE ALSO
+.Xr ddb 4 ,
 .Xr options 4 ,
-.Xr panic 9
+.Xr sysctl 8 ,
+.Xr panic 9 .
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man9

2024-07-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul 24 12:48:17 UTC 2024

Modified Files:
src/share/man/man9: crashme.9

Log Message:
crashme(9): brush up markup, reword cn_fn slightly for clarity


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/crashme.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/mount_null

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 15:53:43 UTC 2024

Modified Files:
src/sbin/mount_null: mount_null.8

Log Message:
mount_null(8): tweak previous

Make the wording in the example less ambiguous.
While here, g/c accidental blank like in input.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/mount_null/mount_null.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/mount_null/mount_null.8
diff -u src/sbin/mount_null/mount_null.8:1.23 src/sbin/mount_null/mount_null.8:1.24
--- src/sbin/mount_null/mount_null.8:1.23	Tue Jul 23 15:06:31 2024
+++ src/sbin/mount_null/mount_null.8	Tue Jul 23 15:53:43 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_null.8,v 1.23 2024/07/23 15:06:31 uwe Exp $
+.\"	$NetBSD: mount_null.8,v 1.24 2024/07/23 15:53:43 uwe Exp $
 .\"
 .\" Copyright (c) 1992, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -231,10 +231,11 @@ The disadvantage is that vnode arguments
 Expose
 .Nx
 source tree under
+.Pa /export/netbsd/src
+as
 .Pa /usr/src
-in read-only mode to prevent polluting the sources with accidental
+but in read-only mode to prevent polluting the sources with accidental
 writes:
-
 .Pp
 .Dl mount -t null -o ro /export/netbsd/src /usr/src
 .\"



CVS commit: src/sbin/mount_null

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 15:53:43 UTC 2024

Modified Files:
src/sbin/mount_null: mount_null.8

Log Message:
mount_null(8): tweak previous

Make the wording in the example less ambiguous.
While here, g/c accidental blank like in input.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/mount_null/mount_null.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/mount_null

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 15:06:31 UTC 2024

Modified Files:
src/sbin/mount_null: mount_null.8

Log Message:
mount_null(8): brush up markup, add read-only /usr/src example

TODO: the source code references probably need to be updated!


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sbin/mount_null/mount_null.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/mount_null

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 15:06:31 UTC 2024

Modified Files:
src/sbin/mount_null: mount_null.8

Log Message:
mount_null(8): brush up markup, add read-only /usr/src example

TODO: the source code references probably need to be updated!


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sbin/mount_null/mount_null.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/mount_null/mount_null.8
diff -u src/sbin/mount_null/mount_null.8:1.22 src/sbin/mount_null/mount_null.8:1.23
--- src/sbin/mount_null/mount_null.8:1.22	Tue Dec  1 02:43:18 2020
+++ src/sbin/mount_null/mount_null.8	Tue Jul 23 15:06:31 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_null.8,v 1.22 2020/12/01 02:43:18 pgoyette Exp $
+.\"	$NetBSD: mount_null.8,v 1.23 2024/07/23 15:06:31 uwe Exp $
 .\"
 .\" Copyright (c) 1992, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -68,9 +68,7 @@ The
 filesystem differs from a traditional
 loopback file system in two respects: it is implemented using
 a stackable layers technique, and its
-.Do
-null-nodes
-.Dc
+.Dq null-nodes
 stack above
 all lower-layer vnodes (not just above directory vnodes).
 .Pp
@@ -81,7 +79,7 @@ and
 are converted to absolute paths before use.
 .Pp
 The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width Fl
 .It Fl o
 Options are specified with a
 .Fl o
@@ -131,20 +129,20 @@ in the arguments and, if a vnode is retu
 stacks a null-node on top of the returned vnode.
 .Pp
 Although bypass handles most operations,
-.Em vop_getattr ,
-.Em vop_inactive ,
-.Em vop_reclaim ,
+.Fa vop_getattr ,
+.Fa vop_inactive ,
+.Fa vop_reclaim ,
 and
-.Em vop_print
+.Fa vop_print
 are not bypassed.
-.Em vop_getattr
+.Fa vop_getattr
 must change the fsid being returned.
-.Em vop_inactive
+.Fa vop_inactive
 and
-.Em vop_reclaim
+.Fa vop_reclaim
 are not bypassed so that
 they can handle freeing null-layer specific data.
-.Em vop_print
+.Fa vop_print
 is not bypassed to avoid excessive debugging
 information.
 .\"
@@ -167,20 +165,23 @@ The bypass routine stacks a null-node ab
 vnode before returning it to the caller.
 .Pp
 For example, imagine mounting a null layer with
-.Bd -literal -offset indent
-mount_null /usr/include /dev/layer/null
-.Ed
+.Pp
+.Dl mount_null /usr/include /dev/layer/null
+.Pp
 Changing directory to
 .Pa /dev/layer/null
 will assign
 the root null-node (which was created when the null layer was mounted).
 Now consider opening
 .Pa sys .
-A vop_lookup would be done on the root null-node.
+A
+.Fa vop_lookup
+would be done on the root null-node.
 This operation would bypass through to the lower layer
 which would return a vnode representing the UFS
 .Pa sys .
-null_bypass then builds a null-node aliasing the UFS
+.Fn null_bypass
+then builds a null-node aliasing the UFS
 .Pa sys
 and returns this to the caller.
 Later operations on the null-node
@@ -204,7 +205,9 @@ There are two techniques to invoke opera
 when the operation cannot be completely bypassed.
 Each method is appropriate in different situations.
 In both cases, it is the responsibility of the aliasing layer to make
-the operation arguments "correct" for the lower layer
+the operation arguments
+.Dq correct
+for the lower layer
 by mapping any vnode arguments to the lower layer.
 .Pp
 The first approach is to call the aliasing layer's bypass routine.
@@ -212,18 +215,30 @@ This method is most suitable when you wi
 currently being handled on the lower layer.
 It has the advantage that the bypass routine already must do argument mapping.
 An example of this is
-.Em null_getattrs
+.Fn null_getattrs
 in the null layer.
 .Pp
 A second approach is to directly invoke vnode operations on
 the lower layer with the
-.Em VOP_OPERATIONNAME
+.Xr vnodeops 9
 interface.
 The advantage of this method is that it is easy to invoke
 arbitrary operations on the lower layer.
 The disadvantage is that vnode arguments must be manually mapped.
 .\"
 .\"
+.Sh EXAMPLES
+Expose
+.Nx
+source tree under
+.Pa /usr/src
+in read-only mode to prevent polluting the sources with accidental
+writes:
+
+.Pp
+.Dl mount -t null -o ro /export/netbsd/src /usr/src
+.\"
+.\"
 .Sh SEE ALSO
 .Xr mount 8
 .Pp



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 10:17:32 UTC 2024

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c

Log Message:
ld.elf_so: Cite reference for PowerPC ELF relocations

PR lib/58455: Missing references for processor-specific ELF
relocation semantics


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.63 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.64
--- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.63	Sun Jun  4 01:24:57 2023
+++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	Tue Jul 23 10:17:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppc_reloc.c,v 1.63 2023/06/04 01:24:57 joerg Exp $	*/
+/*	$NetBSD: ppc_reloc.c,v 1.64 2024/07/23 10:17:32 uwe Exp $	*/
 
 /*-
  * Copyright (C) 1998	Tsubai Masanari
@@ -28,9 +28,22 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * Power ELF relocations.
+ *
+ * Reference:
+ *
+ *	Power Architecture(R) 32-bit
+ *	Application Binary Interface Supplement 1.0 - Linux(R)
+ *	http://web.archive.org/web/20120608163845/https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Linux.pdf
+ *
+ *	64-bit PowerPC ELF Application Binary Interface Supplement 1.9
+ *	https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.pdf
+ */
+
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ppc_reloc.c,v 1.63 2023/06/04 01:24:57 joerg Exp $");
+__RCSID("$NetBSD: ppc_reloc.c,v 1.64 2024/07/23 10:17:32 uwe Exp $");
 #endif /* not lint */
 
 #include 



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 10:17:32 UTC 2024

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c

Log Message:
ld.elf_so: Cite reference for PowerPC ELF relocations

PR lib/58455: Missing references for processor-specific ELF
relocation semantics


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/libexec/ld.elf_so/arch

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 09:55:19 UTC 2024

Modified Files:
src/libexec/ld.elf_so/arch/sparc: mdreloc.c
src/libexec/ld.elf_so/arch/sparc64: mdreloc.c

Log Message:
ld.elf_so: Cite reference for SPARC ELF relocations

PR lib/58455: Missing references for processor-specific ELF
relocation semantics


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/libexec/ld.elf_so/arch/sparc/mdreloc.c
cvs rdiff -u -r1.70 -r1.71 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/libexec/ld.elf_so/arch/sh3

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 09:27:00 UTC 2024

Modified Files:
src/libexec/ld.elf_so/arch/sh3: mdreloc.c

Log Message:
ld.elf_so: Cite reference for SuperH ELF relocations

PR lib/58455: Missing references for processor-specific ELF
relocation semantics


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/libexec/ld.elf_so/arch/sh3/mdreloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/arch/sh3/mdreloc.c
diff -u src/libexec/ld.elf_so/arch/sh3/mdreloc.c:1.36 src/libexec/ld.elf_so/arch/sh3/mdreloc.c:1.37
--- src/libexec/ld.elf_so/arch/sh3/mdreloc.c:1.36	Sun Jun  4 01:24:58 2023
+++ src/libexec/ld.elf_so/arch/sh3/mdreloc.c	Tue Jul 23 09:27:00 2024
@@ -1,10 +1,19 @@
-/*	$NetBSD: mdreloc.c,v 1.36 2023/06/04 01:24:58 joerg Exp $	*/
+/*	$NetBSD: mdreloc.c,v 1.37 2024/07/23 09:27:00 uwe Exp $	*/
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.36 2023/06/04 01:24:58 joerg Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.37 2024/07/23 09:27:00 uwe Exp $");
 #endif /* not lint */
 
+/*
+ * SuperH ELF relocations.
+ *
+ * Reference:
+ *
+ *	[RM0197] SH-4 generic and C specific application binary interface
+ *	https://www.st.com/resource/en/reference_manual/rm0197-sh4-generic-and-c-specific-application-binary-interface-stmicroelectronics.pdf
+ */
+
 #include 
 #include 
 



CVS commit: src/libexec/ld.elf_so/arch/sh3

2024-07-23 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 23 09:27:00 UTC 2024

Modified Files:
src/libexec/ld.elf_so/arch/sh3: mdreloc.c

Log Message:
ld.elf_so: Cite reference for SuperH ELF relocations

PR lib/58455: Missing references for processor-specific ELF
relocation semantics


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/libexec/ld.elf_so/arch/sh3/mdreloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/sys

2024-07-20 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 20 13:12:19 UTC 2024

Modified Files:
src/lib/libc/sys: link.2

Log Message:
link(2): links to directories are refused at the VFS level

Drop the condition that "the caller is the super-user and the file
system ... supports linking to directories."

>From nabijaczleweli.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/link.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/link.2
diff -u src/lib/libc/sys/link.2:1.33 src/lib/libc/sys/link.2:1.34
--- src/lib/libc/sys/link.2:1.33	Sun Sep  1 19:52:32 2019
+++ src/lib/libc/sys/link.2	Sat Jul 20 13:12:19 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: link.2,v 1.33 2019/09/01 19:52:32 sevan Exp $
+.\"	$NetBSD: link.2,v 1.34 2024/07/20 13:12:19 uwe Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 2011
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)link.2	8.3 (Berkeley) 1/12/94
 .\"
-.Dd September 1, 2019
+.Dd July 20, 2024
 .Dt LINK 2
 .Os
 .Sh NAME
@@ -78,8 +78,7 @@ and
 .Fa name2
 must be in the same file system.
 .Fa name1
-may not be a directory unless the caller is the super-user
-and the file system containing it supports linking to directories.
+may not be a directory.
 .Pp
 .Fn linkat
 works the same way as
@@ -188,11 +187,7 @@ does not support links.
 .It Bq Er EPERM
 The file named by
 .Fa name1
-is a directory and the effective
-user ID is not super-user,
-or the file system containing the file does not permit the use of
-.Fn link
-on a directory.
+is a directory.
 .It Bq Er EROFS
 The requested link requires writing in a directory on a read-only file
 system.



CVS commit: src/lib/libc/sys

2024-07-20 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Jul 20 13:12:19 UTC 2024

Modified Files:
src/lib/libc/sys: link.2

Log Message:
link(2): links to directories are refused at the VFS level

Drop the condition that "the caller is the super-user and the file
system ... supports linking to directories."

>From nabijaczleweli.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/link.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2024-07-17 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul 17 07:11:57 UTC 2024

Modified Files:
src/lib/libc/arch/sh3/gen: setjmp.S sigsetjmp.S
src/tests/lib/libc/setjmp: t_sigstack.c

Log Message:
sh3: siglongjmp - restore register context first (PR lib/57946)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/sh3/gen/setjmp.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/sh3/gen/sigsetjmp.S
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libc/setjmp/t_sigstack.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2024-07-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 16 16:48:54 UTC 2024

Modified Files:
src/sys/uvm: uvm_map.c

Log Message:
uvm_findspace_invariants: don't repeat the message three times

The topdown and bottomup messages were exactly the same and sh3 printf
hack added the third copy.  Restructure the code so that there's only
one message and make the message more obvious - the topdown condition
in the assertions was confusing b/c it's inverted (!topdown || ...
means it's the topdown map).

PR 51254


To generate a diff of this commit:
cvs rdiff -u -r1.412 -r1.413 src/sys/uvm/uvm_map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.412 src/sys/uvm/uvm_map.c:1.413
--- src/sys/uvm/uvm_map.c:1.412	Mon Jul 15 12:51:50 2024
+++ src/sys/uvm/uvm_map.c	Tue Jul 16 16:48:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.412 2024/07/15 12:51:50 riastradh Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.413 2024/07/16 16:48:54 uwe Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.412 2024/07/15 12:51:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.413 2024/07/16 16:48:54 uwe Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -1776,32 +1776,30 @@ uvm_findspace_invariants(struct vm_map *
 vaddr_t hint, struct vm_map_entry *entry, int line)
 {
 	const int topdown = map->flags & VM_MAP_TOPDOWN;
+	const int hint_location_ok =
+		topdown ? hint <= orig_hint
+			: hint >= orig_hint;
+
+#if !(defined(__sh3__) && defined(DIAGNOSTIC)) /* XXXRO: kern/51254 */
+#define UVM_FINDSPACE_KASSERTMSG KASSERTMSG
+
+#else  /* sh3 && DIAGNOSTIC */
+/* like KASSERTMSG but make it not fatal */
+#define UVM_FINDSPACE_KASSERTMSG(e, msg, ...)			\
+		(__predict_true((e)) ? (void)0 :		\
+		printf(__KASSERTSTR msg "\n",		\
+			"weak diagnostic ", #e,			\
+			__FILE__, __LINE__, ## __VA_ARGS__))
+#endif
 
-	KASSERTMSG( topdown || hint >= orig_hint,
-	"map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
-	" length=%#"PRIxVSIZE" uobj=%p uoffset=%#llx align=%"PRIxVSIZE
-	" flags=%#x entry=%p (uvm_map_findspace line %d)",
-	map, hint, orig_hint,
-	length, uobj, (unsigned long long)uoffset, align,
-	flags, entry, line);
-#ifndef __sh3__ /* XXXRO: kern/51254 */
-	KASSERTMSG(!topdown || hint <= orig_hint,
-	"map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
-	" length=%#"PRIxVSIZE" uobj=%p uoffset=%#llx align=%"PRIxVSIZE
+	UVM_FINDSPACE_KASSERTMSG(hint_location_ok,
+	"%s map=%p hint=%#" PRIxVADDR " %s orig_hint=%#" PRIxVADDR
+	" length=%#" PRIxVSIZE " uobj=%p uoffset=%#llx align=%" PRIxVSIZE
 	" flags=%#x entry=%p (uvm_map_findspace line %d)",
-	map, hint, orig_hint,
+	topdown ? "topdown" : "bottomup",
+	map, hint, topdown ? ">" : "<", orig_hint,
 	length, uobj, (unsigned long long)uoffset, align,
 	flags, entry, line);
-#else
-	if (__predict_false(!(!topdown || hint <= orig_hint)))
-		printf("map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
-		" length=%#"PRIxVSIZE" uobj=%p"
-		" uoffset=%#llx align=%"PRIxVSIZE
-		" flags=%#x entry=%p (uvm_map_findspace line %d)\n",
-		map, hint, orig_hint,
-		length, uobj, (unsigned long long)uoffset, align,
-		flags, entry, line);
-#endif
 }
 
 /*



CVS commit: src/libexec/getty

2024-07-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jul  4 15:50:22 UTC 2024

Modified Files:
src/libexec/getty: ttys.5

Log Message:
ttys(5): revert duplicate description of kill -HUP

The old one should be easier to see now.
ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/libexec/getty/ttys.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/getty/ttys.5
diff -u src/libexec/getty/ttys.5:1.22 src/libexec/getty/ttys.5:1.23
--- src/libexec/getty/ttys.5:1.22	Wed Jul  3 15:19:54 2024
+++ src/libexec/getty/ttys.5	Thu Jul  4 15:50:22 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ttys.5,v 1.22 2024/07/03 15:19:54 uwe Exp $
+.\"	$NetBSD: ttys.5,v 1.23 2024/07/04 15:50:22 uwe Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -42,13 +42,7 @@ contains information that is used by var
 and control the use of terminal special files.
 This information is read with the
 .Xr getttyent 3
-library routines, and is used by
-.Xr init 8 ,
-which can be notified of changes to
-.Nm
-by:
-.Pp
-.Dl kill -HUP 1
+library routines.
 .Pp
 There is one line in the
 .Nm



CVS commit: src/libexec/getty

2024-07-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jul  4 15:50:22 UTC 2024

Modified Files:
src/libexec/getty: ttys.5

Log Message:
ttys(5): revert duplicate description of kill -HUP

The old one should be easier to see now.
ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/libexec/getty/ttys.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/libexec/getty

2024-07-03 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul  3 15:19:54 UTC 2024

Modified Files:
src/libexec/getty: ttys.5

Log Message:
ttys(5): touch up markup

Make the original SIGHUP example at the end of the text more visible
by using a display to show it.  I will let riastradh@ decide how he
wants to deal with that duplicate.  The one at the end also mentions
ttyflags(8) which refers to the flags documented in this manpage, so
it's a bit awkward to move that paragraph to the beginning of the
page.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/libexec/getty/ttys.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/libexec/getty

2024-07-03 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul  3 15:19:54 UTC 2024

Modified Files:
src/libexec/getty: ttys.5

Log Message:
ttys(5): touch up markup

Make the original SIGHUP example at the end of the text more visible
by using a display to show it.  I will let riastradh@ decide how he
wants to deal with that duplicate.  The one at the end also mentions
ttyflags(8) which refers to the flags documented in this manpage, so
it's a bit awkward to move that paragraph to the beginning of the
page.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/libexec/getty/ttys.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/getty/ttys.5
diff -u src/libexec/getty/ttys.5:1.21 src/libexec/getty/ttys.5:1.22
--- src/libexec/getty/ttys.5:1.21	Wed Jul  3 14:15:21 2024
+++ src/libexec/getty/ttys.5	Wed Jul  3 15:19:54 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ttys.5,v 1.21 2024/07/03 14:15:21 riastradh Exp $
+.\"	$NetBSD: ttys.5,v 1.22 2024/07/03 15:19:54 uwe Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -47,6 +47,7 @@ library routines, and is used by
 which can be notified of changes to
 .Nm
 by:
+.Pp
 .Dl kill -HUP 1
 .Pp
 There is one line in the
@@ -54,14 +55,18 @@ There is one line in the
 file per special device file.
 Fields are separated by tabs and/or spaces.
 Fields comprising more than one word should be enclosed in double
-quotes (``"'').
+quotes
+.Pq Ql \*q .
 Blank lines and comments may appear anywhere in the file; comments
-are delimited by hash marks (``#'') and new lines.
+are delimited by hash marks
+.Pq Ql #
+and new lines.
 Any unspecified fields will default to null.
 .Pp
 Each line in
 .Nm
 has the format:
+.Pp
 .Dl tty command type flags
 .Pp
 The first field is the
@@ -84,7 +89,7 @@ tty line, normally the one found in the
 .Xr terminfo 5
 data base file.
 The environment variable
-.Dv TERM
+.Ev TERM
 is initialized with the value by either
 .Xr getty 8
 or
@@ -92,24 +97,29 @@ or
 .Pp
 The remaining fields set flags in the
 .Fa ty_status
-entry (see
-.Xr getttyent 3 )
+entry
+.Pq see Xr getttyent 3
 or specify a window system process that
 .Xr init 8
 will maintain for the terminal line
-or a key into a database of tty attributes (currently unused).
-.Pp
-.Bl -tag -width softcar
-.It Sy on No or Sy off
+or a key into a database of tty attributes
+.Pq currently unused .
+.Bl -tag -offset indent -width Ic
+.\"
+.It Ic on No or Ic off
 .Xr init 8
-should (or should not) execute the command given in the second field.
-.It Sy secure
+should
+.Pq or should not
+execute the command given in the second field.
+.\"
+.It Ic secure
 If
-.Sy on
+.Ic on
 is specified, allows users with a uid of 0
 .Pq e.g. Qq root
 to login on this line.
-.It Sy local
+.\"
+.It Ic local
 Sets the
 .Dv TIOCFLAG_CLOCAL
 .Xr tty 4
@@ -119,49 +129,57 @@ This will cause the
 .Dv CLOCAL
 flag to be set on every open and thus modem control signal lines will be
 ignored by default.
-.It Sy softcar
-Causes the driver to ignore hardware carrier on the line (by setting the
+.\"
+.It Ic softcar
+Causes the driver to ignore hardware carrier on the line
+.Po
+by setting the
 .Dv TIOCFLAG_SOFTCAR
 .Xr tty 4
-flag).
-.It Sy rtscts
+flag
+.Pc .
+.\"
+.It Ic rtscts
 Sets the
 .Dv TIOCFLAG_CRTSCTS
 .Xr tty 4
 flag for the device to enable
-.Tn RTS /
-.Tn CTS
-.Qq hardware
+.Tn RTS Ns / Ns Tn CTS
+.Dq hardware
 flow control by default.
-.It Sy mdmbuf
+.\"
+.It Ic mdmbuf
 Sets the
 .Dv TIOCFLAG_MDMBUF
 .Xr tty 4
 flag for the device to enable
-.Tn DTR /
-.Tn DCD
-.Qq hardware
+.Tn DTR Ns / Ns Tn DCD
+.Dq hardware
 flow control by default.
 .El
 .Pp
 The flags
-.Qq local ,
-.Qq rtscts ,
-.Qq mdmbuf ,
+.Ic local ,
+.Ic rtscts ,
+.Ic mdmbuf ,
 and
-.Qq softcar
+.Ic softcar
 modify the default behaviour of the terminal line, and their actions
 are device driver dependent.
 These flag fields should not be quoted.
 .Pp
-The string ``window='' may be followed by a quoted command
+The string
+.Ql window=
+may be followed by a quoted command
 string which
 .Xr init 8
 will execute
 .Em before
 starting the command specified by the second field.
 .Pp
-The string ``class='' may be followed by a quoted string used
+The string
+.Ql class=
+may be followed by a quoted string used
 as a key into a database of attributes for that category of tty.
 See
 .Xr getttynam 3
@@ -174,7 +192,9 @@ file a
 signal can be sent to
 .Xr init 8
 with the command
-.Dq Li "kill \-s HUP 1" .
+.Pp
+.Dl kill -s HUP 1
+.Pp
 On receipt of this signal,
 .Xr init 8
 will re-read the
@@ -183,7 +203,7 @@ file and spawn any necessary
 .Xr getty 8
 processes.
 .Pp
-.Sy Nota Bene :
+.Sy NB :
 Sending
 .Dv SIGHUP
 to
@@ -196,24 +216,24 @@ device flags listed above; the
 .Xr ttyflags 8
 program must be run for changes in those flags to take effect on the devices.
 .Sh FILES
-.Bl -tag -width /et

CVS commit: src/external/historical/nawk/bin

2024-06-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 23:30:06 UTC 2024

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
awk(1): properly markup \n backreferences


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/historical/nawk/bin/awk.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/historical/nawk/bin/awk.1
diff -u src/external/historical/nawk/bin/awk.1:1.32 src/external/historical/nawk/bin/awk.1:1.33
--- src/external/historical/nawk/bin/awk.1:1.32	Tue Jul  5 22:50:43 2022
+++ src/external/historical/nawk/bin/awk.1	Wed Jun 19 23:30:06 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: awk.1,v 1.32 2022/07/05 22:50:43 uwe Exp $
+.\"	$NetBSD: awk.1,v 1.33 2024/06/19 23:30:06 uwe Exp $
 .\"
 .\" Copyright (C) Lucent Technologies 1997
 .\" All Rights Reserved
@@ -438,7 +438,7 @@ is used instead.
 .\"Within the replacement text
 .\".Ar s ,
 .\"the sequence
-.\".Ar \en ,
+.\".Sq Li \e Ns Ar n ,
 .\"where
 .\".Ar n
 .\"is a digit from 1 to 9, may be used to indicate just the text that
@@ -458,8 +458,8 @@ and the original target is
 .Em not
 changed.
 Note that the
-.Ql \en
-sequences within replacement string
+.Sq Li \e Ns Ar n
+sequences (backreferences) within replacement string
 .Ar s
 supported by GNU
 .Nm



CVS commit: src/external/historical/nawk/bin

2024-06-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 23:30:06 UTC 2024

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
awk(1): properly markup \n backreferences


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/historical/nawk/bin/awk.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/rpcgen

2024-06-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jun 17 01:28:31 UTC 2024

Modified Files:
src/usr.bin/rpcgen: rpcgen.1

Log Message:
rpcgen(1): brush up markup a bit


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/rpcgen/rpcgen.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/rpcgen/rpcgen.1
diff -u src/usr.bin/rpcgen/rpcgen.1:1.25 src/usr.bin/rpcgen/rpcgen.1:1.26
--- src/usr.bin/rpcgen/rpcgen.1:1.25	Sun Jun 16 22:21:57 2024
+++ src/usr.bin/rpcgen/rpcgen.1	Mon Jun 17 01:28:31 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rpcgen.1,v 1.25 2024/06/16 22:21:57 rillig Exp $
+.\"	$NetBSD: rpcgen.1,v 1.26 2024/06/17 01:28:31 uwe Exp $
 .\" from: @(#)rpcgen.new.1	1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89
 .\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved.
 .Dd December 14, 2013
@@ -12,7 +12,7 @@
 .Ar infile
 .Nm
 .Op Fl AaBbILMNTv
-.Op Fl D Ar name Op =value
+.Op Fl D Ar name Ns Op Li = Ns Ar value
 .Op Fl i Ar size
 .Op Fl K Ar secs
 .Op Fl Y Ar pathname
@@ -23,9 +23,9 @@
 .Fl l Li |
 .Fl m Li |
 .Fl t Li |
-.Fl S\&c Li |
-.Fl S\&s
-.\" .Fl S\&m
+.Fl \&Sc Li |
+.Fl \&Ss
+.\" .Fl \&Sm
 .Op Fl o Ar outfile
 .Op Ar infile
 .Nm
@@ -72,14 +72,14 @@ it will also generate the
 dispatch table in
 .Pa proto_tbl.i .
 With the
-.Fl S\&c
+.Fl \&Sc
 option,
 it will also generate sample code which would illustrate how to use the
 remote procedures on the client side.
 This code would be created in
 .Pa proto_client.c .
 With the
-.Fl S\&s
+.Fl \&Ss
 option,
 it will also generate a sample server code which would illustrate how to write
 the remote procedures.
@@ -87,10 +87,12 @@ This code would be created in
 .Pa proto_server.c .
 .Pp
 The server created can be started both by the port monitors
-(for example,
-.Em inetd
+.Po
+for example,
+.Xr inetd 8
 or
-.Em listen )
+.Xr listen 1M		\" sic! System V
+.Pc
 or by itself.
 When it is started by a port monitor,
 it creates servers only for the transport for which
@@ -114,7 +116,7 @@ file.
 the transports are chosen at run time and not at compile time.
 When the server is self-started,
 it backgrounds itself by default.
-A special define symbol
+A special preprocessor symbol
 .Dv RPC_SVC_FG
 can be used to run the server process in foreground.
 .Pp
@@ -123,7 +125,7 @@ for the creation of more sophisticated
 .Tn RPC
 servers.
 These features include support for user provided
-.Li #defines
+.Li #define Ns s
 and
 .Tn RPC
 dispatch tables.
@@ -131,12 +133,14 @@ The entries in the
 .Tn RPC
 dispatch table contain:
 .Pp
+.\" XXX: uwe: -dash has too much space after the dash and causes the
+.\" first item to exceed the page width in text mode.
 .Bl -inset -offset indent -compact
-.It +
+.It -
 pointers to the service routine corresponding to that procedure,
-.It +
+.It -
 a pointer to the input and output arguments,
-.It +
+.It -
 the size of these routines
 .El
 .Pp
@@ -164,7 +168,7 @@ executed with the
 .Fl n
 option,
 it creates a server for the transport specified by
-.Em netid .
+.Ar netid .
 If
 .Ar infile
 is not specified,
@@ -180,7 +184,7 @@ For each type of output file,
 defines a special preprocessor symbol for use by the
 .Nm
 programmer:
-.Bl -tag -width RPC_CLNT
+.Bl -tag -offset indent -width Dv
 .It Dv RPC_HDR
 defined when compiling into header files
 .It Dv RPC_XDR
@@ -198,7 +202,7 @@ dispatch tables
 .El
 .Pp
 Any line beginning with
-.Sq %
+.Ql %
 is passed directly into the output file,
 uninterpreted by
 .Nm .
@@ -208,7 +212,7 @@ For every data type referred to in
 .Nm
 assumes that there exists a
 routine with the string
-.Dq xdr_
+.Ql xdr_
 prepended to the name of the data type.
 If this routine does not exist in the
 .Tn RPC/XDR
@@ -218,7 +222,7 @@ allows customization of
 .Tn XDR
 routines.
 .Sh OPTIONS
-.Bl -tag -width indent
+.Bl -tag -width Fl
 .It Fl A
 Generate an
 .Fn svc_caller
@@ -226,16 +230,24 @@ function.
 .It Fl a
 Generate all the files including sample code for client and server side.
 .It Fl B
-Generate BSD cplusplus macros (__BEGIN_DECLS, __END_DECLS).
+Generate BSD cplusplus macros
+.Pq Dv __BEGIN_DECLS , Dv __END_DECLS .
 .It Fl b
-Compile stubs in "backwards compatible" mode, disabling support for
+Compile stubs in
+.Dq backwards compatible
+mode, disabling support for
 transport-independent RPC.
+.Bd -filled -offset indent
+.Em Note :
 The
 .Fl b
-should always be specified when generating files for
+should
+.Em always
+be specified when generating files for
 .Nx ,
 since there is no transport-independent RPC support in
 .Nx .
+.Ed
 .It Fl c
 Compile into
 .Tn XDR
@@ -244,12 +256,12 @@ routines.
 Define a symbol
 .Dv name .
 Equivalent to the
-.Dv #define
+.Li #define
 directive in the source.
 If no
-.Dv value
+.Ar value
 is given,
-.Dv value
+.Ar value
 is defined as 1.
 This option may be specified more than once.
 .It Fl h
@@ -284,16 +296,16 @@ That interval can be chang

CVS commit: src/usr.bin/rpcgen

2024-06-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jun 17 01:28:31 UTC 2024

Modified Files:
src/usr.bin/rpcgen: rpcgen.1

Log Message:
rpcgen(1): brush up markup a bit


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/rpcgen/rpcgen.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-06-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Jun 14 14:36:32 UTC 2024

Modified Files:
src/share/man/man9: uvm_obj_wirepages.9

Log Message:
uvm_obj_wirepages(9): fix a couple of markup glitches


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/uvm_obj_wirepages.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/uvm_obj_wirepages.9
diff -u src/share/man/man9/uvm_obj_wirepages.9:1.1 src/share/man/man9/uvm_obj_wirepages.9:1.2
--- src/share/man/man9/uvm_obj_wirepages.9:1.1	Fri Jun 14 13:19:35 2024
+++ src/share/man/man9/uvm_obj_wirepages.9	Fri Jun 14 14:36:32 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: uvm_obj_wirepages.9,v 1.1 2024/06/14 13:19:35 riastradh Exp $
+.\"	$NetBSD: uvm_obj_wirepages.9,v 1.2 2024/06/14 14:36:32 uwe Exp $
 .\"
 .\" Copyright (c) 2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,9 +53,9 @@ the pages in the range will not be paged
 If
 .Fa list
 is nonnull, it is initialized to a tailq of pages linked through the
-.Dv pageq.queue
+.Fa pageq.queue
 member of
-.Dt struct vm_page ,
+.Vt struct vm_page ,
 for the convenience of the caller.
 The caller is not transferred ownership of any part of
 .Fa list



CVS commit: src/share/man/man9

2024-06-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Jun 14 14:36:32 UTC 2024

Modified Files:
src/share/man/man9: uvm_obj_wirepages.9

Log Message:
uvm_obj_wirepages(9): fix a couple of markup glitches


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/uvm_obj_wirepages.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2024-06-05 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun  5 16:09:59 UTC 2024

Modified Files:
src/tests/lib/libcurses/tests: curs_set

Log Message:
adjust initial cursor state to reflect reality

Missed in PR bin/58090
Fixes PR lib/58313


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/curs_set

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/tests/curs_set
diff -u src/tests/lib/libcurses/tests/curs_set:1.1 src/tests/lib/libcurses/tests/curs_set:1.2
--- src/tests/lib/libcurses/tests/curs_set:1.1	Sun Apr 10 09:55:10 2011
+++ src/tests/lib/libcurses/tests/curs_set	Wed Jun  5 16:09:59 2024
@@ -1,5 +1,5 @@
 include start
-call 2 curs_set 0
+call 1 curs_set 0
 compare curs_set1.chk
 call 0 curs_set 1
 compare curs_set2.chk



CVS commit: src/tests/lib/libcurses/tests

2024-06-05 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun  5 16:09:59 UTC 2024

Modified Files:
src/tests/lib/libcurses/tests: curs_set

Log Message:
adjust initial cursor state to reflect reality

Missed in PR bin/58090
Fixes PR lib/58313


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/curs_set

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2024-05-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon May 27 14:30:43 UTC 2024

Modified Files:
src/lib/libcurses: screen.c

Log Message:
curses: init old_mode to 1 (normal visible cursor)

PR bin/58090: Ctrl-Z, fg makes blinking cursor in vi
ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libcurses/screen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/screen.c
diff -u src/lib/libcurses/screen.c:1.38 src/lib/libcurses/screen.c:1.39
--- src/lib/libcurses/screen.c:1.38	Fri May 17 23:32:50 2024
+++ src/lib/libcurses/screen.c	Mon May 27 14:30:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $	*/
+/*	$NetBSD: screen.c,v 1.39 2024/05/27 14:30:43 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)screen.c	8.2 (blymn) 11/27/2001";
 #else
-__RCSID("$NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $");
+__RCSID("$NetBSD: screen.c,v 1.39 2024/05/27 14:30:43 uwe Exp $");
 #endif
 #endif	/* not lint */
 
@@ -156,7 +156,7 @@ newterm(const char *type, FILE *outfd, F
 	new_screen->nca = A_NORMAL;
 	new_screen->color_type = COLOR_NONE;
 	new_screen->COLOR_PAIRS = 0;
-	new_screen->old_mode = 2;
+	new_screen->old_mode = 1;
 	new_screen->stdbuf = NULL;
 	new_screen->stdscr = NULL;
 	new_screen->curscr = NULL;



CVS commit: src/lib/libcurses

2024-05-27 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon May 27 14:30:43 UTC 2024

Modified Files:
src/lib/libcurses: screen.c

Log Message:
curses: init old_mode to 1 (normal visible cursor)

PR bin/58090: Ctrl-Z, fg makes blinking cursor in vi
ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libcurses/screen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 22 00:25:56 UTC 2024

Modified Files:
src/share/man/man4: uaudio.4

Log Message:
uaudio.4: improve markup


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/uaudio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/uaudio.4
diff -u src/share/man/man4/uaudio.4:1.30 src/share/man/man4/uaudio.4:1.31
--- src/share/man/man4/uaudio.4:1.30	Tue May 21 10:45:39 2024
+++ src/share/man/man4/uaudio.4	Wed May 22 00:25:56 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: uaudio.4,v 1.30 2024/05/21 10:45:39 nia Exp $
+.\" $NetBSD: uaudio.4,v 1.31 2024/05/22 00:25:56 uwe Exp $
 .\"
 .\" Copyright (c) 1999-2024 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -46,46 +46,63 @@ audio class devices.
 A
 .Tn USB
 audio device consists of a number of components:
-input terminals (e.g. USB digital input), output terminals (e.g.
-speakers), and a number of units in between (e.g. volume control).
+input terminals
+.Pq e.g. USB digital input ,
+output terminals
+.Pq e.g. speakers ,
+and a number of units in between
+.Pq e.g. volume control .
 The following types of units are handled by the
 .Nm
-driver and are accessible via the mixer (see
-.Xr audio 4 )
+driver and are accessible via the mixer
+.Pq see Xr audio 4
 interface:
-.Bl -tag -width Dv -offset 3n -compact
-.It mixer
+.Bl -tag -width Em
+.It Em mixer
 A mixer has a number of inputs and one output.
 Each input has a control that determines its volume in the output.
 The name of the control is
-.Ar mixN-S ,
+.Sm off
+.Li mix Ar N Li \|- Ar S ,
+.Sm on
 where
 .Ar N
 is a number that identifies which mixer it is and
 .Ar S
 which input.
-.It selector
+.
+.It Em selector
 A selector unit selects one of multiple audio sources such as mic-in
 and line-in.
 The name of the control is
-.Ar selN-S1S2S3... ,
+.Sm off
+.Li sel Ar N Li \|- Ar S1S2S3... ,
+.Sm on
 where
 .Ar N
 is a number that identifies which selector unit it is and the sequence of
 .Ar Sn
 indicates candidate units for the audio source.
-.It feature
+.
+.It Em feature
 A feature unit changes the sound in some way, like bass, treble,
 mute, or volume.
 The name of the control is determined in a heuristic way.
 If the unit changes the sound to a speaker output terminal,
-the names of the controls may be outputs.speaker.bass, outputs.speaker.treble,
-outputs.speaker.mute, outputs.speaker, or likewise.
-.It processing
+the names of the controls may be
+.Li outputs.speaker.bass ,
+.Li outputs.speaker.treble ,
+.Li outputs.speaker.mute ,
+.Li outputs.speaker ,
+or likewise.
+.
+.It Em processing
 A processing unit does one of a number of audio processing functions
-(e.g., channel up-down mixing, Dolby ProLogic, or chorus effects).
-The name of the on-off control is
-.Ar proN.M-enable ,
+.Pq e.g., channel up-down mixing, Dolby ProLogic, or chorus effects .
+The name of the on\[en]off control is
+.Sm off
+.Li pro Ar N Li \&. Ar M Li \|-enable ,
+.Sm on
 where
 .Ar N
 is a number that identifies which processing unit it is and
@@ -93,10 +110,13 @@ is a number that identifies which proces
 which kind.
 Depending on the type of processing unit there may be other controls
 as well.
-.It extension
+.
+.It Em extension
 An extension unit performs some unspecified audio processing
-The name of the on-off control is
-.Ar extN-enable ,
+The name of the on\[en]off control is
+.Sm off
+.Li ext Ar N Li \|-enable ,
+.Sm on
 where
 .Ar N
 is a number that identifies which processing unit it is.



CVS commit: src/share/man/man4

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 22 00:25:56 UTC 2024

Modified Files:
src/share/man/man4: uaudio.4

Log Message:
uaudio.4: improve markup


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/uaudio.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/mkubootimage

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 22 00:02:47 UTC 2024

Modified Files:
src/usr.bin/mkubootimage: mkubootimage.1

Log Message:
mkubootimage.1: improve markup


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mkubootimage/mkubootimage.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/mkubootimage

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed May 22 00:02:47 UTC 2024

Modified Files:
src/usr.bin/mkubootimage: mkubootimage.1

Log Message:
mkubootimage.1: improve markup


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mkubootimage/mkubootimage.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/mkubootimage/mkubootimage.1
diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.19 src/usr.bin/mkubootimage/mkubootimage.1:1.20
--- src/usr.bin/mkubootimage/mkubootimage.1:1.19	Tue May 21 23:31:21 2024
+++ src/usr.bin/mkubootimage/mkubootimage.1	Wed May 22 00:02:46 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mkubootimage.1,v 1.19 2024/05/21 23:31:21 uwe Exp $
+.\"	$NetBSD: mkubootimage.1,v 1.20 2024/05/22 00:02:46 uwe Exp $
 .\"
 .\" Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -35,18 +35,65 @@
 .Nd create U-Boot loader image
 .Sh SYNOPSIS
 .Nm
+.
 .Op Fl hu
-.Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns riscv Ns | Ns sh )
+.
+.Fl A Po Xo
+.Li arm Ns \||\| Ns
+.Li arm64   Ns \||\| Ns
+.Li i386Ns \||\| Ns
+.Li mipsNs \||\| Ns
+.Li mips64  Ns \||\| Ns
+.Li or1kNs \||\| Ns
+.Li powerpc Ns \||\| Ns
+.Li riscv   Ns \||\| Ns
+.Li sh
+.Xc Pc
+.
+.br
 .Fl a Ar address
-.Op Fl C Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc
+.
+.Oo Fl C Po Xo
+.Li bz2  Ns \||\| Ns
+.Li gz   Ns \||\| Ns
+.Li lzma Ns \||\| Ns
+.Li lzo  Ns \||\| Ns
+.Li none
+.Xc Pc Oc
+.
 .Op Fl E Ar address
+.
 .Op Fl e Ar address
-.Op Fl f Po arm64 Ns | Ns uimg Pc
+.
+.Oo Fl f Po Xo
+.Li arm64 Ns \||\| Ns
+.Li uimg
+.Xc Pc Oc
+.
 .Op Fl m Ar magic
-.Fl n Ar image
-.Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc
-.Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone )
+.
+.Fl n Ar name
+.
+.br
+.Oo Fl O Po Xo
+.Li freebsd Ns \||\| Ns
+.Li linux   Ns \||\| Ns
+.Li netbsd  Ns \||\| Ns
+.Li openbsd
+.Xc Pc Oc
+.
+.br
+.Fl T Po Xo
+.Li fsNs \||\| Ns
+.Li kernelNs \||\| Ns
+.Li kernel_noload Ns \||\| Ns
+.Li ramdisk   Ns \||\| Ns
+.Li scriptNs \||\| Ns
+.Li standalone
+.Xc Pc
+.
 .Op Fl t Ar epoch
+.
 .Ar source destination
 .\"
 .Sh DESCRIPTION
@@ -56,23 +103,46 @@ utility is used to create an image for D
 .Qq Universal Boot Loader .
 .Pp
 The arguments are as follows:
-.Bl -tag -width indent
-.It Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns riscv Ns | Ns sh )
+.Bl -tag -width Fl
+.
+.It Fl A Po Xo
+.Li arm Ns \||\| Ns
+.Li arm64   Ns \||\| Ns
+.Li i386Ns \||\| Ns
+.Li mipsNs \||\| Ns
+.Li mips64  Ns \||\| Ns
+.Li or1kNs \||\| Ns
+.Li powerpc Ns \||\| Ns
+.Li riscv   Ns \||\| Ns
+.Li sh
+.Xc Pc
 Defines the architecture.
 This is required for
-.Qq uimg
+.Ql uimg
 format images.
+.
 .It Fl a Ar address
 Sets the image load address.
 This is an integer between 0 and
 .Dv UINT32_MAX .
 This is required for all
-.Qq uimg
-image types except for script, ramdisk, and kernel_noload.
-.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none )
+.Ql uimg
+image types except for
+.Li script , ramdisk ,
+and
+.Li kernel_noload .
+.
+.It Fl C Po Xo
+.Li bz2  Ns \||\| Ns
+.Li gz   Ns \||\| Ns
+.Li lzma Ns \||\| Ns
+.Li lzo  Ns \||\| Ns
+.Li none
+.Xc Pc
 Defines the compression.
 The default is
-.Qq none .
+.Ql none .
+.
 .It Fl E Ar address
 Define the entry point.
 This is an integer between 0 and
@@ -88,6 +158,7 @@ or
 are not set, the entry point defaults to the
 image load address
 .Pq Fl a .
+.
 .It Fl e Ar address
 Define the entry point.
 This is an integer between 0 and
@@ -99,37 +170,61 @@ or
 are not set, the entry point defaults to the
 image load address
 .Pq Fl a .
-.It Fl f No ( arm64 Ns | Ns uimg )
+.
+.It Fl f Po Xo
+.Li arm64 Ns \||\| Ns
+.Li uimg
+.Xc Pc
 Defines the output image format type.
 The default is
-.Qq uimg .
+.Ql uimg .
+.
 .It Fl h
 Display the usage and exit.
+.
 .It Fl m Ar magic
 Set the magic used for
-.Qq uimg
+.Ql uimg
 format images.
 This is an integer between 0 and
 .Dv UINT32_MAX .
 The default is
-.Qq 0x27051956 .
-.It Fl n Ar image
+.Ql 0x27051956 .
+.
+.It Fl n Ar name
 Defines the image name.
 This is required.
-.It Fl O No ( freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd )
+.
+.It Fl O Po Xo
+.Li freebsd Ns \||\| Ns
+.Li linux   Ns \||\| Ns
+.Li netbsd  Ns \||\| Ns
+.Li openbsd
+.Xc Pc
 Defines the operating system type.
 The default OS name is
-.Qq netbsd .
-.It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone )
+.Ql netbsd .
+.
+.It Fl T Po Xo
+.Li fsNs \||\| Ns
+.Li kernelNs \||\| Ns
+.Li kernel_noload Ns \||\| Ns
+.Li ramdisk   Ns \||\| Ns
+.Li scriptNs \||\| Ns
+.Li standalone
+.Xc Pc
 Defines the 

CVS commit: src/usr.bin/mkubootimage

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 21 23:31:21 UTC 2024

Modified Files:
src/usr.bin/mkubootimage: mkubootimage.1

Log Message:
mkubootimage.1: restore .Ed lost in previous


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mkubootimage/mkubootimage.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/mkubootimage/mkubootimage.1
diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.18 src/usr.bin/mkubootimage/mkubootimage.1:1.19
--- src/usr.bin/mkubootimage/mkubootimage.1:1.18	Tue May 21 22:10:21 2024
+++ src/usr.bin/mkubootimage/mkubootimage.1	Tue May 21 23:31:21 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mkubootimage.1,v 1.18 2024/05/21 22:10:21 gutteridge Exp $
+.\"	$NetBSD: mkubootimage.1,v 1.19 2024/05/21 23:31:21 uwe Exp $
 .\"
 .\" Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -161,6 +161,7 @@ for example:
  comp:0 (none)
  name:NetBSD/armv7 boot
  header crc:  0x2164b567
+.Ed
 .\" .Sh FILES
 .Sh SEE ALSO
 .Qq Das U-Boot - the Universal Boot Loader



CVS commit: src/usr.bin/mkubootimage

2024-05-21 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 21 23:31:21 UTC 2024

Modified Files:
src/usr.bin/mkubootimage: mkubootimage.1

Log Message:
mkubootimage.1: restore .Ed lost in previous


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mkubootimage/mkubootimage.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2024-05-17 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri May 17 23:32:51 UTC 2024

Modified Files:
src/lib/libcurses: curses.h curses_private.h curses_screen.3 screen.c
setterm.c

Log Message:
curses: constify newterm() and setterm() arguments

newterm() argument is const in the spec, so this fixes our
conformance.

setterm() is not in the spec, but it's natural and in ncurses its
argument is const too, so follow suit.

Doesn't change the ABI, so no bump required.

ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/lib/libcurses/curses.h
cvs rdiff -u -r1.80 -r1.81 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/curses_screen.3
cvs rdiff -u -r1.37 -r1.38 src/lib/libcurses/screen.c
cvs rdiff -u -r1.71 -r1.72 src/lib/libcurses/setterm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2024-05-17 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri May 17 23:32:51 UTC 2024

Modified Files:
src/lib/libcurses: curses.h curses_private.h curses_screen.3 screen.c
setterm.c

Log Message:
curses: constify newterm() and setterm() arguments

newterm() argument is const in the spec, so this fixes our
conformance.

setterm() is not in the spec, but it's natural and in ncurses its
argument is const too, so follow suit.

Doesn't change the ABI, so no bump required.

ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/lib/libcurses/curses.h
cvs rdiff -u -r1.80 -r1.81 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/curses_screen.3
cvs rdiff -u -r1.37 -r1.38 src/lib/libcurses/screen.c
cvs rdiff -u -r1.71 -r1.72 src/lib/libcurses/setterm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/curses.h
diff -u src/lib/libcurses/curses.h:1.131 src/lib/libcurses/curses.h:1.132
--- src/lib/libcurses/curses.h:1.131	Tue May 14 10:22:48 2024
+++ src/lib/libcurses/curses.h	Fri May 17 23:32:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses.h,v 1.131 2024/05/14 10:22:48 uwe Exp $	*/
+/*	$NetBSD: curses.h,v 1.132 2024/05/17 23:32:50 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -719,7 +719,7 @@ int	 mvwprintw(WINDOW *, int, int, const
 int	 mvwscanw(WINDOW *, int, int, const char *, ...) __scanflike(4, 5);
 int	 napms(int);
 WINDOW	*newpad(int, int);
-SCREEN  *newterm(char *, FILE *, FILE *);
+SCREEN  *newterm(const char *, FILE *, FILE *);
 WINDOW	*newwin(int, int, int, int);
 int	 nl(void);
 attr_t	 no_color_attributes(void);
@@ -751,7 +751,7 @@ int	 savetty(void);
 int	 scanw(const char *, ...) __scanflike(1, 2);
 int	 scroll(WINDOW *);
 int	 scrollok(WINDOW *, bool);
-int	 setterm(char *);
+int	 setterm(const char *);
 int	 set_escdelay(int);
 int	 set_tabsize(int);
 SCREEN  *set_term(SCREEN *);

Index: src/lib/libcurses/curses_private.h
diff -u src/lib/libcurses/curses_private.h:1.80 src/lib/libcurses/curses_private.h:1.81
--- src/lib/libcurses/curses_private.h:1.80	Tue May  3 07:25:34 2022
+++ src/lib/libcurses/curses_private.h	Fri May 17 23:32:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_private.h,v 1.80 2022/05/03 07:25:34 blymn Exp $	*/
+/*	$NetBSD: curses_private.h,v 1.81 2024/05/17 23:32:50 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -355,7 +355,7 @@ int	_cursesi_waddbytes(WINDOW *, const c
 void _cursesi_reset_wacs(SCREEN *);
 #endif /* HAVE_WCHAR */
 void _cursesi_resetterm(SCREEN *);
-int  _cursesi_setterm(char *, SCREEN *);
+int  _cursesi_setterm(const char *, SCREEN *);
 int	 __delay(void);
 unsigned int	 __hash_more(const void *, size_t, unsigned int);
 unsigned int	 __hash_line(const __LDATA *, int);

Index: src/lib/libcurses/curses_screen.3
diff -u src/lib/libcurses/curses_screen.3:1.28 src/lib/libcurses/curses_screen.3:1.29
--- src/lib/libcurses/curses_screen.3:1.28	Sun Feb  7 23:00:57 2021
+++ src/lib/libcurses/curses_screen.3	Fri May 17 23:32:50 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_screen.3,v 1.28 2021/02/07 23:00:57 rillig Exp $
+.\"	$NetBSD: curses_screen.3,v 1.29 2024/05/17 23:32:50 uwe Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd March 12, 2020
+.Dd May 16, 2024
 .Dt CURSES_SCREEN 3
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@
 .Ft void
 .Fn use_env "bool value"
 .Ft SCREEN *
-.Fn newterm "char *type" "FILE *outfd" "FILE *infd"
+.Fn newterm "const char *type" "FILE *outfd" "FILE *infd"
 .Ft SCREEN *
 .Fn set_term "SCREEN *screen"
 .Ft void
@@ -79,7 +79,7 @@
 .Ft int
 .Fn resizeterm "int lines" "int cols"
 .Ft int
-.Fn setterm "char *name"
+.Fn setterm "const char *name"
 .Ft int
 .Fn set_tabsize "int value"
 .Pp
@@ -99,7 +99,9 @@ argument points to a
 .Xr terminfo 5
 entry, or it may be
 .Dv NULL
-in which case the TERM environment variable is used.
+in which case the
+.Ev TERM
+environment variable is used.
 The
 .Fa outfd
 and

Index: src/lib/libcurses/screen.c
diff -u src/lib/libcurses/screen.c:1.37 src/lib/libcurses/screen.c:1.38
--- src/lib/libcurses/screen.c:1.37	Fri Apr  8 10:17:52 2022
+++ src/lib/libcurses/screen.c	Fri May 17 23:32:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: screen.c,v 1.37 2022/04/08 10:17:52 andvar Exp $	*/
+/*	$NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)screen.c	8.2 (blymn) 11/27/2001";
 #else
-__RCSID("$NetBSD: screen.c,v 1.37 2022/04/08 10:17:52 andvar Exp $");
+__RCSID("$NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $");
 #endif
 #endif	/* not lint */
 
@@ -124,10 +124,10 @@ set_term(SCREEN *new)
  *
  */
 SCREEN *
-newterm(char *type, FILE *outfd, FILE *infd)
+newterm(const char *type, FILE *outfd, FILE *infd)
 {
 	SCREEN *new_screen;
-	char *s

Re: CVS commit: src/share/man/man4

2024-05-16 Thread Valery Ushakov
On Thu, May 16, 2024 at 11:54:20 +, Nia Alarie wrote:

> Modified Files:
>   src/share/man/man4: eap.4
> 
> Log Message:
> Note that EAP_USE_BOTH_DACS is deprecated in the eap(4) manual page.

Please, can you restore the part that explains what this option
is/does?  It might be on its way out, but since we document it's
there, it's a good idea to actually document it, IMHO.

I don't know much about audio, but the kernel mixer is software, isn't
it.  I would imagine the type of systems that might have this device
may actually benefit from the hardware acceleration that this option
seems to imply.

I.e. if anything, I'd rather this option is documented even better
than it was.

-uwe


CVS commit: src/share/man/man4

2024-05-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 16 14:41:03 UTC 2024

Modified Files:
src/share/man/man4: eap.4

Log Message:
eap(4): touch up markup a bit


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/eap.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/eap.4
diff -u src/share/man/man4/eap.4:1.18 src/share/man/man4/eap.4:1.19
--- src/share/man/man4/eap.4:1.18	Thu May 16 11:54:19 2024
+++ src/share/man/man4/eap.4	Thu May 16 14:41:03 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: eap.4,v 1.18 2024/05/16 11:54:19 nia Exp $
+.\" $NetBSD: eap.4,v 1.19 2024/05/16 14:41:03 uwe Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -34,11 +34,12 @@
 .Nm eap
 .Nd AudioPCI audio device driver
 .Sh SYNOPSIS
-.Cd "eap*   at pci? dev ? function ?"
-.Cd "audio* at audiobus?"
-.Cd "joy*   at eap?"
-.Cd "midi*  at eap?"
+.Cd "eap*at pci? dev ? function ?"
 .Cd "options EAP_USE_BOTH_DACS"
+.Pp
+.Cd "audio*  at audiobus?"
+.Cd "joy*at eap?"
+.Cd "midi*   at eap?"
 .Sh DESCRIPTION
 The
 .Nm
@@ -47,9 +48,8 @@ SoundBlaster PCI series of audio cards.
 All models based on the ES1370, ES1371, and ES1373 chips are supported.
 .Pp
 By specifying:
-.Bd -unfilled -offset indent
-options EAP_USE_BOTH_DACS
-.Ed
+.Pp
+.D1 Cd options EAP_USE_BOTH_DACS
 .Pp
 a second audio device is attached.
 You can use it simply by directing audio output to it.



CVS commit: src/share/man/man4

2024-05-16 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 16 14:41:03 UTC 2024

Modified Files:
src/share/man/man4: eap.4

Log Message:
eap(4): touch up markup a bit


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/eap.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/bin/echo

2024-05-14 Thread Valery Ushakov
On Wed, May 15, 2024 at 05:22:25 +0700, Robert Elz wrote:

>   | Unfortunately that advice is not true without further caveats.
> 
> That you have to actually write a valid printf(1) command, and not
> simply s/echo/printf/ ?   Does that really need saying?
> 
> 
>   | netbsd$ sh -c "printf '-V\n'"
> 
>   printf -- -V\\n 
> 
> and it will work anywhere - our printf is specially hacked as once
> upon a time it took no options, and this kind of thing would work.
> Format strings starting with a '-' don't work in general however,
> the '--' should be included if the format might begin with a '-'.
> 
> Even better would be
> 
>   printf -- %s\\n -V
> 
> (where the -- is optional here).

I vaguely remember I read somewhere that printf(1) was specifically
conceived to take no options, but that can be planted memories.  May
be it's indeed induced by the old state of affairs in our version.


-uwe


CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:40:41 UTC 2024

Modified Files:
src/lib/libcurses: curses_input.3

Log Message:
curses_input(3): bump date for define_key() change


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/curses_input.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/curses_input.3
diff -u src/lib/libcurses/curses_input.3:1.31 src/lib/libcurses/curses_input.3:1.32
--- src/lib/libcurses/curses_input.3:1.31	Tue May 14 10:22:48 2024
+++ src/lib/libcurses/curses_input.3	Tue May 14 10:40:41 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_input.3,v 1.31 2024/05/14 10:22:48 uwe Exp $
+.\"	$NetBSD: curses_input.3,v 1.32 2024/05/14 10:40:41 uwe Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd May 16, 2022
+.Dd May 14, 2024
 .Dt CURSES_INPUT 3
 .Os
 .Sh NAME



CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:40:41 UTC 2024

Modified Files:
src/lib/libcurses: curses_input.3

Log Message:
curses_input(3): bump date for define_key() change


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/curses_input.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:38:16 UTC 2024

Modified Files:
src/lib/libcurses: curses_termcap.3

Log Message:
curses_termcap(3): fullname() termbuf argument is const


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_termcap.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/curses_termcap.3
diff -u src/lib/libcurses/curses_termcap.3:1.6 src/lib/libcurses/curses_termcap.3:1.7
--- src/lib/libcurses/curses_termcap.3:1.6	Sat Apr 21 12:27:28 2012
+++ src/lib/libcurses/curses_termcap.3	Tue May 14 10:38:16 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_termcap.3,v 1.6 2012/04/21 12:27:28 roy Exp $
+.\"	$NetBSD: curses_termcap.3,v 1.7 2024/05/14 10:38:16 uwe Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd October 4, 2011
+.Dd May 14, 2024
 .Dt CURSES_TERMCAP 3
 .Os
 .Sh NAME
@@ -42,7 +42,7 @@
 .Sh SYNOPSIS
 .In curses.h
 .Ft char *
-.Fn fullname "char *termbuf" "char *name"
+.Fn fullname "const char *termbuf" "char *name"
 .Sh DESCRIPTION
 The
 .Fn fullname



CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:38:16 UTC 2024

Modified Files:
src/lib/libcurses: curses_termcap.3

Log Message:
curses_termcap(3): fullname() termbuf argument is const


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_termcap.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:22:48 UTC 2024

Modified Files:
src/lib/libcurses: curses.h curses_input.3 getch.c

Log Message:
curse: constify define_key() argument

define_key() is ncurses extension and ncurses defines its first
argument as "const char *".  Follow suit.

PR lib/58254


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/lib/libcurses/curses.h
cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/curses_input.3
cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/getch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/curses.h
diff -u src/lib/libcurses/curses.h:1.130 src/lib/libcurses/curses.h:1.131
--- src/lib/libcurses/curses.h:1.130	Sat Feb 13 10:37:00 2021
+++ src/lib/libcurses/curses.h	Tue May 14 10:22:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses.h,v 1.130 2021/02/13 10:37:00 rillig Exp $	*/
+/*	$NetBSD: curses.h,v 1.131 2024/05/14 10:22:48 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -652,7 +652,7 @@ int	 copywin(const WINDOW *, WINDOW *, i
 int	 curs_set(int);
 int	 def_prog_mode(void);
 int	 def_shell_mode(void);
-int  define_key(char *, int);
+int  define_key(const char *, int);
 int	 delay_output(int);
 void delscreen(SCREEN *);
 int	 delwin(WINDOW *);

Index: src/lib/libcurses/curses_input.3
diff -u src/lib/libcurses/curses_input.3:1.30 src/lib/libcurses/curses_input.3:1.31
--- src/lib/libcurses/curses_input.3:1.30	Sat May 21 12:34:44 2022
+++ src/lib/libcurses/curses_input.3	Tue May 14 10:22:48 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_input.3,v 1.30 2022/05/21 12:34:44 uwe Exp $
+.\"	$NetBSD: curses_input.3,v 1.31 2024/05/14 10:22:48 uwe Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -76,7 +76,7 @@
 .Ft int
 .Fn has_key "int key_symbol"
 .Ft int
-.Fn define_key "char *sequence" "int key_symbol"
+.Fn define_key "const char *sequence" "int key_symbol"
 .Ft int
 .Fn getnstr "char *str" "int limit"
 .Ft int

Index: src/lib/libcurses/getch.c
diff -u src/lib/libcurses/getch.c:1.78 src/lib/libcurses/getch.c:1.79
--- src/lib/libcurses/getch.c:1.78	Tue Oct 19 06:37:29 2021
+++ src/lib/libcurses/getch.c	Tue May 14 10:22:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $	*/
+/*	$NetBSD: getch.c,v 1.79 2024/05/14 10:22:48 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)getch.c	8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $");
+__RCSID("$NetBSD: getch.c,v 1.79 2024/05/14 10:22:48 uwe Exp $");
 #endif
 #endif	/* not lint */
 
@@ -211,7 +211,7 @@ static wchar_t	inbuf[INBUF_SZ];
 static int	start, end, working; /* pointers for manipulating inbuf data */
 
 /* prototypes for private functions */
-static void add_key_sequence(SCREEN *screen, char *sequence, int key_type);
+static void add_key_sequence(SCREEN *screen, const char *sequence, int key_type);
 static key_entry_t *add_new_key(keymap_t *current, char ch, int key_type,
 int symbol);
 static void delete_key_sequence(keymap_t *current, int key_type);
@@ -370,7 +370,7 @@ delete_key_sequence(keymap_t *current, i
  * for the given key symbol.
  */
 static void
-add_key_sequence(SCREEN *screen, char *sequence, int key_type)
+add_key_sequence(SCREEN *screen, const char *sequence, int key_type)
 {
 	key_entry_t *tmp_key;
 	keymap_t *current;
@@ -762,7 +762,7 @@ do_keyok(keymap_t *current, int key_type
  *
  */
 int
-define_key(char *sequence, int symbol)
+define_key(const char *sequence, int symbol)
 {
 
 	if (symbol <= 0 || _cursesi_screen == NULL)



CVS commit: src/lib/libcurses

2024-05-14 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue May 14 10:22:48 UTC 2024

Modified Files:
src/lib/libcurses: curses.h curses_input.3 getch.c

Log Message:
curse: constify define_key() argument

define_key() is ncurses extension and ncurses defines its first
argument as "const char *".  Follow suit.

PR lib/58254


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/lib/libcurses/curses.h
cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/curses_input.3
cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/getch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/bin/echo

2024-05-14 Thread Valery Ushakov
On Tue, May 14, 2024 at 01:32:25 +, David H. Gutteridge wrote:

> Log Message:
> echo.1: borrow advice about printf(1) from the OpenBSD man page

Unfortunately that advice is not true without further caveats.

netbsd$ sh -c "printf '-V\n'"
-V

$ busybox sh -c "printf '-V\n'"
-V

ubuntu$ $ dash -c "printf '-V\n'"
dash: 1: printf: Illegal option -V

$ bash -c "printf '-V\n'"
bash: line 1: printf: -V: invalid option
printf: usage: printf [-v var] format [arguments]


-uwe


CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:22:59 UTC 2024

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c

Log Message:
ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.19 src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.20
--- src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.19	Fri May  3 15:50:42 2024
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c	Sat May  4 18:22:59 2024
@@ -682,7 +682,7 @@ terminate_cleanup(void)
 	if (outfile == NULL)
 		return;
 
-#if !defined (__FreeBSD__) && !defined(__NetBSD__)
+#if !defined (__FreeBSD__) && !(defined(__NetBSD__) || HAVE_NBTOOL_CONFIG_H)
 	if (dounlink) {
 		fprintf(stderr, "Removing %s\n", outfile);
 		unlink(outfile);



CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:22:59 UTC 2024

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c

Log Message:
ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:20:44 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
ctfmerge(1): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1
diff -u src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.4 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.5
--- src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.4	Sat May  4 13:11:41 2024
+++ src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1	Sat May  4 18:20:44 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: ctfmerge.1,v 1.4 2024/05/04 13:11:41 christos Exp $
+.\" $NetBSD: ctfmerge.1,v 1.5 2024/05/04 18:20:44 uwe Exp $
 .\"
 .\" Copyright (c) 2010 The FreeBSD Foundation 
 .\" All rights reserved. 
@@ -41,7 +41,7 @@
 .Fl l Ar label
 .Fl L Ar labelenv
 .Fl o Ar outfile
-file ...
+.Ar
 .Nm
 .Op Fl fgstv
 .Fl l Ar label
@@ -50,14 +50,14 @@ file ...
 .Fl d Ar uniqfile
 .Op Fl g
 .Op Fl D Ar uniqlabel
-file ...
+.Ar
 .Nm
 .Op Fl fgstv
 .Fl l Ar label
 .Fl L Ar labelenv
 .Fl o Ar outfile
 .Fl w Ar withfile
-file ...
+.Ar
 .Nm
 .Op Fl g
 .Fl c Ar srcfile
@@ -69,13 +69,17 @@ utility merges several CTF data sections
 output file, unifying common data.
 .Pp
 The following options are available:
-.Bl -tag -width indent
+.Bl -tag -width Fl
 .It Fl f
 Match global symbols to global CTF data.
 .It Fl g
 Don't delete the original debugging sections.
 .It Fl s
-Use the .dynsym ELF section instead of the .symtab ELF section.
+Use the
+.Ql .dynsym
+ELF section instead of the
+.Ql .symtab
+ELF section.
 .It Fl t
 Make sure that all object files have a CTF section.
 .It Fl v
@@ -110,24 +114,32 @@ into
 .Sh ENVIRONMENT VARIABLES
 The following environment variables are used in
 .Nm :
-.Bl -tag -width x
-.It CTFMERGE_TERMINATE_NO_UNLINK
+.Bl -tag -width Ev
+.It Ev CTFMERGE_TERMINATE_NO_UNLINK
 Don't remove temporary files on exit, so that they can be examined
 for debugging.
-.It CTFMERGE_MAX_SLOTS
+.It Ev CTFMERGE_MAX_SLOTS
 Number of round-robin slots in the input queue that it is processed by
 worker threads.
-Each slot represents a file batch (default 5).
-.It CTFMERGE_PHASE1_BATCH_SIZE
-Number of files in a slot that are needed before processing starts (default 8).
-.It CTFMERGE_NUM_THREADS
+Each slot represents a file batch
+.Pq default 5 .
+.It Ev CTFMERGE_PHASE1_BATCH_SIZE
+Number of files in a slot that are needed before processing starts
+.Pq default 8 .
+.It Ev CTFMERGE_NUM_THREADS
 Set the number of worker threads.
 If the number of processors can be determined it defaults to
-min(processors * 3 / 2, nslots), if not it defaults to 2.
-.It CTFMERGE_INPUT_THROTTLE
-Max queue size to queue (defaults to 10).
-.It CTFMERGE_DEBUG_LEVEL
-Increase debugging verbosity (maximum is 3).
+.Fo min
+.Fa "processors\|*\|3\|/\|2"
+.Fa "nslots"
+.Fc
+if not it defaults to 2.
+.It Ev CTFMERGE_INPUT_THROTTLE
+Max queue size to queue
+.Pq defaults to 10 .
+.It Ev CTFMERGE_DEBUG_LEVEL
+Increase debugging verbosity
+.Pq maximum is 3 .
 .El
 .Sh EXIT STATUS
 .Ex -std



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:20:44 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
ctfmerge(1): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/sys

2024-04-28 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Apr 28 23:10:26 UTC 2024

Modified Files:
src/lib/libc/sys: execve.2

Log Message:
execve(2): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/sys/execve.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/execve.2
diff -u src/lib/libc/sys/execve.2:1.46 src/lib/libc/sys/execve.2:1.47
--- src/lib/libc/sys/execve.2:1.46	Sun Apr 28 22:21:21 2024
+++ src/lib/libc/sys/execve.2	Sun Apr 28 23:10:26 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: execve.2,v 1.46 2024/04/28 22:21:21 rillig Exp $
+.\"	$NetBSD: execve.2,v 1.47 2024/04/28 23:10:26 uwe Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -75,35 +75,32 @@ and
 .Xr a.out 5 .
 .Pp
 An interpreter file begins with a line of the form:
-.Pp
-.Bd -ragged -offset indent -compact
-.Sy \&#!
-.Em interpreter
-.Bq Em arg
+.Bd -ragged -offset indent
+.Ic \&#! Ns Ar interpreter Op Ar arg
 .Ed
 .Pp
 When an interpreter file is
-.Sy execve Ap d ,
+.Nm Ap d ,
 the system actually
-.Sy execve Ap s
+.Nm Ap s
 the specified
-.Em interpreter .
+.Ar interpreter .
 If the optional
-.Em arg
+.Ar arg
 is specified, it becomes the first argument to the
-.Em interpreter ,
+.Ar interpreter ,
 and the name of the originally
-.Sy execve Ap d
+.Nm Ap d
 file becomes the second argument;
 otherwise, the name of the originally
-.Sy execve Ap d
+.Nm Ap d
 file becomes the first argument.
 The original arguments are shifted over to become the subsequent arguments.
 The zeroth argument, normally the name of the
-.Fn execve Ns d
+.Nm Ap d
 file, is left unchanged.
 The interpreter named by
-.Em interpreter
+.Ar interpreter
 must not itself be an interpreter file.
 (See
 .Xr script 7
@@ -127,8 +124,8 @@ character pointers to null-terminated st
 A pointer to this array is normally stored in the global variable
 .Va environ .
 These strings pass information to the
-new process that is not directly an argument to the command (see
-.Xr environ 7 ) .
+new process that is not directly an argument to the command
+.Pq see Xr environ 7 .
 .Pp
 File descriptors open in the calling process image remain open in
 the new process image, except for those for which the close-on-exec
@@ -140,12 +137,18 @@ Descriptors that remain open are unaffec
 .Fn execve .
 .Pp
 In the case of a new setuid or setgid executable being executed, if
-file descriptors 0, 1, or 2 (representing stdin, stdout, and stderr)
+file descriptors 0, 1, or 2
+.Po
+representing
+.Em stdin , stdout ,
+and
+.Em stderr
+.Pc
 are currently unallocated, these descriptors will be opened to point to
 some system file like
 .Pa /dev/null .
 The intent is to ensure these descriptors are not unallocated, since
-many libraries make assumptions about the use of these 3 file descriptors.
+many libraries make assumptions about the use of these three file descriptors.
 .Pp
 Signals set to be ignored in the calling process are set to be ignored in
 the new process.
@@ -157,8 +160,7 @@ The signal stack is reset to be undefine
 for more information).
 .Pp
 If the set-user-ID mode bit of the new process image file is set
-(see
-.Xr chmod 2 ) ,
+.Pq see Xr chmod 2 ,
 the effective user ID of the new process image is set to the owner ID
 of the new process image file.
 If the set-group-ID mode bit of the new process image file is set,
@@ -171,8 +173,8 @@ process image.
 After any set-user-ID and set-group-ID processing,
 the effective user ID is recorded as the saved set-user-ID,
 and the effective group ID is recorded as the saved set-group-ID.
-These values may be used in changing the effective IDs later (see
-.Xr setuid 2 ) .
+These values may be used in changing the effective IDs later
+.Pq see Xr setuid 2 .
 The set-ID bits are not honored if the respective file system has the
 .Cm nosuid
 option enabled or if the new process file is an interpreter file.
@@ -182,20 +184,19 @@ tracing is disabled if effective IDs are
 The new process also inherits the following attributes from
 the calling process:
 .Pp
-.Bl -column parent_process_ID -offset indent -compact
-.It process ID Ta see Xr getpid 2
+.Bl -column "parent process ID" -offset indent -compact
+.It process IDTa see Xr getpid 2
 .It parent process ID Ta see Xr getppid 2
-.It process group ID Ta see Xr getpgrp 2
-.It access groups Ta see Xr getgroups 2
+.It process group ID  Ta see Xr getpgrp 2
+.It access groups Ta see Xr getgroups 2
 .It working directory Ta see Xr chdir 2
-.It root directory Ta see Xr chroot 2
-.It control terminal Ta see Xr termios 4
-.It resource usages Ta see Xr getrusage 2
-.It interval timers Ta see Xr getitimer 2
-.It resource limits Ta see Xr getrlimit 2
-.It file mode mask Ta see Xr umask 2
-.It signal mask Ta see Xr sigaction 2 ,
-.Xr sigprocmask 2
+.It root directoryTa see Xr chroot 2
+.It

CVS commit: src/lib/libc/sys

2024-04-28 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Apr 28 23:10:26 UTC 2024

Modified Files:
src/lib/libc/sys: execve.2

Log Message:
execve(2): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/sys/execve.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/lib/libutil

2024-04-09 Thread Valery Ushakov
On Mon, Apr 08, 2024 at 23:31:16 +0200, Roland Illig wrote:

> Am 08.04.2024 um 21:18 schrieb Valery Ushakov:
> >   "=\017FIFTEEN\0"
> >
> > with its result a few lines below that has:
> >
> >   BURST=0xf=FIFTEEN
> 
> Thank you for explaining this example. I had a gut feeling that there
> would be some hidden correlation between some octal/hexadecimal
> combinations, but I couldn't name it. Indeed, if the number base for
> output is hexadecimal, the field comparisons should be done in
> hexadecimal as well.
> 
> I adjusted the description and examples in the manual page accordingly.

Thanks!  My unscientific impression is that snprintb(3) was not very
popular and its uses sometimes are a bit of a cargo-cult, so existing
use cases have to be taken with a grain of salt and don't necessarily
represent good style.  This is why improving the docs with good
examples is important, imho.


-uwe


  1   2   3   4   5   >