CVS commit: src/sys/fs/msdosfs

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 23:14:21 UTC 2023

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
s/chacters/characters/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/msdosfs/msdosfs_conv.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/msdosfs/msdosfs_conv.c
diff -u src/sys/fs/msdosfs/msdosfs_conv.c:1.18 src/sys/fs/msdosfs/msdosfs_conv.c:1.19
--- src/sys/fs/msdosfs/msdosfs_conv.c:1.18	Sat Oct 23 16:58:17 2021
+++ src/sys/fs/msdosfs/msdosfs_conv.c	Mon Feb 13 23:14:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_conv.c,v 1.18 2021/10/23 16:58:17 thorpej Exp $	*/
+/*	$NetBSD: msdosfs_conv.c,v 1.19 2023/02/13 23:14:21 andvar Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1997 Wolfgang Solfrank.
@@ -58,7 +58,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.18 2021/10/23 16:58:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.19 2023/02/13 23:14:21 andvar Exp $");
 
 /*
  * System include files.
@@ -866,7 +866,7 @@ ucs2utf8str(const u_int16_t *in, int n, 
 
 /*
  * Convert UTF8 string into UCS-2 string
- * return total number of output chacters
+ * return total number of output characters
  */
 static int
 utf8ucs2str(const u_int8_t *in, int n, u_int16_t *out, int m)
