CVS commit: src/usr.bin/make

2024-02-02 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sat Feb  3 00:20:23 UTC 2024

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

Log Message:
make: state of save_dollars affects what is a parse error

When save_dollars is false it is not a parse error to
encounter $$ rather than \$.


To generate a diff of this commit:
cvs rdiff -u -r1.1095 -r1.1096 src/usr.bin/make/var.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod.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.1095 src/usr.bin/make/var.c:1.1096
--- src/usr.bin/make/var.c:1.1095	Sun Jan 21 15:02:17 2024
+++ src/usr.bin/make/var.c	Sat Feb  3 00:20:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1095 2024/01/21 15:02:17 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1096 2024/02/03 00:20:23 sjg 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.1095 2024/01/21 15:02:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1096 2024/02/03 00:20:23 sjg Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -4147,12 +4147,12 @@ IsShortVarnameValid(char varname, const 
 	if (!opts.strict)
 		return false;	/* XXX: Missing error message */
 
-	if (varname == '$')
+	if (varname == '$' && save_dollars)
 		Parse_Error(PARSE_FATAL,
 		"To escape a dollar, use \\$, not $$, at \"%s\"", start);
 	else if (varname == '\0')
 		Parse_Error(PARSE_FATAL, "Dollar followed by nothing");
-	else
+	else if (save_dollars)
 		Parse_Error(PARSE_FATAL,
 		"Invalid variable name '%c', at \"%s\"", varname, start);
 

Index: src/usr.bin/make/unit-tests/varmod.exp
diff -u src/usr.bin/make/unit-tests/varmod.exp:1.7 src/usr.bin/make/unit-tests/varmod.exp:1.8
--- src/usr.bin/make/unit-tests/varmod.exp:1.7	Thu Jun  1 20:56:35 2023
+++ src/usr.bin/make/unit-tests/varmod.exp	Sat Feb  3 00:20:23 2024
@@ -1,8 +1,8 @@
-make: "varmod.mk" line 98: To escape a dollar, use \$, not $$, at "$$:L} != """
-make: "varmod.mk" line 98: Invalid variable name ':', at "$:L} != """
-make: "varmod.mk" line 104: Dollar followed by nothing
-make: "varmod.mk" line 114: Missing delimiter ':' after modifier "P"
-make: "varmod.mk" line 116: Missing argument for ".error"
+make: "varmod.mk" line 101: To escape a dollar, use \$, not $$, at "$$:L} != """
+make: "varmod.mk" line 101: Invalid variable name ':', at "$:L} != """
+make: "varmod.mk" line 107: Dollar followed by nothing
+make: "varmod.mk" line 117: Missing delimiter ':' after modifier "P"
+make: "varmod.mk" line 119: Missing argument for ".error"
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod.mk
diff -u src/usr.bin/make/unit-tests/varmod.mk:1.9 src/usr.bin/make/unit-tests/varmod.mk:1.10
--- src/usr.bin/make/unit-tests/varmod.mk:1.9	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/varmod.mk	Sat Feb  3 00:20:23 2024
@@ -1,4 +1,4 @@
-# $NetBSD: varmod.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod.mk,v 1.10 2024/02/03 00:20:23 sjg Exp $
 #
 # Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback.
 #
@@ -56,6 +56,9 @@
 # | `u`  | strict   || yes  |
 # | `from=to`| greedy   | SysV, fallback | N/A  |
 
+# These tests assume
+.MAKE.SAVE_DOLLARS = yes
+
 DOLLAR1=	$$
 DOLLAR2=	${:U\$}
 



CVS commit: src/usr.bin/make

2024-02-02 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sat Feb  3 00:20:23 UTC 2024

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

Log Message:
make: state of save_dollars affects what is a parse error

When save_dollars is false it is not a parse error to
encounter $$ rather than \$.


To generate a diff of this commit:
cvs rdiff -u -r1.1095 -r1.1096 src/usr.bin/make/var.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod.mk

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



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 23:36:01 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: lex_utf8.c
src/usr.bin/xlint/lint1: main1.c

Log Message:
lint: use the locale for interpreting wide character strings


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/lex_utf8.c
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/xlint/lint1/main1.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/usr.bin/xlint/lint1/lex_utf8.c
diff -u src/tests/usr.bin/xlint/lint1/lex_utf8.c:1.1 src/tests/usr.bin/xlint/lint1/lex_utf8.c:1.2
--- src/tests/usr.bin/xlint/lint1/lex_utf8.c:1.1	Fri Feb  2 23:30:39 2024
+++ src/tests/usr.bin/xlint/lint1/lex_utf8.c	Fri Feb  2 23:36:01 2024
@@ -1,15 +1,12 @@
-/*	$NetBSD: lex_utf8.c,v 1.1 2024/02/02 23:30:39 rillig Exp $	*/
+/*	$NetBSD: lex_utf8.c,v 1.2 2024/02/02 23:36:01 rillig Exp $	*/
 # 3 "lex_utf8.c"
 
 /*
  * Test lexing of multibyte characters and strings in an UTF-8 locale.
+ *
+ * See also:
+ *	lex_wide_string.c	(runs in the C locale)
  */
 
-/*
- * Since lint always runs in the default "C" locale, it does not support any
- * multibyte character encoding, thus treating each byte as a separate
- * character. If lint were to support UTF-8, the array dimension would be 3
- * instead of 7.
- */
-/* expect+1: error: negative array dimension (-7) [20] */
+/* expect+1: error: negative array dimension (-3) [20] */
 typedef int mblen[-(int)(sizeof(L"Ä") / sizeof(L""))];

Index: src/usr.bin/xlint/lint1/main1.c
diff -u src/usr.bin/xlint/lint1/main1.c:1.79 src/usr.bin/xlint/lint1/main1.c:1.80
--- src/usr.bin/xlint/lint1/main1.c:1.79	Sun Jan 21 14:11:52 2024
+++ src/usr.bin/xlint/lint1/main1.c	Fri Feb  2 23:36:01 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: main1.c,v 1.79 2024/01/21 14:11:52 rillig Exp $	*/
+/*	$NetBSD: main1.c,v 1.80 2024/02/02 23:36:01 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,10 +37,11 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: main1.c,v 1.79 2024/01/21 14:11:52 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.80 2024/02/02 23:36:01 rillig Exp $");
 #endif
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -134,6 +135,7 @@ main(int argc, char *argv[])
 {
 	int c;
 
+	setlocale(LC_ALL, "");
 	setprogname(argv[0]);
 
 	while ((c = getopt(argc, argv, "abceghpq:rstuvwyzA:FPR:STX:")) != -1) {



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 23:36:01 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: lex_utf8.c
src/usr.bin/xlint/lint1: main1.c

Log Message:
lint: use the locale for interpreting wide character strings


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/lex_utf8.c
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/xlint/lint1/main1.c

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



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 23:30:39 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: t_integration.sh
Added Files:
src/tests/usr.bin/xlint/lint1: lex_utf8.c

Log Message:
tests/lint: test UTF-8 mode


To generate a diff of this commit:
cvs rdiff -u -r1.1303 -r1.1304 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/lex_utf8.c
cvs rdiff -u -r1.82 -r1.83 src/tests/usr.bin/xlint/lint1/t_integration.sh

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.1303 src/distrib/sets/lists/tests/mi:1.1304
--- src/distrib/sets/lists/tests/mi:1.1303	Fri Feb  2 19:07:57 2024
+++ src/distrib/sets/lists/tests/mi	Fri Feb  2 23:30:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1303 2024/02/02 19:07:57 rillig Exp $
+# $NetBSD: mi,v 1.1304 2024/02/02 23:30:38 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6735,6 +6735,7 @@
 ./usr/tests/usr.bin/xlint/lint1/lex_integer_ilp32.exp		tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_string.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_string.exp			tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/xlint/lint1/lex_utf8.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_whitespace.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_whitespace.exp		tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_wide_char.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/t_integration.sh
diff -u src/tests/usr.bin/xlint/lint1/t_integration.sh:1.82 src/tests/usr.bin/xlint/lint1/t_integration.sh:1.83
--- src/tests/usr.bin/xlint/lint1/t_integration.sh:1.82	Wed Jul  5 11:42:14 2023
+++ src/tests/usr.bin/xlint/lint1/t_integration.sh	Fri Feb  2 23:30:39 2024
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.82 2023/07/05 11:42:14 rillig Exp $
+# $NetBSD: t_integration.sh,v 1.83 2024/02/02 23:30:39 rillig Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -62,8 +62,6 @@ configure_test_case()
 		}
 
 		function platform_has(prop) {
-			if (platform[prop] != "")
-return prop == archsubdir
 			if (!match(prop, /^(schar|uchar|ilp32|lp64|int|long|ldbl64|ldbl96|ldbl128)$/)) {
 printf("bad property '\''%s'\''\n", prop) > "/dev/stderr"
 exit(1)
@@ -109,6 +107,14 @@ configure_test_case()
 	local config
 	config="$(awk "$awk" "$1")" || exit 1
 	eval "$config"
+
+	case "_${1%.c}_" in
+	*_utf8_*)
+		LC_ALL=en_US.UTF-8;;
+	*)
+		LC_ALL=C;;
+	esac
+	export LC_ALL
 }
 
 # shellcheck disable=SC2155

Added files:

Index: src/tests/usr.bin/xlint/lint1/lex_utf8.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/lex_utf8.c:1.1
--- /dev/null	Fri Feb  2 23:30:39 2024
+++ src/tests/usr.bin/xlint/lint1/lex_utf8.c	Fri Feb  2 23:30:39 2024
@@ -0,0 +1,15 @@
+/*	$NetBSD: lex_utf8.c,v 1.1 2024/02/02 23:30:39 rillig Exp $	*/
+# 3 "lex_utf8.c"
+
+/*
+ * Test lexing of multibyte characters and strings in an UTF-8 locale.
+ */
+
+/*
+ * Since lint always runs in the default "C" locale, it does not support any
+ * multibyte character encoding, thus treating each byte as a separate
+ * character. If lint were to support UTF-8, the array dimension would be 3
+ * instead of 7.
+ */
+/* expect+1: error: negative array dimension (-7) [20] */
+typedef int mblen[-(int)(sizeof(L"Ä") / sizeof(L""))];



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 23:30:39 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: t_integration.sh
Added Files:
src/tests/usr.bin/xlint/lint1: lex_utf8.c

Log Message:
tests/lint: test UTF-8 mode


To generate a diff of this commit:
cvs rdiff -u -r1.1303 -r1.1304 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/lex_utf8.c
cvs rdiff -u -r1.82 -r1.83 src/tests/usr.bin/xlint/lint1/t_integration.sh

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



CVS commit: src/bin/ls

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 22:58:26 UTC 2024

Modified Files:
src/bin/ls: ls.c

Log Message:
PR/57892: Roberto Branco: Print full pathname in error messages


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/bin/ls/ls.c

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

Modified files:

Index: src/bin/ls/ls.c
diff -u src/bin/ls/ls.c:1.77 src/bin/ls/ls.c:1.78
--- src/bin/ls/ls.c:1.77	Tue Jul  7 10:29:06 2020
+++ src/bin/ls/ls.c	Fri Feb  2 17:58:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ls.c,v 1.77 2020/07/07 14:29:06 christos Exp $	*/
+/*	$NetBSD: ls.c,v 1.78 2024/02/02 22:58:26 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)ls.c	8.7 (Berkeley) 8/5/94";
 #else
-__RCSID("$NetBSD: ls.c,v 1.77 2020/07/07 14:29:06 christos Exp $");
+__RCSID("$NetBSD: ls.c,v 1.78 2024/02/02 22:58:26 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -445,7 +445,7 @@ traverse(int argc, char *argv[], int opt
 			break;
 		case FTS_DNR:
 		case FTS_ERR:
-			warnx("%s: %s", p->fts_name, strerror(p->fts_errno));
+			warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
 			rval = EXIT_FAILURE;
 			break;
 		case FTS_D:



CVS commit: src/bin/ls

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 22:58:26 UTC 2024

Modified Files:
src/bin/ls: ls.c

Log Message:
PR/57892: Roberto Branco: Print full pathname in error messages


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/bin/ls/ls.c

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



CVS commit: src/tests/usr.bin/xlint/lint1

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 22:45:48 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: lex_wide_string.c

Log Message:
tests/lint: add UTF-8 test for string literals


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/lex_wide_string.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/usr.bin/xlint/lint1/lex_wide_string.c
diff -u src/tests/usr.bin/xlint/lint1/lex_wide_string.c:1.4 src/tests/usr.bin/xlint/lint1/lex_wide_string.c:1.5
--- src/tests/usr.bin/xlint/lint1/lex_wide_string.c:1.4	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/lex_wide_string.c	Fri Feb  2 22:45:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex_wide_string.c,v 1.4 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: lex_wide_string.c,v 1.5 2024/02/02 22:45:48 rillig Exp $	*/
 # 3 "lex_wide_string.c"
 
 /*
@@ -33,3 +33,12 @@ test(void)
 	/* expect+1: error: cannot concatenate wide and regular string literals [292] */
 	sink(L"wide" "plain");
 }
