CVS commit: src/sys/net

2021-12-05 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Mon Dec  6 05:50:39 UTC 2021

Modified Files:
src/sys/net: if_vlan.c

Log Message:
decrease the MTU of vlan(4)
only when ETHERCAP_VLAN_MTU of the parent interface is enabled

This fixed the bug that the MTU of a vlan interface is decreased
when the parent interface already has another vlan interface.
pointed out by tnn@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/net/if_vlan.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/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.165 src/sys/net/if_vlan.c:1.166
--- src/sys/net/if_vlan.c:1.165	Mon Nov 15 07:07:05 2021
+++ src/sys/net/if_vlan.c	Mon Dec  6 05:50:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.165 2021/11/15 07:07:05 yamaguchi Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.166 2021/12/06 05:50:39 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.165 2021/11/15 07:07:05 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.166 2021/12/06 05:50:39 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -434,17 +434,16 @@ vlan_config(struct ifvlan *ifv, struct i
 	case IFT_ETHER:
 	{
 		struct ethercom *ec = (void *)p;
-		bool vlanmtu_enabled;
 
 		nmib->ifvm_msw = _ether_multisw;
 		nmib->ifvm_encaplen = ETHER_VLAN_ENCAP_LEN;
 		nmib->ifvm_mintu = ETHERMIN;
 
-		error = ether_add_vlantag(p, tag, _enabled);
+		error = ether_add_vlantag(p, tag, NULL);
 		if (error != 0)
 			goto done;
 
-		if (vlanmtu_enabled) {
+		if (ec->ec_capenable & ETHERCAP_VLAN_MTU) {
 			nmib->ifvm_mtufudge = 0;
 		} else {
 			/*



CVS commit: src/sys/net

2021-12-05 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Mon Dec  6 05:50:39 UTC 2021

Modified Files:
src/sys/net: if_vlan.c

Log Message:
decrease the MTU of vlan(4)
only when ETHERCAP_VLAN_MTU of the parent interface is enabled

This fixed the bug that the MTU of a vlan interface is decreased
when the parent interface already has another vlan interface.
pointed out by tnn@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/net/if_vlan.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/i2c

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec  6 04:25:36 UTC 2021

Modified Files:
src/sys/dev/i2c: spdmem_i2c.c

Log Message:
Carefully access to the I2C bus in the match function.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/i2c/spdmem_i2c.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/i2c/spdmem_i2c.c
diff -u src/sys/dev/i2c/spdmem_i2c.c:1.23 src/sys/dev/i2c/spdmem_i2c.c:1.24
--- src/sys/dev/i2c/spdmem_i2c.c:1.23	Tue Nov 30 05:02:29 2021
+++ src/sys/dev/i2c/spdmem_i2c.c	Mon Dec  6 04:25:36 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.23 2021/11/30 05:02:29 msaitoh Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.23 2021/11/30 05:02:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $");
 
 #include 
 #include 
@@ -117,6 +117,9 @@ spdmem_reset_page(struct spdmem_i2c_soft
 	 */
 	rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, , 1,
 	, 1, 0);
+	if (rv != 0)
+		goto error;
+
 	reg = 2;
 	rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, , 1,
 	, 1, 0);



CVS commit: src/sys/dev/i2c

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec  6 04:25:36 UTC 2021

Modified Files:
src/sys/dev/i2c: spdmem_i2c.c

Log Message:
Carefully access to the I2C bus in the match function.


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

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



CVS commit: src/external/mit/xorg/server/xorg-server

2021-12-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Dec  5 22:59:32 UTC 2021

Modified Files:
src/external/mit/xorg/server/xorg-server/config: Makefile
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
xorg-server: Enable wscons-based autoconfiguration.

This gets us features like automatic configuration of touchscreens,
and X's default keyboard layout matching the console's.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/mit/xorg/server/xorg-server/config/Makefile
cvs rdiff -u -r1.33 -r1.34 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/xorg-server/config/Makefile
diff -u src/external/mit/xorg/server/xorg-server/config/Makefile:1.2 src/external/mit/xorg/server/xorg-server/config/Makefile:1.3
--- src/external/mit/xorg/server/xorg-server/config/Makefile:1.2	Thu Aug 11 08:32:42 2016
+++ src/external/mit/xorg/server/xorg-server/config/Makefile	Sun Dec  5 22:59:32 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2016/08/11 08:32:42 mrg Exp $
+#	$NetBSD: Makefile,v 1.3 2021/12/05 22:59:32 nia Exp $
 
 .include "../Makefile.serverlib"
 .include "../Makefile.servermod"
@@ -17,5 +17,7 @@ CPPFLAGS+=	-I${X11SRCDIR.xorg-server}/in
 		-I${DESTDIR}${X11INCDIR}/pixman-1 \
 		-I${X11SRCDIR.xorg-server}/../include
 
+CPPFLAGS+=	-DCONFIG_WSCONS
+
 .include 
 .include 

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.33 src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.34
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.33	Mon Dec 31 11:14:04 2018
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile	Sun Dec  5 22:59:32 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2018/12/31 11:14:04 mrg Exp $
+#	$NetBSD: Makefile,v 1.34 2021/12/05 22:59:32 nia Exp $
 
 .include 
 
@@ -82,6 +82,8 @@ CPPFLAGS+=	-DPCCONS_SUPPORT -DPCVT_SUPPO
 CPPFLAGS+=	-DPCVT_SUPPORT
 .endif
 
+CPPFLAGS+=	-DCONFIG_WSCONS
+
 OS_RELEASE!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
 
 DRIVERS=	mga glint nv tga s3 s3virge sis rendition neomagic \



CVS commit: src/external/mit/xorg/server/xorg-server

2021-12-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Dec  5 22:59:32 UTC 2021

Modified Files:
src/external/mit/xorg/server/xorg-server/config: Makefile
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
xorg-server: Enable wscons-based autoconfiguration.

This gets us features like automatic configuration of touchscreens,
and X's default keyboard layout matching the console's.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/mit/xorg/server/xorg-server/config/Makefile
cvs rdiff -u -r1.33 -r1.34 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

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



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 22:37:58 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-unique.mk

Log Message:
tests/make: replace ':U' with ':L' in test for ':u'

In expressions using ':L', the value of the variable is delimited by
'{', which makes it easier to recognize it visually, as opposed to being
delimited by 'U'.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-unique.mk

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/make/unit-tests/varmod-unique.mk
diff -u src/usr.bin/make/unit-tests/varmod-unique.mk:1.5 src/usr.bin/make/unit-tests/varmod-unique.mk:1.6
--- src/usr.bin/make/unit-tests/varmod-unique.mk:1.5	Sun May 30 20:26:41 2021
+++ src/usr.bin/make/unit-tests/varmod-unique.mk	Sun Dec  5 22:37:58 2021
@@ -1,47 +1,46 @@
-# $NetBSD: varmod-unique.mk,v 1.5 2021/05/30 20:26:41 rillig Exp $
+# $NetBSD: varmod-unique.mk,v 1.6 2021/12/05 22:37:58 rillig Exp $
 #
 # Tests for the :u variable modifier, which discards adjacent duplicate
 # words.
 
-.if ${:U1 2 1:u} != "1 2 1"
-.  warning The :u modifier only merges _adjacent_ duplicate words.
+.if ${1 2 1:L:u} != "1 2 1"
+.  warning The modifier ':u' only merges _adjacent_ duplicate words.
 .endif
 
-.if ${:U1 2 2 3:u} != "1 2 3"
-.  warning The :u modifier must merge adjacent duplicate words.
+.if ${1 2 2 3:L:u} != "1 2 3"
+.  warning The modifier ':u' must merge adjacent duplicate words.
 .endif
 
-.if ${:U:u} != ""
-.  warning The :u modifier must do nothing with an empty word list.
+.if ${:L:u} != ""
+.  warning The modifier ':u' must do nothing with an empty word list.
 .endif
 
-.if ${:U   :u} != ""
+.if ${   :L:u} != ""
 .  warning The modifier ':u' must normalize the whitespace.
 .endif
 
-.if ${:Uword:u} != "word"
-.  warning The :u modifier must do nothing with a single-element word list.
+.if ${word:L:u} != "word"
+.  warning The modifier ':u' must do nothing with a single-element word list.
 .endif
 
-.if ${:U   word   :u} != "word"
+.if ${   word   :L:u} != "word"
 .  warning The modifier ':u' must normalize the whitespace.
 .endif
 
-.if ${:U1 1 1 1 1 1 1 1:u} != "1"
-.  warning The :u modifier must merge _all_ adjacent duplicate words.
+.if ${1 1 1 1 1 1 1 1:L:u} != "1"
+.  warning The modifier ':u' must merge _all_ adjacent duplicate words.
 .endif
 
-.if ${:U   121 1  :u} != "1 2 1"
-.  warning The :u modifier must normalize whitespace between the words.
+.if ${   121 1  :L:u} != "1 2 1"
+.  warning The modifier ':u' must normalize whitespace between the words.
 .endif
 
-.if ${:U1 1 1 1 2:u} != "1 2"
+.if ${1 1 1 1 2:L:u} != "1 2"
 .  warning Duplicate words at the beginning must be merged.
 .endif
 
-.if ${:U1 2 2 2 2:u} != "1 2"
+.if ${1 2 2 2 2:L:u} != "1 2"
 .  warning Duplicate words at the end must be merged.
 .endif
 
 all:
-	@:;



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 22:37:58 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-unique.mk

Log Message:
tests/make: replace ':U' with ':L' in test for ':u'

In expressions using ':L', the value of the variable is delimited by
'{', which makes it easier to recognize it visually, as opposed to being
delimited by 'U'.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-unique.mk

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



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 22:31:58 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-root.exp varmod-root.mk

Log Message:
tests/make: split test cases for ':R' into separate tests

This allows to comment or explain individual test cases.

Remove duplicates.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-root.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-root.mk

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/make/unit-tests/varmod-root.exp
diff -u src/usr.bin/make/unit-tests/varmod-root.exp:1.3 src/usr.bin/make/unit-tests/varmod-root.exp:1.4
--- src/usr.bin/make/unit-tests/varmod-root.exp:1.3	Sun Dec 20 22:57:40 2020
+++ src/usr.bin/make/unit-tests/varmod-root.exp	Sun Dec  5 22:31:58 2021
@@ -1,11 +1 @@
-root of 'a/b/c' is 'a/b/c'
-root of 'def' is 'def'
-root of 'a.b.c' is 'a.b'
-root of 'a.b/c' is 'a'
-root of 'a' is 'a'
-root of 'a.a' is 'a'
-root of '.gitignore' is ''
-root of 'a' is 'a'
-root of 'a.a' is 'a'
-root of 'trailing/' is 'trailing/'
 exit status 0

Index: src/usr.bin/make/unit-tests/varmod-root.mk
diff -u src/usr.bin/make/unit-tests/varmod-root.mk:1.4 src/usr.bin/make/unit-tests/varmod-root.mk:1.5
--- src/usr.bin/make/unit-tests/varmod-root.mk:1.4	Sun Dec 20 22:57:40 2020
+++ src/usr.bin/make/unit-tests/varmod-root.mk	Sun Dec  5 22:31:58 2021
@@ -1,9 +1,38 @@
-# $NetBSD: varmod-root.mk,v 1.4 2020/12/20 22:57:40 rillig Exp $
+# $NetBSD: varmod-root.mk,v 1.5 2021/12/05 22:31:58 rillig Exp $
 #
 # Tests for the :R variable modifier, which returns the filename root
 # without the extension.
 
+.if ${a/b/c:L:R} != "a/b/c"
+.  error
+.endif
+
+.if ${def:L:R} != "def"
+.  error
+.endif
+
+.if ${a.b.c:L:R} != "a.b"
+.  error
+.endif
+
+.if ${a.b/c:L:R} != "a"
+.  error
+.endif
+
+.if ${a:L:R} != "a"
+.  error
+.endif
+
+.if ${a.a:L:R} != "a"
+.  error
+.endif
+
+.if ${.gitignore:L:R} != ""
+.  error
+.endif
+
+.if ${trailing/:L:R} != "trailing/"
+.  error
+.endif
+
 all:
-.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
-	@echo "root of '"${path:Q}"' is '"${path:R:Q}"'"
-.endfor



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 22:31:58 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-root.exp varmod-root.mk

Log Message:
tests/make: split test cases for ':R' into separate tests

This allows to comment or explain individual test cases.

Remove duplicates.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-root.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-root.mk

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



CVS commit: xsrc/external/mit/xorg-server/dist/config

2021-12-05 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Dec  5 21:14:13 UTC 2021

Modified Files:
xsrc/external/mit/xorg-server/dist/config: wscons.c

Log Message:
Follow the error path if asprintf fails, not if it succeeds.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/config/wscons.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/config/wscons.c
diff -u xsrc/external/mit/xorg-server/dist/config/wscons.c:1.4 xsrc/external/mit/xorg-server/dist/config/wscons.c:1.5
--- xsrc/external/mit/xorg-server/dist/config/wscons.c:1.4	Tue Sep 28 07:20:54 2021
+++ xsrc/external/mit/xorg-server/dist/config/wscons.c	Sun Dec  5 21:14:12 2021
@@ -139,7 +139,7 @@ wscons_add_keyboard(void)
 input_options = input_option_new(input_options, "name", WSCONS_KBD_DEVICE);
 input_options = input_option_new(input_options, "driver", "kbd");
 
-if (asprintf(_info, "wscons:%s", WSCONS_KBD_DEVICE) != -1)
+if (asprintf(_info, "wscons:%s", WSCONS_KBD_DEVICE) == -1)
 goto unwind;
 if (KB_ENCODING(wsenc) == KB_USER) {
 /* Ignore wscons "user" layout */



CVS commit: xsrc/external/mit/xorg-server/dist/config

2021-12-05 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Dec  5 21:14:13 UTC 2021

Modified Files:
xsrc/external/mit/xorg-server/dist/config: wscons.c

Log Message:
Follow the error path if asprintf fails, not if it succeeds.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/config/wscons.c

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



CVS commit: src/distrib/notes/evbarm

2021-12-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Dec  5 19:43:30 UTC 2021

Modified Files:
src/distrib/notes/evbarm: install xfer

Log Message:
armbsd.org is gone


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/notes/evbarm/install
cvs rdiff -u -r1.6 -r1.7 src/distrib/notes/evbarm/xfer

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

Modified files:

Index: src/distrib/notes/evbarm/install
diff -u src/distrib/notes/evbarm/install:1.17 src/distrib/notes/evbarm/install:1.18
--- src/distrib/notes/evbarm/install:1.17	Tue Apr 27 19:52:06 2021
+++ src/distrib/notes/evbarm/install	Sun Dec  5 19:43:30 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: install,v 1.17 2021/04/27 19:52:06 nia Exp $
+.\"	$NetBSD: install,v 1.18 2021/12/05 19:43:30 nia Exp $
 .\"
 .\" Copyright (c) 2001-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -69,10 +69,6 @@ Or a Rockchip device (e.g. RockPro64):
 # dd if=/usr/pkg/share/u-boot/rockpro64/rksd_loader.img of=/dev/rld0 seek=64 conv=sync progress=1
 .Ed
 .El
-.Pp
-If you do not want to prepare a SD card image manually, NetBSD developer
-Jared McNeill provides pre-prepared images on his website
-.Lk http://www.armbsd.org/arm/ "armbsd.org" .
 .Ss2 Installing NetBSD/evbarm to a SATA hard disk
 Some Arm boards offer a SATA interface, and you might want to install NetBSD
 to a hard disk after you've got it running from an SD card.

Index: src/distrib/notes/evbarm/xfer
diff -u src/distrib/notes/evbarm/xfer:1.6 src/distrib/notes/evbarm/xfer:1.7
--- src/distrib/notes/evbarm/xfer:1.6	Sun Jul 26 11:00:28 2020
+++ src/distrib/notes/evbarm/xfer	Sun Dec  5 19:43:30 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: xfer,v 1.6 2020/07/26 11:00:28 jmcneill Exp $
+.\"	$NetBSD: xfer,v 1.7 2021/12/05 19:43:30 nia Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -43,7 +43,3 @@ to decompress .gz files.
 Arm devices generally also ship with a vendor-specific U-Boot
 bootloader, which may be replaced with a board-specific "mainline"
 U-Boot image from pkgsrc for an optimal NetBSD experience.
-The images available from
-.Lk http://www.armbsd.org/arm/ "armbsd.org"
-come pre-prepared with a board-specific U-Boot image if one is
-available, and otherwise a generic image can be used.



CVS commit: src/distrib/notes/evbarm

2021-12-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Dec  5 19:43:30 UTC 2021

Modified Files:
src/distrib/notes/evbarm: install xfer

Log Message:
armbsd.org is gone


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/notes/evbarm/install
cvs rdiff -u -r1.6 -r1.7 src/distrib/notes/evbarm/xfer

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



CVS commit: src/lib/libc/time

2021-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 18:06:24 UTC 2021

Modified Files:
src/lib/libc/time: localtime.c

Log Message:
PR/56538: coypu: For compat ctime and friends (when time_t was 32 bits)
we want to load the timezone data using the same structs they were saved as.
Introduce __time_t which is always 64 bits and make the minimal changes for
this to work. Yes, it is ugly.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/lib/libc/time/localtime.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/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.125 src/lib/libc/time/localtime.c:1.126
--- src/lib/libc/time/localtime.c:1.125	Wed Oct 27 07:27:25 2021
+++ src/lib/libc/time/localtime.c	Sun Dec  5 13:06:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: localtime.c,v 1.125 2021/10/27 11:27:25 christos Exp $	*/
+/*	$NetBSD: localtime.c,v 1.126 2021/12/05 18:06:24 christos Exp $	*/
 
 /* Convert timestamp from time_t to struct tm.  */
 
@@ -12,7 +12,7 @@
 #if 0
 static char	elsieid[] = "@(#)localtime.c	8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.125 2021/10/27 11:27:25 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.126 2021/12/05 18:06:24 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -97,6 +97,8 @@ static const char	gmt[] = "GMT";
 #define TZDEFRULESTRING ",M3.2.0,M11.1.0"
 #endif
 
+typedef int_fast64_t __time_t;
+
 struct ttinfo {/* time type information */
 	int_fast32_t	tt_utoff;	/* UT offset in seconds */
 	bool		tt_isdst;	/* used to set tm_isdst */
@@ -106,7 +108,7 @@ struct ttinfo {/* time type informat
 };
 
 struct lsinfo {/* leap second information */
-	time_t		ls_trans;	/* transition time */
+	__time_t	ls_trans;	/* transition time */
 	int_fast32_t	ls_corr;	/* correction to apply */
 };
 
@@ -128,7 +130,7 @@ struct state {
 	int		charcnt;
 	bool		goback;
 	bool		goahead;
-	time_t		ats[TZ_MAX_TIMES];
+	__time_t	ats[TZ_MAX_TIMES];
 	unsigned char	types[TZ_MAX_TIMES];
 	struct ttinfo	ttis[TZ_MAX_TYPES];
 	char		chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1,
@@ -158,7 +160,7 @@ struct rule {
 static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t,
 			 struct tm *);
 static bool increment_overflow(int *, int);
-static bool increment_overflow_time(time_t *, int_fast32_t);
+static bool increment_overflow_time(__time_t *, int_fast32_t);
 static int_fast32_t leapcorr(struct state const *, time_t);
 static bool normalize_overflow32(int_fast32_t *, int *, int);
 static struct tm *timesub(time_t const *, int_fast32_t, struct state const *,
@@ -691,7 +693,7 @@ tzloadbody(char const *name, struct stat
 			for (i = 0;
  i < ts->timecnt && sp->timecnt < TZ_MAX_TIMES;
  i++) {
-			  time_t t = ts->ats[i];
+			  __time_t t = ts->ats[i];
 			  if (increment_overflow_time(, leapcorr(sp, t))
   || (0 < sp->timecnt
   && t <= sp->ats[sp->timecnt - 1]))
@@ -1208,7 +1210,7 @@ tzparse(const char *name, struct state *
 			struct rule	end;
 			int		year;
 			int		timecnt;
-			time_t		janfirst;
+			__time_t	janfirst;
 			int_fast32_t janoffset = 0;
 			int yearbeg, yearlim;
 
@@ -1248,7 +1250,7 @@ tzparse(const char *name, struct state *
 			  int_fast32_t yearsecs
 			= year_lengths[isleap(yearbeg)] * SECSPERDAY;
 			  int yearbeg1 = yearbeg;
-			  time_t janfirst1 = janfirst;
+			  __time_t janfirst1 = janfirst;
 			  if (increment_overflow_time(, yearsecs)
 			  || increment_overflow(, 1)
 			  || atlo <= janfirst1)
@@ -1767,7 +1769,7 @@ offtime_r(const time_t *timep, long offs
 time_t
 time(time_t *p)
 {
-  time_t r = sys_time(0);
+  __time_t r = sys_time(0);
   if (r != (time_t) -1) {
 int_fast32_t offset = EPOCH_LOCAL ? (daylight ? timezone : altzone) : 0;
 if (increment_overflow32(, -EPOCH_OFFSET)
@@ -1777,8 +1779,8 @@ time(time_t *p)
 }
   }
   if (p)
-*p = r;
-  return r;
+*p = (time_t)r;
+  return (time_t)r;
 }
 #endif
 
@@ -1986,7 +1988,7 @@ increment_overflow32(int_fast32_t *const
 }
 
 static bool
-increment_overflow_time(time_t *tp, int_fast32_t j)
+increment_overflow_time(__time_t *tp, int_fast32_t j)
 {
 	/*
 	** This is like
@@ -2208,16 +2210,17 @@ again:
 		 YOURTM.TM_GMTOFF is plausible, so try it instead.
 		 It's OK if YOURTM.TM_GMTOFF contains uninitialized data,
 		 since the guess gets checked.  */
-		  time_t altt = t;
+		  __time_t altt = t;
 		  int_fast32_t diff = (int_fast32_t)
 		  (mytm.TM_GMTOFF - yourtm.TM_GMTOFF);
 		  if (!increment_overflow_time(, diff)) {
 		struct tm alttm;
-		if (funcp(sp, , offset, )
+		time_t xaltt = (time_t)altt;
+		if (funcp(sp, , offset, )
 			&& alttm.tm_isdst == mytm.tm_isdst
 			&& alttm.TM_GMTOFF == yourtm.TM_GMTOFF
 			&& tmcomp(, ) == 0) {
-		  t = altt;
+		  t = xaltt;
 		  mytm = alttm;
 		}
 		  }



CVS commit: src/lib/libc/time

2021-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  5 18:06:24 UTC 2021

Modified Files:
src/lib/libc/time: localtime.c

Log Message:
PR/56538: coypu: For compat ctime and friends (when time_t was 32 bits)
we want to load the timezone data using the same structs they were saved as.
Introduce __time_t which is always 64 bits and make the minimal changes for
this to work. Yes, it is ugly.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/lib/libc/time/localtime.c

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 17:00:02 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: fix types for modifier ':O' (since today)

In var.c 1.962 from 2021-12-05, the type of the array to be sorted
changed from 'const char *' to 'Substring'.  The code still worked since
the first member of Substring is 'const char *start', but that was pure
luck.

Fix the type assumptions in the comparison functions.

Add an assertion that the words must be null-terminated since the
comparison functions currently assume this.

This kind of inconsistency may be possible to detect using static
analysis, but NetBSD's lint is currently too limited for that.  To
detect this, it would have to analyze each possible comparison function
and remember the assumed type.  This type could then be compared to the
argument type of a function call to qsort or bsearch.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.963 -r1.964 src/usr.bin/make/var.c

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/make/var.c
diff -u src/usr.bin/make/var.c:1.963 src/usr.bin/make/var.c:1.964
--- src/usr.bin/make/var.c:1.963	Sun Dec  5 15:20:13 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 17:00:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.963 2021/12/05 15:20:13 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.964 2021/12/05 17:00:02 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.963 2021/12/05 15:20:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.964 2021/12/05 17:00:02 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3285,13 +3285,13 @@ bad_modifier:
 #endif
 
 static NUM_TYPE
-num_val(const char *s)
+num_val(Substring s)
 {
 	NUM_TYPE val;
 	char *ep;
 
-	val = strtoll(s, , 0);
-	if (ep != s) {
+	val = strtoll(s.start, , 0);
+	if (ep != s.start) {
 		switch (*ep) {
 		case 'K':
 		case 'k':
@@ -3311,31 +3311,32 @@ num_val(const char *s)
 }
 
 static int
-num_cmp_asc(const void *sa, const void *sb)
+SubNumAsc(const void *sa, const void *sb)
 {
 	NUM_TYPE a, b;
 
-	a = num_val(*(const char *const *)sa);
-	b = num_val(*(const char *const *)sb);
+	a = num_val(*((const Substring *)sa));
+	b = num_val(*((const Substring *)sb));
 	return (a > b) ? 1 : (b > a) ? -1 : 0;
 }
 
 static int
-num_cmp_desc(const void *sa, const void *sb)
+SubNumDesc(const void *sa, const void *sb)
 {
-	return num_cmp_asc(sb, sa);
+	return SubNumAsc(sb, sa);
 }
 
 static int
-str_cmp_asc(const void *a, const void *b)
+SubStrAsc(const void *sa, const void *sb)
 {
-	return strcmp(*(const char *const *)a, *(const char *const *)b);
+	return strcmp(
+	((const Substring *)sa)->start, ((const Substring *)sb)->start);
 }
 
 static int
-str_cmp_desc(const void *a, const void *b)
+SubStrDesc(const void *sa, const void *sb)
 {
-	return str_cmp_asc(b, a);
+	return SubStrAsc(sb, sa);
 }
 
 static void
@@ -3366,13 +3367,13 @@ ApplyModifier_Order(const char **pp, Mod
 	int (*cmp)(const void *, const void *);
 
 	if (IsDelimiter(mod[1], ch) || mod[1] == '\0') {
-		cmp = str_cmp_asc;
+		cmp = SubStrAsc;
 		(*pp)++;
 	} else if (IsDelimiter(mod[2], ch) || mod[2] == '\0') {
 		if (mod[1] == 'n')
-			cmp = num_cmp_asc;
+			cmp = SubNumAsc;
 		else if (mod[1] == 'r')
-			cmp = str_cmp_desc;
+			cmp = SubStrDesc;
 		else if (mod[1] == 'x')
 			cmp = NULL;
 		else
@@ -3381,7 +3382,7 @@ ApplyModifier_Order(const char **pp, Mod
 	} else if (IsDelimiter(mod[3], ch) || mod[3] == '\0') {
 		if ((mod[1] == 'n' && mod[2] == 'r') ||
 		(mod[1] == 'r' && mod[2] == 'n'))
-			cmp = num_cmp_desc;
+			cmp = SubNumDesc;
 		else
 			goto bad;
 		*pp += 3;
@@ -3395,8 +3396,10 @@ ApplyModifier_Order(const char **pp, Mod
 	words = Substring_Words(ch->expr->value.str, false);
 	if (cmp == NULL)
 		ShuffleSubstrings(words.words, words.len);
-	else
+	else {
+		assert(words.words[0].end[0] == '\0');
 		qsort(words.words, words.len, sizeof(words.words[0]), cmp);
+	}
 	Expr_SetValueOwn(ch->expr, SubstringWords_JoinFree(words));
 
 	return AMR_OK;
@@ -4803,6 +4806,14 @@ Var_Stats(void)
 	HashTable_DebugStats(_GLOBAL->vars, "Global variables");
 }
 
+static int
+StrAsc(const void *sa, const void *sb)
+{
+	return strcmp(
+	*((const char *const *)sa), *((const char *const *)sb));
+}
+
+
 /* Print all variables in a scope, sorted by name. */
 void
 Var_Dump(GNode *scope)
@@ -4819,7 +4830,7 @@ Var_Dump(GNode *scope)
 		*(const char **)Vector_Push() = hi.entry->key;
 	varnames = vec.items;
 
-	qsort(varnames, vec.len, sizeof varnames[0], str_cmp_asc);
+	qsort(varnames, vec.len, sizeof varnames[0], StrAsc);
 
 	for (i = 0; i < vec.len; i++) {
 		const char *varname = varnames[i];



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 17:00:02 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: fix types for modifier ':O' (since today)

In var.c 1.962 from 2021-12-05, the type of the array to be sorted
changed from 'const char *' to 'Substring'.  The code still worked since
the first member of Substring is 'const char *start', but that was pure
luck.

Fix the type assumptions in the comparison functions.

Add an assertion that the words must be null-terminated since the
comparison functions currently assume this.

This kind of inconsistency may be possible to detect using static
analysis, but NetBSD's lint is currently too limited for that.  To
detect this, it would have to analyze each possible comparison function
and remember the assumed type.  This type could then be compared to the
argument type of a function call to qsort or bsearch.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.963 -r1.964 src/usr.bin/make/var.c

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



CVS commit: src/sys/fs/union

2021-12-05 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Dec  5 16:16:58 UTC 2021

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
In union_access() copy up regular files before checking permissions.

Unionfs is meant to provide a writable layer above a read-only layer
and should not fail here just because the lower layer is mounted
read-only.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/fs/union/union_vnops.c

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



CVS commit: src/sys/fs/union

2021-12-05 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Dec  5 16:16:58 UTC 2021

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
In union_access() copy up regular files before checking permissions.

Unionfs is meant to provide a writable layer above a read-only layer
and should not fail here just because the lower layer is mounted
read-only.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/fs/union/union_vnops.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/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.79 src/sys/fs/union/union_vnops.c:1.80
--- src/sys/fs/union/union_vnops.c:1.79	Wed Oct 20 03:08:17 2021
+++ src/sys/fs/union/union_vnops.c	Sun Dec  5 16:16:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.79 2021/10/20 03:08:17 thorpej Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.80 2021/12/05 16:16:58 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.79 2021/10/20 03:08:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.80 2021/12/05 16:16:58 hannken Exp $");
 
 #include 
 #include 
@@ -771,6 +771,13 @@ union_access(void *v)
 		}
 	}
 
+	if (un->un_uppervp == NULLVP &&
+	(un->un_lowervp->v_type == VREG) &&
+	(ap->a_accmode & VWRITE)) {
+		error = union_copyup(un, 1, ap->a_cred, curlwp);
+		if (error)
+			return error;
+	}
 
 	if ((vp = un->un_uppervp) != NULLVP) {
 		ap->a_vp = vp;



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:51:33 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop-delete.mk

Log Message:
tests/make: document use-after-free in ':@' more precisely

The commit message from the previous commit was misleading.  This bug
had not been introduced in 2016.02.27.16.20.06 (which was entirely
unrelated) but rather in 2016.02.18.23.33.25.

The commit 2016.02.27.16.20.06 just happened to be the first one from my
make-archive that triggered the bug.  That's because I had only checked
out the last commit from each month, to save some disk space.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varmod-loop-delete.mk

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/make/unit-tests/varmod-loop-delete.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop-delete.mk:1.1 src/usr.bin/make/unit-tests/varmod-loop-delete.mk:1.2
--- src/usr.bin/make/unit-tests/varmod-loop-delete.mk:1.1	Sun Dec  5 15:20:13 2021
+++ src/usr.bin/make/unit-tests/varmod-loop-delete.mk	Sun Dec  5 15:51:33 2021
@@ -1,13 +1,13 @@
-# $NetBSD: varmod-loop-delete.mk,v 1.1 2021/12/05 15:20:13 rillig Exp $
+# $NetBSD: varmod-loop-delete.mk,v 1.2 2021/12/05 15:51:33 rillig Exp $
 #
 # Tests for the variable modifier ':@', which as a side effect allows to
 # delete an arbitrary variable.
 
 # A side effect of the modifier ':@' is that the loop variable is created as
 # an actual variable in the current evaluation scope (Command/Global/target),
-# and at the end of the loop, this variable is deleted.  Before var.c 1.963
-# from 2021-12-05, a variable could be deleted while it was in use, leading to
-# a use-after-free bug.
+# and at the end of the loop, this variable is deleted.  Since var.c 1.204
+# from 2016-02-18 and before var.c 1.963 from 2021-12-05, a variable could be
+# deleted while it was in use, leading to a use-after-free bug.
 #
 # See Var_Parse, comment 'the value of the variable must not change'.
 



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:51:33 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop-delete.mk

Log Message:
tests/make: document use-after-free in ':@' more precisely

The commit message from the previous commit was misleading.  This bug
had not been introduced in 2016.02.27.16.20.06 (which was entirely
unrelated) but rather in 2016.02.18.23.33.25.

The commit 2016.02.27.16.20.06 just happened to be the first one from my
make-archive that triggered the bug.  That's because I had only checked
out the last commit from each month, to save some disk space.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varmod-loop-delete.mk

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



CVS commit: src/sys/arch/sgimips/dev

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 15:25:56 UTC 2021

Modified Files:
src/sys/arch/sgimips/dev: dp8573areg.h

Log Message:
Fix typo again... s/Comparision/Comparison/


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/dev/dp8573areg.h

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/sgimips/dev/dp8573areg.h
diff -u src/sys/arch/sgimips/dev/dp8573areg.h:1.2 src/sys/arch/sgimips/dev/dp8573areg.h:1.3
--- src/sys/arch/sgimips/dev/dp8573areg.h:1.2	Sun Dec  5 04:26:37 2021
+++ src/sys/arch/sgimips/dev/dp8573areg.h	Sun Dec  5 15:25:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dp8573areg.h,v 1.2 2021/12/05 04:26:37 msaitoh Exp $	*/
+/*	$NetBSD: dp8573areg.h,v 1.3 2021/12/05 15:25:56 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2003 Steve Rumble
@@ -96,7 +96,7 @@
 #define DP8573A_YEAR		0x0b	/* Years */
 #define DP8573A_DOW		0x0e	/* Day of Week */
 
-/* Comparision Registers */
+/* Comparison Registers */
 #define DP8573A_CMP_SEC		0x13	/* Seconds */ 
 #define DP8573A_CMP_MIN		0x14	/* Minutes */
 #define DP8573A_CMP_HOUR	0x15	/* Hours */



CVS commit: src/sys/arch/sgimips/dev

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 15:25:56 UTC 2021

Modified Files:
src/sys/arch/sgimips/dev: dp8573areg.h

Log Message:
Fix typo again... s/Comparision/Comparison/


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/dev/dp8573areg.h

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



CVS commit: src/sys/dev/ic

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 15:22:37 UTC 2021

Modified Files:
src/sys/dev/ic: aic79xx.c

Log Message:
Fix typo again... s/Expilcitly/Explicitly/


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/aic79xx.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/ic/aic79xx.c
diff -u src/sys/dev/ic/aic79xx.c:1.62 src/sys/dev/ic/aic79xx.c:1.63
--- src/sys/dev/ic/aic79xx.c:1.62	Sun Dec  5 07:44:53 2021
+++ src/sys/dev/ic/aic79xx.c	Sun Dec  5 15:22:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic79xx.c,v 1.62 2021/12/05 07:44:53 msaitoh Exp $	*/
+/*	$NetBSD: aic79xx.c,v 1.63 2021/12/05 15:22:37 msaitoh Exp $	*/
 
 /*
  * Core routines and tables shareable across OS platforms.
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.62 2021/12/05 07:44:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.63 2021/12/05 15:22:37 msaitoh Exp $");
 
 #include 
 #include 
@@ -4798,7 +4798,7 @@ ahd_handle_ign_wide_residue(struct ahd_s
 /*
  * The residual data count is not updated
  * for the command run to completion case.
- * Expilcitly zero the count.
+ * Explicitly zero the count.
  */
 data_cnt &= ~AHD_SG_LEN_MASK;
 			}



CVS commit: src/sys/dev/ic

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 15:22:37 UTC 2021

Modified Files:
src/sys/dev/ic: aic79xx.c

Log Message:
Fix typo again... s/Expilcitly/Explicitly/


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/aic79xx.c

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



CVS commit: src

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:20:13 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: Makefile varmod-loop.exp varmod-loop.mk
Added Files:
src/usr.bin/make/unit-tests: varmod-loop-delete.exp
varmod-loop-delete.mk

Log Message:
make: fix use-after-free in modifier ':@'

Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.


To generate a diff of this commit:
cvs rdiff -u -r1.1173 -r1.1174 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.962 -r1.963 src/usr.bin/make/var.c
cvs rdiff -u -r1.285 -r1.286 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varmod-loop-delete.exp \
src/usr.bin/make/unit-tests/varmod-loop-delete.mk
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-loop.mk

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1173 src/distrib/sets/lists/tests/mi:1.1174
--- src/distrib/sets/lists/tests/mi:1.1173	Sun Nov 28 16:20:13 2021
+++ src/distrib/sets/lists/tests/mi	Sun Dec  5 15:20:13 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1173 2021/11/28 16:20:13 rillig Exp $
+# $NetBSD: mi,v 1.1174 2021/12/05 15:20:13 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5985,6 +5985,8 @@
 ./usr/tests/usr.bin/make/unit-tests/varmod-l-name-to-value.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-localtime.exp			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-localtime.mktests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-loop-delete.exp			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varmod-loop-delete.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-loop-varname.exp			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-loop-varname.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmod-loop.exptests-usr.bin-tests	compattestfile,atf

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.962 src/usr.bin/make/var.c:1.963
--- src/usr.bin/make/var.c:1.962	Sun Dec  5 12:17:49 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 15:20:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.962 2021/12/05 12:17:49 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.963 2021/12/05 15:20:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.962 2021/12/05 12:17:49 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.963 2021/12/05 15:20:13 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -496,6 +496,12 @@ Var_Delete(GNode *scope, const char *var
 
 	DEBUG2(VAR, "%s:delete %s\n", scope->name, varname);
 	v = he->value;
+	if (v->inUse) {
+		Parse_Error(PARSE_FATAL,
+		"Cannot delete variable \"%s\" while it is used.",
+		v->name.str);
+		return;
+	}
 	if (v->exported)
 		unsetenv(v->name.str);
 	if (strcmp(v->name.str, MAKE_EXPORTED) == 0)

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.285 src/usr.bin/make/unit-tests/Makefile:1.286
--- src/usr.bin/make/unit-tests/Makefile:1.285	Sun Dec  5 14:57:36 2021
+++ src/usr.bin/make/unit-tests/Makefile	Sun Dec  5 15:20:13 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.285 2021/12/05 14:57:36 rillig Exp $
+# $NetBSD: Makefile,v 1.286 2021/12/05 15:20:13 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -351,6 +351,7 @@ TESTS+=		varmod-indirect
 TESTS+=		varmod-l-name-to-value
 TESTS+=		varmod-localtime
 TESTS+=		varmod-loop
+TESTS+=		varmod-loop-delete
 TESTS+=		varmod-loop-varname
 TESTS+=		varmod-match
 TESTS+=		varmod-match-escape

Index: src/usr.bin/make/unit-tests/varmod-loop.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop.exp:1.12 src/usr.bin/make/unit-tests/varmod-loop.exp:1.13
--- src/usr.bin/make/unit-tests/varmod-loop.exp:1.12	Sun Dec  5 15:01:04 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.exp	Sun Dec  5 15:20:13 2021
@@ -13,5 +13,4 @@ mod-loop-dollar:$3$:
 mod-loop-dollar:$${word}$$:
 mod-loop-dollar:$$5$$:
 mod-loop-dollar:$$${word}$$$:
-: all: ' rest of the value'
 exit status 0

Index: src/usr.bin/make/unit-tests/varmod-loop.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.17 src/usr.bin/make/unit-tests/varmod-loop.mk:1.18
--- src/usr.bin/make/unit-tests/varmod-loop.mk:1.17	Sun Dec  5 

CVS commit: src

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:20:13 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: Makefile varmod-loop.exp varmod-loop.mk
Added Files:
src/usr.bin/make/unit-tests: varmod-loop-delete.exp
varmod-loop-delete.mk

Log Message:
make: fix use-after-free in modifier ':@'

Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.


To generate a diff of this commit:
cvs rdiff -u -r1.1173 -r1.1174 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.962 -r1.963 src/usr.bin/make/var.c
cvs rdiff -u -r1.285 -r1.286 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varmod-loop-delete.exp \
src/usr.bin/make/unit-tests/varmod-loop-delete.mk
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-loop.mk

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



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:01:04 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop-varname.exp
varmod-loop-varname.mk varmod-loop.exp varmod-loop.mk

Log Message:
tests/make: demonstrate use-after-free in modifier ':@'


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-loop-varname.exp \
src/usr.bin/make/unit-tests/varmod-loop-varname.mk
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-loop.mk

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/make/unit-tests/varmod-loop-varname.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.3 src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.4
--- src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.3	Tue Nov 30 23:52:19 2021
+++ src/usr.bin/make/unit-tests/varmod-loop-varname.exp	Sun Dec  5 15:01:04 2021
@@ -1,11 +1,11 @@
 make: "varmod-loop-varname.mk" line 16: In the :@ modifier of "", the variable name "${:Ubar:S,b,v,}" must not contain a dollar.
 make: "varmod-loop-varname.mk" line 16: Malformed conditional (${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+")
-make: "varmod-loop-varname.mk" line 83: In the :@ modifier of "1 2 3", the variable name "v$" must not contain a dollar.
-make: "varmod-loop-varname.mk" line 83: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)")
-make: "varmod-loop-varname.mk" line 88: In the :@ modifier of "1 2 3", the variable name "v$$" must not contain a dollar.
-make: "varmod-loop-varname.mk" line 88: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()")
-make: "varmod-loop-varname.mk" line 93: In the :@ modifier of "1 2 3", the variable name "v$$$" must not contain a dollar.
-make: "varmod-loop-varname.mk" line 93: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()")
+make: "varmod-loop-varname.mk" line 85: In the :@ modifier of "1 2 3", the variable name "v$" must not contain a dollar.
+make: "varmod-loop-varname.mk" line 85: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)")
+make: "varmod-loop-varname.mk" line 90: In the :@ modifier of "1 2 3", the variable name "v$$" must not contain a dollar.
+make: "varmod-loop-varname.mk" line 90: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()")
+make: "varmod-loop-varname.mk" line 95: In the :@ modifier of "1 2 3", the variable name "v$$$" must not contain a dollar.
+make: "varmod-loop-varname.mk" line 95: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()")
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1
Index: src/usr.bin/make/unit-tests/varmod-loop-varname.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.3 src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.4
--- src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.3	Tue Nov 30 23:52:19 2021
+++ src/usr.bin/make/unit-tests/varmod-loop-varname.mk	Sun Dec  5 15:01:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-loop-varname.mk,v 1.3 2021/11/30 23:52:19 rillig Exp $
+# $NetBSD: varmod-loop-varname.mk,v 1.4 2021/12/05 15:01:04 rillig Exp $
 #
 # Tests for the first part of the variable modifier ':@var@...@', which
 # contains the variable name to use during the loop.
@@ -15,6 +15,8 @@
 # variable name.
 .if ${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"
 .  error
+.else
+.  error
 .endif
 
 

Index: src/usr.bin/make/unit-tests/varmod-loop.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop.exp:1.11 src/usr.bin/make/unit-tests/varmod-loop.exp:1.12
--- src/usr.bin/make/unit-tests/varmod-loop.exp:1.11	Tue Nov 30 23:52:19 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.exp	Sun Dec  5 15:01:04 2021
@@ -13,4 +13,5 @@ mod-loop-dollar:$3$:
 mod-loop-dollar:$${word}$$:
 mod-loop-dollar:$$5$$:
 mod-loop-dollar:$$${word}$$$:
+: all: ' rest of the value'
 exit status 0

Index: src/usr.bin/make/unit-tests/varmod-loop.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.16 src/usr.bin/make/unit-tests/varmod-loop.mk:1.17
--- src/usr.bin/make/unit-tests/varmod-loop.mk:1.16	Tue Nov 30 23:52:19 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.mk	Sun Dec  5 15:01:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-loop.mk,v 1.16 2021/11/30 23:52:19 rillig Exp $
+# $NetBSD: varmod-loop.mk,v 1.17 2021/12/05 15:01:04 rillig Exp $
 #
 # Tests for the :@var@...${var}...@ variable modifier.
 
@@ -187,6 +187,31 @@ CMDLINE=	global		# needed for deleting t
 .endif
 
 
-# TODO: Actually trigger the undefined behavior (use after free) that was
-#  already suspected in Var_Parse, in the comment 'the value of the variable
-#  must not change'.
+# A side effect of the modifier ':@' is that the loop variable is created as
+# an actual variable in the current evaluation scope 

CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 15:01:04 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop-varname.exp
varmod-loop-varname.mk varmod-loop.exp varmod-loop.mk

Log Message:
tests/make: demonstrate use-after-free in modifier ':@'


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-loop-varname.exp \
src/usr.bin/make/unit-tests/varmod-loop-varname.mk
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-loop.mk

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 14:57:36 UTC 2021

Modified Files:
src/usr.bin/make: test-variants.sh
src/usr.bin/make/unit-tests: Makefile export.mk opt-file.mk

Log Message:
tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/test-variants.sh
cvs rdiff -u -r1.284 -r1.285 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/export.mk
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/opt-file.mk

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/make/test-variants.sh
diff -u src/usr.bin/make/test-variants.sh:1.12 src/usr.bin/make/test-variants.sh:1.13
--- src/usr.bin/make/test-variants.sh:1.12	Sun Sep 12 10:28:40 2021
+++ src/usr.bin/make/test-variants.sh	Sun Dec  5 14:57:36 2021
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: test-variants.sh,v 1.12 2021/09/12 10:28:40 rillig Exp $
+# $NetBSD: test-variants.sh,v 1.13 2021/12/05 14:57:36 rillig Exp $
 #
 # Build several variants of make and run the tests on them.
 #
@@ -30,7 +30,7 @@ testcase() {
 	&& env -i PATH="$PATH" USETOOLS="no" "$@" \
 		sh -ce "make -ks -j6 dependall" \
 	&& size *.o make \
-	&& env -i PATH="$PATH" USETOOLS="no" MALLOC_OPTIONS="JA" \
+	&& env -i PATH="$PATH" USETOOLS="no" MALLOC_CONF="junk:true" \
 		_MKMSG_TEST=":" "$@" \
 		sh -ce "make -s test" \
 	|| fail

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.284 src/usr.bin/make/unit-tests/Makefile:1.285
--- src/usr.bin/make/unit-tests/Makefile:1.284	Tue Oct 19 15:59:26 2021
+++ src/usr.bin/make/unit-tests/Makefile	Sun Dec  5 14:57:36 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.284 2021/10/19 15:59:26 sjg Exp $
+# $NetBSD: Makefile,v 1.285 2021/12/05 14:57:36 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -651,7 +651,7 @@ TMPDIR:=	/tmp/uid${.MAKE.UID}
 x!= echo; mkdir -p ${TMPDIR}
 .endif
 
-MAKE_TEST_ENV?=	MALLOC_OPTIONS="JA"	# for jemalloc
+MAKE_TEST_ENV?=	MALLOC_CONF="junk:true"	# for jemalloc
 MAKE_TEST_ENV+= TMPDIR=${TMPDIR}
 
 .if ${.MAKE.OS} == "NetBSD"

Index: src/usr.bin/make/unit-tests/export.mk
diff -u src/usr.bin/make/unit-tests/export.mk:1.10 src/usr.bin/make/unit-tests/export.mk:1.11
--- src/usr.bin/make/unit-tests/export.mk:1.10	Sat Oct 24 08:50:17 2020
+++ src/usr.bin/make/unit-tests/export.mk	Sun Dec  5 14:57:36 2021
@@ -1,4 +1,4 @@
-# $NetBSD: export.mk,v 1.10 2020/10/24 08:50:17 rillig Exp $
+# $NetBSD: export.mk,v 1.11 2021/12/05 14:57:36 rillig Exp $
 
 UT_TEST=	export
 UT_FOO=		foo${BAR}
@@ -40,7 +40,7 @@ BAR=	bar is ${UT_FU}
 
 .MAKE.EXPORTED+=	UT_ZOO UT_TEST
 
-FILTER_CMD?=	egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_|&)='
+FILTER_CMD?=	egrep -v '^(MAKEFLAGS|MALLOC_.*|PATH|PWD|SHLVL|_|&)='
 
 all:
 	@env | ${FILTER_CMD} | sort

Index: src/usr.bin/make/unit-tests/opt-file.mk
diff -u src/usr.bin/make/unit-tests/opt-file.mk:1.12 src/usr.bin/make/unit-tests/opt-file.mk:1.13
--- src/usr.bin/make/unit-tests/opt-file.mk:1.12	Sun Apr  4 10:13:09 2021
+++ src/usr.bin/make/unit-tests/opt-file.mk	Sun Dec  5 14:57:36 2021
@@ -1,4 +1,4 @@
-# $NetBSD: opt-file.mk,v 1.12 2021/04/04 10:13:09 rillig Exp $
+# $NetBSD: opt-file.mk,v 1.13 2021/12/05 14:57:36 rillig Exp $
 #
 # Tests for the -f command line option.
 
@@ -19,7 +19,7 @@ all: file-containing-null-byte
 # outside of the file buffer.
 #
 #	printf '%s' 'VAR=value\' \
-#	| MALLOC_OPTIONS=JA make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
+#	| MALLOC_CONF="junk:true" make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
 #	| less
 #
 # The debug output shows how make happily uses freshly allocated memory (the



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 14:57:36 UTC 2021

Modified Files:
src/usr.bin/make: test-variants.sh
src/usr.bin/make/unit-tests: Makefile export.mk opt-file.mk

Log Message:
tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/test-variants.sh
cvs rdiff -u -r1.284 -r1.285 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/export.mk
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/opt-file.mk

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



CVS commit: src/lib/libc/stdlib

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 14:25:04 UTC 2021

Modified Files:
src/lib/libc/stdlib: jemalloc.3

Log Message:
jemalloc.3: fix malformed CVS Id


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdlib/jemalloc.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/stdlib

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 14:25:04 UTC 2021

Modified Files:
src/lib/libc/stdlib: jemalloc.3

Log Message:
jemalloc.3: fix malformed CVS Id


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.3
diff -u src/lib/libc/stdlib/jemalloc.3:1.10 src/lib/libc/stdlib/jemalloc.3:1.11
--- src/lib/libc/stdlib/jemalloc.3:1.10	Wed Oct 25 17:09:47 2017
+++ src/lib/libc/stdlib/jemalloc.3	Sun Dec  5 14:25:04 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD $
+.\" $NetBSD: jemalloc.3,v 1.11 2021/12/05 14:25:04 rillig Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.



CVS commit: src/sys/dev/ic

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 13:10:43 UTC 2021

Modified Files:
src/sys/dev/ic: isp.c

Log Message:
isp: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/ic/isp.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/ic/isp.c
diff -u src/sys/dev/ic/isp.c:1.132 src/sys/dev/ic/isp.c:1.133
--- src/sys/dev/ic/isp.c:1.132	Sun Dec  5 04:29:53 2021
+++ src/sys/dev/ic/isp.c	Sun Dec  5 13:10:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.132 2021/12/05 04:29:53 msaitoh Exp $ */
+/* $NetBSD: isp.c,v 1.133 2021/12/05 13:10:43 rillig Exp $ */
 /*
  * Machine and OS Independent (well, as best as possible)
  * code for the Qlogic ISP SCSI adapters.
@@ -43,7 +43,7 @@
  */
 #ifdef	__NetBSD__
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.132 2021/12/05 04:29:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.133 2021/12/05 13:10:43 rillig Exp $");
 #include 
 #endif
 #ifdef	__FreeBSD__
@@ -2725,7 +2725,7 @@ not_on_fabric:
  * layer appropriately).
  *
  * We also do initiator map target id assignment here for new initiator
- * devices and refresh old ones ot make sure that they point to the correct
+ * devices and refresh old ones to make sure that they point to the correct
  * entities.
  */
 static int



CVS commit: src/sys/dev/ic

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 13:10:43 UTC 2021

Modified Files:
src/sys/dev/ic: isp.c

Log Message:
isp: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/ic/isp.c

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:17:50 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: save a memory allocation in each modifier ':O' and ':u'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/str.h
cvs rdiff -u -r1.961 -r1.962 src/usr.bin/make/var.c

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/make/str.h
diff -u src/usr.bin/make/str.h:1.10 src/usr.bin/make/str.h:1.11
--- src/usr.bin/make/str.h:1.10	Sun Dec  5 11:40:03 2021
+++ src/usr.bin/make/str.h	Sun Dec  5 12:17:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.10 2021/12/05 11:40:03 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.11 2021/12/05 12:17:49 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig 
@@ -182,6 +182,14 @@ Substring_Equals(Substring sub, const ch
 	   memcmp(sub.start, str, len) == 0;
 }
 
+MAKE_INLINE bool
+Substring_Eq(Substring sub, Substring str)
+{
+	size_t len = Substring_Length(sub);
+	return len == Substring_Length(str) &&
+	   memcmp(sub.start, str.start, len) == 0;
+}
+
 MAKE_STATIC Substring
 Substring_Sub(Substring sub, size_t start, size_t end)
 {

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.961 src/usr.bin/make/var.c:1.962
--- src/usr.bin/make/var.c:1.961	Sun Dec  5 12:10:28 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 12:17:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.961 2021/12/05 12:10:28 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.962 2021/12/05 12:17:49 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.961 2021/12/05 12:10:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.962 2021/12/05 12:17:49 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1807,7 +1807,7 @@ ModifyWord_Realpath(Substring word, SepB
 
 
 static char *
-Words_JoinFree(Words words)
+SubstringWords_JoinFree(SubstringWords words)
 {
 	Buffer buf;
 	size_t i;
@@ -1819,10 +1819,11 @@ Words_JoinFree(Words words)
 			/* XXX: Use ch->sep instead of ' ', for consistency. */
 			Buf_AddByte(, ' ');
 		}
-		Buf_AddStr(, words.words[i]);
+		Buf_AddBytesBetween(,
+		words.words[i].start, words.words[i].end);
 	}
 
-	Words_Free(words);
+	SubstringWords_Free(words);
 
 	return Buf_DoneData();
 }
@@ -3332,13 +,13 @@ str_cmp_desc(const void *a, const void *
 }
 
 static void
-ShuffleStrings(char **strs, size_t n)
+ShuffleSubstrings(Substring *strs, size_t n)
 {
 	size_t i;
 
 	for (i = n - 1; i > 0; i--) {
 		size_t rndidx = (size_t)random() % (i + 1);
-		char *t = strs[i];
+		Substring t = strs[i];
 		strs[i] = strs[rndidx];
 		strs[rndidx] = t;
 	}
@@ -3355,7 +3356,7 @@ static ApplyModifierResult
 ApplyModifier_Order(const char **pp, ModChain *ch)
 {
 	const char *mod = *pp;
-	Words words;
+	SubstringWords words;
 	int (*cmp)(const void *, const void *);
 
 	if (IsDelimiter(mod[1], ch) || mod[1] == '\0') {
@@ -3385,12 +3386,12 @@ ApplyModifier_Order(const char **pp, Mod
 	if (!ModChain_ShouldEval(ch))
 		return AMR_OK;
 
-	words = Str_Words(ch->expr->value.str, false);
+	words = Substring_Words(ch->expr->value.str, false);
 	if (cmp == NULL)
-		ShuffleStrings(words.words, words.len);
+		ShuffleSubstrings(words.words, words.len);
 	else
 		qsort(words.words, words.len, sizeof(words.words[0]), cmp);
-	Expr_SetValueOwn(ch->expr, Words_JoinFree(words));
+	Expr_SetValueOwn(ch->expr, SubstringWords_JoinFree(words));
 
 	return AMR_OK;
 
@@ -3620,7 +3621,7 @@ ApplyModifier_WordFunc(const char **pp, 
 static ApplyModifierResult
 ApplyModifier_Unique(const char **pp, ModChain *ch)
 {
-	Words words;
+	SubstringWords words;
 
 	if (!IsDelimiter((*pp)[1], ch))
 		return AMR_UNKNOWN;
@@ -3629,14 +3630,14 @@ ApplyModifier_Unique(const char **pp, Mo
 	if (!ModChain_ShouldEval(ch))
 		return AMR_OK;
 
-	words = Str_Words(ch->expr->value.str, false);
+	words = Substring_Words(ch->expr->value.str, false);
 
 	if (words.len > 1) {
 		size_t si, di;
 
 		di = 0;
 		for (si = 1; si < words.len; si++) {
-			if (strcmp(words.words[si], words.words[di]) != 0) {
+			if (!Substring_Eq(words.words[si], words.words[di])) {
 di++;
 if (di != si)
 	words.words[di] = words.words[si];
@@ -3645,7 +3646,7 @@ ApplyModifier_Unique(const char **pp, Mo
 		words.len = di + 1;
 	}
 
-	Expr_SetValueOwn(ch->expr, Words_JoinFree(words));
+	Expr_SetValueOwn(ch->expr, SubstringWords_JoinFree(words));
 
 	return AMR_OK;
 }



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:17:50 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: save a memory allocation in each modifier ':O' and ':u'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/str.h
cvs rdiff -u -r1.961 -r1.962 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:10:28 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: save a memory allocation in the modifier ':[...]'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.960 -r1.961 src/usr.bin/make/var.c

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/make/var.c
diff -u src/usr.bin/make/var.c:1.960 src/usr.bin/make/var.c:1.961
--- src/usr.bin/make/var.c:1.960	Sun Dec  5 12:06:23 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 12:10:28 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.960 2021/12/05 12:06:23 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.961 2021/12/05 12:10:28 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.960 2021/12/05 12:06:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.961 2021/12/05 12:10:28 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2725,9 +2725,10 @@ ApplyModifier_Range(const char **pp, Mod
 		return AMR_OK;
 
 	if (n == 0) {
-		Words words = Str_Words(ch->expr->value.str, false);
+		SubstringWords words = Substring_Words(ch->expr->value.str,
+		false);
 		n = words.len;
-		Words_Free(words);
+		SubstringWords_Free(words);
 	}
 
 	Buf_Init();
@@ -3203,9 +3204,10 @@ ApplyModifier_Words(const char **pp, Mod
 		} else {
 			Buffer buf;
 
-			Words words = Str_Words(expr->value.str, false);
+			SubstringWords words = Substring_Words(
+			expr->value.str, false);
 			size_t ac = words.len;
-			Words_Free(words);
+			SubstringWords_Free(words);
 
 			/* 3 digits + '\0' is usually enough */
 			Buf_InitSize(, 4);



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:10:28 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: save a memory allocation in the modifier ':[...]'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.960 -r1.961 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:06:23 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-select-words.mk

Log Message:
make: save a memory allocation in the modifier ':[...]'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.959 -r1.960 src/usr.bin/make/var.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-select-words.mk

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/make/var.c
diff -u src/usr.bin/make/var.c:1.959 src/usr.bin/make/var.c:1.960
--- src/usr.bin/make/var.c:1.959	Sun Dec  5 11:57:18 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 12:06:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.959 2021/12/05 11:57:18 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.960 2021/12/05 12:06:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.959 2021/12/05 11:57:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.960 2021/12/05 12:06:23 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1735,7 +1735,7 @@ static char *
 VarSelectWords(const char *str, int first, int last,
 	   char sep, bool oneBigWord)
 {
-	Words words;
+	SubstringWords words;
 	int len, start, end, step;
 	int i;
 
@@ -1743,15 +1743,13 @@ VarSelectWords(const char *str, int firs
 	SepBuf_Init(, sep);
 
 	if (oneBigWord) {
-		/* fake what Str_Words() would do if there were only one word */
+		/* fake what Substring_Words() would do */
 		words.len = 1;
-		words.words = bmake_malloc(
-		(words.len + 1) * sizeof(words.words[0]));
-		words.freeIt = bmake_strdup(str);
-		words.words[0] = words.freeIt;
-		words.words[1] = NULL;
+		words.words = bmake_malloc(sizeof(words.words[0]));
+		words.freeIt = NULL;
+		words.words[0] = Substring_InitStr(str); /* no need to copy */
 	} else {
-		words = Str_Words(str, false);
+		words = Substring_Words(str, false);
 	}
 
 	/*
@@ -1777,11 +1775,11 @@ VarSelectWords(const char *str, int firs
 	}
 
 	for (i = start; (step < 0) == (i >= end); i += step) {
-		SepBuf_AddStr(, words.words[i]);
+		SepBuf_AddSubstring(, words.words[i]);
 		SepBuf_Sep();
 	}
 
-	Words_Free(words);
+	SubstringWords_Free(words);
 
 	return SepBuf_DoneData();
 }

Index: src/usr.bin/make/unit-tests/varmod-select-words.mk
diff -u src/usr.bin/make/unit-tests/varmod-select-words.mk:1.2 src/usr.bin/make/unit-tests/varmod-select-words.mk:1.3
--- src/usr.bin/make/unit-tests/varmod-select-words.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/varmod-select-words.mk	Sun Dec  5 12:06:23 2021
@@ -1,7 +1,10 @@
-# $NetBSD: varmod-select-words.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: varmod-select-words.mk,v 1.3 2021/12/05 12:06:23 rillig Exp $
 #
 # Tests for the :[...] variable modifier, which selects a single word
 # or a range of words from a variable.
+#
+# See also:
+#	modword.mk		(should be migrated here)
 
 # TODO: Implementation
 



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 12:06:23 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-select-words.mk

Log Message:
make: save a memory allocation in the modifier ':[...]'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.959 -r1.960 src/usr.bin/make/var.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-select-words.mk

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 11:57:19 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: in UnexportVars, replace Str_Words with Substring_Words

This skips an allocation and a bit of memory copying.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.958 -r1.959 src/usr.bin/make/var.c

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/make/var.c
diff -u src/usr.bin/make/var.c:1.958 src/usr.bin/make/var.c:1.959
--- src/usr.bin/make/var.c:1.958	Fri Dec  3 18:29:35 2021
+++ src/usr.bin/make/var.c	Sun Dec  5 11:57:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.958 2021/12/03 18:29:35 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.959 2021/12/05 11:57:18 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.958 2021/12/03 18:29:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.959 2021/12/05 11:57:18 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -848,15 +848,17 @@ GetVarnamesToUnexport(bool isEnv, const 
 }
 
 static void
-UnexportVar(const char *varname, UnexportWhat what)
+UnexportVar(Substring varname, UnexportWhat what)
 {
-	Var *v = VarFind(varname, SCOPE_GLOBAL, false);
+	Var *v = VarFindSubstring(varname, SCOPE_GLOBAL, false);
 	if (v == NULL) {
-		DEBUG1(VAR, "Not unexporting \"%s\" (not found)\n", varname);
+		DEBUG2(VAR, "Not unexporting \"%.*s\" (not found)\n",
+		(int)Substring_Length(varname), varname.start);
 		return;
 	}
 
-	DEBUG1(VAR, "Unexporting \"%s\"\n", varname);
+	DEBUG2(VAR, "Unexporting \"%.*s\"\n",
+	(int)Substring_Length(varname), varname.start);
 	if (what != UNEXPORT_ENV && v->exported && !v->reexport)
 		unsetenv(v->name.str);
 	v->exported = false;
@@ -880,17 +882,15 @@ static void
 UnexportVars(FStr *varnames, UnexportWhat what)
 {
 	size_t i;
-	Words words;
+	SubstringWords words;
 
 	if (what == UNEXPORT_ENV)
 		ClearEnv();
 
-	words = Str_Words(varnames->str, false);
-	for (i = 0; i < words.len; i++) {
-		const char *varname = words.words[i];
-		UnexportVar(varname, what);
-	}
-	Words_Free(words);
+	words = Substring_Words(varnames->str, false);
+	for (i = 0; i < words.len; i++)
+		UnexportVar(words.words[i], what);
+	SubstringWords_Free(words);
 
 	if (what != UNEXPORT_NAMED)
 		Global_Delete(MAKE_EXPORTED);



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 11:57:19 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: in UnexportVars, replace Str_Words with Substring_Words

This skips an allocation and a bit of memory copying.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.958 -r1.959 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 11:40:03 UTC 2021

Modified Files:
src/usr.bin/make: for.c str.h
src/usr.bin/make/unit-tests: directive-for-escape.mk

Log Message:
make: inline Str_Words into .for loop handling

This saves one memory allocation and a bit of copying, per .for loop.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/usr.bin/make/for.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/str.h
cvs rdiff -u -r1.11 -r1.12 \
src/usr.bin/make/unit-tests/directive-for-escape.mk

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/make/for.c
diff -u src/usr.bin/make/for.c:1.147 src/usr.bin/make/for.c:1.148
--- src/usr.bin/make/for.c:1.147	Thu Sep  2 07:02:07 2021
+++ src/usr.bin/make/for.c	Sun Dec  5 11:40:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.147 2021/09/02 07:02:07 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.148 2021/12/05 11:40:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.147 2021/09/02 07:02:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.148 2021/12/05 11:40:03 rillig Exp $");
 
 
 /* One of the variables to the left of the "in" in a .for loop. */
@@ -70,7 +70,7 @@ typedef struct ForVar {
 typedef struct ForLoop {
 	Buffer body;		/* Unexpanded body of the loop */
 	Vector /* of ForVar */ vars; /* Iteration variables */
-	Words items;		/* Substitution items */
+	SubstringWords items;	/* Substitution items */
 	Buffer curBody;		/* Expanded body of the current iteration */
 	unsigned int sub_next;	/* Where to continue iterating */
 } ForLoop;
@@ -87,8 +87,7 @@ ForLoop_New(void)
 
 	Buf_Init(>body);
 	Vector_Init(>vars, sizeof(ForVar));
-	f->items.words = NULL;
-	f->items.freeIt = NULL;
+	SubstringWords_Init(>items);
 	Buf_Init(>curBody);
 	f->sub_next = 0;
 
@@ -106,7 +105,7 @@ ForLoop_Free(ForLoop *f)
 	}
 	Vector_Done(>vars);
 
-	Words_Free(f->items);
+	SubstringWords_Free(f->items);
 	Buf_Done(>curBody);
 
 	free(f);
@@ -171,10 +170,10 @@ ForLoop_ParseItems(ForLoop *f, const cha
 		return false;
 	}
 
-	f->items = Str_Words(items, false);
+	f->items = Substring_Words(items, false);
 	free(items);
 
-	if (f->items.len == 1 && f->items.words[0][0] == '\0')
+	if (f->items.len == 1 && Substring_IsEmpty(f->items.words[0]))
 		f->items.len = 0; /* .for var in ${:U} */
 
 	if (f->items.len != 0 && f->items.len % f->vars.len != 0) {
@@ -278,17 +277,16 @@ For_Accum(const char *line)
 
 
 static size_t
-ExprLen(const char *expr)
+ExprLen(const char *s, const char *e)
 {
-	char ch, expr_open, expr_close;
+	char expr_open, expr_close;
 	int depth;
-	size_t len;
+	const char *p;
 
-	expr_open = expr[0];
-	if (expr_open == '\0')
-		/* just escape the $ */
-		return 0;
+	if (s == e)
+		return 0;	/* just escape the '$' */
 
+	expr_open = s[0];
 	if (expr_open == '(')
 		expr_close = ')';
 	else if (expr_open == '{')
@@ -297,11 +295,11 @@ ExprLen(const char *expr)
 		return 1;	/* Single char variable */
 
 	depth = 1;
-	for (len = 1; (ch = expr[len++]) != '\0';) {
-		if (ch == expr_open)
+	for (p = s + 1; p != e; p++) {
+		if (*p == expr_open)
 			depth++;
-		else if (ch == expr_close && --depth == 0)
-			return len;
+		else if (*p == expr_close && --depth == 0)
+			return (size_t)(p + 1 - s);
 	}
 
 	/* Expression end not found, escape the $ */
@@ -313,11 +311,11 @@ ExprLen(const char *expr)
  * that characters that break this syntax must be backslash-escaped.
  */
 static bool
-NeedsEscapes(const char *value, char endc)
+NeedsEscapes(Substring value, char endc)
 {
 	const char *p;
 
-	for (p = value; *p != '\0'; p++) {
+	for (p = value.start; p != value.end; p++) {
 		if (*p == ':' || *p == '$' || *p == '\\' || *p == endc ||
 		*p == '\n')
 			return true;
@@ -332,27 +330,29 @@ NeedsEscapes(const char *value, char end
  * The result is later unescaped by ApplyModifier_Defined.
  */
 static void
-Buf_AddEscaped(Buffer *cmds, const char *item, char endc)
+Buf_AddEscaped(Buffer *cmds, Substring item, char endc)
 {
+	const char *p;
 	char ch;
 
 	if (!NeedsEscapes(item, endc)) {
-		Buf_AddStr(cmds, item);
+		Buf_AddBytesBetween(cmds, item.start, item.end);
 		return;
 	}
 
 	/* Escape ':', '$', '\\' and 'endc' - these will be removed later by
 	 * :U processing, see ApplyModifier_Defined. */
-	while ((ch = *item++) != '\0') {
+	for (p = item.start; p != item.end; p++) {
+		ch = *p;
 		if (ch == '$') {
-			size_t len = ExprLen(item);
+			size_t len = ExprLen(p + 1, item.end);
 			if (len != 0) {
 /*
  * XXX: Should a '\' be added here?
  * See directive-for-escape.mk, ExprLen.
  */
-Buf_AddBytes(cmds, item - 1, len + 1);
-item += len;
+Buf_AddBytes(cmds, p, 1 + len);
+p += len;
 continue;
 			}
 			Buf_AddByte(cmds, '\\');


CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 11:40:03 UTC 2021

Modified Files:
src/usr.bin/make: for.c str.h
src/usr.bin/make/unit-tests: directive-for-escape.mk

Log Message:
make: inline Str_Words into .for loop handling

This saves one memory allocation and a bit of copying, per .for loop.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/usr.bin/make/for.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/str.h
cvs rdiff -u -r1.11 -r1.12 \
src/usr.bin/make/unit-tests/directive-for-escape.mk

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



CVS commit: src/sys/dev/usb

2021-12-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec  5 11:05:37 UTC 2021

Modified Files:
src/sys/dev/usb: ehci.c

Log Message:
ehci: Replace bogus polling during suspend by taking bus lock.

The system is not at high IPL or limited to a single CPU at this
point; it is running essentially normally, just with some devices
suspended.  Other threads might be trying to touch EHCI registers,
which might have bad outcomes while we're suspending stuff.  Enabling
polling only makes sense if there is a single thread and single CPU
running, such as when we enter ddb on crash.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/sys/dev/usb/ehci.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/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.286 src/sys/dev/usb/ehci.c:1.287
--- src/sys/dev/usb/ehci.c:1.286	Tue Aug 31 08:22:28 2021
+++ src/sys/dev/usb/ehci.c	Sun Dec  5 11:05:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.286 2021/08/31 08:22:28 mrg Exp $ */
+/*	$NetBSD: ehci.c,v 1.287 2021/12/05 11:05:37 riastradh Exp $ */
 
 /*
  * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.286 2021/08/31 08:22:28 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.287 2021/12/05 11:05:37 riastradh Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -1385,10 +1385,6 @@ ehci_activate(device_t self, enum devact
 /*
  * Handle suspend/resume.
  *
- * We need to switch to polling mode here, because this routine is
- * called from an interrupt context.  This is all right since we
- * are almost suspended anyway.
- *
  * Note that this power handler isn't to be registered directly; the
  * bus glue needs to call out to it.
  */
@@ -1401,9 +1397,7 @@ ehci_suspend(device_t dv, const pmf_qual
 
 	EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
-	mutex_spin_enter(>sc_intr_lock);
-	sc->sc_bus.ub_usepolling++;
-	mutex_spin_exit(>sc_intr_lock);
+	mutex_enter(>sc_lock);
 
 	for (i = 1; i <= sc->sc_noport; i++) {
 		cmd = EOREAD4(sc, EHCI_PORTSC(i)) & ~EHCI_PS_CLEAR;
@@ -1439,9 +1433,7 @@ ehci_suspend(device_t dv, const pmf_qual
 	if (hcr != EHCI_STS_HCH)
 		printf("%s: config timeout\n", device_xname(dv));
 
-	mutex_spin_enter(>sc_intr_lock);
-	sc->sc_bus.ub_usepolling--;
-	mutex_spin_exit(>sc_intr_lock);
+	mutex_exit(>sc_lock);
 
 	return true;
 }
@@ -1455,6 +1447,8 @@ ehci_resume(device_t dv, const pmf_qual_
 
 	EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
+	mutex_enter(>sc_lock);
+
 	/* restore things in case the bios sucks */
 	EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
 	EOWRITE4(sc, EHCI_PERIODICLISTBASE, DMAADDR(>sc_fldma, 0));
@@ -1500,6 +1494,8 @@ ehci_resume(device_t dv, const pmf_qual_
 	if (hcr == EHCI_STS_HCH)
 		printf("%s: config timeout\n", device_xname(dv));
 
+	mutex_exit(>sc_lock);
+
 	return true;
 }
 



CVS commit: src/sys/dev/usb

2021-12-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec  5 11:05:37 UTC 2021

Modified Files:
src/sys/dev/usb: ehci.c

Log Message:
ehci: Replace bogus polling during suspend by taking bus lock.

The system is not at high IPL or limited to a single CPU at this
point; it is running essentially normally, just with some devices
suspended.  Other threads might be trying to touch EHCI registers,
which might have bad outcomes while we're suspending stuff.  Enabling
polling only makes sense if there is a single thread and single CPU
running, such as when we enter ddb on crash.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/sys/dev/usb/ehci.c

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



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:13:44 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-assign.mk

Log Message:
tests/make: make test for '::=' easier to read, fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-assign.mk

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/make/unit-tests/varmod-assign.mk
diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.13 src/usr.bin/make/unit-tests/varmod-assign.mk:1.14
--- src/usr.bin/make/unit-tests/varmod-assign.mk:1.13	Tue Nov 30 20:48:01 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.mk	Sun Dec  5 10:13:44 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.13 2021/11/30 20:48:01 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.14 2021/12/05 10:13:44 rillig Exp $
 #
 # Tests for the obscure ::= variable modifiers, which perform variable
 # assignments during evaluation, just like the = operator in C.
@@ -44,24 +44,24 @@ all:	mod-assign-shell-error
 # used in practice.
 
 # The condition "1" is true, therefore THEN1 gets assigned a value,
-# and IT1 as well.  Nothing surprising here.
-.if "${1:?${THEN1::=then1${IT1::=t1}}:${ELSE1::=else1${IE1::=e1}}}${THEN1}${ELSE1}${IT1}${IE1}" != "then1t1"
+# and the inner IT1 as well.  Nothing surprising here.
+.if "${1:?${THEN1::=then1${IT1::=t1}}:${ELSE1::=else1${IE1::=e1}}} ${THEN1}${ELSE1}${IT1}${IE1}" != " then1t1"
 .  error
 .endif
 
-# The condition "0" is false, therefore ELSE1 gets assigned a value,
-# and IE1 as well.  Nothing surprising here as well.
-.if "${0:?${THEN2::=then2${IT2::=t2}}:${ELSE2::=else2${IE2::=e2}}}${THEN2}${ELSE2}${IT2}${IE2}" != "else2e2"
+# The condition "0" is false, therefore ELSE2 gets assigned a value,
+# and the inner IE2 as well.  Nothing surprising here as well.
+.if "${0:?${THEN2::=then2${IT2::=t2}}:${ELSE2::=else2${IE2::=e2}}} ${THEN2}${ELSE2}${IT2}${IE2}" != " else2e2"
 .  error
 .endif
 
 # The same effects happen when the variables are defined elsewhere.
-SINK3:=	${1:?${THEN3::=then3${IT3::=t3}}:${ELSE3::=else3${IE3::=e3}}}${THEN3}${ELSE3}${IT3}${IE3}
-SINK4:=	${0:?${THEN4::=then4${IT4::=t4}}:${ELSE4::=else4${IE4::=e4}}}${THEN4}${ELSE4}${IT4}${IE4}
-.if ${SINK3} != "then3t3"
+SINK3:=	${1:?${THEN3::=then3${IT3::=t3}}:${ELSE3::=else3${IE3::=e3}}} ${THEN3}${ELSE3}${IT3}${IE3}
+SINK4:=	${0:?${THEN4::=then4${IT4::=t4}}:${ELSE4::=else4${IE4::=e4}}} ${THEN4}${ELSE4}${IT4}${IE4}
+.if ${SINK3} != " then3t3"
 .  error
 .endif
-.if ${SINK4} != "else4e4"
+.if ${SINK4} != " else4e4"
 .  error
 .endif
 



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:13:44 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-assign.mk

Log Message:
tests/make: make test for '::=' easier to read, fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-assign.mk

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



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:11:31 UTC 2021

Modified Files:
src/usr.bin/make: cond.c lst.h

Log Message:
make: fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/usr.bin/make/cond.c
cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/lst.h

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/make/cond.c
diff -u src/usr.bin/make/cond.c:1.280 src/usr.bin/make/cond.c:1.281
--- src/usr.bin/make/cond.c:1.280	Sun Sep 26 03:23:06 2021
+++ src/usr.bin/make/cond.c	Sun Dec  5 10:11:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.280 2021/09/26 03:23:06 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.281 2021/12/05 10:11:31 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.280 2021/09/26 03:23:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.281 2021/12/05 10:11:31 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -1055,7 +1055,7 @@ CondParser_Eval(CondParser *par, bool *o
  *	COND_PARSE	if the condition was valid grammatically
  *	COND_INVALID	if not a valid conditional.
  *
- *	(*value) is set to the boolean value of the condition
+ *	*out_value	is set to the boolean value of the condition
  */
 static CondEvalResult
 CondEvalExpression(const char *cond, bool *out_value, bool plain,
@@ -1230,7 +1230,7 @@ Cond_EvalLine(const char *line)
 		if (p[1] != 'l') {
 			/*
 			 * Unknown directive.  It might still be a
-			 * transformation rule like '.elisp.scm',
+			 * transformation rule like '.err.txt',
 			 * therefore no error message here.
 			 */
 			return COND_INVALID;

Index: src/usr.bin/make/lst.h
diff -u src/usr.bin/make/lst.h:1.98 src/usr.bin/make/lst.h:1.99
--- src/usr.bin/make/lst.h:1.98	Sat Apr  3 11:08:40 2021
+++ src/usr.bin/make/lst.h	Sun Dec  5 10:11:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lst.h,v 1.98 2021/04/03 11:08:40 rillig Exp $	*/
+/*	$NetBSD: lst.h,v 1.99 2021/12/05 10:11:31 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -137,9 +137,9 @@ ListNode *Lst_FindDatum(List *, const vo
 
 /* Insert a datum before the given node. */
 void Lst_InsertBefore(List *, ListNode *, void *);
-/* Place a datum at the front of the list. */
+/* Add a datum at the front of the list. */
 void Lst_Prepend(List *, void *);
-/* Place a datum at the end of the list. */
+/* Add a datum at the end of the list. */
 void Lst_Append(List *, void *);
 /* Remove the node from the list. */
 void Lst_Remove(List *, ListNode *);



CVS commit: src/usr.bin/make

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:11:31 UTC 2021

Modified Files:
src/usr.bin/make: cond.c lst.h

Log Message:
make: fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/usr.bin/make/cond.c
cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/lst.h

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



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:02:52 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmisc.mk

Log Message:
tests/make: fix documentation of .MAKE.SAVE_DOLLARS


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/unit-tests/varmisc.mk

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/make/unit-tests/varmisc.mk
diff -u src/usr.bin/make/unit-tests/varmisc.mk:1.31 src/usr.bin/make/unit-tests/varmisc.mk:1.32
--- src/usr.bin/make/unit-tests/varmisc.mk:1.31	Tue Nov 30 23:52:19 2021
+++ src/usr.bin/make/unit-tests/varmisc.mk	Sun Dec  5 10:02:51 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmisc.mk,v 1.31 2021/11/30 23:52:19 rillig Exp $
+# $NetBSD: varmisc.mk,v 1.32 2021/12/05 10:02:51 rillig Exp $
 #
 # Miscellaneous variable tests.
 
@@ -83,7 +83,9 @@ SD_VALUES=	0 1 2 False True false true Y
 SD_4_DOLLARS=	
 
 .for val in ${SD_VALUES}
-.MAKE.SAVE_DOLLARS:=	${val}	# Must be := since a simple '=' has no effect.
+# The assignment must be done using ':=' since a simple '=' would be
+# interpreted as 'yes', due to the leading '$'; see ParseBoolean.
+.MAKE.SAVE_DOLLARS:=	${val}
 SD.${val}:=		${SD_4_DOLLARS}
 .endfor
 .MAKE.SAVE_DOLLARS:=	yes



CVS commit: src/usr.bin/make/unit-tests

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 10:02:52 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmisc.mk

Log Message:
tests/make: fix documentation of .MAKE.SAVE_DOLLARS


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/unit-tests/varmisc.mk

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



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:53:15 UTC 2021

Modified Files:
src/games/dab: box.h

Log Message:
dab: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/games/dab/box.h

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

Modified files:

Index: src/games/dab/box.h
diff -u src/games/dab/box.h:1.3 src/games/dab/box.h:1.4
--- src/games/dab/box.h:1.3	Sun Dec  5 09:22:45 2021
+++ src/games/dab/box.h	Sun Dec  5 09:53:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: box.h,v 1.3 2021/12/05 09:22:45 rillig Exp $	*/
+/*	$NetBSD: box.h,v 1.4 2021/12/05 09:53:15 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@ class BOX {
 int& name(void);
 int& edge(int e);
 
-// Edge maniputations
+// Edge manipulations
 void set(int e);
 void clr(int e);
 int isset(int e) const;



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:53:15 UTC 2021

Modified Files:
src/games/dab: box.h

Log Message:
dab: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/games/dab/box.h

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



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:46:05 UTC 2021

Modified Files:
src/games/dab: dab.6

Log Message:
dab.6: fix URL reference to the book


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/dab/dab.6

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

Modified files:

Index: src/games/dab/dab.6
diff -u src/games/dab/dab.6:1.7 src/games/dab/dab.6:1.8
--- src/games/dab/dab.6:1.7	Thu Feb 12 06:24:21 2015
+++ src/games/dab/dab.6	Sun Dec  5 09:46:05 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dab.6,v 1.7 2015/02/12 06:24:21 dholland Exp $
+.\"	$NetBSD: dab.6,v 1.8 2021/12/05 09:46:05 rillig Exp $
 .\"
 .\" Copyright (c) 2003 Thomas Klausner.
 .\"
@@ -22,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 7, 2012
+.Dd December 5, 2021
 .Dt DAB 6
 .Os
 .Sh NAME
@@ -105,7 +105,7 @@ used.
 .%T The Dots and Boxes Game: Sophisticated Child's Play
 .%D 2000
 .%I A K Peters
-.%U http://www.akpeters.com/book.asp?bID=111
+.%U urn:ISBN:9781568811291
 .Re
 .Sh AUTHORS
 .An Christos Zoulas



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:46:05 UTC 2021

Modified Files:
src/games/dab: dab.6

Log Message:
dab.6: fix URL reference to the book


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/dab/dab.6

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



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:22:45 UTC 2021

Modified Files:
src/games/dab: algor.cc algor.h board.cc board.h box.cc box.h defs.h
gamescreen.cc gamescreen.h human.cc human.h main.cc player.cc
player.h random.cc random.h test.cc ttyscrn.cc ttyscrn.h

Log Message:
dab: clean up introductory comments

The filenames in these comments were redundant, half of them were wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/dab/algor.cc src/games/dab/algor.h \
src/games/dab/ttyscrn.cc
cvs rdiff -u -r1.4 -r1.5 src/games/dab/board.cc src/games/dab/board.h \
src/games/dab/random.h src/games/dab/ttyscrn.h
cvs rdiff -u -r1.3 -r1.4 src/games/dab/box.cc src/games/dab/defs.h \
src/games/dab/gamescreen.h src/games/dab/human.cc src/games/dab/human.h \
src/games/dab/player.h src/games/dab/random.cc
cvs rdiff -u -r1.2 -r1.3 src/games/dab/box.h src/games/dab/gamescreen.cc \
src/games/dab/player.cc src/games/dab/test.cc
cvs rdiff -u -r1.6 -r1.7 src/games/dab/main.cc

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



CVS commit: src/games/dab

2021-12-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Dec  5 09:22:45 UTC 2021

Modified Files:
src/games/dab: algor.cc algor.h board.cc board.h box.cc box.h defs.h
gamescreen.cc gamescreen.h human.cc human.h main.cc player.cc
player.h random.cc random.h test.cc ttyscrn.cc ttyscrn.h

Log Message:
dab: clean up introductory comments

The filenames in these comments were redundant, half of them were wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/dab/algor.cc src/games/dab/algor.h \
src/games/dab/ttyscrn.cc
cvs rdiff -u -r1.4 -r1.5 src/games/dab/board.cc src/games/dab/board.h \
src/games/dab/random.h src/games/dab/ttyscrn.h
cvs rdiff -u -r1.3 -r1.4 src/games/dab/box.cc src/games/dab/defs.h \
src/games/dab/gamescreen.h src/games/dab/human.cc src/games/dab/human.h \
src/games/dab/player.h src/games/dab/random.cc
cvs rdiff -u -r1.2 -r1.3 src/games/dab/box.h src/games/dab/gamescreen.cc \
src/games/dab/player.cc src/games/dab/test.cc
cvs rdiff -u -r1.6 -r1.7 src/games/dab/main.cc

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

Modified files:

Index: src/games/dab/algor.cc
diff -u src/games/dab/algor.cc:1.5 src/games/dab/algor.cc:1.6
--- src/games/dab/algor.cc:1.5	Wed Feb 29 23:39:53 2012
+++ src/games/dab/algor.cc	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor.cc,v 1.5 2012/02/29 23:39:53 joerg Exp $	*/
+/*	$NetBSD: algor.cc,v 1.6 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 /*
- * algor.C: Computer algorithm
+ * Computer algorithm
  */
+
 #include "defs.h"
-RCSID("$NetBSD: algor.cc,v 1.5 2012/02/29 23:39:53 joerg Exp $")
+RCSID("$NetBSD: algor.cc,v 1.6 2021/12/05 09:22:45 rillig Exp $")
 
 #include "algor.h"
 #include "board.h"
Index: src/games/dab/algor.h
diff -u src/games/dab/algor.h:1.5 src/games/dab/algor.h:1.6
--- src/games/dab/algor.h:1.5	Fri Jun 15 10:51:25 2012
+++ src/games/dab/algor.h	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor.h,v 1.5 2012/06/15 10:51:25 joerg Exp $	*/
+/*	$NetBSD: algor.h,v 1.6 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 /*
- * algor.h: Computer's algorithm
+ * Computer's algorithm
  */
 
 #ifndef _H_ALGOR
Index: src/games/dab/ttyscrn.cc
diff -u src/games/dab/ttyscrn.cc:1.5 src/games/dab/ttyscrn.cc:1.6
--- src/games/dab/ttyscrn.cc:1.5	Sat Oct  6 19:39:51 2012
+++ src/games/dab/ttyscrn.cc	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttyscrn.cc,v 1.5 2012/10/06 19:39:51 christos Exp $	*/
+/*	$NetBSD: ttyscrn.cc,v 1.6 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,11 +30,11 @@
  */
 
 /*
- * ttyscrn.C: Curses screen implementation for dots
+ * Curses screen implementation for dots
  */
 
 #include "defs.h"
-RCSID("$NetBSD: ttyscrn.cc,v 1.5 2012/10/06 19:39:51 christos Exp $")
+RCSID("$NetBSD: ttyscrn.cc,v 1.6 2021/12/05 09:22:45 rillig Exp $")
 
 #include 
 #include 

Index: src/games/dab/board.cc
diff -u src/games/dab/board.cc:1.4 src/games/dab/board.cc:1.5
--- src/games/dab/board.cc:1.4	Mon Apr 28 20:22:53 2008
+++ src/games/dab/board.cc	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: board.cc,v 1.4 2008/04/28 20:22:53 martin Exp $	*/
+/*	$NetBSD: board.cc,v 1.5 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 /*
- * board.C: Board manipulations
+ * Board manipulations
  */
+
 #include "defs.h"
-RCSID("$NetBSD: board.cc,v 1.4 2008/04/28 20:22:53 martin Exp $")
+RCSID("$NetBSD: board.cc,v 1.5 2021/12/05 09:22:45 rillig Exp $")
 
 #include 
 #include 
Index: src/games/dab/board.h
diff -u src/games/dab/board.h:1.4 src/games/dab/board.h:1.5
--- src/games/dab/board.h:1.4	Wed Feb 29 23:39:53 2012
+++ src/games/dab/board.h	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: board.h,v 1.4 2012/02/29 23:39:53 joerg Exp $	*/
+/*	$NetBSD: board.h,v 1.5 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 /*
- * board.h: Board functions
+ * Board functions
  */
 
 #ifndef _H_BOARD
Index: src/games/dab/random.h
diff -u src/games/dab/random.h:1.4 src/games/dab/random.h:1.5
--- src/games/dab/random.h:1.4	Sun May  2 12:50:44 2021
+++ src/games/dab/random.h	Sun Dec  5 09:22:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: random.h,v 1.4 2021/05/02 12:50:44 rillig Exp $	*/
+/*	$NetBSD: random.h,v 1.5 2021/12/05 09:22:45 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,8 +30,8 @@
  */
 
 /*
- * random.h: Randomizer; returns a random sequence of values from [0..fx)
- *	 returning each value exactly once. After fx calls it returns fx.
+ * Randomizer; returns a random sequence of values from [0..fx) returning each
+ * value exactly once. 

CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:19:57 UTC 2021

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: oakley.c
src/external/bsd/ipf/dist/lib: parseipfexpr.c

Log Message:
s/vlaue/value/


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/crypto/dist/ipsec-tools/src/racoon/oakley.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/ipf/dist/lib/parseipfexpr.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/oakley.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.27 src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.28
--- src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.27	Sat May 19 20:21:23 2018
+++ src/crypto/dist/ipsec-tools/src/racoon/oakley.c	Sun Dec  5 08:19:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: oakley.c,v 1.27 2018/05/19 20:21:23 maxv Exp $	*/
+/*	$NetBSD: oakley.c,v 1.28 2021/12/05 08:19:57 msaitoh Exp $	*/
 
 /* Id: oakley.c,v 1.32 2006/05/26 12:19:46 manubsd Exp */
 
@@ -401,7 +401,7 @@ oakley_setdhgroup(group, dhgrp)
 		return 0;
 	}
 
-	/* set defined dh vlaues */
+	/* set defined dh values */
 	memcpy(*dhgrp, g, sizeof(*g));
 	(*dhgrp)->prime = vdup(g->prime);
 

Index: src/external/bsd/ipf/dist/lib/parseipfexpr.c
diff -u src/external/bsd/ipf/dist/lib/parseipfexpr.c:1.1.1.2 src/external/bsd/ipf/dist/lib/parseipfexpr.c:1.2
--- src/external/bsd/ipf/dist/lib/parseipfexpr.c:1.1.1.2	Sun Jul 22 13:44:40 2012
+++ src/external/bsd/ipf/dist/lib/parseipfexpr.c	Sun Dec  5 08:19:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parseipfexpr.c,v 1.1.1.2 2012/07/22 13:44:40 darrenr Exp $	*/
+/*	$NetBSD: parseipfexpr.c,v 1.2 2021/12/05 08:19:57 msaitoh Exp $	*/
 
 #include "ipf.h"
 #include 
@@ -79,7 +79,7 @@ parseipfexpr(line, errorptr)
 	for (ops = strtok(temp, ";"); ops != NULL; ops = strtok(NULL, ";")) {
 		arg = strchr(ops, '=');
 		if ((arg < ops + 2) || (arg == NULL)) {
-			error = "bad 'arg' vlaue";
+			error = "bad 'arg' value";
 			goto parseerror;
 		}
 



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:19:57 UTC 2021

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: oakley.c
src/external/bsd/ipf/dist/lib: parseipfexpr.c

Log Message:
s/vlaue/value/


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/crypto/dist/ipsec-tools/src/racoon/oakley.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/ipf/dist/lib/parseipfexpr.c

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



CVS commit: src/usr.sbin/makemandb

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:18:18 UTC 2021

Modified Files:
src/usr.sbin/makemandb: makemandb.c

Log Message:
s/trival/trivial/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/makemandb/makemandb.c

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

Modified files:

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.60 src/usr.sbin/makemandb/makemandb.c:1.61
--- src/usr.sbin/makemandb/makemandb.c:1.60	Sat May 18 07:56:43 2019
+++ src/usr.sbin/makemandb/makemandb.c	Sun Dec  5 08:18:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.60 2019/05/18 07:56:43 abhinav Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.61 2021/12/05 08:18:18 msaitoh Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay 
  * Copyright (c) 2011 Kristaps Dzonsons 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: makemandb.c,v 1.60 2019/05/18 07:56:43 abhinav Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.61 2021/12/05 08:18:18 msaitoh Exp $");
 
 #include 
 #include 
@@ -1259,7 +1259,7 @@ pman_sh(const struct roff_node *n, mandb
 
 	/*
 	 * Check if this section should be extracted and
-	 * where it should be stored. Handled the trival cases first.
+	 * where it should be stored. Handled the trivial cases first.
 	 */
 	for (i = 0; i < sizeof(mapping) / sizeof(mapping[0]); ++i) {
 		if (strcmp(head->string, mapping[i].header) == 0) {



CVS commit: src/usr.sbin/makemandb

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:18:18 UTC 2021

Modified Files:
src/usr.sbin/makemandb: makemandb.c

Log Message:
s/trival/trivial/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/makemandb/makemandb.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/ieee1394

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:17:21 UTC 2021

Modified Files:
src/sys/dev/ieee1394: fwohci.c

Log Message:
s/transcat/transact/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/dev/ieee1394/fwohci.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/ieee1394/fwohci.c
diff -u src/sys/dev/ieee1394/fwohci.c:1.148 src/sys/dev/ieee1394/fwohci.c:1.149
--- src/sys/dev/ieee1394/fwohci.c:1.148	Sat Aug 21 11:55:25 2021
+++ src/sys/dev/ieee1394/fwohci.c	Sun Dec  5 08:17:21 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwohci.c,v 1.148 2021/08/21 11:55:25 andvar Exp $	*/
+/*	$NetBSD: fwohci.c,v 1.149 2021/12/05 08:17:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  *
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.148 2021/08/21 11:55:25 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.149 2021/12/05 08:17:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -1670,7 +1670,7 @@ fwohci_txd(struct fwohci_softc *sc, stru
 			mutex_enter(>xferq.q_mtx);
 			/*
 			 * The watchdog timer takes care of split
-			 * transcation timeout for ACKPEND case.
+			 * transaction timeout for ACKPEND case.
 			 */
 		} else
 			aprint_error_dev(fc->dev, "this shouldn't happen\n");



CVS commit: src/sys/dev/ieee1394

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:17:21 UTC 2021

Modified Files:
src/sys/dev/ieee1394: fwohci.c

Log Message:
s/transcat/transact/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/dev/ieee1394/fwohci.c

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



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:16:10 UTC 2021

Modified Files:
src/sys/arch/amiga/dev: if_qn.c
src/sys/dev/ic: ncr53c9x.c
src/tests/dev/sysmon: t_swsensor.sh

Log Message:
s/timout/timeout/


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amiga/dev/if_qn.c
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/ic/ncr53c9x.c
cvs rdiff -u -r1.12 -r1.13 src/tests/dev/sysmon/t_swsensor.sh

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/amiga/dev/if_qn.c
diff -u src/sys/arch/amiga/dev/if_qn.c:1.49 src/sys/arch/amiga/dev/if_qn.c:1.50
--- src/sys/arch/amiga/dev/if_qn.c:1.49	Wed Jan 29 05:23:16 2020
+++ src/sys/arch/amiga/dev/if_qn.c	Sun Dec  5 08:16:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_qn.c,v 1.49 2020/01/29 05:23:16 thorpej Exp $ */
+/*	$NetBSD: if_qn.c,v 1.50 2021/12/05 08:16:10 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.49 2020/01/29 05:23:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.50 2021/12/05 08:16:10 msaitoh Exp $");
 
 #include "qn.h"
 #if NQN > 0
@@ -416,13 +416,13 @@ qnstart(struct ifnet *ifp)
 	/* Wait for the packet to really leave. */
 	while (!(*sc->nic_t_status & T_TMT_OK) && --timout) {
 		if ((timout % 1) == 0)
-			log(LOG_INFO, "qn: timout...\n");
+			log(LOG_INFO, "qn: timeout...\n");
 	}
 
 	if (timout == 0)
 		/* Maybe we should try to recover from this one? */
 		/* But now, let's just fall thru and hope the best... */
-		log(LOG_INFO, "qn: transmit timout (fatal?)\n");
+		log(LOG_INFO, "qn: transmit timeout (fatal?)\n");
 
 	sc->transmit_pending = 1;
 	*sc->nic_t_mask = INT_TMT_OK | INT_SIXTEEN_COL;

Index: src/sys/dev/ic/ncr53c9x.c
diff -u src/sys/dev/ic/ncr53c9x.c:1.155 src/sys/dev/ic/ncr53c9x.c:1.156
--- src/sys/dev/ic/ncr53c9x.c:1.155	Sat Aug  7 16:19:12 2021
+++ src/sys/dev/ic/ncr53c9x.c	Sun Dec  5 08:16:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9x.c,v 1.155 2021/08/07 16:19:12 thorpej Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.156 2021/12/05 08:16:10 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.155 2021/08/07 16:19:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.156 2021/12/05 08:16:10 msaitoh Exp $");
 
 #include 
 #include 
@@ -244,7 +244,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s
 	 * The recommended timeout is 250ms. This register is loaded
 	 * with a value calculated as follows, from the docs:
 	 *
-	 *		(timout period) x (CLK frequency)
+	 *		(timeout period) x (CLK frequency)
 	 *	reg = -
 	 *		 8192 x (Clock Conversion Factor)
 	 *

Index: src/tests/dev/sysmon/t_swsensor.sh
diff -u src/tests/dev/sysmon/t_swsensor.sh:1.12 src/tests/dev/sysmon/t_swsensor.sh:1.13
--- src/tests/dev/sysmon/t_swsensor.sh:1.12	Sun Jun 13 14:45:36 2021
+++ src/tests/dev/sysmon/t_swsensor.sh	Sun Dec  5 08:16:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_swsensor.sh,v 1.12 2021/06/13 14:45:36 riastradh Exp $
+# $NetBSD: t_swsensor.sh,v 1.13 2021/12/05 08:16:10 msaitoh Exp $
 
 get_sensor_info() {
 	rump.envstat -x | \
@@ -134,7 +134,7 @@ common_body() {
 	# (use $(( ... )) since the timeout is displayed in hex!)
 	rump.envstat -c env0.conf
 	if [ $(( $( get_sensor_key refresh-timeout ) )) -ne 2 ] ; then
-		atf_fail "1: Could not set refresh-timout to 2s"
+		atf_fail "1: Could not set refresh-timeout to 2s"
 	fi
 
 	# Step 2 - verify that we can read sensor's value



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:16:10 UTC 2021

Modified Files:
src/sys/arch/amiga/dev: if_qn.c
src/sys/dev/ic: ncr53c9x.c
src/tests/dev/sysmon: t_swsensor.sh

Log Message:
s/timout/timeout/


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amiga/dev/if_qn.c
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/ic/ncr53c9x.c
cvs rdiff -u -r1.12 -r1.13 src/tests/dev/sysmon/t_swsensor.sh

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



CVS commit: src/sys

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:13:12 UTC 2021

Modified Files:
src/sys/compat/netbsd32: netbsd32_wait.c
src/sys/kern: kern_exit.c

Log Message:
s/sytle/style/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/netbsd32/netbsd32_wait.c
cvs rdiff -u -r1.292 -r1.293 src/sys/kern/kern_exit.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/compat/netbsd32/netbsd32_wait.c
diff -u src/sys/compat/netbsd32/netbsd32_wait.c:1.25 src/sys/compat/netbsd32/netbsd32_wait.c:1.26
--- src/sys/compat/netbsd32/netbsd32_wait.c:1.25	Tue Sep  7 11:43:05 2021
+++ src/sys/compat/netbsd32/netbsd32_wait.c	Sun Dec  5 08:13:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_wait.c,v 1.25 2021/09/07 11:43:05 riastradh Exp $	*/
+/*	$NetBSD: netbsd32_wait.c,v 1.26 2021/12/05 08:13:12 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_wait.c,v 1.25 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_wait.c,v 1.26 2021/12/05 08:13:12 msaitoh Exp $");
 
 #include 
 #include 
@@ -119,7 +119,7 @@ netbsd32_wait6(struct lwp *l, const stru
 #if 0
 	/*
 	 * should we copyout if there was no process, hence no useful data?
-	 * We don't for an old sytle wait4() (etc) but I believe
+	 * We don't for an old style wait4() (etc) but I believe
 	 * FreeBSD does for wait6(), so a tossup...  Go with FreeBSD for now.
 	 */
 	if (pid == 0)

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.292 src/sys/kern/kern_exit.c:1.293
--- src/sys/kern/kern_exit.c:1.292	Sun Oct 10 18:07:51 2021
+++ src/sys/kern/kern_exit.c	Sun Dec  5 08:13:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.292 2021/10/10 18:07:51 thorpej Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.293 2021/12/05 08:13:12 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.292 2021/10/10 18:07:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.293 2021/12/05 08:13:12 msaitoh Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_dtrace.h"
@@ -801,7 +801,7 @@ sys_wait6(struct lwp *l, const struct sy
 #if 0
 	/*
 	 * should we copyout if there was no process, hence no useful data?
-	 * We don't for an old sytle wait4() (etc) but I believe
+	 * We don't for an old style wait4() (etc) but I believe
 	 * FreeBSD does for wait6(), so a tossup...  Go with FreeBSD for now.
 	 */
 	if (pid == 0)



CVS commit: src/sys

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:13:12 UTC 2021

Modified Files:
src/sys/compat/netbsd32: netbsd32_wait.c
src/sys/kern: kern_exit.c

Log Message:
s/sytle/style/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/netbsd32/netbsd32_wait.c
cvs rdiff -u -r1.292 -r1.293 src/sys/kern/kern_exit.c

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



CVS commit: src/usr.sbin/puffs/mount_psshfs

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:11:40 UTC 2021

Modified Files:
src/usr.sbin/puffs/mount_psshfs: psshfs.c

Log Message:
s/systme/system/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/puffs/mount_psshfs/psshfs.c

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

Modified files:

Index: src/usr.sbin/puffs/mount_psshfs/psshfs.c
diff -u src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.66 src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.67
--- src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.66	Sun Nov  4 22:46:08 2012
+++ src/usr.sbin/puffs/mount_psshfs/psshfs.c	Sun Dec  5 08:11:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: psshfs.c,v 1.66 2012/11/04 22:46:08 christos Exp $	*/
+/*	$NetBSD: psshfs.c,v 1.67 2021/12/05 08:11:39 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  * psshfs: puffs sshfs
  *
  * psshfs implements sshfs functionality on top of puffs making it
- * possible to mount a filesystme through the sftp service.
+ * possible to mount a filesystem through the sftp service.
  *
  * psshfs can execute multiple operations in "parallel" by using the
  * puffs_cc framework for continuations.
@@ -41,7 +41,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: psshfs.c,v 1.66 2012/11/04 22:46:08 christos Exp $");
+__RCSID("$NetBSD: psshfs.c,v 1.67 2021/12/05 08:11:39 msaitoh Exp $");
 #endif /* !lint */
 
 #include 



CVS commit: src/usr.sbin/puffs/mount_psshfs

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:11:40 UTC 2021

Modified Files:
src/usr.sbin/puffs/mount_psshfs: psshfs.c

Log Message:
s/systme/system/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/puffs/mount_psshfs/psshfs.c

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



CVS commit: src/sys/coda

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:10:39 UTC 2021

Modified Files:
src/sys/coda: coda_vnops.c

Log Message:
s/sybolic/symbolic/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/coda/coda_vnops.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/coda/coda_vnops.c
diff -u src/sys/coda/coda_vnops.c:1.116 src/sys/coda/coda_vnops.c:1.117
--- src/sys/coda/coda_vnops.c:1.116	Wed Oct 20 03:08:16 2021
+++ src/sys/coda/coda_vnops.c	Sun Dec  5 08:10:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_vnops.c,v 1.116 2021/10/20 03:08:16 thorpej Exp $	*/
+/*	$NetBSD: coda_vnops.c,v 1.117 2021/12/05 08:10:39 msaitoh Exp $	*/
 
 /*
  *
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.116 2021/10/20 03:08:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.117 2021/12/05 08:10:39 msaitoh Exp $");
 
 #include 
 #include 
@@ -1465,7 +1465,7 @@ coda_symlink(void *v)
 /*
  * Here's the strategy for the moment: perform the symlink, then
  * do a lookup to grab the resulting vnode.  I know this requires
- * two communications with Venus for a new sybolic link, but
+ * two communications with Venus for a new symbolic link, but
  * that's the way the ball bounces.  I don't yet want to change
  * the way the Mach symlink works.  When Mach support is
  * deprecated, we should change symlink so that the common case



CVS commit: src/sys/coda

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:10:39 UTC 2021

Modified Files:
src/sys/coda: coda_vnops.c

Log Message:
s/sybolic/symbolic/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/coda/coda_vnops.c

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



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:09:30 UTC 2021

Modified Files:
src/lib: checkver checkvers
src/lib/libc/stdlib: strfmon.c
src/sys/arch/amiga/stand/bootblock/boot: main.c

Log Message:
s/supress/suppress/


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/checkver
cvs rdiff -u -r1.8 -r1.9 src/lib/checkvers
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/strfmon.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amiga/stand/bootblock/boot/main.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/checkver
diff -u src/lib/checkver:1.17 src/lib/checkver:1.18
--- src/lib/checkver:1.17	Fri Sep 17 02:12:16 2021
+++ src/lib/checkver	Sun Dec  5 08:09:30 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: checkver,v 1.17 2021/09/17 02:12:16 christos Exp $
+#	$NetBSD: checkver,v 1.18 2021/12/05 08:09:30 msaitoh Exp $
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -63,7 +63,7 @@
 # version greater than the source is found, checkver prints a
 # header and a list of the names of the offending installed libraries.
 #
-# The header may be supressed by passing "-q" as the first argument.
+# The header may be suppressed by passing "-q" as the first argument.
 #
 
 TMP=/tmp/checkver.$$

Index: src/lib/checkvers
diff -u src/lib/checkvers:1.8 src/lib/checkvers:1.9
--- src/lib/checkvers:1.8	Fri Dec  3 13:27:37 2021
+++ src/lib/checkvers	Sun Dec  5 08:09:30 2021
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#	$NetBSD: checkvers,v 1.8 2021/12/03 13:27:37 andvar Exp $
+#	$NetBSD: checkvers,v 1.9 2021/12/05 08:09:30 msaitoh Exp $
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -119,7 +119,7 @@ fi
 QUIET=
 LIBNAME=
 
-# Supress header.
+# Suppress header.
 if [ quiet -eq 1 ] ; then
 QUIET="-q"
 fi

Index: src/lib/libc/stdlib/strfmon.c
diff -u src/lib/libc/stdlib/strfmon.c:1.13 src/lib/libc/stdlib/strfmon.c:1.14
--- src/lib/libc/stdlib/strfmon.c:1.13	Mon Nov 27 23:54:28 2017
+++ src/lib/libc/stdlib/strfmon.c	Sun Dec  5 08:09:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: strfmon.c,v 1.13 2017/11/27 23:54:28 maya Exp $	*/
+/*	$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001 Alexey Zelkin 
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strfmon.c,v 1.14 2003/03/20 08:18:55 ache Exp $");
 #else
-__RCSID("$NetBSD: strfmon.c,v 1.13 2017/11/27 23:54:28 maya Exp $");
+__RCSID("$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -58,7 +58,7 @@ __RCSID("$NetBSD: strfmon.c,v 1.13 2017/
 #define	SIGN_POSN_USED		0x02	/* '+' or '(' usage flag */
 #define	LOCALE_POSN		0x04	/* use locale defined +/- (default) */
 #define	PARENTH_POSN		0x08	/* enclose negative amount in () */
-#define	SUPRESS_CURR_SYMBOL	0x10	/* supress the currency from output */
+#define	SUPPRESS_CURR_SYMBOL	0x10	/* suppress the currency from output */
 #define	LEFT_JUSTIFY		0x20	/* left justify */
 #define	USE_INTL_CURRENCY	0x40	/* use international currency symbol */
 #define IS_NEGATIVE		0x80	/* is argument value negative ? */
@@ -187,7 +187,7 @@ vstrfmon_l(char * __restrict s, size_t m
 	flags |= (SIGN_POSN_USED|PARENTH_POSN);
 	continue;
 case '!':	/* suppress currency symbol */
-	flags |= SUPRESS_CURR_SYMBOL;
+	flags |= SUPPRESS_CURR_SYMBOL;
 	continue;
 case '-':	/* alignment (left)  */
 	flags |= LEFT_JUSTIFY;
@@ -327,7 +327,7 @@ vstrfmon_l(char * __restrict s, size_t m
 	PRINT(' ');
 			}
 
-			if (!(flags & SUPRESS_CURR_SYMBOL)) {
+			if (!(flags & SUPPRESS_CURR_SYMBOL)) {
 PRINTS(currency_symbol);
 
 if (sign_posn == 4) {
@@ -351,7 +351,7 @@ vstrfmon_l(char * __restrict s, size_t m
 PRINTS(signstr);
 			}
 
-			if (!(flags & SUPRESS_CURR_SYMBOL)) {
+			if (!(flags & SUPPRESS_CURR_SYMBOL)) {
 if ((sign_posn == 3 && sep_by_space == 2)
 || (sep_by_space == 1
 && (sign_posn == 0

Index: src/sys/arch/amiga/stand/bootblock/boot/main.c
diff -u src/sys/arch/amiga/stand/bootblock/boot/main.c:1.31 src/sys/arch/amiga/stand/bootblock/boot/main.c:1.32
--- src/sys/arch/amiga/stand/bootblock/boot/main.c:1.31	Sat Jun 11 07:01:25 2016
+++ src/sys/arch/amiga/stand/bootblock/boot/main.c	Sun Dec  5 08:09:30 2021
@@ -1,5 +1,5 @@
 /*
- * $NetBSD: main.c,v 1.31 2016/06/11 07:01:25 dholland Exp $
+ * $NetBSD: main.c,v 1.32 2021/12/05 08:09:30 msaitoh Exp $
  *
  *
  * Copyright (c) 1996,1999 Ignatios Souvatzis
@@ -409,7 +409,7 @@ printf("Kernel load failed\n");
 if (marks[MARK_NSYM] && (*kvers == 0x4e73 || *kvers <= 1)) {
 		nkcd = (int *)marks[MARK_SYM];
 		esym = 0;
-printf("Supressing %ld kernel symbols\n", marks[MARK_NSYM]);
+printf("Suppressing %ld kernel symbols\n", marks[MARK_NSYM]);
 		timelimit = 60;
 		(void)getchar();
 	}



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:09:30 UTC 2021

Modified Files:
src/lib: checkver checkvers
src/lib/libc/stdlib: strfmon.c
src/sys/arch/amiga/stand/bootblock/boot: main.c

Log Message:
s/supress/suppress/


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/checkver
cvs rdiff -u -r1.8 -r1.9 src/lib/checkvers
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/strfmon.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amiga/stand/bootblock/boot/main.c

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



CVS commit: src/usr.sbin/makemandb

2021-12-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec  5 08:03:32 UTC 2021

Modified Files:
src/usr.sbin/makemandb: custom_apropos_tokenizer.c

Log Message:
preceds -> precedes


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makemandb/custom_apropos_tokenizer.c

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

Modified files:

Index: src/usr.sbin/makemandb/custom_apropos_tokenizer.c
diff -u src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.3 src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.4
--- src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.3	Sun Dec  5 07:13:49 2021
+++ src/usr.sbin/makemandb/custom_apropos_tokenizer.c	Sun Dec  5 08:03:32 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: custom_apropos_tokenizer.c,v 1.3 2021/12/05 07:13:49 msaitoh Exp $	*/
+/*	$NetBSD: custom_apropos_tokenizer.c,v 1.4 2021/12/05 08:03:32 wiz Exp $	*/
 /*
 ** 2006 September 30
 **
@@ -304,7 +304,7 @@ star_oh(const char *z)
 
 /*
  * If the word ends with zFrom and xCond() is true for the stem
- * of the word that preceds the zFrom ending, then change the 
+ * of the word that precedes the zFrom ending, then change the 
  * ending to zTo.
  *
  * The input word *pz and zFrom are both in reverse order.  zTo



CVS commit: src/usr.sbin/makemandb

2021-12-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec  5 08:03:32 UTC 2021

Modified Files:
src/usr.sbin/makemandb: custom_apropos_tokenizer.c

Log Message:
preceds -> precedes


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makemandb/custom_apropos_tokenizer.c

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



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:03:07 UTC 2021

Modified Files:
src/lib/libc/rpc: clnt_dg.c
src/sys/arch/shark/shark: scr.c
src/usr.bin/pr: pr.c

Log Message:
s/succesful/successful/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/rpc/clnt_dg.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/shark/shark/scr.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/pr/pr.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/libc/rpc/clnt_dg.c
diff -u src/lib/libc/rpc/clnt_dg.c:1.30 src/lib/libc/rpc/clnt_dg.c:1.31
--- src/lib/libc/rpc/clnt_dg.c:1.30	Sat Aug 21 23:00:30 2021
+++ src/lib/libc/rpc/clnt_dg.c	Sun Dec  5 08:03:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: clnt_dg.c,v 1.30 2021/08/21 23:00:30 andvar Exp $	*/
+/*	$NetBSD: clnt_dg.c,v 1.31 2021/12/05 08:03:06 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)clnt_dg.c 1.19 89/03/16 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: clnt_dg.c,v 1.30 2021/08/21 23:00:30 andvar Exp $");
+__RCSID("$NetBSD: clnt_dg.c,v 1.31 2021/12/05 08:03:06 msaitoh Exp $");
 #endif
 #endif
 
@@ -484,7 +484,7 @@ send_again:
 			}
 		}		/* end successful completion */
 		/*
-		 * If unsuccesful AND error is an authentication error
+		 * If unsuccessful AND error is an authentication error
 		 * then refresh credentials and try again, else break
 		 */
 		else if (cu->cu_error.re_status == RPC_AUTHERROR)

Index: src/sys/arch/shark/shark/scr.c
diff -u src/sys/arch/shark/shark/scr.c:1.33 src/sys/arch/shark/shark/scr.c:1.34
--- src/sys/arch/shark/shark/scr.c:1.33	Mon Aug  9 21:38:04 2021
+++ src/sys/arch/shark/shark/scr.c	Sun Dec  5 08:03:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: scr.c,v 1.33 2021/08/09 21:38:04 andvar Exp $	*/
+/*	$NetBSD: scr.c,v 1.34 2021/12/05 08:03:07 msaitoh Exp $	*/
 
 /*
  * Copyright 1997
@@ -102,7 +102,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.33 2021/08/09 21:38:04 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.34 2021/12/05 08:03:07 msaitoh Exp $");
 
 #include "opt_ddb.h"
 
@@ -663,7 +663,7 @@ const struct cdevsw scr_cdevsw = {
 ** 
 ** This is the probe routine for the Smart Card.  Because the 
 ** Smart Card is hard wired, there is no probing to peform.  The
-** function ensures that a succesfull problem occurs only once.
+** function ensures that a successfull problem occurs only once.
 **
 **  FORMAL PARAMETERS:
 **

Index: src/usr.bin/pr/pr.c
diff -u src/usr.bin/pr/pr.c:1.24 src/usr.bin/pr/pr.c:1.25
--- src/usr.bin/pr/pr.c:1.24	Wed Aug  1 02:27:48 2012
+++ src/usr.bin/pr/pr.c	Sun Dec  5 08:03:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pr.c,v 1.24 2012/08/01 02:27:48 ginsbach Exp $	*/
+/*	$NetBSD: pr.c,v 1.25 2021/12/05 08:03:07 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1991 Keith Muller.
@@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
 #if 0
 from: static char sccsid[] = "@(#)pr.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: pr.c,v 1.24 2012/08/01 02:27:48 ginsbach Exp $");
+__RCSID("$NetBSD: pr.c,v 1.25 2021/12/05 08:03:07 msaitoh Exp $");
 #endif
 #endif /* not lint */
 
@@ -841,7 +841,7 @@ mulfile(int argc, char *argv[])
 	 * do not know how many columns yet. The number of operands provide an
 	 * upper bound on the number of columns. We use the number of files
 	 * we can open successfully to set the number of columns. The operation
-	 * of the merge operation (-m) in relation to unsuccesful file opens
+	 * of the merge operation (-m) in relation to unsuccessful file opens
 	 * is unspecified by posix.
 	 */
 	j = 0;



CVS commit: src

2021-12-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  5 08:03:07 UTC 2021

Modified Files:
src/lib/libc/rpc: clnt_dg.c
src/sys/arch/shark/shark: scr.c
src/usr.bin/pr: pr.c

Log Message:
s/succesful/successful/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/rpc/clnt_dg.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/shark/shark/scr.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/pr/pr.c

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