@@ -920,7 +920,7 @@ ucs2char8str(const u_int16_t *in, int n,
 
 /*
  * Convert 8bit character string into UCS-2 string
- * return total number of output chacters
+ * return total number of output characters
  */
 static int
 char8ucs2str(const u_int8_t *in, int n, u_int16_t *out, int m)



CVS commit: src/sys/fs/msdosfs

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 23:14:21 UTC 2023

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
s/chacters/characters/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/msdosfs/msdosfs_conv.c

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



CVS commit: src/external/bsd/nvi/dist/common

2023-02-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Feb 13 23:08:43 UTC 2023

Modified Files:
src/external/bsd/nvi/dist/common: search.c

Log Message:
search.c: correctly handle escaped backslashes

Addresses PR bin/57106 from Bosco G. G., who supplied the patch.
(This was also committed in the nvi2 sources:
https://github.com/lichray/nvi2/commit/e7054267a371d5caa81edb218f5c8388e11b5197)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/search.c

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



CVS commit: src/external/bsd/nvi/dist/common

2023-02-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Feb 13 23:08:43 UTC 2023

Modified Files:
src/external/bsd/nvi/dist/common: search.c

Log Message:
search.c: correctly handle escaped backslashes

Addresses PR bin/57106 from Bosco G. G., who supplied the patch.
(This was also committed in the nvi2 sources:
https://github.com/lichray/nvi2/commit/e7054267a371d5caa81edb218f5c8388e11b5197)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/search.c

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

Modified files:

Index: src/external/bsd/nvi/dist/common/search.c
diff -u src/external/bsd/nvi/dist/common/search.c:1.4 src/external/bsd/nvi/dist/common/search.c:1.5
--- src/external/bsd/nvi/dist/common/search.c:1.4	Wed Nov 22 16:17:30 2017
+++ src/external/bsd/nvi/dist/common/search.c	Mon Feb 13 23:08:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.4 2017/11/22 16:17:30 rin Exp $ */
+/*	$NetBSD: search.c,v 1.5 2023/02/13 23:08:43 gutteridge Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: search.c,v 10.31 2001/06/25 15:19:12 skimo Exp  (Berkeley) Date: 2001/06/25 15:19:12 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: search.c,v 1.4 2017/11/22 16:17:30 rin Exp $");
+__RCSID("$NetBSD: search.c,v 1.5 2023/02/13 23:08:43 gutteridge Exp $");
 #endif
 
 #include 
@@ -110,9 +110,14 @@ prev:			if (sp->re == NULL) {
 	++p;
 break;
 			}
-			if (plen > 1 && p[0] == '\\' && p[1] == delim) {
-++p;
---plen;
+			if (plen > 1 && p[0] == '\\') {
+if(p[1] == delim) {
+	++p;
+	--plen;
+} else if(p[1] == '\\') {
+	*t++ = *p++;
+	--plen;
+}
 			}
 		}
 		if (epp != NULL)



CVS commit: src

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 23:02:27 UTC 2023

Modified Files:
src/lib/libcurses/PSD.doc: appen.A appen.C intro.5
src/usr.bin/printf: printf.1

Log Message:
s/chracter/character/ in documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/PSD.doc/appen.A \
src/lib/libcurses/PSD.doc/appen.C
cvs rdiff -u -r1.8 -r1.9 src/lib/libcurses/PSD.doc/intro.5
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/printf/printf.1

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

Modified files:

Index: src/lib/libcurses/PSD.doc/appen.A
diff -u src/lib/libcurses/PSD.doc/appen.A:1.7 src/lib/libcurses/PSD.doc/appen.A:1.8
--- src/lib/libcurses/PSD.doc/appen.A:1.7	Thu Aug  7 16:44:26 2003
+++ src/lib/libcurses/PSD.doc/appen.A	Mon Feb 13 23:02:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: appen.A,v 1.7 2003/08/07 16:44:26 agc Exp $
+.\"	$NetBSD: appen.A,v 1.8 2023/02/13 23:02:27 andvar Exp $
 .\"
 .\" Copyright (c) 1980, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -58,7 +58,7 @@ the source code in the
 This program demonstrates how to set up a window and output characters to it.
 Also, it demonstrates how one might control the output to the window.
 If you run this program, you will get a demonstration of the character output
-chracteristics discussed in the above Character Output section.
+characteristics discussed in the above Character Output section.
 .(l I
 .so ex1.gr
 .)l
Index: src/lib/libcurses/PSD.doc/appen.C
diff -u src/lib/libcurses/PSD.doc/appen.C:1.7 src/lib/libcurses/PSD.doc/appen.C:1.8
--- src/lib/libcurses/PSD.doc/appen.C:1.7	Thu Aug  7 16:44:26 2003
+++ src/lib/libcurses/PSD.doc/appen.C	Mon Feb 13 23:02:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: appen.C,v 1.7 2003/08/07 16:44:26 agc Exp $
+.\"	$NetBSD: appen.C,v 1.8 2023/02/13 23:02:27 andvar Exp $
 .\"
 .\" Copyright (c) 1980, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -62,7 +62,7 @@ of what the relevant portions do.
 This program demonstrates how to set up a window and output characters to it.
 Also, it demonstrates how one might control the output to the window.
 If you run this program, you will get a demonstration of the character output
-chracteristics discussed in the above Character Output section.
+characteristics discussed in the above Character Output section.
 .(l I
 .so t2.gr
 .)l

Index: src/lib/libcurses/PSD.doc/intro.5
diff -u src/lib/libcurses/PSD.doc/intro.5:1.8 src/lib/libcurses/PSD.doc/intro.5:1.9
--- src/lib/libcurses/PSD.doc/intro.5:1.8	Sun Nov  2 11:16:03 2003
+++ src/lib/libcurses/PSD.doc/intro.5	Mon Feb 13 23:02:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: intro.5,v 1.8 2003/11/02 11:16:03 wiz Exp $
+.\"	$NetBSD: intro.5,v 1.9 2023/02/13 23:02:27 andvar Exp $
 .\"
 .\" Copyright (c) 1980, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -46,7 +46,7 @@ line) is output.
 Likewise, if scrolling is enabled, a scroll will be invoked only when the
 first character on he first line past the bottom line of the window is
 output.
-If scrolling is not enabled the chracters will to be output to the
+If scrolling is not enabled the characters will to be output to the
 bottom right corner of the window which is the cursor location.
 .pp
 This policy allows consistent behavior of the cursor at the boundary

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.36 src/usr.bin/printf/printf.1:1.37
--- src/usr.bin/printf/printf.1:1.36	Wed May 19 22:29:18 2021
+++ src/usr.bin/printf/printf.1	Mon Feb 13 23:02:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.36 2021/05/19 22:29:18 kre Exp $
+.\"	$NetBSD: printf.1,v 1.37 2023/02/13 23:02:27 andvar Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -138,7 +138,7 @@ Each format specification is introduced 
 .Pq Ql \&% .
 To produce a literal percent
 .Pq Ql \&% 
-in the output, write the percent chracter twice:
+in the output, write the percent character twice:
 .Pq Ql \&%% .
 This is not a format conversion.
 The remainder of the format specification includes,



CVS commit: src

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 23:02:27 UTC 2023

Modified Files:
src/lib/libcurses/PSD.doc: appen.A appen.C intro.5
src/usr.bin/printf: printf.1

Log Message:
s/chracter/character/ in documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/PSD.doc/appen.A \
src/lib/libcurses/PSD.doc/appen.C
cvs rdiff -u -r1.8 -r1.9 src/lib/libcurses/PSD.doc/intro.5
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/printf/printf.1

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



CVS commit: src/sys/dev/ppbus

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 22:44:52 UTC 2023

Modified Files:
src/sys/dev/ppbus: ppbus_base.c

Log Message:
s/charater/character/ in one more comment.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ppbus/ppbus_base.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/ppbus

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 22:44:52 UTC 2023

Modified Files:
src/sys/dev/ppbus: ppbus_base.c

Log Message:
s/charater/character/ in one more comment.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ppbus/ppbus_base.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/ppbus/ppbus_base.c
diff -u src/sys/dev/ppbus/ppbus_base.c:1.22 src/sys/dev/ppbus/ppbus_base.c:1.23
--- src/sys/dev/ppbus/ppbus_base.c:1.22	Tue Jan 17 14:13:48 2023
+++ src/sys/dev/ppbus/ppbus_base.c	Mon Feb 13 22:44:52 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ppbus_base.c,v 1.22 2023/01/17 14:13:48 msaitoh Exp $ */
+/* $NetBSD: ppbus_base.c,v 1.23 2023/02/13 22:44:52 andvar Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.22 2023/01/17 14:13:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.23 2023/02/13 22:44:52 andvar Exp $");
 
 #include "opt_ppbus_1284.h"
 #include "opt_ppbus.h"
@@ -236,7 +236,7 @@ ppbus_write(device_t dev, char * buf, in
 	return (bus->ppbus_write(device_parent(bus->sc_dev), buf, len, how, cnt));
 }
 
-/* Read charaters from the port */
+/* Read characters from the port */
 int
 ppbus_read(device_t dev, char * buf, int len, int how, size_t * cnt)
 {



CVS commit: src/tests/dev/audio

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 22:24:06 UTC 2023

Modified Files:
src/tests/dev/audio: audiotest.c

Log Message:
s/plyaback/playback/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/dev/audio/audiotest.c

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

Modified files:

Index: src/tests/dev/audio/audiotest.c
diff -u src/tests/dev/audio/audiotest.c:1.27 src/tests/dev/audio/audiotest.c:1.28
--- src/tests/dev/audio/audiotest.c:1.27	Sat Aug 13 07:22:40 2022
+++ src/tests/dev/audio/audiotest.c	Mon Feb 13 22:24:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiotest.c,v 1.27 2022/08/13 07:22:40 isaki Exp $	*/
+/*	$NetBSD: audiotest.c,v 1.28 2023/02/13 22:24:06 andvar Exp $	*/
 
 /*
  * Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: audiotest.c,v 1.27 2022/08/13 07:22:40 isaki Exp $");
+__RCSID("$NetBSD: audiotest.c,v 1.28 2023/02/13 22:24:06 andvar Exp $");
 
 #include 
 #include 
@@ -4208,7 +4208,7 @@ DEF(FIOASYNC_reset)
 }
 
 /*
- * Whether SIGIO is emitted on plyaback.
+ * Whether SIGIO is emitted on playback.
  * XXX I don't understand conditions that NetBSD7 emits signal.
  */
 DEF(FIOASYNC_play_signal)



CVS commit: src/tests/dev/audio

2023-02-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Feb 13 22:24:06 UTC 2023

Modified Files:
src/tests/dev/audio: audiotest.c

Log Message:
s/plyaback/playback/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/dev/audio/audiotest.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

2023-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb 13 21:01:46 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: dep-var.exp dep-var.mk

Log Message:
tests/make: update test for evaluating undefined variables


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/dep-var.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/dep-var.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

2023-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb 13 21:01:46 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: dep-var.exp dep-var.mk

Log Message:
tests/make: update test for evaluating undefined variables


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/dep-var.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/dep-var.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/dep-var.exp
diff -u src/usr.bin/make/unit-tests/dep-var.exp:1.4 src/usr.bin/make/unit-tests/dep-var.exp:1.5
--- src/usr.bin/make/unit-tests/dep-var.exp:1.4	Tue Sep  8 05:26:22 2020
+++ src/usr.bin/make/unit-tests/dep-var.exp	Mon Feb 13 21:01:46 2023
@@ -1,3 +1,27 @@
+Var_Parse: ${UNDEF1} (eval-defined)
+Global: .ALLTARGETS =  all
+Global: .ALLTARGETS =  all ${DEF2}
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3}
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1
+Global: INDIRECT_1 = 2-$${INDIRECT_2}-2
+Global: INDIRECT_2 = 3-$${INDIRECT_3}-3
+Global: INDIRECT_3 = indirect
+Global: UNDEF1 = undef1
+Global: DEF2 = def2
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$)
+Var_Parse: ${:U\$)}: (eval-defined)
+Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
+Result of ${:U\$)} is "$)" (eval-defined, defined)
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1 def2
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1 def2 a-def2-b
+Var_Parse: $INDIRECT_2-2-1 $): (parse-only)
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1 def2 a-def2-b 1-2-$INDIRECT_2-2-1
+Var_Parse: $): (parse-only)
+Global: .ALLTARGETS =  all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1 def2 a-def2-b 1-2-$INDIRECT_2-2-1 $)
+Global: .MAKEFLAGS =  -r -k -d v -d
+Global: .MAKEFLAGS =  -r -k -d v -d 0
 make: Malformed variable expression at "$)"
 def2
 a-def2-b