+
+/*
+ * Since lint always runs in the default "C" locale, it does not support any
+ * multibyte character encoding, thus treating each byte as a separate
+ * character. If lint were to support UTF-8, the array dimension would be 3
+ * instead of 7.
+ */
+/* expect+1: error: negative array dimension (-7) [20] */
+typedef int mblen[-(int)(sizeof(L"Ä") / sizeof(L""))];



CVS commit: src/tests/usr.bin/xlint/lint1

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 22:45:48 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: lex_wide_string.c

Log Message:
tests/lint: add UTF-8 test for string literals


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/lex_wide_string.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/ic

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:43:12 UTC 2024

Modified Files:
src/sys/dev/ic: aac_tables.h

Log Message:
s/maintenace/maintenance/ in command status code description.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/aac_tables.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/dev/ic/aac_tables.h
diff -u src/sys/dev/ic/aac_tables.h:1.5 src/sys/dev/ic/aac_tables.h:1.6
--- src/sys/dev/ic/aac_tables.h:1.5	Tue Jun  5 04:04:14 2007
+++ src/sys/dev/ic/aac_tables.h	Fri Feb  2 22:43:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aac_tables.h,v 1.5 2007/06/05 04:04:14 briggs Exp $	*/
+/*	$NetBSD: aac_tables.h,v 1.6 2024/02/02 22:43:12 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2000 Michael Smith
@@ -73,7 +73,7 @@ const struct aac_code_lookup aac_command
 	{ "bad type",10007 },
 	{ "jukebox",10008 },
 	{ "not mounted",			10009 },
-	{ "in maintenace mode",			10010 },
+	{ "in maintenance mode",		10010 },
 	{ "stale ACL",10011 },
 	{ NULL, 0 },
 	{ "unknown command status",		0 }



CVS commit: src/sys/dev/ic

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:43:12 UTC 2024

Modified Files:
src/sys/dev/ic: aac_tables.h

Log Message:
s/maintenace/maintenance/ in command status code description.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/aac_tables.h

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



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:39:10 UTC 2024

Modified Files:
src/sys/dev/audio: mulaw.c
src/sys/dev/i2c: sht3xreg.h
src/sys/dev/ic: aic6915.c aic79xx.c aic7xxx.c
src/sys/dev/marvell: if_mvxpereg.h mvgbereg.h
src/sys/dev/microcode/aic7xxx: aic7xxx.reg
src/sys/dev/pci: if_sipreg.h if_skreg.h
src/sys/netinet: sctp_input.c
src/tests/lib/libm: t_round.c

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/audio/mulaw.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/sht3xreg.h
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/aic6915.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/aic79xx.c
cvs rdiff -u -r1.147 -r1.148 src/sys/dev/ic/aic7xxx.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/marvell/if_mvxpereg.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/marvell/mvgbereg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/microcode/aic7xxx/aic7xxx.reg
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/if_sipreg.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_skreg.h
cvs rdiff -u -r1.16 -r1.17 src/sys/netinet/sctp_input.c
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libm/t_round.c

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



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:39:10 UTC 2024

Modified Files:
src/sys/dev/audio: mulaw.c
src/sys/dev/i2c: sht3xreg.h
src/sys/dev/ic: aic6915.c aic79xx.c aic7xxx.c
src/sys/dev/marvell: if_mvxpereg.h mvgbereg.h
src/sys/dev/microcode/aic7xxx: aic7xxx.reg
src/sys/dev/pci: if_sipreg.h if_skreg.h
src/sys/netinet: sctp_input.c
src/tests/lib/libm: t_round.c

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/audio/mulaw.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/sht3xreg.h
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/aic6915.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/aic79xx.c
cvs rdiff -u -r1.147 -r1.148 src/sys/dev/ic/aic7xxx.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/marvell/if_mvxpereg.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/marvell/mvgbereg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/microcode/aic7xxx/aic7xxx.reg
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/if_sipreg.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_skreg.h
cvs rdiff -u -r1.16 -r1.17 src/sys/netinet/sctp_input.c
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libm/t_round.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/audio/mulaw.c
diff -u src/sys/dev/audio/mulaw.c:1.5 src/sys/dev/audio/mulaw.c:1.6
--- src/sys/dev/audio/mulaw.c:1.5	Wed Jul 21 06:35:44 2021
+++ src/sys/dev/audio/mulaw.c	Fri Feb  2 22:39:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mulaw.c,v 1.5 2021/07/21 06:35:44 skrll Exp $	*/
+/*	$NetBSD: mulaw.c,v 1.6 2024/02/02 22:39:10 andvar Exp $	*/
 
 /*
  * Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.5 2021/07/21 06:35:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.6 2024/02/02 22:39:10 andvar Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.
  * About mulaw32 format.
  *
  * The format which I call ``mulaw32'' is only used in dev/tc/bba.c .
- * It is 8bit mu-law but 16bit left-shifted and its containter is 32bit.
+ * It is 8bit mu-law but 16bit left-shifted and its container is 32bit.
  * Not mu-law calculated in 32bit.
  *
  * When MULAW32 is not defined (it's default), this file outputs

Index: src/sys/dev/i2c/sht3xreg.h
diff -u src/sys/dev/i2c/sht3xreg.h:1.3 src/sys/dev/i2c/sht3xreg.h:1.4
--- src/sys/dev/i2c/sht3xreg.h:1.3	Sat May 28 10:36:23 2022
+++ src/sys/dev/i2c/sht3xreg.h	Fri Feb  2 22:39:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sht3xreg.h,v 1.3 2022/05/28 10:36:23 andvar Exp $	*/
+/*	$NetBSD: sht3xreg.h,v 1.4 2024/02/02 22:39:10 andvar Exp $	*/
 
 /*
  * Copyright (c) 2021 Brad Spencer 
@@ -84,7 +84,7 @@
the information in the datasheet was not enough to
get it working.  A read of the registers appears to
function just fine, but writes do not do anything, and
-   the chip does not indicate any errors occured.
+   the chip does not indicate any errors occurred.
 */
 #define SHT3X_READ_HIGH_ALERT_SET	0xE11F
 #define SHT3X_READ_HIGH_ALERT_CLEAR	0xE114

Index: src/sys/dev/ic/aic6915.c
diff -u src/sys/dev/ic/aic6915.c:1.45 src/sys/dev/ic/aic6915.c:1.46
--- src/sys/dev/ic/aic6915.c:1.45	Sun Sep 25 18:43:32 2022
+++ src/sys/dev/ic/aic6915.c	Fri Feb  2 22:39:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic6915.c,v 1.45 2022/09/25 18:43:32 thorpej Exp $	*/
+/*	$NetBSD: aic6915.c,v 1.46 2024/02/02 22:39:10 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.45 2022/09/25 18:43:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.46 2024/02/02 22:39:10 andvar Exp $");
 
 
 #include 
@@ -824,7 +824,7 @@ sf_tick(void *arg)
 /*
  * sf_stats_update:
  *
- *	Read the statitistics counters.
+ *	Read the statistics counters.
  */
 static void
 sf_stats_update(struct sf_softc *sc)

Index: src/sys/dev/ic/aic79xx.c
diff -u src/sys/dev/ic/aic79xx.c:1.69 src/sys/dev/ic/aic79xx.c:1.70
--- src/sys/dev/ic/aic79xx.c:1.69	Tue Aug  1 20:50:11 2023
+++ src/sys/dev/ic/aic79xx.c	Fri Feb  2 22:39:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic79xx.c,v 1.69 2023/08/01 20:50:11 andvar Exp $	*/
+/*	$NetBSD: aic79xx.c,v 1.70 2024/02/02 22:39:10 andvar Exp $	*/
 
 /*
  * Core routines and tables shareable across OS platforms.
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.69 2023/08/01 20:50:11 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.70 2024/02/02 22:39:10 andvar Exp $");
 
 #include 
 #include 
@@ -1871,7 +1871,7 @@ ahd_handle_transmission_error(struct ahd
 		 * If we raise ATN and the target completes the entire
 		 * stream (P0 asserted during the last packet), the
 		 * hardware will ack all data and return to the ISTART
-		 * state.  When the target reponds to our ATN condition,
+		 * state.  When the target responds to 

CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:33:43 UTC 2024

Modified Files:
src/sys/arch/ia64/ia64: consinit.c
src/sys/arch/powerpc/ibm4xx/dev: if_emac.c
src/sys/arch/sparc64/include: ctlreg.h
src/sys/dev/marvell: gtidmac.c
src/sys/dev/pci: unichromemode.h
src/usr.bin/nbperf: nbperf.c

Log Message:
fix typos, mainly s/unsupport/unsupported/ in log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/consinit.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sparc64/include/ctlreg.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/marvell/gtidmac.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/unichromemode.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/nbperf/nbperf.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/arch/ia64/ia64/consinit.c
diff -u src/sys/arch/ia64/ia64/consinit.c:1.4 src/sys/arch/ia64/ia64/consinit.c:1.5
--- src/sys/arch/ia64/ia64/consinit.c:1.4	Thu Apr  3 17:07:07 2014
+++ src/sys/arch/ia64/ia64/consinit.c	Fri Feb  2 22:33:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: consinit.c,v 1.4 2014/04/03 17:07:07 martin Exp $	*/
+/*	$NetBSD: consinit.c,v 1.5 2024/02/02 22:33:42 andvar Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2014/04/03 17:07:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.5 2024/02/02 22:33:42 andvar Exp $");
 
 #include 
 #include 
@@ -94,7 +94,7 @@ pcdp_cnprobe(struct consdev *cn)
 #if defined(DIAGNOSTIC)
 if (tbl->revision < 3)
 	panic("PCDP found in HCDP rev.%d."
-	" Maybe unsupport PCDP",
+	" Maybe unsupported PCDP",
 	tbl->revision);
 #endif
 cn->cn_pri = CN_NORMAL;

Index: src/sys/arch/powerpc/ibm4xx/dev/if_emac.c
diff -u src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.57 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.58
--- src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.57	Sun Sep 18 13:19:40 2022
+++ src/sys/arch/powerpc/ibm4xx/dev/if_emac.c	Fri Feb  2 22:33:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_emac.c,v 1.57 2022/09/18 13:19:40 thorpej Exp $	*/
+/*	$NetBSD: if_emac.c,v 1.58 2024/02/02 22:33:42 andvar Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.57 2022/09/18 13:19:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.58 2024/02/02 22:33:42 andvar Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_emac.h"
@@ -467,7 +467,7 @@ emac_attach(device_t parent, device_t se
 			opbc = STACR_OPBC_A100MHZ;
 			break;
 		}
-		aprint_error_dev(self, "unsupport OPB frequency %dMHz\n",
+		aprint_error_dev(self, "unsupported OPB frequency %dMHz\n",
 		opb_freq / 1000 / 1000);
 		goto fail_5;
 	}

Index: src/sys/arch/sparc64/include/ctlreg.h
diff -u src/sys/arch/sparc64/include/ctlreg.h:1.69 src/sys/arch/sparc64/include/ctlreg.h:1.70
--- src/sys/arch/sparc64/include/ctlreg.h:1.69	Thu Aug 10 20:02:56 2023
+++ src/sys/arch/sparc64/include/ctlreg.h	Fri Feb  2 22:33:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.69 2023/08/10 20:02:56 andvar Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.70 2024/02/02 22:33:42 andvar Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -286,7 +286,7 @@
 
 /* SFSR bits for both D_SFSR and I_SFSR */
 #define	SFSR_ASI(x)		((x)>>16)
-#define	SFSR_FT_VA_OOR_2	0x02000 /* IMMU: jumpl or return to unsupportd VA */
+#define	SFSR_FT_VA_OOR_2	0x02000 /* IMMU: jumpl or return to unsupported VA */
 #define	SFSR_FT_VA_OOR_1	0x01000 /* fault at unsupported VA */
 #define	SFSR_FT_NFO		0x00800	/* DMMU: Access to page marked NFO */
 #define	SFSR_ILL_ASI		0x00400	/* DMMU: Illegal (unsupported) ASI */