Index: src/usr.bin/make/unit-tests/dep-var.mk
diff -u src/usr.bin/make/unit-tests/dep-var.mk:1.6 src/usr.bin/make/unit-tests/dep-var.mk:1.7
--- src/usr.bin/make/unit-tests/dep-var.mk:1.6	Sun Apr  4 10:13:09 2021
+++ src/usr.bin/make/unit-tests/dep-var.mk	Mon Feb 13 21:01:46 2023
@@ -1,14 +1,16 @@
-# $NetBSD: dep-var.mk,v 1.6 2021/04/04 10:13:09 rillig Exp $
+# $NetBSD: dep-var.mk,v 1.7 2023/02/13 21:01:46 rillig Exp $
 #
 # Tests for variable references in dependency declarations.
 #
 # Uh oh, this feels so strange that probably nobody uses it. But it seems to
 # be the only way to reach the lower half of SuffExpandChildren.
 
-# XXX: The -dv log says:
-#	Var_Parse: ${UNDEF1} with VARE_UNDEFERR|VARE_WANTRES
-# but no error message is generated for this line.
-# The variable expression ${UNDEF1} simply expands to an empty string.
+.MAKEFLAGS: -dv
+
+# expect: Var_Parse: ${UNDEF1} (eval-defined)
+# Even though undefined expressions should lead to errors, no error message is
+# generated for this line.  The variable expression ${UNDEF1} simply expands
+# to an empty string.
 all: ${UNDEF1}
 
 # Using a double dollar in order to circumvent immediate variable expansion