Index: src/sys/dev/marvell/gtidmac.c
diff -u src/sys/dev/marvell/gtidmac.c:1.19 src/sys/dev/marvell/gtidmac.c:1.20
--- src/sys/dev/marvell/gtidmac.c:1.19	Mon Jun 19 08:40:30 2023
+++ src/sys/dev/marvell/gtidmac.c	Fri Feb  2 22:33:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmac.c,v 1.19 2023/06/19 08:40:30 msaitoh Exp $	*/
+/*	$NetBSD: gtidmac.c,v 1.20 2024/02/02 22:33:42 andvar Exp $	*/
 /*
  * Copyright (c) 2008, 2012, 2016 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.19 2023/06/19 08:40:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.20 2024/02/02 22:33:42 andvar Exp $");
 
 #include 
 #include 
@@ -1020,7 +1020,7 @@ gtidmac_setup(void *tag, int chan, int n
 			ccl |= GTIDMAC_CCLR_SBL_128B;
 		else
 			panic("gtidmac_setup: chan%d source:"
-			" unsupport hold size", chan);
+			" unsupported hold size", chan);
 	} else
 		ccl |= GTIDMAC_CCLR_SBL_128B;
 	if (size != (*dmamap_out)->dm_mapsize) {

Index: src/sys/dev/pci/unichromemode.h
diff -u 

CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:33:43 UTC 2024

Modified Files:
src/sys/arch/ia64/ia64: consinit.c
src/sys/arch/powerpc/ibm4xx/dev: if_emac.c
src/sys/arch/sparc64/include: ctlreg.h
src/sys/dev/marvell: gtidmac.c
src/sys/dev/pci: unichromemode.h
src/usr.bin/nbperf: nbperf.c

Log Message:
fix typos, mainly s/unsupport/unsupported/ in log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/consinit.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sparc64/include/ctlreg.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/marvell/gtidmac.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/unichromemode.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/nbperf/nbperf.c

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



CVS commit: src/sys/dev

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:26:58 UTC 2024

Modified Files:
src/sys/dev/ic: ispmbox.h mfi.c
src/sys/dev/pci: twe.c

Log Message:
s/mangement/management/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/ic/ispmbox.h
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/twe.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/ispmbox.h
diff -u src/sys/dev/ic/ispmbox.h:1.58 src/sys/dev/ic/ispmbox.h:1.59
--- src/sys/dev/ic/ispmbox.h:1.58	Thu Sep 21 09:31:50 2023
+++ src/sys/dev/ic/ispmbox.h	Fri Feb  2 22:26:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ispmbox.h,v 1.58 2023/09/21 09:31:50 msaitoh Exp $ */
+/* $NetBSD: ispmbox.h,v 1.59 2024/02/02 22:26:58 andvar Exp $ */
 /*
  * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
  * All rights reserved.
@@ -1928,7 +1928,7 @@ typedef struct {
 
 #define	NAFC_RCOUNT	0x80	/* increment resource count */
 #define NAFC_RST_CLRD	0x20	/* Clear LIP Reset */
-#define	NAFC_TVALID	0x10	/* task mangement response code is valid */
+#define	NAFC_TVALID	0x10	/* task management response code is valid */
 
 /*
  * ISP24XX Notify Acknowledge

Index: src/sys/dev/ic/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.79 src/sys/dev/ic/mfi.c:1.80
--- src/sys/dev/ic/mfi.c:1.79	Tue May 24 20:50:19 2022
+++ src/sys/dev/ic/mfi.c	Fri Feb  2 22:26:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.79 2022/05/24 20:50:19 andvar Exp $ */
+/* $NetBSD: mfi.c,v 1.80 2024/02/02 22:26:58 andvar Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 
 /*
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.79 2022/05/24 20:50:19 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.80 2024/02/02 22:26:58 andvar Exp $");
 
 #include "bio.h"
 
@@ -3374,7 +3374,7 @@ mfi_tbolt_create_sgl(struct mfi_ccb *ccb
  *
  * If this is not done right the RAID firmware will not remove a
  * pulled drive and the RAID won't go degraded etc.  Effectively,
- * stopping any RAID mangement to functions.
+ * stopping any RAID management to functions.
  *
  * Doing another LD sync, requires the use of an event since the
  * driver needs to do a mfi_wait_command and can't do that in an

Index: src/sys/dev/pci/twe.c
diff -u src/sys/dev/pci/twe.c:1.110 src/sys/dev/pci/twe.c:1.111
--- src/sys/dev/pci/twe.c:1.110	Sat Aug  7 16:19:14 2021
+++ src/sys/dev/pci/twe.c	Fri Feb  2 22:26:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: twe.c,v 1.110 2021/08/07 16:19:14 thorpej Exp $	*/
+/*	$NetBSD: twe.c,v 1.111 2024/02/02 22:26:58 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.110 2021/08/07 16:19:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.111 2024/02/02 22:26:58 andvar Exp $");
 
 #include 
 #include 
@@ -1014,7 +1014,7 @@ twe_aen_enqueue(struct twe_softc *sc, ui
 		}
 	}
 
-	/* Now enqueue the AEN for mangement tools. */
+	/* Now enqueue the AEN for management tools. */
 	s = splbio();
 
 	next = (sc->sc_aen_head + 1) % TWE_AEN_Q_LENGTH;



CVS commit: src/sys/dev

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:26:58 UTC 2024

Modified Files:
src/sys/dev/ic: ispmbox.h mfi.c
src/sys/dev/pci: twe.c

Log Message:
s/mangement/management/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/ic/ispmbox.h
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/twe.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/ic

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:23:54 UTC 2024

Modified Files:
src/sys/dev/ic: dp8390var.h

Log Message:
s/tranceiver/transceiver/ in comment and definition.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/dp8390var.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

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:23:54 UTC 2024

Modified Files:
src/sys/dev/ic: dp8390var.h

Log Message:
s/tranceiver/transceiver/ in comment and definition.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/dp8390var.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/dev/ic/dp8390var.h
diff -u src/sys/dev/ic/dp8390var.h:1.36 src/sys/dev/ic/dp8390var.h:1.37
--- src/sys/dev/ic/dp8390var.h:1.36	Mon Aug  9 20:49:10 2021
+++ src/sys/dev/ic/dp8390var.h	Fri Feb  2 22:23:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: dp8390var.h,v 1.36 2021/08/09 20:49:10 andvar Exp $	*/
+/*	$NetBSD: dp8390var.h,v 1.37 2024/02/02 22:23:53 andvar Exp $	*/
 
 /*
  * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -110,9 +110,9 @@ struct dp8390_softc {
  * Compile-time config flags
  */
 /*
- * This sets the default for enabling/disabling the tranceiver.
+ * This sets the default for enabling/disabling the transceiver.
  */
-#define DP8390_DISABLE_TRANCEIVER	0x0001
+#define DP8390_DISABLE_TRANSCEIVER	0x0001
 
 /*
  * This forces the board to be used in 8/16-bit mode even if it autoconfigs



CVS commit: src/sys

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:19:13 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: topcatreg.h
src/sys/arch/hp300/stand/common: grf_tcreg.h
src/sys/dev/ic: aacreg.h
src/sys/dev/pci: pcireg.h

Log Message:
s/Staus/Status/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/topcatreg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/stand/common/grf_tcreg.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/aacreg.h
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/pci/pcireg.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/hp300/dev/topcatreg.h
diff -u src/sys/arch/hp300/dev/topcatreg.h:1.3 src/sys/arch/hp300/dev/topcatreg.h:1.4
--- src/sys/arch/hp300/dev/topcatreg.h:1.3	Sun Jan 15 06:19:45 2023
+++ src/sys/arch/hp300/dev/topcatreg.h	Fri Feb  2 22:19:13 2024
@@ -1,5 +1,5 @@
 /*	$OpenBSD: topcatreg.h,v 1.2 2005/01/24 21:36:39 miod Exp $	*/
-/*	$NetBSD: topcatreg.h,v 1.3 2023/01/15 06:19:45 tsutsui Exp $	*/
+/*	$NetBSD: topcatreg.h,v 1.4 2024/02/02 22:19:13 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -95,7 +95,7 @@ struct tcboxfb {
 	uint16_t wheight;		/* block mover pixel height   0x4106 */
   /* Catseye */
 	uint8_t f19[0x4206-0x4106-2];
-	uint16_t rug_cmdstat;		/* RUG Command/Staus	  0x4206 */
+	uint16_t rug_cmdstat;		/* RUG Command/Status	  0x4206 */
 	uint8_t f20[0x4510-0x4206-2];
 	uint16_t vb_select;		/* Vector/BitBlt Select	  0x4510 */
 	uint16_t tcntrl;		/* Three Operand Control  0x4512 */