@@ -20,8 +22,8 @@ all: ${UNDEF1}
 all: $${DEF2} a-$${DEF2}-b
 
 # This variable is not defined at all.
-# XXX: The -dv log says:
-#	Var_Parse: ${UNDEF3} with VARE_UNDEFERR|VARE_WANTRES
+# XXX: The -dv log says later when expanding the sources of 'all':
+#	Var_Parse: ${UNDEF3} (eval-defined)
 # but no error message is generated for this line, just like for UNDEF1.
 # The variable expression ${UNDEF3} simply expands to an empty string.
 all: $${UNDEF3}
@@ -81,8 +83,13 @@ all: )
 # Since 2020-09-13, this generates a parse error in lint mode (-dL), but not
 # in normal mode since ParseDependency does not handle any errors after
 # calling Var_Parse.
+# expect: Var_Parse: ${:U\$)}: (eval-defined)
+# expect: Var_Parse: $INDIRECT_2-2-1 $): (parse-only)
+# expect: Var_Parse: $): (parse-only)
 undef1 def2 a-def2-b 1-2-$$INDIRECT_2-2-1 ${:U\$)}:
 	@echo ${.TARGET:Q}
 
+.MAKEFLAGS: -d0
+
 # XXX: Why is the exit status still 0, even though Parse_Error is called
 # with PARSE_FATAL in SuffExpandChildren?