Index: src/sys/arch/hp300/stand/common/grf_tcreg.h
diff -u src/sys/arch/hp300/stand/common/grf_tcreg.h:1.2 src/sys/arch/hp300/stand/common/grf_tcreg.h:1.3
--- src/sys/arch/hp300/stand/common/grf_tcreg.h:1.2	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/grf_tcreg.h	Fri Feb  2 22:19:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_tcreg.h,v 1.2 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: grf_tcreg.h,v 1.3 2024/02/02 22:19:13 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -119,7 +119,7 @@ struct tcboxfb {
   vu_short 	wheight;		/* block mover pixel height   0x4106 */
   /* Catseye */
   u_char	f19[0x4206-0x4106-2];
-  vu_short	rug_cmdstat;		/* RUG Command/Staus	  0x4206 */
+  vu_short	rug_cmdstat;		/* RUG Command/Status	  0x4206 */
   u_char	f20[0x4510-0x4206-2];
   vu_short	vb_select;		/* Vector/BitBlt Select	  0x4510 */
   vu_short	tcntrl;			/* Three Operand Control  0x4512 */

Index: src/sys/dev/ic/aacreg.h
diff -u src/sys/dev/ic/aacreg.h:1.14 src/sys/dev/ic/aacreg.h:1.15
--- src/sys/dev/ic/aacreg.h:1.14	Fri Dec 10 20:36:03 2021
+++ src/sys/dev/ic/aacreg.h	Fri Feb  2 22:19:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aacreg.h,v 1.14 2021/12/10 20:36:03 andvar Exp $	*/
+/*	$NetBSD: aacreg.h,v 1.15 2024/02/02 22:19:13 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -576,7 +576,7 @@ struct aac_ctcfg_resp {
 } __packed;
 
 /*
- * 'Ioctl' commads
+ * 'Ioctl' commands
  */
 #define AAC_SCSI_MAX_PORTS	10
 #define AAC_BUS_NO_EXIST	0
@@ -1118,7 +1118,7 @@ struct aac_fib {
 /*
  *  Adapter Status Register
  *
- *  Phase Staus mailbox is 32bits:
+ *  Phase Status mailbox is 32bits:
  *  <31:16> = Phase Status
  *  <15:0>  = Phase
  *

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.168 src/sys/dev/pci/pcireg.h:1.169
--- src/sys/dev/pci/pcireg.h:1.168	Mon Oct 17 03:05:32 2022
+++ src/sys/dev/pci/pcireg.h	Fri Feb  2 22:19:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.168 2022/10/17 03:05:32 mrg Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.169 2024/02/02 22:19:13 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -2116,7 +2116,7 @@ struct pci_rom {
 #define	PCI_DPCCTL_DLACTECOR	__BIT(23)  /* DL_Active ERR_COR Enable */
 
 #define	PCI_DPC_STATESID 0x08	/* Status and Error Source ID Register */
-#define	PCI_DPCSTAT_TSTAT	__BIT(0)   /* DPC Trigger Staus */
+#define	PCI_DPCSTAT_TSTAT	__BIT(0)   /* DPC Trigger Status */
 #define	PCI_DPCSTAT_TREASON	__BITS(2, 1)   /* DPC Trigger Reason */
 #define	PCI_DPCSTAT_ISTAT	__BIT(3)   /* DPC Interrupt Status */
 #define	PCI_DPCSTAT_RPBUSY	__BIT(4)   /* DPC RP Busy */



CVS commit: src/sys

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:19:13 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: topcatreg.h
src/sys/arch/hp300/stand/common: grf_tcreg.h
src/sys/dev/ic: aacreg.h
src/sys/dev/pci: pcireg.h

Log Message:
s/Staus/Status/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/topcatreg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/stand/common/grf_tcreg.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/aacreg.h
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/pci/pcireg.h

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



CVS commit: src/external/bsd/fetch/dist/libfetch

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 22:19:05 UTC 2024

Modified Files:
src/external/bsd/fetch/dist/libfetch: common.c common.h fetch.3 ftp.c
http.c

Log Message:
Sync with pkgsrc and try to fix more memory corruption from PR/57179.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/fetch/dist/libfetch/common.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/fetch/dist/libfetch/common.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/fetch/dist/libfetch/fetch.3 \
src/external/bsd/fetch/dist/libfetch/http.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/fetch/dist/libfetch/ftp.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/fetch/dist/libfetch/common.c
diff -u src/external/bsd/fetch/dist/libfetch/common.c:1.6 src/external/bsd/fetch/dist/libfetch/common.c:1.7
--- src/external/bsd/fetch/dist/libfetch/common.c:1.6	Wed Jan  3 06:40:38 2024
+++ src/external/bsd/fetch/dist/libfetch/common.c	Fri Feb  2 17:19:05 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.6 2024/01/03 11:40:38 riastradh Exp $	*/
+/*	$NetBSD: common.c,v 1.7 2024/02/02 22:19:05 christos Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2008, 2010 Joerg Sonnenberger 
@@ -41,6 +41,13 @@
 #include 
 #include 
 #include 
+#if defined(HAVE_POLL_H) || defined(NETBSD)
+#include 
+#define HAVE_POLL
+#elif HAVE_SYS_POLL_H
+#define HAVE_POLL
+#include 
+#endif
 
 #include 
 #include 
@@ -236,6 +243,9 @@ fetch_reopen(int sd)
 	conn->next_buf = NULL;
 	conn->next_len = 0;
 	conn->sd = sd;
+#ifdef HAVE_POLL
+	conn->buf_events = POLLIN;
+#endif
 	return (conn);
 }
 
@@ -316,6 +326,7 @@ fetch_connect(struct url *url, int af, i
 	if ((conn = fetch_reopen(sd)) == NULL) {
 		fetch_syserr();
 		close(sd);
+		return (NULL);
 	}
 	conn->cache_url = fetchCopyURL(url);
 	conn->cache_af = af;
@@ -398,7 +409,7 @@ void
 fetch_cache_put(conn_t *conn, int (*closecb)(conn_t *))
 {
 	conn_t *iter, *last, *oiter;
-	int global_count, host_count;
+	int global_count, host_count, added;
 
 	if (conn->cache_url == NULL || cache_global_limit == 0) {
 		(*closecb)(conn);
@@ -409,20 +420,23 @@ fetch_cache_put(conn_t *conn, int (*clos
 	last = NULL;
 	for (iter = connection_cache; iter; ) {
 		++global_count;
-		if (strcmp(conn->cache_url->host, iter->cache_url->host) == 0)
+		added = !strcmp(conn->cache_url->host, iter->cache_url->host);
+		if (added)
 			++host_count;
 		if (global_count < cache_global_limit &&
-		host_count < cache_per_host_limit)
+		host_count < cache_per_host_limit) {
 			oiter = NULL;
-		else {
+			last = iter;
+		} else {
 			--global_count;
+			if (added)
+--host_count;
 			if (last != NULL)
 last->next_cached = iter->next_cached;
 			else
 connection_cache = iter->next_cached;
 			oiter = iter;
 		}
-		last = iter;
 		iter = iter->next_cached;
 		if (oiter)
 			(*oiter->cache_close)(oiter);
@@ -437,7 +451,7 @@ fetch_cache_put(conn_t *conn, int (*clos
  * Enable SSL on a connection.
  */
 int
-fetch_ssl(conn_t *conn, int verbose)
+fetch_ssl(conn_t *conn, const struct url *URL, int verbose)
 {
 
 #ifdef WITH_SSL
@@ -462,11 +476,17 @@ fetch_ssl(conn_t *conn, int verbose)
 		fprintf(stderr, "SSL context creation failed\n");
 		return (-1);
 	}
+	conn->buf_events = 0;
 	SSL_set_fd(conn->ssl, conn->sd);
-	if (!SSL_set_tlsext_host_name(conn->ssl, conn->cache_url->host)) {
-		fprintf(stderr, "SSL hostname setting failed\n"); 
+#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
+	if (!SSL_set_tlsext_host_name(conn->ssl, (char *)(uintptr_t)URL->host))
+	{
+		fprintf(stderr,
+		"TLS server name indication extension failed for host %s\n",
+		URL->host);
 		return (-1);
 	}
+#endif
 	if (SSL_connect(conn->ssl) == -1){
 		ERR_print_errors_fp(stderr);
 		return (-1);
@@ -498,6 +518,17 @@ fetch_ssl(conn_t *conn, int verbose)
 #endif
 }
 
+#ifdef HAVE_POLL
+static int
+compute_timeout(const struct timeval *tv)
+{
+	struct timeval cur;
+
+	gettimeofday(, NULL);
+	return (tv->tv_sec - cur.tv_sec) * 1000
+	+ (tv->tv_usec - cur.tv_usec) / 1000;
+}
+#endif
 
 /*
  * Read a character from a connection w/ timeout
@@ -505,8 +536,13 @@ fetch_ssl(conn_t *conn, int verbose)
 ssize_t
 fetch_read(conn_t *conn, char *buf, size_t len)
 {
-	struct timeval now, timeout, waittv;
+	struct timeval timeout_end;
+#ifdef HAVE_POLL
+	struct pollfd pfd;
+#else
 	fd_set readfds;
+#endif
+	int timeout_cur;
 	ssize_t rlen;
 	int r;
 
@@ -523,17 +559,41 @@ fetch_read(conn_t *conn, char *buf, size
 	}
 
 	if (fetchTimeout) {
+#ifndef HAVE_POLL
 		FD_ZERO();
-		gettimeofday(, NULL);
-		timeout.tv_sec += fetchTimeout;
+#endif
+		gettimeofday(_end, NULL);
+		timeout_end.tv_sec += fetchTimeout;
 	}
 
 	for (;;) {
+#ifdef HAVE_POLL
+		pfd.fd = conn->sd;
+		pfd.events = conn->buf_events;
+		if (fetchTimeout && pfd.events) {
+			do {
+

CVS commit: src/external/bsd/fetch/dist/libfetch

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 22:19:05 UTC 2024

Modified Files:
src/external/bsd/fetch/dist/libfetch: common.c common.h fetch.3 ftp.c
http.c

Log Message:
Sync with pkgsrc and try to fix more memory corruption from PR/57179.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/fetch/dist/libfetch/common.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/fetch/dist/libfetch/common.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/fetch/dist/libfetch/fetch.3 \
src/external/bsd/fetch/dist/libfetch/http.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/fetch/dist/libfetch/ftp.c

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



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:14:05 UTC 2024

Modified Files:
src/share/examples/secmodel: secmodel_example.c
src/sys/arch/arm/sunxi: sunxi_debe.c
src/sys/arch/arm/ti: ti_motg.c
src/sys/arch/evbmips/loongson/dev: gcscpcib_pci.c
src/sys/arch/i386/pci: gcscpcib_pci.c
src/sys/dev/acpi: igpio_acpi.c

Log Message:
s/attachement/attachment/ and s/detachement/detachment/.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/examples/secmodel/secmodel_example.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/sunxi/sunxi_debe.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_motg.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/pci/gcscpcib_pci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/igpio_acpi.c

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

Modified files:

Index: src/share/examples/secmodel/secmodel_example.c
diff -u src/share/examples/secmodel/secmodel_example.c:1.29 src/share/examples/secmodel/secmodel_example.c:1.30
--- src/share/examples/secmodel/secmodel_example.c:1.29	Thu Jan  5 17:36:53 2023
+++ src/share/examples/secmodel/secmodel_example.c	Fri Feb  2 22:14:04 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_example.c,v 1.29 2023/01/05 17:36:53 jakllsch Exp $ */
+/* $NetBSD: secmodel_example.c,v 1.30 2024/02/02 22:14:04 andvar Exp $ */
 
 /*
  * This file is placed in the public domain.
@@ -13,7 +13,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.29 2023/01/05 17:36:53 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.30 2024/02/02 22:14:04 andvar Exp $");
 
 #include 
 #include 
@@ -160,7 +160,7 @@ secmodel_example_eval(const char *what, 
 }
 
 /*
- * Module attachement/detachement routine. Whether the secmodel(9) is
+ * Module attachment/detachment routine. Whether the secmodel(9) is
  * builtin or loaded dynamically, it is in charge of initializing, starting
  * and stopping the module. See module(9).
  */

Index: src/sys/arch/arm/sunxi/sunxi_debe.c
diff -u src/sys/arch/arm/sunxi/sunxi_debe.c:1.16 src/sys/arch/arm/sunxi/sunxi_debe.c:1.17
--- src/sys/arch/arm/sunxi/sunxi_debe.c:1.16	Sat Jan  1 13:47:19 2022
+++ src/sys/arch/arm/sunxi/sunxi_debe.c	Fri Feb  2 22:14:04 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_debe.c,v 1.16 2022/01/01 13:47:19 andvar Exp $ */
+/* $NetBSD: sunxi_debe.c,v 1.17 2024/02/02 22:14:04 andvar Exp $ */
 
 /*-
  * Copyright (c) 2018 Manuel Bouyer 
@@ -38,7 +38,7 @@
 #define SUNXI_DEBE_CURMAX	64
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.16 2022/01/01 13:47:19 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.17 2024/02/02 22:14:04 andvar Exp $");
 
 #include 
 #include 
@@ -704,7 +704,7 @@ sunxi_debe_ioctl(device_t self, u_long c
 	return EPASSTHROUGH;
 }
 
-/* genfb attachement */
+/* genfb attachment */
 
 struct sunxi_befb_softc {
 	struct genfb_softc sc_gen;

Index: src/sys/arch/arm/ti/ti_motg.c
diff -u src/sys/arch/arm/ti/ti_motg.c:1.4 src/sys/arch/arm/ti/ti_motg.c:1.5
--- src/sys/arch/arm/ti/ti_motg.c:1.4	Wed Jan 27 03:10:20 2021
+++ src/sys/arch/arm/ti/ti_motg.c	Fri Feb  2 22:14:04 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_motg.c,v 1.4 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: ti_motg.c,v 1.5 2024/02/02 22:14:04 andvar Exp $ */
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
  *
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_motg.c,v 1.4 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_motg.c,v 1.5 2024/02/02 22:14:04 andvar Exp $");
 
 #include 
 #include 
@@ -67,7 +67,7 @@ static const struct device_compatible_en
 };
 
 /*
- * motg device attachement and driver,
+ * motg device attachment and driver,
  * for the per-port part of the controller: TI-specific part, phy and
  * MI Mentor OTG.
  */

Index: src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c
diff -u src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c:1.2 src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c:1.3
--- src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c:1.2	Mon Aug 29 18:34:42 2011
+++ src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c	Fri Feb  2 22:14:04 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscpcib_pci.c,v 1.2 2011/08/29 18:34:42 bouyer Exp $ */
+/* $NetBSD: gcscpcib_pci.c,v 1.3 2024/02/02 22:14:04 andvar Exp $ */
 /* $OpenBSD: gcscpcib.c,v 1.6 2007/11/17 17:02:47 mbalmer Exp $	*/
 
 /*
@@ -22,10 +22,10 @@
 
 /*
  * AMD CS5535/CS5536 series LPC bridge also containing timer, watchdog and GPIO.
- * machine-dependent attachement.
+ * machine-dependent attachment.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gcscpcib_pci.c,v 1.2 2011/08/29 18:34:42 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscpcib_pci.c,v 1.3 2024/02/02 22:14:04 andvar Exp $");
 
 
 #include 

Index: src/sys/arch/i386/pci/gcscpcib_pci.c
diff -u 

CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:14:05 UTC 2024

Modified Files:
src/share/examples/secmodel: secmodel_example.c
src/sys/arch/arm/sunxi: sunxi_debe.c
src/sys/arch/arm/ti: ti_motg.c
src/sys/arch/evbmips/loongson/dev: gcscpcib_pci.c
src/sys/arch/i386/pci: gcscpcib_pci.c
src/sys/dev/acpi: igpio_acpi.c

Log Message:
s/attachement/attachment/ and s/detachement/detachment/.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/examples/secmodel/secmodel_example.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/sunxi/sunxi_debe.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_motg.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/loongson/dev/gcscpcib_pci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/pci/gcscpcib_pci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/igpio_acpi.c

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



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:00:34 UTC 2024

Modified Files:
src/lib/libc/arch/hppa/sys: __sigtramp2.S
src/lib/libc/nameser: ns_name.c
src/sys/arch/arm/arm32: fault.c
src/sys/arch/arm/rockchip: rk3399_pcie.c
src/sys/arch/newsmips/apbus: if_snreg.h
src/sys/arch/powerpc/booke: booke_machdep.c
src/sys/arch/riscv/include: insn.h
src/sys/arch/riscv/riscv: locore.S
src/sys/arch/vax/vax: ka860.c
src/sys/dev/ic: cd18xx.c siisata.c
src/sys/dev/microcode/i8255x: rcvbundl.h
src/sys/dev/pci: amr.c
src/sys/dev/usb: usbnet.c
src/sys/netinet: sctp_constants.h

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/hppa/sys/__sigtramp2.S
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/nameser/ns_name.c
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/arm/arm32/fault.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/rockchip/rk3399_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/newsmips/apbus/if_snreg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/insn.h
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/riscv/riscv/locore.S
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/vax/vax/ka860.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/cd18xx.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/siisata.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/microcode/i8255x/rcvbundl.h
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/amr.c
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet/sctp_constants.h

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



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 22:00:34 UTC 2024

Modified Files:
src/lib/libc/arch/hppa/sys: __sigtramp2.S
src/lib/libc/nameser: ns_name.c
src/sys/arch/arm/arm32: fault.c
src/sys/arch/arm/rockchip: rk3399_pcie.c
src/sys/arch/newsmips/apbus: if_snreg.h
src/sys/arch/powerpc/booke: booke_machdep.c
src/sys/arch/riscv/include: insn.h
src/sys/arch/riscv/riscv: locore.S
src/sys/arch/vax/vax: ka860.c
src/sys/dev/ic: cd18xx.c siisata.c
src/sys/dev/microcode/i8255x: rcvbundl.h
src/sys/dev/pci: amr.c
src/sys/dev/usb: usbnet.c
src/sys/netinet: sctp_constants.h

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/hppa/sys/__sigtramp2.S
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/nameser/ns_name.c
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/arm/arm32/fault.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/rockchip/rk3399_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/newsmips/apbus/if_snreg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/insn.h
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/riscv/riscv/locore.S
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/vax/vax/ka860.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/cd18xx.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/siisata.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/microcode/i8255x/rcvbundl.h
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/amr.c
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet/sctp_constants.h

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/arch/hppa/sys/__sigtramp2.S
diff -u src/lib/libc/arch/hppa/sys/__sigtramp2.S:1.7 src/lib/libc/arch/hppa/sys/__sigtramp2.S:1.8
--- src/lib/libc/arch/hppa/sys/__sigtramp2.S:1.7	Sun Jun 26 14:37:13 2022
+++ src/lib/libc/arch/hppa/sys/__sigtramp2.S	Fri Feb  2 22:00:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: __sigtramp2.S,v 1.7 2022/06/26 14:37:13 skrll Exp $	*/
+/*	$NetBSD: __sigtramp2.S,v 1.8 2024/02/02 22:00:32 andvar Exp $	*/
 
 /*
  * Copyright (c) 1998-2001 Michael Shalayeff
@@ -61,7 +61,7 @@
 
 /*
  * The hppa signal trampoline is required to call the handler
- * possibily via a PLABEL.
+ * possibly via a PLABEL.
  *
  * On entry, stack looks like:
  *

Index: src/lib/libc/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.14 src/lib/libc/nameser/ns_name.c:1.15
--- src/lib/libc/nameser/ns_name.c:1.14	Sat Jan 20 14:52:48 2024
+++ src/lib/libc/nameser/ns_name.c	Fri Feb  2 22:00:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.14 2024/01/20 14:52:48 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.15 2024/02/02 22:00:32 andvar Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.14 2024/01/20 14:52:48 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.15 2024/02/02 22:00:32 andvar Exp $");
 #endif
 #endif
 
@@ -1092,7 +1092,7 @@ encode_bitsring(const char **bp, const c
 if (beg_blen == NULL) {
 	
 	if (c == '0') {
-		/* blen never begings with 0 */
+		/* blen never begins with 0 */
 		return (EINVAL);
 	}
 	beg_blen = cp;

Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.118 src/sys/arch/arm/arm32/fault.c:1.119
--- src/sys/arch/arm/arm32/fault.c:1.118	Fri Oct  6 09:53:02 2023
+++ src/sys/arch/arm/arm32/fault.c	Fri Feb  2 22:00:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.118 2023/10/06 09:53:02 martin Exp $	*/
+/*	$NetBSD: fault.c,v 1.119 2024/02/02 22:00:32 andvar Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.118 2023/10/06 09:53:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.119 2024/02/02 22:00:32 andvar Exp $");
 
 #include 
 
@@ -384,7 +384,7 @@ data_abort_handler(trapframe_t *tf)
 			/*
 			 * Force exit via userret()
 			 * This is necessary as the FPE is an extension to
-			 * userland that actually runs in a priveledged mode
+			 * userland that actually runs in a privileged mode
 			 * but uses USR mode permissions for its accesses.
 			 */
 			user = true;

Index: src/sys/arch/arm/rockchip/rk3399_pcie.c
diff -u src/sys/arch/arm/rockchip/rk3399_pcie.c:1.21 src/sys/arch/arm/rockchip/rk3399_pcie.c:1.22
--- src/sys/arch/arm/rockchip/rk3399_pcie.c:1.21	Wed Dec 27 07:46:20 2023
+++ src/sys/arch/arm/rockchip/rk3399_pcie.c	Fri Feb  2 22:00:32 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_pcie.c,v 1.21 2023/12/27 07:46:20 skrll Exp $ */
+/* $NetBSD: rk3399_pcie.c,v 1.22 2024/02/02 22:00:32 andvar Exp $ */
 /*
  * Copyright (c) 2018 Mark Kettenis 

CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 21:52:23 UTC 2024

Modified Files:
src/lib/libc: shlib_version
src/tests/rump/kernspace: threadpool.c

Log Message:
s/shold/should/


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/lib/libc/shlib_version
cvs rdiff -u -r1.5 -r1.6 src/tests/rump/kernspace/threadpool.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/shlib_version
diff -u src/lib/libc/shlib_version:1.295 src/lib/libc/shlib_version:1.296
--- src/lib/libc/shlib_version:1.295	Tue Aug  1 17:51:24 2023
+++ src/lib/libc/shlib_version	Fri Feb  2 21:52:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.295 2023/08/01 17:51:24 christos Exp $
+#	$NetBSD: shlib_version,v 1.296 2024/02/02 21:52:22 andvar Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -8,7 +8,7 @@
 # - libc/net: resolver update to BIND8/9?
 # - md2, md4, md5, rmd160 & sha1 functions should take the same arguments AFAP
 # - Crypto hashes have name overlap with libcrypto, rename them
-# - obsolete crypto hashes shold be booted out of libc
+# - obsolete crypto hashes should be booted out of libc
 # - libc/gen/setproctitle.c: remove __ps_strings hack
 # - libc/gen/assert.c: __{diag,}assert13() -> __{diag,}assert()
 # - lib/libc/net/iso_addr.c: remove

Index: src/tests/rump/kernspace/threadpool.c
diff -u src/tests/rump/kernspace/threadpool.c:1.5 src/tests/rump/kernspace/threadpool.c:1.6
--- src/tests/rump/kernspace/threadpool.c:1.5	Fri Jan  4 05:35:24 2019
+++ src/tests/rump/kernspace/threadpool.c	Fri Feb  2 21:52:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: threadpool.c,v 1.5 2019/01/04 05:35:24 thorpej Exp $	*/
+/*	$NetBSD: threadpool.c,v 1.6 2024/02/02 21:52:23 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: threadpool.c,v 1.5 2019/01/04 05:35:24 thorpej Exp $");
+__RCSID("$NetBSD: threadpool.c,v 1.6 2024/02/02 21:52:23 andvar Exp $");
 #endif /* !lint */
 
 #include 
@@ -223,7 +223,7 @@ rumptest_threadpool_job_cancel(void)
 		cv_wait(, );
 	KASSERT(data.count == 1);
 
-	/* Job is already running (and is not finished); this shold fail. */
+	/* Job is already running (and is not finished); this should fail. */
 	rv = threadpool_cancel_job_async(pool, );
 	KASSERT(rv == false);
 



CVS commit: src

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 21:52:23 UTC 2024

Modified Files:
src/lib/libc: shlib_version
src/tests/rump/kernspace: threadpool.c

Log Message:
s/shold/should/


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/lib/libc/shlib_version
cvs rdiff -u -r1.5 -r1.6 src/tests/rump/kernspace/threadpool.c

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



CVS commit: src/lib/libc/gen

2024-02-02 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Feb  2 21:16:42 UTC 2024

Modified Files:
src/lib/libc/gen: err.3

Log Message:
Make the err(3) manual clearer to read.

- Mention that the 'fmt' argument to these functions holds
  a printf(3)-like format specification.
- Clarify that the err()/warn()/errc()/warnc() family of functions
  will append an additional error message to the output.
- Add whitespace to separate paragraphs describing distinct
  concepts.
- Move the sentence mentioning the final output newline to
  a less ambiguous location within the text.
- Add a cross-reference to printf(3).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/err.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/gen

2024-02-02 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Feb  2 21:16:42 UTC 2024

Modified Files:
src/lib/libc/gen: err.3

Log Message:
Make the err(3) manual clearer to read.

- Mention that the 'fmt' argument to these functions holds
  a printf(3)-like format specification.
- Clarify that the err()/warn()/errc()/warnc() family of functions
  will append an additional error message to the output.
- Add whitespace to separate paragraphs describing distinct
  concepts.
- Move the sentence mentioning the final output newline to
  a less ambiguous location within the text.
- Add a cross-reference to printf(3).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/err.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/gen/err.3
diff -u src/lib/libc/gen/err.3:1.23 src/lib/libc/gen/err.3:1.24
--- src/lib/libc/gen/err.3:1.23	Thu Jan  5 15:13:57 2023
+++ src/lib/libc/gen/err.3	Fri Feb  2 21:16:41 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: err.3,v 1.23 2023/01/05 15:13:57 kre Exp $
+.\" $NetBSD: err.3,v 1.24 2024/02/02 21:16:41 jkoshy Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)err.3	8.1 (Berkeley) 6/9/93
 .\"
-.Dd January 5, 2023
+.Dd February 2, 2024
 .Dt ERR 3
 .Os
 .Sh NAME
@@ -81,27 +81,30 @@ and
 .Fn warn
 family of functions display a formatted error message on the standard
 error output.
-In all cases, the last component of the program name, a colon character,
-and a space are output.
+.Pp
+In all cases these functions output the last component of the program name,
+a colon character, and a space.
 If the
 .Fa fmt
 argument is not
 .Dv NULL ,
-the formatted error message is output.
+it is used as a
+.Xr printf 3 Ns
+-like format specification for the error message.
+.Pp
 In the case of the
 .Fn err ,
 .Fn verr ,
 .Fn warn ,
 and
 .Fn vwarn
-functions, the error message string affiliated with the current value of
-the global variable
+functions, an additional error message string affiliated with the current
+value of the global variable
 .Va errno
 is output next, preceded by a colon character and a space if
 .Fa fmt
 is not
 .Dv NULL .
-In all cases, the output is followed by a newline character.
 The
 .Fn errc ,
 .Fn verrc ,
@@ -119,7 +122,9 @@ The
 .Fn warnx ,
 and
 .Fn vwarnx
-functions will not output this error message string.
+functions will not output an additional error message string.
+.Pp
+In all cases, the output is terminated by a newline character.
 .Pp
 The
 .Fn err ,
@@ -168,6 +173,7 @@ if ((fd = open(block_device, O_RDONLY, 0
 .Sh SEE ALSO
 .Xr exit 3 ,
 .Xr getprogname 3 ,
+.Xr printf 3 ,
 .Xr strerror 3
 .Sh HISTORY
 The



CVS commit: src/libexec/httpd

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 20:50:28 UTC 2024

Modified Files:
src/libexec/httpd: bozohttpd.8

Log Message:
s/supressing/suppressing/.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/libexec/httpd/bozohttpd.8

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

Modified files:

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.94 src/libexec/httpd/bozohttpd.8:1.95
--- src/libexec/httpd/bozohttpd.8:1.94	Fri Jan 26 23:19:44 2024
+++ src/libexec/httpd/bozohttpd.8	Fri Feb  2 20:50:28 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.94 2024/01/26 23:19:44 mrg Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.95 2024/02/02 20:50:28 andvar Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -79,7 +79,7 @@ using the ftp facility (but see the
 .Fl s
 option for testing and the
 .Fl q
-option for supressing this.)
+option for suppressing this.)
 .Nm
 is designed to be small, simple and relatively featureless,
 hopefully increasing its security.



CVS commit: src/libexec/httpd

2024-02-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Feb  2 20:50:28 UTC 2024

Modified Files:
src/libexec/httpd: bozohttpd.8

Log Message:
s/supressing/suppressing/.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/libexec/httpd/bozohttpd.8

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



CVS commit: src

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 20:27:26 UTC 2024

Modified Files:
src/sbin/mount_cd9660: Makefile mount_cd9660.8 mount_cd9660.c
src/sys/fs/cd9660: cd9660_extern.h cd9660_mount.h cd9660_vfsops.c
cd9660_vnops.c

Log Message:
PR/57897: Ricardo Branco: Add support for mount options mask,dirmask,uid,gid


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/mount_cd9660/Makefile
cvs rdiff -u -r1.31 -r1.32 src/sbin/mount_cd9660/mount_cd9660.8
cvs rdiff -u -r1.33 -r1.34 src/sbin/mount_cd9660/mount_cd9660.c
cvs rdiff -u -r1.27 -r1.28 src/sys/fs/cd9660/cd9660_extern.h
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/cd9660/cd9660_mount.h
cvs rdiff -u -r1.97 -r1.98 src/sys/fs/cd9660/cd9660_vfsops.c
cvs rdiff -u -r1.62 -r1.63 src/sys/fs/cd9660/cd9660_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/sbin/mount_cd9660/Makefile
diff -u src/sbin/mount_cd9660/Makefile:1.12 src/sbin/mount_cd9660/Makefile:1.13
--- src/sbin/mount_cd9660/Makefile:1.12	Tue Aug  5 16:57:45 2008
+++ src/sbin/mount_cd9660/Makefile	Fri Feb  2 15:27:26 2024
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.12 2008/08/05 20:57:45 pooka Exp $
+#	$NetBSD: Makefile,v 1.13 2024/02/02 20:27:26 christos Exp $
 #	@(#)Makefile	8.3 (Berkeley) 3/27/94
 
 .include 
 
 PROG=	mount_cd9660
-SRCS=	mount_cd9660.c pathadj.c
+SRCS=	mount_cd9660.c fattr.c pathadj.c
 MAN=	mount_cd9660.8
 
 MOUNT=	${NETBSDSRCDIR}/sbin/mount

Index: src/sbin/mount_cd9660/mount_cd9660.8
diff -u src/sbin/mount_cd9660/mount_cd9660.8:1.31 src/sbin/mount_cd9660/mount_cd9660.8:1.32
--- src/sbin/mount_cd9660/mount_cd9660.8:1.31	Sat Jun 30 05:27:41 2018
+++ src/sbin/mount_cd9660/mount_cd9660.8	Fri Feb  2 15:27:26 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: mount_cd9660.8,v 1.31 2018/06/30 09:27:41 sevan Exp $
+.\" $NetBSD: mount_cd9660.8,v 1.32 2024/02/02 20:27:26 christos Exp $
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -57,7 +57,7 @@
 .\"
 .\" @(#)mount_cd9660.8	8.3 (Berkeley) 3/27/94
 .\"
-.Dd June 30, 2018
+.Dd February 1, 2024
 .Dt MOUNT_CD9660 8
 .Os
 .Sh NAME
@@ -65,6 +65,10 @@
 .Nd mount an ISO-9660 file system
 .Sh SYNOPSIS
 .Nm
+.Op Fl G Ar gid
+.Op Fl m Ar mask
+.Op Fl M Ar mask
+.Op Fl U Ar uid
 .Op Fl o Ar options
 .Ar special node
 .Sh DESCRIPTION
@@ -82,6 +86,37 @@ are converted to absolute paths before u
 .Pp
 The options are as follows:
 .Bl -tag -width indent
+.It Fl G Ar group
+Set the group of the files in the file system to
+.Ar group .
+The default gid on non-Rockridge volumes is zero.
+.It Fl U Ar user
+Set the owner of the files in the file system to
+.Ar user .
+The default uid on non-Rockridge volumes is zero.
+.It Fl m Ar mask
+Specify the maximum file permissions for files
+in the file system.
+(For example, a
+.Ar mask
+of
+.Li 755
+specifies that, by default, the owner should have
+read, write, and execute permissions for files, but
+others should only have read and execute permissions).
+See
+.Xr chmod 1
+for more information about octal file modes.
+Only the nine low-order bits of
+.Ar mask
+are used.
+The default
+.Ar mask
+on non-Rockridge volumes is 755.
+.It Fl M Ar mask
+Specify the maximum file permissions for directories
+in the file system.
+See the previous option's description for details.
 .It Fl o
 Options are specified with a
 .Fl o

Index: src/sbin/mount_cd9660/mount_cd9660.c
diff -u src/sbin/mount_cd9660/mount_cd9660.c:1.33 src/sbin/mount_cd9660/mount_cd9660.c:1.34
--- src/sbin/mount_cd9660/mount_cd9660.c:1.33	Sun Oct 16 12:26:35 2022
+++ src/sbin/mount_cd9660/mount_cd9660.c	Fri Feb  2 15:27:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_cd9660.c,v 1.33 2022/10/16 16:26:35 rillig Exp $	*/
+/*	$NetBSD: mount_cd9660.c,v 1.34 2024/02/02 20:27:26 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "@(#)mount_cd9660.c	8.7 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: mount_cd9660.c,v 1.33 2022/10/16 16:26:35 rillig Exp $");
+__RCSID("$NetBSD: mount_cd9660.c,v 1.34 2024/02/02 20:27:26 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -99,14 +99,15 @@ mount_cd9660_parseargs(int argc, char **
 	struct iso_args *args, int *mntflags,
 	char *canon_dev, char *canon_dir)
 {
-	int ch, opts;
+	struct stat sb;
+	int ch, opts, set_gid, set_uid, set_mask, set_dirmask;
 	mntoptparse_t mp;
 	char *dev, *dir;
 
 	memset(args, 0, sizeof(*args));
-	*mntflags = opts = 0;
+	*mntflags = opts = set_gid = set_uid = set_mask = set_dirmask = 0;
 	optind = optreset = 1;
-	while ((ch = getopt(argc, argv, "egjo:r")) != -1)
+	while ((ch = getopt(argc, argv, "egG:jM:m:o:rU:")) != -1)
 		switch (ch) {
 		case 'e':
 			/* obsolete, retained for compatibility only, use
@@ -118,6 +119,19 @@ mount_cd9660_parseargs(int argc, char **
 			 * -o gens */
 			opts |= ISOFSMNT_GENS;
 			break;
+		

CVS commit: src

2024-02-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  2 20:27:26 UTC 2024

Modified Files:
src/sbin/mount_cd9660: Makefile mount_cd9660.8 mount_cd9660.c
src/sys/fs/cd9660: cd9660_extern.h cd9660_mount.h cd9660_vfsops.c
cd9660_vnops.c

Log Message:
PR/57897: Ricardo Branco: Add support for mount options mask,dirmask,uid,gid


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/mount_cd9660/Makefile
cvs rdiff -u -r1.31 -r1.32 src/sbin/mount_cd9660/mount_cd9660.8
cvs rdiff -u -r1.33 -r1.34 src/sbin/mount_cd9660/mount_cd9660.c
cvs rdiff -u -r1.27 -r1.28 src/sys/fs/cd9660/cd9660_extern.h
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/cd9660/cd9660_mount.h
cvs rdiff -u -r1.97 -r1.98 src/sys/fs/cd9660/cd9660_vfsops.c
cvs rdiff -u -r1.62 -r1.63 src/sys/fs/cd9660/cd9660_vnops.c

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



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 19:07:58 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: lex_char.c msg_074.c msg_075.c msg_076.c
msg_079.c msg_080.c msg_081.c msg_082.c msg_254.c msg_258.c
msg_263.c msg_264.c queries.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_079_nongcc.c

Log Message:
tests/lint: test lexing of characters and strings


To generate a diff of this commit:
cvs rdiff -u -r1.1302 -r1.1303 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/lex_char.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_074.c \
src/tests/usr.bin/xlint/lint1/msg_075.c \
src/tests/usr.bin/xlint/lint1/msg_080.c \
src/tests/usr.bin/xlint/lint1/msg_081.c \
src/tests/usr.bin/xlint/lint1/msg_082.c \
src/tests/usr.bin/xlint/lint1/msg_258.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_076.c \
src/tests/usr.bin/xlint/lint1/msg_079.c \
src/tests/usr.bin/xlint/lint1/msg_254.c \
src/tests/usr.bin/xlint/lint1/msg_263.c
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_079_nongcc.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_264.c
cvs rdiff -u -r1.23 -r1.24 src/tests/usr.bin/xlint/lint1/queries.c

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.1302 src/distrib/sets/lists/tests/mi:1.1303
--- src/distrib/sets/lists/tests/mi:1.1302	Sat Jan 27 15:10:56 2024
+++ src/distrib/sets/lists/tests/mi	Fri Feb  2 19:07:57 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1302 2024/01/27 15:10:56 rillig Exp $
+# $NetBSD: mi,v 1.1303 2024/02/02 19:07:57 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6905,6 +6905,7 @@
 ./usr/tests/usr.bin/xlint/lint1/msg_078.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_079.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_079.exp			tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/xlint/lint1/msg_079_nongcc.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_080.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_080.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_081.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/lex_char.c
diff -u src/tests/usr.bin/xlint/lint1/lex_char.c:1.8 src/tests/usr.bin/xlint/lint1/lex_char.c:1.9
--- src/tests/usr.bin/xlint/lint1/lex_char.c:1.8	Fri Jan 19 19:23:34 2024
+++ src/tests/usr.bin/xlint/lint1/lex_char.c	Fri Feb  2 19:07:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex_char.c,v 1.8 2024/01/19 19:23:34 rillig Exp $	*/
+/*	$NetBSD: lex_char.c,v 1.9 2024/02/02 19:07:58 rillig Exp $	*/
 # 3 "lex_char.c"
 
 /*
@@ -61,6 +61,18 @@ test(void)
 
 	/* U+000D carriage return */
 	sink('\r');
+
+	/* A double quote may be escaped or not, since C90. */
+	sink('"');
+	sink('\"');
+
+	/* A question mark may be escaped or not, since C90. */
+	sink('?');
+	sink('\?');
+
+	sink('\\');
+
+	sink('\'');
 }
 
 /*

Index: src/tests/usr.bin/xlint/lint1/msg_074.c
diff -u src/tests/usr.bin/xlint/lint1/msg_074.c:1.6 src/tests/usr.bin/xlint/lint1/msg_074.c:1.7
--- src/tests/usr.bin/xlint/lint1/msg_074.c:1.6	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/msg_074.c	Fri Feb  2 19:07:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_074.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: msg_074.c,v 1.7 2024/02/02 19:07:58 rillig Exp $	*/
 # 3 "msg_074.c"
 
 // Test for message: no hex digits follow \x [74]
@@ -6,11 +6,31 @@
 /* lint1-extra-flags: -X 351 */
 
 /* expect+1: error: no hex digits follow \x [74] */
-char invalid_hex = '\x';
-
+char char_invalid_hex = '\x';
 /* expect+2: error: no hex digits follow \x [74] */
 /* expect+1: warning: multi-character character constant [294] */
-char invalid_hex_letter = '\xg';
+char char_invalid_hex_letter = '\xg';
+char char_hex1 = '\xf';
+char char_hex2 = '\xff';
 
-char valid_hex = '\xff';
-char valid_single_digit_hex = '\xa';
+/* expect+1: error: no hex digits follow \x [74] */
+int wide_invalid_hex = L'\x';
+/* expect+2: error: no hex digits follow \x [74] */
+/* expect+1: error: too many characters in character constant [71] */
+int wide_invalid_hex_letter = L'\xg';
+int wide_hex1 = L'\xf';
+int wide_hex2 = L'\xff';
+
+/* expect+1: error: no hex digits follow \x [74] */
+char char_string_invalid_hex[] = "\x";
+/* expect+1: error: no hex digits follow \x [74] */
+char char_string_invalid_hex_letter[] = "\xg";
+char char_string_hex1[] = "\xf";
+char char_string_hex2[] = "\xff";
+
+/* expect+1: error: no hex digits follow \x [74] */
+int wide_string_invalid_hex[] = L"\x";
+/* expect+1: error: no hex digits follow \x [74] */
+int 

CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 19:07:58 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: lex_char.c msg_074.c msg_075.c msg_076.c
msg_079.c msg_080.c msg_081.c msg_082.c msg_254.c msg_258.c
msg_263.c msg_264.c queries.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_079_nongcc.c

Log Message:
tests/lint: test lexing of characters and strings


To generate a diff of this commit:
cvs rdiff -u -r1.1302 -r1.1303 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/lex_char.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_074.c \
src/tests/usr.bin/xlint/lint1/msg_075.c \
src/tests/usr.bin/xlint/lint1/msg_080.c \
src/tests/usr.bin/xlint/lint1/msg_081.c \
src/tests/usr.bin/xlint/lint1/msg_082.c \
src/tests/usr.bin/xlint/lint1/msg_258.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_076.c \
src/tests/usr.bin/xlint/lint1/msg_079.c \
src/tests/usr.bin/xlint/lint1/msg_254.c \
src/tests/usr.bin/xlint/lint1/msg_263.c
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_079_nongcc.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_264.c
cvs rdiff -u -r1.23 -r1.24 src/tests/usr.bin/xlint/lint1/queries.c

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



CVS commit: [netbsd-10] src/sys/arch/macppc/conf

2024-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  2 18:29:18 UTC 2024

Modified Files:
src/sys/arch/macppc/conf [netbsd-10]: GENERIC

Log Message:
Pull up following revision(s) (requested by uwe in ticket #558):

sys/arch/macppc/conf/GENERIC: revision 1.378

macppc: enable FFS_EI in GENERIC

I'd say it should be enabled for anything with USB.

ok macallan


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.375.4.1 src/sys/arch/macppc/conf/GENERIC

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



CVS commit: [netbsd-10] src/sys/arch/macppc/conf

2024-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  2 18:29:18 UTC 2024

Modified Files:
src/sys/arch/macppc/conf [netbsd-10]: GENERIC

Log Message:
Pull up following revision(s) (requested by uwe in ticket #558):

sys/arch/macppc/conf/GENERIC: revision 1.378

macppc: enable FFS_EI in GENERIC

I'd say it should be enabled for anything with USB.

ok macallan


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.375.4.1 src/sys/arch/macppc/conf/GENERIC

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/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.375 src/sys/arch/macppc/conf/GENERIC:1.375.4.1
--- src/sys/arch/macppc/conf/GENERIC:1.375	Sun Aug  7 02:52:27 2022
+++ src/sys/arch/macppc/conf/GENERIC	Fri Feb  2 18:29:18 2024
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.375 2022/08/07 02:52:27 simonb Exp $
+# $NetBSD: GENERIC,v 1.375.4.1 2024/02/02 18:29:18 martin Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.375 $"
+#ident 		"GENERIC-$Revision: 1.375.4.1 $"
 
 maxusers	32
 
@@ -84,7 +84,7 @@ include "conf/filesystems.config"
 
 # File system options
 options 	APPLE_UFS	# Apple UFS support in FFS
-#options 	FFS_EI		# FFS Endian Independent support
+options 	FFS_EI		# FFS Endian Independent support
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas



CVS commit: [netbsd-10] src/sys/arch/vax/conf

2024-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  2 18:27:51 UTC 2024

Modified Files:
src/sys/arch/vax/conf [netbsd-10]: files.vax

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #557):

sys/arch/vax/conf/files.vax: revision 1.127

Add missed "rasops1" attribute to smg(4) rasops'fied a year ago.

This fixes silent boot failure on VS3100 with smg(4) framebuffer console.


To generate a diff of this commit:
cvs rdiff -u -r1.125.30.1 -r1.125.30.2 src/sys/arch/vax/conf/files.vax

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/vax/conf/files.vax
diff -u src/sys/arch/vax/conf/files.vax:1.125.30.1 src/sys/arch/vax/conf/files.vax:1.125.30.2
--- src/sys/arch/vax/conf/files.vax:1.125.30.1	Sun Feb 12 12:27:26 2023
+++ src/sys/arch/vax/conf/files.vax	Fri Feb  2 18:27:51 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.vax,v 1.125.30.1 2023/02/12 12:27:26 martin Exp $
+#	$NetBSD: files.vax,v 1.125.30.2 2024/02/02 18:27:51 martin Exp $
 #
 # new style config file for vax architecture
 #
@@ -186,7 +186,7 @@ file	arch/vax/vsa/ncr.c		si_vsbus
 include "dev/ata/files.ata"
 
 # Monochrome framebuffer on VS3100.
-device	smg: displaydev, wsemuldisplaydev
+device	smg: displaydev, wsemuldisplaydev, rasops1
 attach	smg at vsbus
 file	arch/vax/vsa/smg.c		smg needs-flag
 



CVS commit: [netbsd-10] src/sys/arch/vax/conf

2024-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb  2 18:27:51 UTC 2024

Modified Files:
src/sys/arch/vax/conf [netbsd-10]: files.vax

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #557):

sys/arch/vax/conf/files.vax: revision 1.127

Add missed "rasops1" attribute to smg(4) rasops'fied a year ago.

This fixes silent boot failure on VS3100 with smg(4) framebuffer console.


To generate a diff of this commit:
cvs rdiff -u -r1.125.30.1 -r1.125.30.2 src/sys/arch/vax/conf/files.vax

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



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 16:25:59 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_254.c
src/usr.bin/xlint/common: externs.h tyname.c
src/usr.bin/xlint/lint1: debug.c

Log Message:
lint: fix debug output for strings, reduce code size

The debug output contained too many newlines.

The buffer functions were built into lint2 even though they weren't
used.

Enable the query for invisible characters in string literals, to make
sure that a newline in a string literal does not trigger that query.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_254.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/xlint/common/externs.h
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/xlint/common/tyname.c
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/xlint/lint1/debug.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/usr.bin/xlint/lint1/msg_254.c
diff -u src/tests/usr.bin/xlint/lint1/msg_254.c:1.4 src/tests/usr.bin/xlint/lint1/msg_254.c:1.5
--- src/tests/usr.bin/xlint/lint1/msg_254.c:1.4	Fri Jun 17 18:54:53 2022
+++ src/tests/usr.bin/xlint/lint1/msg_254.c	Fri Feb  2 16:25:58 2024
@@ -1,9 +1,9 @@
-/*	$NetBSD: msg_254.c,v 1.4 2022/06/17 18:54:53 rillig Exp $	*/
+/*	$NetBSD: msg_254.c,v 1.5 2024/02/02 16:25:58 rillig Exp $	*/
 # 3 "msg_254.c"
 
 /* Test for message: newline in string or char constant [254] */
 
-/* lint1-flags: -tw */
+/* lint1-flags: -tw -q17 */
 
 /*
  * The sequence backslash-newline is a GCC extension.

Index: src/usr.bin/xlint/common/externs.h
diff -u src/usr.bin/xlint/common/externs.h:1.35 src/usr.bin/xlint/common/externs.h:1.36
--- src/usr.bin/xlint/common/externs.h:1.35	Thu Feb  1 21:19:13 2024
+++ src/usr.bin/xlint/common/externs.h	Fri Feb  2 16:25:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: externs.h,v 1.35 2024/02/01 21:19:13 rillig Exp $	*/
+/*	$NetBSD: externs.h,v 1.36 2024/02/02 16:25:58 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,6 +37,8 @@
 #if IS_LINT1 || IS_LINT2
 const char *type_name(const type_t *);
 const char *tspec_name(tspec_t);
+#endif
+#if IS_LINT1
 void buf_init(buffer *);
 void buf_add_char(buffer *, char);
 #endif

Index: src/usr.bin/xlint/common/tyname.c
diff -u src/usr.bin/xlint/common/tyname.c:1.60 src/usr.bin/xlint/common/tyname.c:1.61
--- src/usr.bin/xlint/common/tyname.c:1.60	Thu Feb  1 21:19:13 2024
+++ src/usr.bin/xlint/common/tyname.c	Fri Feb  2 16:25:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tyname.c,v 1.60 2024/02/01 21:19:13 rillig Exp $	*/
+/*	$NetBSD: tyname.c,v 1.61 2024/02/02 16:25:58 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tyname.c,v 1.60 2024/02/01 21:19:13 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.61 2024/02/02 16:25:58 rillig Exp $");
 #endif
 
 #include 
@@ -94,7 +94,11 @@ intern(const char *name)
 	return n->ntn_name;
 }
 
+#if IS_LINT1
 void
+#else
+static void
+#endif
 buf_init(buffer *buf)
 {
 	buf->len = 0;
@@ -122,11 +126,13 @@ buf_add_mem(buffer *buf, const char *s, 
 	buf->data[buf->len] = '\0';
 }
 
+#if IS_LINT1
 void
 buf_add_char(buffer *buf, char c)
 {
 	buf_add_mem(buf, , 1);
 }
+#endif
 
 static void
 buf_add(buffer *buf, const char *s)

Index: src/usr.bin/xlint/lint1/debug.c
diff -u src/usr.bin/xlint/lint1/debug.c:1.68 src/usr.bin/xlint/lint1/debug.c:1.69
--- src/usr.bin/xlint/lint1/debug.c:1.68	Thu Feb  1 18:37:06 2024
+++ src/usr.bin/xlint/lint1/debug.c	Fri Feb  2 16:25:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.68 2024/02/01 18:37:06 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.69 2024/02/02 16:25:58 rillig Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: debug.c,v 1.68 2024/02/01 18:37:06 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.69 2024/02/02 16:25:58 rillig Exp $");
 #endif
 
 #include 
@@ -235,10 +235,11 @@ debug_node(const tnode_t *tn) // NOLINT(
 		debug_printf("\n");
 		break;
 	case STRING:
-		debug_printf(", length %zu\n", tn->tn_string->len);
+		debug_printf(", length %zu", tn->tn_string->len);
 		if (tn->tn_string->data != NULL)
 			// TODO: May contain \0 or control characters.
-			debug_printf(", \"%s\"\n", tn->tn_string->data);
+			debug_printf(", \"%s\"", tn->tn_string->data);
+		debug_printf("\n");
 		break;
 	default:
 		debug_printf("\n");



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 16:25:59 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_254.c
src/usr.bin/xlint/common: externs.h tyname.c
src/usr.bin/xlint/lint1: debug.c

Log Message:
lint: fix debug output for strings, reduce code size

The debug output contained too many newlines.

The buffer functions were built into lint2 even though they weren't
used.

Enable the query for invisible characters in string literals, to make
sure that a newline in a string literal does not trigger that query.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_254.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/xlint/common/externs.h
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/xlint/common/tyname.c
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/xlint/lint1/debug.c

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



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 16:05:37 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_253.c msg_258.c
src/usr.bin/xlint/lint1: cgram.y lex.c

Log Message:
lint: make newline in a string literal an error in C90 and later


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_253.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_258.c
cvs rdiff -u -r1.485 -r1.486 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.206 -r1.207 src/usr.bin/xlint/lint1/lex.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/usr.bin/xlint/lint1/msg_253.c
diff -u src/tests/usr.bin/xlint/lint1/msg_253.c:1.4 src/tests/usr.bin/xlint/lint1/msg_253.c:1.5
--- src/tests/usr.bin/xlint/lint1/msg_253.c:1.4	Fri Jun 17 18:54:53 2022
+++ src/tests/usr.bin/xlint/lint1/msg_253.c	Fri Feb  2 16:05:37 2024
@@ -1,8 +1,9 @@
-/*	$NetBSD: msg_253.c,v 1.4 2022/06/17 18:54:53 rillig Exp $	*/
+/*	$NetBSD: msg_253.c,v 1.5 2024/02/02 16:05:37 rillig Exp $	*/
 # 3 "msg_253.c"
 
 // Test for message: unterminated character constant [253]
 
+/* expect+4: error: newline in string or char constant [254] */
 /* expect+3: error: unterminated character constant [253] */
-/* expect+2: error: syntax error '' [249] */
+/* expect+2: error: syntax error ''' [249] */
 '

Index: src/tests/usr.bin/xlint/lint1/msg_258.c
diff -u src/tests/usr.bin/xlint/lint1/msg_258.c:1.5 src/tests/usr.bin/xlint/lint1/msg_258.c:1.6
--- src/tests/usr.bin/xlint/lint1/msg_258.c:1.5	Tue Mar 28 14:44:35 2023
+++ src/tests/usr.bin/xlint/lint1/msg_258.c	Fri Feb  2 16:05:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_258.c,v 1.5 2023/03/28 14:44:35 rillig Exp $	*/
+/*	$NetBSD: msg_258.c,v 1.6 2024/02/02 16:05:37 rillig Exp $	*/
 # 3 "msg_258.c"
 
 // Test for message: unterminated string constant [258]
@@ -12,6 +12,7 @@ int dummy;
 //
 // "This string doesn't end in this line.
 
+/* expect+5: error: newline in string or char constant [254] */
 /* expect+4: error: unterminated string constant [258] */
 /* expect+3: error: syntax error '' [249] */
 /* expect+2: error: empty array declaration for 'str' [190] */

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.485 src/usr.bin/xlint/lint1/cgram.y:1.486
--- src/usr.bin/xlint/lint1/cgram.y:1.485	Thu Feb  1 18:37:06 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Feb  2 16:05:37 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.485 2024/02/01 18:37:06 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.486 2024/02/02 16:05:37 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.485 2024/02/01 18:37:06 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.486 2024/02/02 16:05:37 rillig Exp $");
 #endif
 
 #include 
@@ -187,7 +187,7 @@ is_either(const char *s, const char *a, 
 		op_name($$->tn_op), type_name($$->tn_type));
 } 
 %printer { fprintf(yyo, "%zu to %zu", $$.lo, $$.hi); } 
-%printer { fprintf(yyo, "length %zu", $$->st_len); } 
+%printer { fprintf(yyo, "length %zu", $$->len); } 
 %printer {
 	fprintf(yyo, "%s *", type_qualifiers_string($$->qualifiers));
 } 

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.206 src/usr.bin/xlint/lint1/lex.c:1.207
--- src/usr.bin/xlint/lint1/lex.c:1.206	Thu Feb  1 21:19:13 2024
+++ src/usr.bin/xlint/lint1/lex.c	Fri Feb  2 16:05:37 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.206 2024/02/01 21:19:13 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.207 2024/02/02 16:05:37 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: lex.c,v 1.206 2024/02/01 21:19:13 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.207 2024/02/02 16:05:37 rillig Exp $");
 #endif
 
 #include 
@@ -903,12 +903,9 @@ get_escaped_char(int delim)
 		return -1;
 	switch (c) {
 	case '\n':
-		if (!allow_c90) {
-			/* newline in string or char constant */
-			error(254);
-			return -2;
-		}
-		return c;
+		/* newline in string or char constant */
+		error(254);
+		return -2;
 	case '\0':
 		/* syntax error '%s' */
 		error(249, "EOF or null byte in literal");



CVS commit: src

2024-02-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  2 16:05:37 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_253.c msg_258.c
src/usr.bin/xlint/lint1: cgram.y lex.c

Log Message:
lint: make newline in a string literal an error in C90 and later


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_253.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_258.c
cvs rdiff -u -r1.485 -r1.486 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.206 -r1.207 src/usr.bin/xlint/lint1/lex.c

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



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

2024-02-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb  2 15:59:30 UTC 2024

Modified Files:
src/sys/arch/next68k/dev: nextdisplay.c nextdisplayvar.h

Log Message:
Add WSDISPLAY_GINFO, LINEBYTES, and SMODE ioctl(2)s and mmap(2) support.

mlterm-wscons partially works (no 2 bpp support) with these APIs.
XXX: Xorg server needs wsmouse support.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/next68k/dev/nextdisplay.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/next68k/dev/nextdisplayvar.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/next68k/dev/nextdisplay.c
diff -u src/sys/arch/next68k/dev/nextdisplay.c:1.30 src/sys/arch/next68k/dev/nextdisplay.c:1.31
--- src/sys/arch/next68k/dev/nextdisplay.c:1.30	Sat Feb 11 02:34:15 2023
+++ src/sys/arch/next68k/dev/nextdisplay.c	Fri Feb  2 15:59:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: nextdisplay.c,v 1.30 2023/02/11 02:34:15 tsutsui Exp $ */
+/* $NetBSD: nextdisplay.c,v 1.31 2024/02/02 15:59:30 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1998 Matt DeBergalis
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.30 2023/02/11 02:34:15 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.31 2024/02/02 15:59:30 tsutsui Exp $");
 
 #include 			/* RCS ID & Copyright macro defns */
 
@@ -170,6 +170,7 @@ nextdisplay_init(struct nextdisplay_conf
 	dc->dc_wid = 1120;
 	dc->dc_ht = 832;
 	dc->dc_depth = color ? 16 : 2;
+	dc->dc_cmsize = color ? 256 : 4;
 	dc->dc_rowbytes = (turbo ? 1120 : 1152) * dc->dc_depth / 8;
 
 	dc->dc_videobase = dc->dc_vaddr;
@@ -259,6 +260,8 @@ nextdisplay_attach(device_t parent, devi
 		INTR_ENABLE(NEXT_I_C16_VIDEO);
 	}
 
+	sc->sc_mode = WSDISPLAYIO_MODE_EMUL;
+
 	/* initialize the raster */
 	waa.console = isconsole;
 	waa.scrdata = iscolor ?
@@ -294,6 +297,7 @@ nextdisplay_ioctl(void *v, void *vs, u_l
 {
 	struct nextdisplay_softc *sc = v;
 	struct nextdisplay_config *dc = sc->sc_dc;
+	int new_mode;
 
 	switch (cmd) {
 	case WSDISPLAYIO_GTYPE:
@@ -309,6 +313,25 @@ nextdisplay_ioctl(void *v, void *vs, u_l
 		return EPASSTHROUGH;
 
 	case WSDISPLAYIO_GINFO:
+#define wsd_fbip ((struct wsdisplay_fbinfo *)data)
+		wsd_fbip->height = dc->dc_ht;
+		wsd_fbip->width = dc->dc_wid;
+		wsd_fbip->depth = dc->dc_depth;
+		wsd_fbip->cmsize = dc->dc_cmsize;
+#undef wsd_fbip
+return 0;
+
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = dc->dc_rowbytes;
+		return 0;
+
+	case WSDISPLAYIO_SMODE:
+		new_mode = *(int *)data;
+		if (new_mode != sc->sc_mode) {
+			sc->sc_mode = new_mode;
+		}
+		return 0;
+
 	case WSDISPLAYIO_GETCMAP:
 	case WSDISPLAYIO_PUTCMAP:
 	case WSDISPLAYIO_GVIDEO:
@@ -326,10 +349,18 @@ nextdisplay_ioctl(void *v, void *vs, u_l
 static paddr_t
 nextdisplay_mmap(void *v, void *vs, off_t offset, int prot)
 {
+	struct nextdisplay_softc *sc = v;
+	struct nextdisplay_config *dc = sc->sc_dc;
+	paddr_t cookie = -1;
+
+	switch (sc->sc_mode) {
+	case WSDISPLAYIO_MODE_DUMBFB:
+		if (offset >= 0 && offset < dc->dc_size)
+			cookie = m68k_btop(dc->dc_paddr + offset);
+		break;
+	}
 
-	/* XXX */
-	printf("nextdisplay_mmap: failed\n");
-	return -1;
+	return cookie;
 }
 
 int

Index: src/sys/arch/next68k/dev/nextdisplayvar.h
diff -u src/sys/arch/next68k/dev/nextdisplayvar.h:1.6 src/sys/arch/next68k/dev/nextdisplayvar.h:1.7
--- src/sys/arch/next68k/dev/nextdisplayvar.h:1.6	Fri Feb  3 23:13:00 2023
+++ src/sys/arch/next68k/dev/nextdisplayvar.h	Fri Feb  2 15:59:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: nextdisplayvar.h,v 1.6 2023/02/03 23:13:00 tsutsui Exp $ */
+/* $NetBSD: nextdisplayvar.h,v 1.7 2024/02/02 15:59:30 tsutsui Exp $ */
 /*
  * Copyright (c) 1998 Matt DeBergalis
  * All rights reserved.
@@ -54,6 +54,7 @@ struct nextdisplay_config {
 	int dc_ht;			/* height of frame buffer */
 	int dc_depth;			/* depth of frame buffer */
 	int dc_rowbytes;		/* bytes in fb scan line */
+	int dc_cmsize;
 
 	struct raster dc_raster;	/* raster description */
 	struct rcons dc_rcons;		/* raster blitter control info */
@@ -67,6 +68,7 @@ struct nextdisplay_softc {
 	device_t sc_dev;
 
 	struct nextdisplay_config *sc_dc;
+	int sc_mode;
 
 	int nscreens;
 };



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

2024-02-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb  2 15:59:30 UTC 2024

Modified Files:
src/sys/arch/next68k/dev: nextdisplay.c nextdisplayvar.h

Log Message:
Add WSDISPLAY_GINFO, LINEBYTES, and SMODE ioctl(2)s and mmap(2) support.

mlterm-wscons partially works (no 2 bpp support) with these APIs.
XXX: Xorg server needs wsmouse support.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/next68k/dev/nextdisplay.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/next68k/dev/nextdisplayvar.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/dec

2024-02-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb  2 15:44:43 UTC 2024

Modified Files:
src/sys/dev/dec: dz.c dzkbd.c dzms.c mcclock.c

Log Message:
Use aprint_normal(9) for attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/dec/dz.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/dec/dzkbd.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dec/dzms.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dec/mcclock.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/dec/dz.c
diff -u src/sys/dev/dec/dz.c:1.43 src/sys/dev/dec/dz.c:1.44
--- src/sys/dev/dec/dz.c:1.43	Wed Oct 26 23:44:36 2022
+++ src/sys/dev/dec/dz.c	Fri Feb  2 15:44:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: dz.c,v 1.43 2022/10/26 23:44:36 riastradh Exp $	*/
+/*	$NetBSD: dz.c,v 1.44 2024/02/02 15:44:43 tsutsui Exp $	*/
 /*
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.43 2022/10/26 23:44:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.44 2024/02/02 15:44:43 tsutsui Exp $");
 
 #include 
 #include 
@@ -247,7 +247,7 @@ dzattach(struct dz_softc *sc, struct evc
 		callout_init(_ch, 0);
 		callout_reset(_ch, hz, dzscan, NULL);
 	}
-	printf("\n");
+	aprint_normal("\n");
 }
 
 /* Receiver Interrupt */

Index: src/sys/dev/dec/dzkbd.c
diff -u src/sys/dev/dec/dzkbd.c:1.30 src/sys/dev/dec/dzkbd.c:1.31
--- src/sys/dev/dec/dzkbd.c:1.30	Sat Aug  7 16:19:10 2021
+++ src/sys/dev/dec/dzkbd.c	Fri Feb  2 15:44:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: dzkbd.c,v 1.30 2021/08/07 16:19:10 thorpej Exp $	*/
+/*	$NetBSD: dzkbd.c,v 1.31 2024/02/02 15:44:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.30 2021/08/07 16:19:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.31 2024/02/02 15:44:43 tsutsui Exp $");
 
 #include 
 #include 
@@ -171,7 +171,7 @@ dzkbd_attach(device_t parent, device_t s
 	dzi->dzi_ls = ls;
 	dzkbd->sc_itl = dzi;
 
-	printf("\n");
+	aprint_normal("\n");
 
 	if (!isconsole) {
 		DELAY(10);

Index: src/sys/dev/dec/dzms.c
diff -u src/sys/dev/dec/dzms.c:1.24 src/sys/dev/dec/dzms.c:1.25
--- src/sys/dev/dec/dzms.c:1.24	Sat Aug  7 16:19:10 2021
+++ src/sys/dev/dec/dzms.c	Fri Feb  2 15:44:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: dzms.c,v 1.24 2021/08/07 16:19:10 thorpej Exp $	*/
+/*	$NetBSD: dzms.c,v 1.25 2024/02/02 15:44:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.24 2021/08/07 16:19:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.25 2024/02/02 15:44:43 tsutsui Exp $");
 
 #include 
 #include 
@@ -128,7 +128,7 @@ dzms_attach(device_t parent, device_t se
 	ls = >sc_dz[daa->daa_line];
 	dzms->dzms_ls = ls;
 
-	printf("\n");
+	aprint_normal("\n");
 
 	a.accessops = _accessops;
 	a.accesscookie = dzms;

Index: src/sys/dev/dec/mcclock.c
diff -u src/sys/dev/dec/mcclock.c:1.29 src/sys/dev/dec/mcclock.c:1.30
--- src/sys/dev/dec/mcclock.c:1.29	Thu Aug 24 14:21:40 2023
+++ src/sys/dev/dec/mcclock.c	Fri Feb  2 15:44:43 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: mcclock.c,v 1.29 2023/08/24 14:21:40 andvar Exp $ */
+/* $NetBSD: mcclock.c,v 1.30 2024/02/02 15:44:43 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.29 2023/08/24 14:21:40 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.30 2024/02/02 15:44:43 tsutsui Exp $");
 
 #include 
 #include 
@@ -68,7 +68,7 @@ void
 mcclock_attach(struct mcclock_softc *sc, const struct mcclock_busfns *busfns)
 {
 
-	printf(": mc146818 or compatible");
+	aprint_normal(": mc146818 or compatible");
 
 	sc->sc_busfns = busfns;
 



CVS commit: src/sys/dev/dec

2024-02-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb  2 15:44:43 UTC 2024

Modified Files:
src/sys/dev/dec: dz.c dzkbd.c dzms.c mcclock.c

Log Message:
Use aprint_normal(9) for attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/dec/dz.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/dec/dzkbd.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dec/dzms.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dec/mcclock.c

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