CVS commit: src/usr.bin/make

2023-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb 13 19:25:15 UTC 2023

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

Log Message:
make: extract the decision of using a specific log format

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1040 -r1.1041 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

2023-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Feb 13 19:25:15 UTC 2023

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

Log Message:
make: extract the decision of using a specific log format

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1040 -r1.1041 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.1040 src/usr.bin/make/var.c:1.1041
--- src/usr.bin/make/var.c:1.1040	Thu Feb  9 07:34:15 2023
+++ src/usr.bin/make/var.c	Mon Feb 13 19:25:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1040 2023/02/09 07:34:15 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.1041 2023/02/13 19:25:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1040 2023/02/09 07:34:15 sjg Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1041 2023/02/13 19:25:15 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3735,6 +3735,18 @@ ApplyModifier_SunShell(const char **pp, 
 }
 #endif
 
+/*
+ * In cases where the evaluation mode and the definedness are the "standard"
+ * ones, don't log them, to keep the logs readable.
+ */
+static bool
+ShouldLogInSimpleFormat(const Expr *expr)
+{
+	return (expr->emode == VARE_WANTRES ||
+		expr->emode == VARE_UNDEFERR) &&
+	   expr->defined == DEF_REGULAR;
+}
+
 static void
 LogBeforeApply(const ModChain *ch, const char *mod)
 {
@@ -3752,8 +3764,7 @@ LogBeforeApply(const ModChain *ch, const
 		return;
 	}
 
-	if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) &&
-	expr->defined == DEF_REGULAR) {
+	if (ShouldLogInSimpleFormat(expr)) {
 		debug_printf(
 		"Evaluating modifier ${%s:%c%s} on value \"%s\"\n",
 		expr->name, mod[0], is_single_char ? "" : "...",
@@ -3774,9 +3785,7 @@ LogAfterApply(const ModChain *ch, const 
 	const char *value = Expr_Str(expr);
 	const char *quot = value == var_Error ? "" : "\"";
 
-	if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) &&
-	expr->defined == DEF_REGULAR) {
-
+	if (ShouldLogInSimpleFormat(expr)) {
 		debug_printf("Result of ${%s:%.*s} is %s%s%s\n",
 		expr->name, (int)(p - mod), mod,
 		quot, value == var_Error ? "error" : value, quot);



CVS commit: src/sys/kern

2023-02-13 Thread Brian Buhrow
Module Name:src
Committed By:   buhrow
Date:   Mon Feb 13 19:07:14 UTC 2023

Modified Files:
src/sys/kern: subr_devsw.c

Log Message:
When a device driver calls devsw_attach() it has the option of 
attaching a block device
structure and a character device structure, or, just the character device 
structure.
With the existing code, if a driver elects not to attach a block device 
structure and if it
asks for a major number to be dynamically assigned to its character interface,
that driver will not be able to detach and reattach its character driver 
interface.  This is a very
long standing bug which didn't come to light until we began using loadable 
kernel modules more
heavily.  this patch fixes this problem.  With this patch in place, drivers 
that implement only
a character device interface may detach and reattach that character interface 
as often as they
need to.

Fixes PR kern/57229


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/subr_devsw.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/kern/subr_devsw.c
diff -u src/sys/kern/subr_devsw.c:1.49 src/sys/kern/subr_devsw.c:1.50
--- src/sys/kern/subr_devsw.c:1.49	Sat Oct 29 10:52:36 2022
+++ src/sys/kern/subr_devsw.c	Mon Feb 13 19:07:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_devsw.c,v 1.49 2022/10/29 10:52:36 riastradh Exp $	*/
+/*	$NetBSD: subr_devsw.c,v 1.50 2023/02/13 19:07:14 buhrow Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.49 2022/10/29 10:52:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.50 2023/02/13 19:07:14 buhrow Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dtrace.h"
@@ -397,7 +397,7 @@ devsw_attach(const char *devname,
 		if (conv->d_name == NULL || strcmp(devname, conv->d_name) != 0)
 			continue;
 
-		if (*bmajor < 0)
+		if ((bdev != NULL) && (*bmajor < 0)) 
 			*bmajor = conv->d_bmajor;
 		if (*cmajor < 0)
 			*cmajor = conv->d_cmajor;



CVS commit: src/sys/kern

2023-02-13 Thread Brian Buhrow
Module Name:src
Committed By:   buhrow
Date:   Mon Feb 13 19:07:14 UTC 2023

Modified Files:
src/sys/kern: subr_devsw.c

Log Message:
When a device driver calls devsw_attach() it has the option of 
attaching a block device
structure and a character device structure, or, just the character device 
structure.
With the existing code, if a driver elects not to attach a block device 
structure and if it
asks for a major number to be dynamically assigned to its character interface,
that driver will not be able to detach and reattach its character driver 
interface.  This is a very
long standing bug which didn't come to light until we began using loadable 
kernel modules more
heavily.  this patch fixes this problem.  With this patch in place, drivers 
that implement only
a character device interface may detach and reattach that character interface 
as often as they
need to.

Fixes PR kern/57229


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/subr_devsw.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/usb

2023-02-13 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Feb 13 14:05:26 UTC 2023

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

Log Message:
Add support for ZTE MF112 and D-Link DWM222 3G USB modems


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/u3g.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/usb

2023-02-13 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Feb 13 14:05:26 UTC 2023

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

Log Message:
Add support for ZTE MF112 and D-Link DWM222 3G USB modems


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/u3g.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/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.43 src/sys/dev/usb/u3g.c:1.44
--- src/sys/dev/usb/u3g.c:1.43	Sat Aug  7 16:19:17 2021
+++ src/sys/dev/usb/u3g.c	Mon Feb 13 14:05:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: u3g.c,v 1.43 2021/08/07 16:19:17 thorpej Exp $	*/
+/*	$NetBSD: u3g.c,v 1.44 2023/02/13 14:05:26 manu Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.43 2021/08/07 16:19:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.44 2023/02/13 14:05:26 manu Exp $");
 
 #include 
 #include 
@@ -252,6 +252,7 @@ static const struct usb_devno u3g_devs[]
 	{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF626 },
 	{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF628 },
 	{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF820D },
+	{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF112 },
 
 	/* 4G Systems */
 	{ USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_XSSTICK_P14 },
@@ -260,6 +261,7 @@ static const struct usb_devno u3g_devs[]
 	/* DLink */
 	{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWM157 },
 	{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWM157E },
+	{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWM222 },
 };
 
 /*



CVS commit: src/usr.bin/audio/play

2023-02-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Feb 13 13:35:45 UTC 2023

Modified Files:
src/usr.bin/audio/play: audioplay.1

Log Message:
audioplay(1): fix typo

>From Jim Spath in PR/57228


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/audio/play/audioplay.1

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

Modified files:

Index: src/usr.bin/audio/play/audioplay.1
diff -u src/usr.bin/audio/play/audioplay.1:1.30 src/usr.bin/audio/play/audioplay.1:1.31
--- src/usr.bin/audio/play/audioplay.1:1.30	Fri Apr 10 21:33:27 2020
+++ src/usr.bin/audio/play/audioplay.1	Mon Feb 13 13:35:45 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: audioplay.1,v 1.30 2020/04/10 21:33:27 gutteridge Exp $
+.\"	$NetBSD: audioplay.1,v 1.31 2023/02/13 13:35:45 uwe Exp $
 .\"
 .\" Copyright (c) 1998, 1999, 2002, 2010, 2019 Matthew R. Green
 .\" All rights reserved.
@@ -181,7 +181,7 @@ In this case
 converts the floating point data into signed linear samples before
 they are passed to the chosen audio device.
 .Sh ERRORS
-If the audio device or the control device can not be opened, and error is
+If the audio device or the control device can not be opened, an error is
 returned.
 .Pp
 If an invalid parameter is specified, an error is returned.



CVS commit: src/usr.bin/audio/play

2023-02-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Feb 13 13:35:45 UTC 2023

Modified Files:
src/usr.bin/audio/play: audioplay.1

Log Message:
audioplay(1): fix typo

>From Jim Spath in PR/57228


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/audio/play/audioplay.1

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



CVS commit: src/sys/arch/mips/include

2023-02-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 13 12:00:18 UTC 2023

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
mips/asm.h: Cite source for Cavium sync plunger business.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/mips/include/asm.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/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.71 src/sys/arch/mips/include/asm.h:1.72
--- src/sys/arch/mips/include/asm.h:1.71	Thu Apr 21 12:06:31 2022
+++ src/sys/arch/mips/include/asm.h	Mon Feb 13 12:00:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.71 2022/04/21 12:06:31 riastradh Exp $	*/
+/*	$NetBSD: asm.h,v 1.72 2023/02/13 12:00:18 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -582,7 +582,30 @@ _C_LABEL(x):
  * we need to apply a plunger to it _after_ releasing a lock or else
  * other CPUs may spin for hundreds of thousands of cycles before they
  * see the lock is released.  So we also have the quirky SYNC_PLUNGER
- * barrier as syncw.
+ * barrier as syncw.  See the note in the SYNCW instruction description
+ * on p. 2168 of Cavium OCTEON III CN78XX Hardware Reference Manual,
+ * CN78XX-HM-0.99E, September 2014:
+ *
+ *	Core A (writer)
+ *
+ *	SW R1, DATA#		change shared DATA value
+ *	LI R1, 1
+ *	SYNCW# (or SYNCWS)	Perform DATA store before performing FLAG store
+ *	SW R2, FLAG#		say that the shared DATA value is valid
+ *	SYNCW# (or SYNCWS)	Force the FLAG store soon (CN78XX-specific)
+ *
+ *	...
+ *
+ *	The second SYNCW instruction executed by core A is not
+ *	necessary for correctness, but has very important performance
+ *	effects on the CN78XX.  Without it, the store to FLAG may
+ *	linger in core A's write buffer before it becomes visible to
+ *	any other cores.  (If core A is not performing many stores,
+ *	this may add hundreds of thousands of cycles to the flag
+ *	release time since the CN78XX core nominally retains stores to
+ *	attempt to merge them before sending the store on the CMI.)
+ *	Applications should include this second SYNCW instruction after
+ *	flag or lock release.
  */
 #define	LLSCSYNC	/* nothing */
 #define	BDSYNC		sync



CVS commit: src/sys/arch/mips/include

2023-02-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 13 12:00:18 UTC 2023

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
mips/asm.h: Cite source for Cavium sync plunger business.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/mips/include/asm.h

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

2023-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Feb 13 08:39:40 UTC 2023

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

Log Message:
When mounting a union file system set its lower mount only on success.

Reported-by: syzbot+b81b69971581b4f4d...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/fs/union/union_vfsops.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_vfsops.c
diff -u src/sys/fs/union/union_vfsops.c:1.86 src/sys/fs/union/union_vfsops.c:1.87
--- src/sys/fs/union/union_vfsops.c:1.86	Mon Feb  6 10:33:32 2023
+++ src/sys/fs/union/union_vfsops.c	Mon Feb 13 08:39:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vfsops.c,v 1.86 2023/02/06 10:33:32 hannken Exp $	*/
+/*	$NetBSD: union_vfsops.c,v 1.87 2023/02/13 08:39:40 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.86 2023/02/06 10:33:32 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.87 2023/02/13 08:39:40 hannken Exp $");
 
 #include 
 #include 
@@ -255,15 +255,16 @@ union_mount(struct mount *mp, const char
 
 	mp->mnt_data = um;
 	vfs_getnewfsid(mp);
-	error = vfs_set_lowermount(mp, um->um_uppervp->v_mount);
-	if (error)
-		goto bad;
 
 	error = set_statvfs_info(path, UIO_USERSPACE, NULL, UIO_USERSPACE,
 	mp->mnt_op->vfs_name, mp, l);
 	if (error)
 		goto bad;
 
+	error = vfs_set_lowermount(mp, um->um_uppervp->v_mount);
+	if (error)
+		goto bad;
+
 	switch (um->um_op) {
 	case UNMNT_ABOVE:
 		cp = ":";



CVS commit: src/sys/fs/union

2023-02-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Feb 13 08:39:40 UTC 2023

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

Log Message:
When mounting a union file system set its lower mount only on success.

Reported-by: syzbot+b81b69971581b4f4d...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/fs/union/union_vfsops.c

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