CVS commit: src/usr.bin/make

2021-12-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 23:47:10 UTC 2021

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

Log Message:
make: merge duplicate code in ParseDirective

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.568 -r1.569 src/usr.bin/make/parse.c

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



CVS commit: src/usr.bin/make

2021-12-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 23:47:10 UTC 2021

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

Log Message:
make: merge duplicate code in ParseDirective

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.568 -r1.569 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.568 src/usr.bin/make/parse.c:1.569
--- src/usr.bin/make/parse.c:1.568	Fri Dec  3 23:37:30 2021
+++ src/usr.bin/make/parse.c	Sat Dec  4 23:47:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.568 2021/12/03 23:37:30 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.569 2021/12/04 23:47:09 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.568 2021/12/03 23:37:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.569 2021/12/04 23:47:09 rillig Exp $");
 
 /* types and constants */
 
@@ -2997,12 +2997,6 @@ ParseLine_ShellCommand(const char *p)
 	}
 }
 
-MAKE_INLINE bool
-IsDirective(const char *dir, size_t dirlen, const char *name)
-{
-	return dirlen == strlen(name) && memcmp(dir, name, dirlen) == 0;
-}
-
 /*
  * See if the line starts with one of the known directives, and if so, handle
  * the directive.
@@ -3011,8 +3005,8 @@ static bool
 ParseDirective(char *line)
 {
 	char *cp = line + 1;
-	const char *dir, *arg;
-	size_t dirlen;
+	const char *arg;
+	Substring dir;
 
 	pp_skip_whitespace();
 	if (IsInclude(cp, false)) {
@@ -3020,10 +3014,10 @@ ParseDirective(char *line)
 		return true;
 	}
 
-	dir = cp;
+	dir.start = cp;
 	while (ch_isalpha(*cp) || *cp == '-')
 		cp++;
-	dirlen = (size_t)(cp - dir);
+	dir.end = cp;
 
 	if (*cp != '\0' && !ch_isspace(*cp))
 		return false;
@@ -3031,31 +3025,31 @@ ParseDirective(char *line)
 	pp_skip_whitespace();
 	arg = cp;
 
-	if (IsDirective(dir, dirlen, "undef")) {
-		Var_Undef(cp);
+	if (Substring_Equals(dir, "undef")) {
+		Var_Undef(arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "export")) {
+	} else if (Substring_Equals(dir, "export")) {
 		Var_Export(VEM_PLAIN, arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "export-env")) {
+	} else if (Substring_Equals(dir, "export-env")) {
 		Var_Export(VEM_ENV, arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "export-literal")) {
+	} else if (Substring_Equals(dir, "export-literal")) {
 		Var_Export(VEM_LITERAL, arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "unexport")) {
+	} else if (Substring_Equals(dir, "unexport")) {
 		Var_UnExport(false, arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "unexport-env")) {
+	} else if (Substring_Equals(dir, "unexport-env")) {
 		Var_UnExport(true, arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "info")) {
+	} else if (Substring_Equals(dir, "info")) {
 		ParseMessage(PARSE_INFO, "info", arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "warning")) {
+	} else if (Substring_Equals(dir, "warning")) {
 		ParseMessage(PARSE_WARNING, "warning", arg);
 		return true;
-	} else if (IsDirective(dir, dirlen, "error")) {
+	} else if (Substring_Equals(dir, "error")) {
 		ParseMessage(PARSE_FATAL, "error", arg);
 		return true;
 	}



CVS commit: src/sbin/cgdconfig

2021-12-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Dec  4 15:03:58 UTC 2021

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

Log Message:
cgdconfig.8: Use argon2id in examples


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/cgdconfig/cgdconfig.8

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

Modified files:

Index: src/sbin/cgdconfig/cgdconfig.8
diff -u src/sbin/cgdconfig/cgdconfig.8:1.51 src/sbin/cgdconfig/cgdconfig.8:1.52
--- src/sbin/cgdconfig/cgdconfig.8:1.51	Mon Nov 22 14:34:35 2021
+++ src/sbin/cgdconfig/cgdconfig.8	Sat Dec  4 15:03:58 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: cgdconfig.8,v 1.51 2021/11/22 14:34:35 nia Exp $
+.\" $NetBSD: cgdconfig.8,v 1.52 2021/12/04 15:03:58 nia Exp $
 .\"
 .\" Copyright (c) 2002, The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -394,7 +394,7 @@ cgd configuration file.
 To set up and configure a cgd that uses adiantum, which takes a 256-bit
 key:
 .Bd -literal
-	# cgdconfig -g -o /etc/cgd/wd0e adiantum 256
+	# cgdconfig -g -k argon2id -o /etc/cgd/wd0e adiantum 256
 	# cgdconfig cgd0 /dev/wd0e
 	/dev/wd0e's passphrase:
 .Ed
@@ -407,7 +407,7 @@ when we configure the first time to set 
 Here is the
 sequence of commands that is recommended:
 .Bd -literal
-	# cgdconfig -g -o /etc/cgd/dk3 -V gpt adiantum
+	# cgdconfig -g -k argon2id -o /etc/cgd/dk3 -V gpt adiantum
 	# cgdconfig -V re-enter cgd0 /dev/dk3
 	/dev/dk3's passphrase:
 	re-enter device's passphrase:



CVS commit: src/sbin/cgdconfig

2021-12-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Dec  4 15:03:58 UTC 2021

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

Log Message:
cgdconfig.8: Use argon2id in examples


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/cgdconfig/cgdconfig.8

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



CVS commit: src/sys/dev/pckbport

2021-12-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Dec  4 14:53:56 UTC 2021

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
synaptics: Fix tracking of extended buttons.

- Ensure that packets are processed whenever any button change
  occurs, instead of just processing packets when there is movement
  or trackpad finger activity
- Only transfer the state of the "extended buttons" to the button
  masks when actual changes occur OR a button is being held down.

With this patch, my middle mouse button no longer gets "stuck down",
but proper press/release tracking and dragging behavior is preserved.

Thanks to blymn for pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pckbport/synaptics.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/pckbport

2021-12-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Dec  4 14:53:56 UTC 2021

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
synaptics: Fix tracking of extended buttons.

- Ensure that packets are processed whenever any button change
  occurs, instead of just processing packets when there is movement
  or trackpad finger activity
- Only transfer the state of the "extended buttons" to the button
  masks when actual changes occur OR a button is being held down.

With this patch, my middle mouse button no longer gets "stuck down",
but proper press/release tracking and dragging behavior is preserved.

Thanks to blymn for pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.74 src/sys/dev/pckbport/synaptics.c:1.75
--- src/sys/dev/pckbport/synaptics.c:1.74	Fri Dec  3 13:27:39 2021
+++ src/sys/dev/pckbport/synaptics.c	Sat Dec  4 14:53:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.74 2021/12/03 13:27:39 andvar Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.75 2021/12/04 14:53:56 nia Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.74 2021/12/03 13:27:39 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.75 2021/12/04 14:53:56 nia Exp $");
 
 #include 
 #include 
@@ -1031,6 +1031,8 @@ pms_synaptics_parse(struct pms_softc *ps
 	struct synaptics_packet nsp;
 	char new_buttons, ew_mode;
 	unsigned v, primary_finger, secondary_finger;
+	int ext_left = -1, ext_right = -1, ext_middle = -1,
+	ext_up = -1, ext_down = -1;
 
 	sc->total_packets++;
 
@@ -1177,29 +1179,29 @@ pms_synaptics_parse(struct pms_softc *ps
 			psc->packet[3], psc->packet[4], psc->packet[5]);
 
 			if ((psc->packet[4] & SYN_1BUTMASK) != 0)
-sc->ext_left = PMS_LBUTMASK;
+ext_left = PMS_LBUTMASK;
 			else
-sc->ext_left = 0;
+ext_left = 0;
 
 			if ((psc->packet[4] & SYN_3BUTMASK) != 0)
-sc->ext_middle = PMS_MBUTMASK;
+ext_middle = PMS_MBUTMASK;
 			else
-sc->ext_middle = 0;
+ext_middle = 0;
 
 			if ((psc->packet[5] & SYN_2BUTMASK) != 0)
-sc->ext_right = PMS_RBUTMASK;
+ext_right = PMS_RBUTMASK;
 			else
-sc->ext_right = 0;
+ext_right = 0;
 
 			if ((psc->packet[5] & SYN_4BUTMASK) != 0)
-sc->ext_up = 1;
+ext_up = 1;
 			else
-sc->ext_up = 0;
+ext_up = 0;
 
 			if ((psc->packet[4] & SYN_5BUTMASK) != 0)
-sc->ext_down = 1;
+ext_down = 1;
 			else
-sc->ext_down = 0;
+ext_down = 0;
 		} else {
 			/* Left/Right button handling. */
 			nsp.sp_left = psc->packet[0] & PMS_LBUTMASK;
@@ -1275,16 +1277,38 @@ pms_synaptics_parse(struct pms_softc *ps
 			/* Old style Middle Button. */
 			nsp.sp_middle = (psc->packet[0] & PMS_LBUTMASK) ^
 			(psc->packet[3] & PMS_LBUTMASK);
-		} else if (synaptics_up_down_emul != 1) {
+		} else {
 			nsp.sp_middle = 0;
 		}
 
-		/* Overlay extended button state */
-		nsp.sp_left |= sc->ext_left;
-		nsp.sp_right |= sc->ext_right;
-		nsp.sp_middle |= sc->ext_middle;
-		nsp.sp_up |= sc->ext_up;
-		nsp.sp_down |= sc->ext_down;
+		/*
+		 * Overlay extended button state if anything changed,
+		 * preserve the state if a button is being held.
+		 */
+		if (ext_left != -1)
+			nsp.sp_left = sc->ext_left = ext_left;
+		else if (sc->ext_left != 0)
+			nsp.sp_left = sc->ext_left;
+
+		if (ext_right != -1)
+			nsp.sp_right = sc->ext_right = ext_right;
+		else if (sc->ext_right != 0)
+			nsp.sp_right = sc->ext_right;
+
+		if (ext_middle != -1)
+			nsp.sp_middle = sc->ext_middle = ext_middle;
+		else if (sc->ext_middle != 0)
+			nsp.sp_middle = sc->ext_middle;
+
+		if (ext_up != -1)
+			nsp.sp_up = sc->ext_up = ext_up;
+		else if (sc->ext_up != 0)
+			nsp.sp_up = sc->ext_up;
+
+		if (ext_down != -1)
+			nsp.sp_down = sc->ext_down = ext_down;
+		else if (sc->ext_down != 0)
+			nsp.sp_down = sc->ext_down;
 
 		switch (synaptics_up_down_emul) {
 		case 1:
@@ -1328,7 +1352,12 @@ skip_position:
 	/* If no fingers and we at least saw the primary finger
 	 * or the buttons changed then process the last packet.
 	 */
-	if (pms_synaptics_get_fingers(psc, nsp.sp_w, nsp.sp_z) == 0) {
+	if (pms_synaptics_get_fingers(psc, nsp.sp_w, nsp.sp_z) == 0 ||
+	nsp.sp_left != packet.sp_left ||
+	nsp.sp_right != packet.sp_right ||
+	nsp.sp_middle != packet.sp_middle ||
+	nsp.sp_up != packet.sp_up ||
+	nsp.sp_down != packet.sp_down) {
 		if (nsp.sp_primary == 1) {
 			pms_synaptics_process_packet(psc, );
 			sc->packet_count[SYN_PRIMARY_FINGER] = 0;



CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 14:39:08 UTC 2021

Modified Files:
src/libexec/ld.elf_so: headers.c rtld.c rtld.h
src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c

Log Message:
Restore the fptr_t type of {init,fini}{,_array} that was removed when initial
support for indirect functions was added.  This fixes {init,fini}_array support
on hppa where each member of the array is (already) a plabel.

Discussed with joerg.

 4 files changed, 29 insertions(+), 39 deletions(-)
: --


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.209 -r1.210 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.141 -r1.142 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.47 -r1.48 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c

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

Modified files:

Index: src/libexec/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.69 src/libexec/ld.elf_so/headers.c:1.70
--- src/libexec/ld.elf_so/headers.c:1.69	Sat May 16 16:43:15 2020
+++ src/libexec/ld.elf_so/headers.c	Sat Dec  4 14:39:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.69 2020/05/16 16:43:15 skrll Exp $	 */
+/*	$NetBSD: headers.c,v 1.70 2021/12/04 14:39:08 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.69 2020/05/16 16:43:15 skrll Exp $");
+__RCSID("$NetBSD: headers.c,v 1.70 2021/12/04 14:39:08 skrll Exp $");
 #endif /* not lint */
 
 #include 
@@ -299,7 +299,7 @@ _rtld_digest_dynamic(const char *execnam
 #ifdef HAVE_INITFINI_ARRAY
 		case DT_INIT_ARRAY:
 			obj->init_array =
-			(Elf_Addr *)(obj->relocbase + dynp->d_un.d_ptr);
+			(fptr_t *)(obj->relocbase + dynp->d_un.d_ptr);
 			dbg(("headers: DT_INIT_ARRAY at %p",
 			obj->init_array));
 			break;
@@ -320,7 +320,7 @@ _rtld_digest_dynamic(const char *execnam
 #ifdef HAVE_INITFINI_ARRAY
 		case DT_FINI_ARRAY:
 			obj->fini_array =
-			(Elf_Addr *)(obj->relocbase + dynp->d_un.d_ptr);
+			(fptr_t *)(obj->relocbase + dynp->d_un.d_ptr);
 			dbg(("headers: DT_FINI_ARRAY at %p",
 			obj->fini_array));
 			break;
@@ -434,10 +434,19 @@ _rtld_digest_dynamic(const char *execnam
 	}
 
 #ifdef RTLD_LOADER
+#if defined(__HAVE_FUNCTION_DESCRIPTORS)
+ 	if (init != 0)
+		obj->init = (void (*)(void))
+		_rtld_function_descriptor_alloc(obj, NULL, init);
+ 	if (fini != 0)
+		obj->fini = (void (*)(void))
+		_rtld_function_descriptor_alloc(obj, NULL, fini);
+#else
 	if (init != 0)
-		obj->init = (Elf_Addr) obj->relocbase + init;
+		obj->init = (void (*)(void)) (obj->relocbase + init);
 	if (fini != 0)
-		obj->fini = (Elf_Addr) obj->relocbase + fini;
+		obj->fini = (void (*)(void)) (obj->relocbase + fini);
+#endif
 #endif
 
 	if (dyn_rpath != NULL) {

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.209 src/libexec/ld.elf_so/rtld.c:1.210
--- src/libexec/ld.elf_so/rtld.c:1.209	Wed Jun 16 21:53:51 2021
+++ src/libexec/ld.elf_so/rtld.c	Sat Dec  4 14:39:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.209 2021/06/16 21:53:51 riastradh Exp $	 */
+/*	$NetBSD: rtld.c,v 1.210 2021/12/04 14:39:08 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.209 2021/06/16 21:53:51 riastradh Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.210 2021/12/04 14:39:08 skrll Exp $");
 #endif /* not lint */
 
 #include 
@@ -137,25 +137,25 @@ static Obj_Entry *_rtld_obj_from_addr(co
 static void _rtld_fill_dl_phdr_info(const Obj_Entry *, struct dl_phdr_info *);
 
 static inline void
-_rtld_call_initfini_function(const Obj_Entry *obj, Elf_Addr func, sigset_t *mask)
+_rtld_call_initfini_function(fptr_t func, sigset_t *mask)
 {
 	_rtld_exclusive_exit(mask);
-	_rtld_call_function_void(obj, func);
+	(*func)();
 	_rtld_exclusive_enter(mask);
 }
 
 static void
 _rtld_call_fini_function(Obj_Entry *obj, sigset_t *mask, u_int cur_objgen)
 {
-	if (obj->fini_arraysz == 0 && (obj->fini == 0 || obj->fini_called))
+	if (obj->fini_arraysz == 0 && (obj->fini == NULL || obj->fini_called))
 		return;
 
-	if (obj->fini != 0 && !obj->fini_called) {
+	if (obj->fini != NULL && !obj->fini_called) {
 		dbg (("calling fini function %s at %p%s", obj->path,
 		(void *)obj->fini,
 		obj->z_initfirst ? " (DF_1_INITFIRST)" : ""));
 		obj->fini_called = 1;
-		_rtld_call_initfini_function(obj, obj->fini, mask);
+		_rtld_call_initfini_function(obj->fini, mask);
 	}
 #ifdef HAVE_INITFINI_ARRAY
 	/*
@@ -165,12 +165,12 @@ _rtld_call_fini_function(Obj_Entry *obj,
 	 * the loop.
 	 */
 	while (obj->fini_arraysz > 0 && _rtld_objgen == cur_objgen) {
-		Elf_Addr fini = *obj->fini_array++;
+		fptr_t fini = *obj->fini_array++;
 		obj->fini_arraysz--;
 		dbg (("calling fini array function %s at %p%s", obj->path,
 		

CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 14:39:08 UTC 2021

Modified Files:
src/libexec/ld.elf_so: headers.c rtld.c rtld.h
src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c

Log Message:
Restore the fptr_t type of {init,fini}{,_array} that was removed when initial
support for indirect functions was added.  This fixes {init,fini}_array support
on hppa where each member of the array is (already) a plabel.

Discussed with joerg.

 4 files changed, 29 insertions(+), 39 deletions(-)
: --


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.209 -r1.210 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.141 -r1.142 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.47 -r1.48 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.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/sparc/dev

2021-12-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Dec  4 13:34:35 UTC 2021

Modified Files:
src/sys/arch/sparc/dev: pckbc_js.c

Log Message:
s/establised/established/ in struct variable name. Also fixed typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc/dev/pckbc_js.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/sparc/dev/pckbc_js.c
diff -u src/sys/arch/sparc/dev/pckbc_js.c:1.20 src/sys/arch/sparc/dev/pckbc_js.c:1.21
--- src/sys/arch/sparc/dev/pckbc_js.c:1.20	Sun Nov 22 03:55:33 2020
+++ src/sys/arch/sparc/dev/pckbc_js.c	Sat Dec  4 13:34:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pckbc_js.c,v 1.20 2020/11/22 03:55:33 thorpej Exp $ */
+/*	$NetBSD: pckbc_js.c,v 1.21 2021/12/04 13:34:35 andvar Exp $ */
 
 /*
  * Copyright (c) 2002 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc_js.c,v 1.20 2020/11/22 03:55:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_js.c,v 1.21 2021/12/04 13:34:35 andvar Exp $");
 
 #include 
 #include 
@@ -52,7 +52,7 @@ struct pckbc_js_softc {
 
 	/* kbd and mouse share interrupt in both mr.coffee and krups */
 	uint32_t jsc_intr;
-	int jsc_establised;
+	int jsc_established;
 	void *jsc_int_cookie;
 };
 
@@ -165,7 +165,7 @@ pckbc_js_attach_common(struct pckbc_js_s
 
 	jsc->jsc_pckbc.intr_establish = pckbc_js_intr_establish;
 	jsc->jsc_intr = intr;
-	jsc->jsc_establised = 0;
+	jsc->jsc_established = 0;
 
 	if (isconsole) {
 		int status;
@@ -238,7 +238,7 @@ pckbc_js_intr_establish(struct pckbc_sof
 	struct pckbc_js_softc *jsc = (struct pckbc_js_softc *)sc;
 	void *res;
 
-	if (jsc->jsc_establised) {
+	if (jsc->jsc_established) {
 #ifdef DEBUG
 		aprint_verbose_dev(sc->sc_dv,
 		"%s slot shares interrupt (already established)\n",
@@ -248,7 +248,7 @@ pckbc_js_intr_establish(struct pckbc_sof
 	}
 
 	/*
-	 * We can not choose the devic class interruptlevel freely,
+	 * We can not choose the device class interrupt level freely,
 	 * so we debounce via a softinterrupt.
 	 */
 	jsc->jsc_int_cookie = softint_establish(SOFTINT_SERIAL,
@@ -266,7 +266,7 @@ pckbc_js_intr_establish(struct pckbc_sof
 		"unable to establish %s slot interrupt\n",
 		pckbc_slot_names[slot]);
 	else
-		jsc->jsc_establised = 1;
+		jsc->jsc_established = 1;
 }
 
 static int



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

2021-12-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Dec  4 13:34:35 UTC 2021

Modified Files:
src/sys/arch/sparc/dev: pckbc_js.c

Log Message:
s/establised/established/ in struct variable name. Also fixed typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc/dev/pckbc_js.c

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



CVS commit: src/sys

2021-12-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Dec  4 13:23:04 UTC 2021

Modified Files:
src/sys/arch/pmax/ibus: sii_ds.c
src/sys/arch/sparc/sparc: timer_sun4m.c
src/sys/arch/sparc64/dev: vdsk.c
src/sys/netbt: hci_link.c
src/sys/netinet: dccp_usrreq.c

Log Message:
fix typos in comments and log messages, mainly in establish(ed).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/ibus/sii_ds.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/sparc/timer_sun4m.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/vdsk.c
cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/hci_link.c
cvs rdiff -u -r1.21 -r1.22 src/sys/netinet/dccp_usrreq.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/pmax/ibus/sii_ds.c
diff -u src/sys/arch/pmax/ibus/sii_ds.c:1.10 src/sys/arch/pmax/ibus/sii_ds.c:1.11
--- src/sys/arch/pmax/ibus/sii_ds.c:1.10	Tue Jun  9 20:23:53 2015
+++ src/sys/arch/pmax/ibus/sii_ds.c	Sat Dec  4 13:23:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $	*/
+/*	$NetBSD: sii_ds.c,v 1.11 2021/12/04 13:23:03 andvar Exp $	*/
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -16,7 +16,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.11 2021/12/04 13:23:03 andvar Exp $");
 
 #include "sii.h"
 
@@ -38,7 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1
 #include 
 #include 
 
-#include 		/* interrupt etablish */
+#include 		/* interrupt establish */
 
 #include 		/* kn01 (ds3100) address constants */
 #include 

Index: src/sys/arch/sparc/sparc/timer_sun4m.c
diff -u src/sys/arch/sparc/sparc/timer_sun4m.c:1.31 src/sys/arch/sparc/sparc/timer_sun4m.c:1.32
--- src/sys/arch/sparc/sparc/timer_sun4m.c:1.31	Fri Jan 12 06:01:33 2018
+++ src/sys/arch/sparc/sparc/timer_sun4m.c	Sat Dec  4 13:23:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_sun4m.c,v 1.31 2018/01/12 06:01:33 mrg Exp $	*/
+/*	$NetBSD: timer_sun4m.c,v 1.32 2021/12/04 13:23:03 andvar Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.31 2018/01/12 06:01:33 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.32 2021/12/04 13:23:03 andvar Exp $");
 
 #include 
 #include 
@@ -290,7 +290,7 @@ timerattach_obio_4m(device_t parent, dev
 	if (sparc_ncpus > 1) {
 		/*
 		 * Note that we don't actually use this cookie after checking
-		 * it was establised, we call directly via raise_ipi() on
+		 * it was established, we call directly via raise_ipi() on
 		 * IPL_HARDCLOCK.
 		 */
 		void *hardclock_cookie;

Index: src/sys/arch/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.8 src/sys/arch/sparc64/dev/vdsk.c:1.9
--- src/sys/arch/sparc64/dev/vdsk.c:1.8	Sat Aug  7 16:19:05 2021
+++ src/sys/arch/sparc64/dev/vdsk.c	Sat Dec  4 13:23:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.8 2021/08/07 16:19:05 thorpej Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.9 2021/12/04 13:23:03 andvar Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -251,7 +251,7 @@ vdsk_attach(device_t parent, device_t se
 
 	/*
 	 * Un-configure queues before registering interrupt handlers,
-	 * such that we dont get any stale LDC packets or events.
+	 * such that we don't get any stale LDC packets or events.
 	 */
 	hv_ldc_tx_qconf(ca->ca_id, 0, 0);
 	hv_ldc_rx_qconf(ca->ca_id, 0, 0);
@@ -357,7 +357,7 @@ vdsk_attach(device_t parent, device_t se
 
 	/*
 	 * Interrupts aren't enabled during autoconf, so poll for VIO
-	 * peer-to-peer hanshake completion.
+	 * peer-to-peer handshake completion.
 	 */
 	s = splbio();
 	timeout = 10 * 1000;
@@ -370,7 +370,7 @@ vdsk_attach(device_t parent, device_t se
 	splx(s);
 
 	if (sc->sc_vio_state != VIO_ESTABLISHED) {
-	  printf("vio not establshed: %d\n", sc->sc_vio_state);
+	  printf("vio not established: %d\n", sc->sc_vio_state);
 	  return;
 	}
 

Index: src/sys/netbt/hci_link.c
diff -u src/sys/netbt/hci_link.c:1.25 src/sys/netbt/hci_link.c:1.26
--- src/sys/netbt/hci_link.c:1.25	Fri Sep  7 14:47:15 2018
+++ src/sys/netbt/hci_link.c	Sat Dec  4 13:23:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci_link.c,v 1.25 2018/09/07 14:47:15 plunky Exp $	*/
+/*	$NetBSD: hci_link.c,v 1.26 2021/12/04 13:23:04 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hci_link.c,v 1.25 2018/09/07 14:47:15 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_link.c,v 1.26 2021/12/04 13:23:04 andvar Exp $");
 
 #include 
 #include 
@@ -123,7 +123,7 @@ hci_acl_open(struct hci_unit *unit, bdad
 
 	case HCI_LINK_OPEN:
 		/*
-		 * If already open, halt any expiry timeouts. We dont need
+		 * If already open, halt any expiry timeouts. We don't need
 		 * to care about 

CVS commit: src/sys

2021-12-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Dec  4 13:23:04 UTC 2021

Modified Files:
src/sys/arch/pmax/ibus: sii_ds.c
src/sys/arch/sparc/sparc: timer_sun4m.c
src/sys/arch/sparc64/dev: vdsk.c
src/sys/netbt: hci_link.c
src/sys/netinet: dccp_usrreq.c

Log Message:
fix typos in comments and log messages, mainly in establish(ed).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/ibus/sii_ds.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/sparc/timer_sun4m.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/vdsk.c
cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/hci_link.c
cvs rdiff -u -r1.21 -r1.22 src/sys/netinet/dccp_usrreq.c

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



CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:53:34 UTC 2021

Modified Files:
src/libexec/ld.elf_so: reloc.c
src/libexec/ld.elf_so/arch/aarch64: Makefile.inc

Log Message:
Provide a stub _rtld_call_ifunc when a platform doesn't use one of the
common ones or doesn't provide its own.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/libexec/ld.elf_so/reloc.c
cvs rdiff -u -r1.2 -r1.3 src/libexec/ld.elf_so/arch/aarch64/Makefile.inc

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

Modified files:

Index: src/libexec/ld.elf_so/reloc.c
diff -u src/libexec/ld.elf_so/reloc.c:1.116 src/libexec/ld.elf_so/reloc.c:1.117
--- src/libexec/ld.elf_so/reloc.c:1.116	Sat Feb 29 04:24:33 2020
+++ src/libexec/ld.elf_so/reloc.c	Sat Dec  4 08:53:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: reloc.c,v 1.116 2020/02/29 04:24:33 kamil Exp $	 */
+/*	$NetBSD: reloc.c,v 1.117 2021/12/04 08:53:34 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -39,7 +39,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: reloc.c,v 1.116 2020/02/29 04:24:33 kamil Exp $");
+__RCSID("$NetBSD: reloc.c,v 1.117 2021/12/04 08:53:34 skrll Exp $");
 #endif /* not lint */
 
 #include 
@@ -260,6 +260,16 @@ _rtld_resolve_ifunc2(const Obj_Entry *ob
 	return target;
 }
 
+#if \
+!defined(RTLD_COMMON_CALL_IFUNC_RELA) && \
+!defined(RTLD_COMMON_CALL_IFUNC_REL) && \
+!defined(RTLD_ARCH_CALL_IFUNC)
+void
+_rtld_call_ifunc(Obj_Entry *obj, sigset_t *mask, u_int cur_objgen)
+{
+}
+#endif
+
 #ifdef RTLD_COMMON_CALL_IFUNC_RELA
 #  ifdef __sparc__
 #  include 

Index: src/libexec/ld.elf_so/arch/aarch64/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/aarch64/Makefile.inc:1.2 src/libexec/ld.elf_so/arch/aarch64/Makefile.inc:1.3
--- src/libexec/ld.elf_so/arch/aarch64/Makefile.inc:1.2	Thu Dec 27 18:58:14 2018
+++ src/libexec/ld.elf_so/arch/aarch64/Makefile.inc	Sat Dec  4 08:53:34 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.2 2018/12/27 18:58:14 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2021/12/04 08:53:34 skrll Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -7,5 +7,6 @@ CPPFLAGS+=	-fpic
 
 CPPFLAGS+=	-DELFSIZE=64
 CPPFLAGS+=	-DELF_NOTE_MARCH_DESC=\"${LDELFSO_MACHINE_ARCH}\"
+CPPFLAGS+=	-DRTLD_ARCH_CALL_IFUNC
 
 LDFLAGS+=	-Wl,-e,_rtld_start



CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:53:34 UTC 2021

Modified Files:
src/libexec/ld.elf_so: reloc.c
src/libexec/ld.elf_so/arch/aarch64: Makefile.inc

Log Message:
Provide a stub _rtld_call_ifunc when a platform doesn't use one of the
common ones or doesn't provide its own.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/libexec/ld.elf_so/reloc.c
cvs rdiff -u -r1.2 -r1.3 src/libexec/ld.elf_so/arch/aarch64/Makefile.inc

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



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

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:51:08 UTC 2021

Modified Files:
src/libexec/ld.elf_so/arch/or1k: Makefile.inc

Log Message:
Add a newline


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/arch/or1k/Makefile.inc

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

Modified files:

Index: src/libexec/ld.elf_so/arch/or1k/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/or1k/Makefile.inc:1.1 src/libexec/ld.elf_so/arch/or1k/Makefile.inc:1.2
--- src/libexec/ld.elf_so/arch/or1k/Makefile.inc:1.1	Wed Sep  3 19:34:26 2014
+++ src/libexec/ld.elf_so/arch/or1k/Makefile.inc	Sat Dec  4 08:51:08 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2014/09/03 19:34:26 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2021/12/04 08:51:08 skrll Exp $
 
 SRCS+=		mdreloc.c
 LDFLAGS+=	-Wl,-e,_rtld_start
@@ -7,4 +7,5 @@ CPPFLAGS+=	-fPIC
 
 SRCS+=		rtld_start.S
 CPPFLAGS+=	-DELFSIZE=32
+
 #LDFLAGS+=	-Wl,--script,${.CURDIR}/arch/powerpc/ld.so.script



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

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:51:08 UTC 2021

Modified Files:
src/libexec/ld.elf_so/arch/or1k: Makefile.inc

Log Message:
Add a newline


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/arch/or1k/Makefile.inc

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



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

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:50:41 UTC 2021

Modified Files:
src/libexec/ld.elf_so/arch/mips: Makefile.inc

Log Message:
Add a newline


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/libexec/ld.elf_so/arch/mips/Makefile.inc

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

Modified files:

Index: src/libexec/ld.elf_so/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.20 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.21
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.20	Wed Jul 10 15:08:38 2013
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Sat Dec  4 08:50:41 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.20 2013/07/10 15:08:38 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.21 2021/12/04 08:50:41 skrll Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
@@ -6,6 +6,7 @@ COPTS+=		-G0
 
 CPPFLAGS+=	-DELFSIZE=_MIPS_SZPTR
 CPPFLAGS+=	-DRTLD_INHIBIT_COPY_RELOCS
+
 AFLAGS+=	-Wa,--fatal-warnings
 
 LDFLAGS+=	-Wl,-e,rtld_start



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

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:50:41 UTC 2021

Modified Files:
src/libexec/ld.elf_so/arch/mips: Makefile.inc

Log Message:
Add a newline


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/libexec/ld.elf_so/arch/mips/Makefile.inc

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



CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:45:56 UTC 2021

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
Error if there are undefined symbols, e.g. _rtld_call_ifunc


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/libexec/ld.elf_so/Makefile

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.143 src/libexec/ld.elf_so/Makefile:1.144
--- src/libexec/ld.elf_so/Makefile:1.143	Sun Feb  9 09:11:59 2020
+++ src/libexec/ld.elf_so/Makefile	Sat Dec  4 08:45:56 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.143 2020/02/09 09:11:59 kamil Exp $
+#	$NetBSD: Makefile,v 1.144 2021/12/04 08:45:56 skrll Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -49,6 +49,7 @@ LDFLAGS+=	${${ACTIVE_CC} == "clang":? -W
 		-shared -nostartfiles -nodefaultlibs
 LDFLAGS+=	-Wl,-static
 LDFLAGS+=	-Wl,--warn-shared-textrel
+LDFLAGS+=	-Wl,--no-undefined
 LDFLAGS+=	-Wl,-Map=${.TARGET}.map
 
 COPTS+=		-fvisibility=hidden



CVS commit: src/libexec/ld.elf_so

2021-12-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec  4 08:45:56 UTC 2021

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
Error if there are undefined symbols, e.g. _rtld_call_ifunc


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/libexec/ld.elf_so/Makefile

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 07:23:43 UTC 2021

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

Log Message:
tests/make: fix test for option '-T'

When run via ATF, the test makefile is not in the current directory.


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

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 07:23:43 UTC 2021

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

Log Message:
tests/make: fix test for option '-T'

When run via ATF, the test makefile is not in the current directory.


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/opt-tracefile.mk
diff -u src/usr.bin/make/unit-tests/opt-tracefile.mk:1.3 src/usr.bin/make/unit-tests/opt-tracefile.mk:1.4
--- src/usr.bin/make/unit-tests/opt-tracefile.mk:1.3	Fri Dec  3 21:55:10 2021
+++ src/usr.bin/make/unit-tests/opt-tracefile.mk	Sat Dec  4 07:23:43 2021
@@ -1,11 +1,11 @@
-# $NetBSD: opt-tracefile.mk,v 1.3 2021/12/03 21:55:10 rillig Exp $
+# $NetBSD: opt-tracefile.mk,v 1.4 2021/12/04 07:23:43 rillig Exp $
 #
 # Tests for the command line option '-T', which in jobs mode appends a trace
 # record to a trace log whenever a job is started or completed.
 
 all: .PHONY
 	@rm -f opt-tracefile.log
-	@${MAKE} -f opt-tracefile.mk -j1 -Topt-tracefile.log trace
+	@${MAKE} -f ${MAKEFILE} -j1 -Topt-tracefile.log trace
 	# Remove timestamps, process IDs and directory paths.
 	@awk '{ print $$2, $$3 }' opt-tracefile.log
 



CVS commit: src

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Sat Dec  4 06:42:39 UTC 2021

Modified Files:
src/lib/librefuse: Makefile fuse.h refuse.c refuse_lowlevel.c
refuse_opt.c
src/sbin/mount_qemufwcfg: Makefile fwcfg.c
src/tests/lib/librefuse: t_refuse_opt.c
src/usr.sbin/perfused: perfused.h
Added Files:
src/lib/librefuse: fuse_internal.h

Log Message:
librefuse: Preparation of a proper API versioning; no more #ifdef woes in user 
code

The goal is to fully support FUSE API version 3.0 while maintaining
API/ABI compatibility with code written for 2.6 (or even older).

*  now emits a compiler warning if it's included without
  defining FUSE_USE_VERSION. It had been silently defaulted to the
  latest supported version prior to this change. This is permissive
  compared to the original FUSE, as it emits an error instead.

*  now emits a warning if FUSE_USE_VERSION is higher than what
  can be provided.

* Added a macro FUSE_MAKE_VERSION(maj, min). It was missing from
  librefuse .

No actual API updates have been made (yet).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/librefuse/Makefile
cvs rdiff -u -r1.23 -r1.24 src/lib/librefuse/fuse.h
cvs rdiff -u -r0 -r1.1 src/lib/librefuse/fuse_internal.h
cvs rdiff -u -r1.102 -r1.103 src/lib/librefuse/refuse.c
cvs rdiff -u -r1.1 -r1.2 src/lib/librefuse/refuse_lowlevel.c
cvs rdiff -u -r1.21 -r1.22 src/lib/librefuse/refuse_opt.c
cvs rdiff -u -r1.4 -r1.5 src/sbin/mount_qemufwcfg/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sbin/mount_qemufwcfg/fwcfg.c
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/librefuse/t_refuse_opt.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/perfused/perfused.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/librefuse/Makefile
diff -u src/lib/librefuse/Makefile:1.11 src/lib/librefuse/Makefile:1.12
--- src/lib/librefuse/Makefile:1.11	Sun Nov 20 13:26:28 2016
+++ src/lib/librefuse/Makefile	Sat Dec  4 06:42:39 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2016/11/20 13:26:28 pho Exp $
+# $NetBSD: Makefile,v 1.12 2021/12/04 06:42:39 pho Exp $
 
 USE_FORT?=	yes	# data driven bugs?
 
@@ -11,7 +11,7 @@ FUSE_OPT_DEBUG_FLAGS=	-g -DFUSE_OPT_DEBU
 .endif
 
 CFLAGS+=	${FUSE_OPT_DEBUG_FLAGS}
-CPPFLAGS+=	-I${.CURDIR} -D_KERNTYPES
+CPPFLAGS+=	-I${.CURDIR}
 SRCS=		refuse.c refuse_opt.c refuse_lowlevel.c
 MAN=		refuse.3
 WARNS?=		5

Index: src/lib/librefuse/fuse.h
diff -u src/lib/librefuse/fuse.h:1.23 src/lib/librefuse/fuse.h:1.24
--- src/lib/librefuse/fuse.h:1.23	Wed Apr 10 21:38:02 2019
+++ src/lib/librefuse/fuse.h	Sat Dec  4 06:42:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: fuse.h,v 1.23 2019/04/10 21:38:02 maya Exp $ */
+/* $NetBSD: fuse.h,v 1.24 2021/12/04 06:42:39 pho Exp $ */
 
 /*
  * Copyright © 2007 Alistair Crooks.  All rights reserved.
@@ -28,19 +28,33 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef FUSE_H_
-#define FUSE_H_	20070123
-
-/* set the default version to use for the fuse interface */
-/* this value determines the API to be used */
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION	26
-#endif
+#define FUSE_H_	20211204
 
 #include 
 
 #include 
 #include 
 
+/* The latest version of FUSE API currently provided by refuse. */
+#define FUSE_MAJOR_VERSION	2
+#define FUSE_MINOR_VERSION	6
+
+#define FUSE_MAKE_VERSION(maj, min)	((maj) * 10 + (min))
+#define FUSE_VERSION	FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION)
+
+/* FUSE_USE_VERSION is expected to be defined by user code to
+ * determine the API to be used. Although defining this macro is
+ * mandatory in the original FUSE implementation, refuse hasn't
+ * required this so we only emit a warning if it's undefined. */
+#if defined(FUSE_USE_VERSION)
+#	if FUSE_USE_VERSION > FUSE_VERSION
+#		warning "The requested API version is higher than the latest one supported by refuse."
+#	endif
+#else
+#	warning "User code including  should define FUSE_USE_VERSION before including this header. Defaulting to the latest version."
+#	define FUSE_USE_VERSION	FUSE_VERSION
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -97,10 +111,6 @@ typedef struct puffs_fuse_dirh *fuse_dir
 typedef int (*fuse_fill_dir_t)(void *, const char *, const struct stat *, off_t);
 typedef int (*fuse_dirfil_t)(fuse_dirh_t, const char *, int, ino_t);
 
-#define FUSE_VERSION	26
-#define FUSE_MAJOR_VERSION	2
-#define FUSE_MINOR_VERSION	6
-
 /*
  * These operations shadow those in puffs_usermount, and are used
  * as a table of callbacks to make when file system requests come

Index: src/lib/librefuse/refuse.c
diff -u src/lib/librefuse/refuse.c:1.102 src/lib/librefuse/refuse.c:1.103
--- src/lib/librefuse/refuse.c:1.102	Tue Nov 30 12:13:12 2021
+++ src/lib/librefuse/refuse.c	Sat Dec  4 06:42:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: refuse.c,v 1.102 2021/11/30 12:13:12 pho Exp $	*/
+/*	$NetBSD: refuse.c,v 1.103 2021/12/04 06:42:39 pho Exp $	

CVS commit: src

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Sat Dec  4 06:42:39 UTC 2021

Modified Files:
src/lib/librefuse: Makefile fuse.h refuse.c refuse_lowlevel.c
refuse_opt.c
src/sbin/mount_qemufwcfg: Makefile fwcfg.c
src/tests/lib/librefuse: t_refuse_opt.c
src/usr.sbin/perfused: perfused.h
Added Files:
src/lib/librefuse: fuse_internal.h

Log Message:
librefuse: Preparation of a proper API versioning; no more #ifdef woes in user 
code

The goal is to fully support FUSE API version 3.0 while maintaining
API/ABI compatibility with code written for 2.6 (or even older).

*  now emits a compiler warning if it's included without
  defining FUSE_USE_VERSION. It had been silently defaulted to the
  latest supported version prior to this change. This is permissive
  compared to the original FUSE, as it emits an error instead.

*  now emits a warning if FUSE_USE_VERSION is higher than what
  can be provided.

* Added a macro FUSE_MAKE_VERSION(maj, min). It was missing from
  librefuse .

No actual API updates have been made (yet).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/librefuse/Makefile
cvs rdiff -u -r1.23 -r1.24 src/lib/librefuse/fuse.h
cvs rdiff -u -r0 -r1.1 src/lib/librefuse/fuse_internal.h
cvs rdiff -u -r1.102 -r1.103 src/lib/librefuse/refuse.c
cvs rdiff -u -r1.1 -r1.2 src/lib/librefuse/refuse_lowlevel.c
cvs rdiff -u -r1.21 -r1.22 src/lib/librefuse/refuse_opt.c
cvs rdiff -u -r1.4 -r1.5 src/sbin/mount_qemufwcfg/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sbin/mount_qemufwcfg/fwcfg.c
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/librefuse/t_refuse_opt.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/perfused/perfused.h

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



CVS commit: src

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 00:01:24 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_123.c msg_123.exp
src/usr.bin/xlint/lint1: err.c tree.c

Log Message:
lint: add quotes around placeholders in message 123


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_123.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_123.exp
cvs rdiff -u -r1.147 -r1.148 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.395 -r1.396 src/usr.bin/xlint/lint1/tree.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_123.c
diff -u src/tests/usr.bin/xlint/lint1/msg_123.c:1.3 src/tests/usr.bin/xlint/lint1/msg_123.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_123.c:1.3	Mon Aug 16 18:51:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_123.c	Sat Dec  4 00:01:24 2021
@@ -1,7 +1,7 @@
-/*	$NetBSD: msg_123.c,v 1.3 2021/08/16 18:51:58 rillig Exp $	*/
+/*	$NetBSD: msg_123.c,v 1.4 2021/12/04 00:01:24 rillig Exp $	*/
 # 3 "msg_123.c"
 
-// Test for message: illegal combination of %s (%s) and %s (%s), op %s [123]
+// Test for message: illegal combination of %s '%s' and %s '%s', op '%s' [123]
 
 void ok(_Bool);
 void bad(_Bool);
@@ -30,8 +30,8 @@ compare(_Bool b, int i, double d, const 
 void
 cover_check_assign_types_compatible(int *int_pointer, int i)
 {
-	/* expect+1: warning: illegal combination of pointer (pointer to int) and integer (int), op = [123] */
+	/* expect+1: warning: illegal combination of pointer 'pointer to int' and integer 'int', op '=' [123] */
 	int_pointer = i;
-	/* expect+1: warning: illegal combination of integer (int) and pointer (pointer to int), op = [123] */
+	/* expect+1: warning: illegal combination of integer 'int' and pointer 'pointer to int', op '=' [123] */
 	i = int_pointer;
 }

Index: src/tests/usr.bin/xlint/lint1/msg_123.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_123.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_123.exp:1.5
--- src/tests/usr.bin/xlint/lint1/msg_123.exp:1.4	Mon Aug 16 18:51:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_123.exp	Sat Dec  4 00:01:24 2021
@@ -1,8 +1,8 @@
-msg_123.c(15): warning: illegal combination of integer (_Bool) and pointer (pointer to const char), op < [123]
-msg_123.c(19): warning: illegal combination of integer (int) and pointer (pointer to const char), op < [123]
+msg_123.c(15): warning: illegal combination of integer '_Bool' and pointer 'pointer to const char', op '<' [123]
+msg_123.c(19): warning: illegal combination of integer 'int' and pointer 'pointer to const char', op '<' [123]
 msg_123.c(23): error: operands of '<' have incompatible types (double != pointer) [107]
-msg_123.c(24): warning: illegal combination of pointer (pointer to const char) and integer (_Bool), op < [123]
-msg_123.c(25): warning: illegal combination of pointer (pointer to const char) and integer (int), op < [123]
+msg_123.c(24): warning: illegal combination of pointer 'pointer to const char' and integer '_Bool', op '<' [123]
+msg_123.c(25): warning: illegal combination of pointer 'pointer to const char' and integer 'int', op '<' [123]
 msg_123.c(26): error: operands of '<' have incompatible types (pointer != double) [107]
-msg_123.c(34): warning: illegal combination of pointer (pointer to int) and integer (int), op = [123]
-msg_123.c(36): warning: illegal combination of integer (int) and pointer (pointer to int), op = [123]
+msg_123.c(34): warning: illegal combination of pointer 'pointer to int' and integer 'int', op '=' [123]
+msg_123.c(36): warning: illegal combination of integer 'int' and pointer 'pointer to int', op '=' [123]

Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.147 src/usr.bin/xlint/lint1/err.c:1.148
--- src/usr.bin/xlint/lint1/err.c:1.147	Sat Oct 30 22:04:42 2021
+++ src/usr.bin/xlint/lint1/err.c	Sat Dec  4 00:01:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.c,v 1.147 2021/10/30 22:04:42 rillig Exp $	*/
+/*	$NetBSD: err.c,v 1.148 2021/12/04 00:01:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.147 2021/10/30 22:04:42 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.148 2021/12/04 00:01:24 rillig Exp $");
 #endif
 
 #include 
@@ -177,7 +177,7 @@ const char *const msgs[] = {
 	"bitwise '%s' on signed value nonportable",		  /* 120 */
 	"negative shift",	  /* 121 */
 	"shift amount %llu is greater than bit-size %llu of '%s'",/* 122 */
-	"illegal combination of %s (%s) and %s (%s), op %s",	  /* 123 */
+	"illegal combination of %s '%s' and %s '%s', op '%s'",	  /* 123 */
 	"illegal combination of '%s' and '%s', op '%s'",	  /* 124 */
 	"ANSI C forbids ordered comparisons of pointers to functions",/* 125 */
 	"incompatible types '%s' and '%s' in conditional",	  /* 126 */

Index: 

CVS commit: src

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec  4 00:01:24 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_123.c msg_123.exp
src/usr.bin/xlint/lint1: err.c tree.c

Log Message:
lint: add quotes around placeholders in message 123


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_123.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_123.exp
cvs rdiff -u -r1.147 -r1.148 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.395 -r1.396 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:37:30 UTC 2021

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

Log Message:
make: do not try to expand fixed variable names

The function SetFilenameVars is only called with fixed variable names,
none of which contains a '$', so take a shortcut.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.567 -r1.568 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.567 src/usr.bin/make/parse.c:1.568
--- src/usr.bin/make/parse.c:1.567	Fri Dec  3 23:29:30 2021
+++ src/usr.bin/make/parse.c	Fri Dec  3 23:37:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.567 2021/12/03 23:29:30 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.568 2021/12/03 23:37:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.567 2021/12/03 23:29:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.568 2021/12/03 23:37:30 rillig Exp $");
 
 /* types and constants */
 
@@ -2299,8 +2299,8 @@ SetFilenameVars(const char *filename, co
 		basename = slash + 1;
 	}
 
-	Global_SetExpand(dirvar, dirname.str);
-	Global_SetExpand(filevar, basename);
+	Global_Set(dirvar, dirname.str);
+	Global_Set(filevar, basename);
 
 	DEBUG5(PARSE, "%s: ${%s} = `%s' ${%s} = `%s'\n",
 	__func__, dirvar, dirname.str, filevar, basename);



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:37:30 UTC 2021

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

Log Message:
make: do not try to expand fixed variable names

The function SetFilenameVars is only called with fixed variable names,
none of which contains a '$', so take a shortcut.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.567 -r1.568 src/usr.bin/make/parse.c

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



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:29:30 UTC 2021

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

Log Message:
make: only allocate the name of an included file if necessary

The string passed to IncludeFile is only used during that function call,
it is not stored anywhere.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.566 -r1.567 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.566 src/usr.bin/make/parse.c:1.567
--- src/usr.bin/make/parse.c:1.566	Fri Dec  3 23:13:29 2021
+++ src/usr.bin/make/parse.c	Fri Dec  3 23:29:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.566 2021/12/03 23:13:29 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.567 2021/12/03 23:29:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.566 2021/12/03 23:13:29 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.567 2021/12/03 23:29:30 rillig Exp $");
 
 /* types and constants */
 
@@ -2123,7 +2123,7 @@ Parse_AddIncludeDir(const char *dir)
  * line options.
  */
 static void
-IncludeFile(char *file, bool isSystem, bool depinc, bool silent)
+IncludeFile(const char *file, bool isSystem, bool depinc, bool silent)
 {
 	struct loadedfile *lf;
 	char *fullname;		/* full pathname of file */
@@ -2237,8 +2237,8 @@ IncludeFile(char *file, bool isSystem, b
 static void
 ParseInclude(char *directive)
 {
-	char endc;		/* the character which ends the file spec */
-	char *p, *xfile;
+	char endc;		/* '>' or '"' */
+	char *p;
 	bool silent = directive[0] != 'i';
 	FStr file;
 
@@ -2269,11 +2269,15 @@ ParseInclude(char *directive)
 
 	*p = '\0';
 
-	(void)Var_Subst(file.str, SCOPE_CMDLINE, VARE_WANTRES, );
-	/* TODO: handle errors */
+	if (strchr(file.str, '$') != NULL) {
+		char *xfile;
+		Var_Subst(file.str, SCOPE_CMDLINE, VARE_WANTRES, );
+		/* TODO: handle errors */
+		file = FStr_InitOwn(xfile);
+	}
 
-	IncludeFile(xfile, endc == '>', directive[0] == 'd', silent);
-	free(xfile);
+	IncludeFile(file.str, endc == '>', directive[0] == 'd', silent);
+	FStr_Done();
 }
 
 /*



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:29:30 UTC 2021

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

Log Message:
make: only allocate the name of an included file if necessary

The string passed to IncludeFile is only used during that function call,
it is not stored anywhere.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.566 -r1.567 src/usr.bin/make/parse.c

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



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:13:29 UTC 2021

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

Log Message:
make: clean up ParseInclude

It was confusing to let the variable 'file' point to the '<' of the
.include directive.  In each parsing function, there should only be a
single moving pointer, typically named 'p' or historically 'cp', even
though the 'c' is redundant.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.565 -r1.566 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.565 src/usr.bin/make/parse.c:1.566
--- src/usr.bin/make/parse.c:1.565	Tue Sep 21 23:06:18 2021
+++ src/usr.bin/make/parse.c	Fri Dec  3 23:13:29 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.565 2021/09/21 23:06:18 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.566 2021/12/03 23:13:29 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.565 2021/09/21 23:06:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.566 2021/12/03 23:13:29 rillig Exp $");
 
 /* types and constants */
 
@@ -2228,54 +2228,52 @@ IncludeFile(char *file, bool isSystem, b
 		doing_depend = depinc;	/* only turn it on */
 }
 
+/*
+ * Parse a directive like '.include' or '.-include'.
+ *
+ * .include "user-makefile.mk"
+ * .include 
+ */
 static void
 ParseInclude(char *directive)
 {
 	char endc;		/* the character which ends the file spec */
-	char *cp;		/* current position in file spec */
+	char *p, *xfile;
 	bool silent = directive[0] != 'i';
-	char *file = directive + (silent ? 8 : 7);
+	FStr file;
 
-	/* Skip to delimiter character so we know where to look */
-	pp_skip_hspace();
+	p = directive + (silent ? 8 : 7);
+	pp_skip_hspace();
 
-	if (*file != '"' && *file != '<') {
+	if (*p != '"' && *p != '<') {
 		Parse_Error(PARSE_FATAL,
 		".include filename must be delimited by '\"' or '<'");
 		return;
 	}
 
-	/*
-	 * Set the search path on which to find the include file based on the
-	 * characters which bracket its name. Angle-brackets imply it's
-	 * a system Makefile while double-quotes imply it's a user makefile
-	 */
-	if (*file == '<')
+	if (*p++ == '<')
 		endc = '>';
 	else
 		endc = '"';
+	file = FStr_InitRefer(p);
 
 	/* Skip to matching delimiter */
-	for (cp = ++file; *cp != '\0' && *cp != endc; cp++)
-		continue;
+	while (*p != '\0' && *p != endc)
+		p++;
 
-	if (*cp != endc) {
+	if (*p != endc) {
 		Parse_Error(PARSE_FATAL,
 		"Unclosed .include filename. '%c' expected", endc);
 		return;
 	}
 
-	*cp = '\0';
+	*p = '\0';
 
-	/*
-	 * Substitute for any variables in the filename before trying to
-	 * find the file.
-	 */
-	(void)Var_Subst(file, SCOPE_CMDLINE, VARE_WANTRES, );
+	(void)Var_Subst(file.str, SCOPE_CMDLINE, VARE_WANTRES, );
 	/* TODO: handle errors */
 
-	IncludeFile(file, endc == '>', directive[0] == 'd', silent);
-	free(file);
+	IncludeFile(xfile, endc == '>', directive[0] == 'd', silent);
+	free(xfile);
 }
 
 /*



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 23:13:29 UTC 2021

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

Log Message:
make: clean up ParseInclude

It was confusing to let the variable 'file' point to the '<' of the
.include directive.  In each parsing function, there should only be a
single moving pointer, typically named 'p' or historically 'cp', even
though the 'c' is redundant.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.565 -r1.566 src/usr.bin/make/parse.c

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 22:48:07 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: directive-include.exp directive-include.mk

Log Message:
tests/make: demonstrate .include with erroneous expression


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/directive-include.exp
diff -u src/usr.bin/make/unit-tests/directive-include.exp:1.5 src/usr.bin/make/unit-tests/directive-include.exp:1.6
--- src/usr.bin/make/unit-tests/directive-include.exp:1.5	Fri Dec  3 22:43:50 2021
+++ src/usr.bin/make/unit-tests/directive-include.exp	Fri Dec  3 22:48:07 2021
@@ -4,6 +4,8 @@ CondParser_Eval: ${.MAKE.MAKEFILES:T} !=
 lhs = "directive-include.mk null", rhs = "directive-include.mk null", op = !=
 make: "directive-include.mk" line 25: Could not find nonexistent.mk
 make: "directive-include.mk" line 47: Could not find "
+make: "directive-include.mk" line 52: Unknown modifier "Z"
+make: "directive-include.mk" line 52: Could not find nonexistent.mk
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directive-include.mk
diff -u src/usr.bin/make/unit-tests/directive-include.mk:1.6 src/usr.bin/make/unit-tests/directive-include.mk:1.7
--- src/usr.bin/make/unit-tests/directive-include.mk:1.6	Fri Dec  3 22:43:50 2021
+++ src/usr.bin/make/unit-tests/directive-include.mk	Fri Dec  3 22:48:07 2021
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.6 2021/12/03 22:43:50 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.7 2021/12/03 22:48:07 rillig Exp $
 #
 # Tests for the .include directive, which includes another file.
 
@@ -46,4 +46,9 @@ DEV=	null
 DQUOT=	"
 .include "${DQUOT}"
 
+# When the expression in a filename cannot be evaluated, the failing
+# expression is skipped and the file is included nevertheless.
+# FIXME: Add proper error handling, no file must be included here.
+.include "nonexistent${:U123:Z}.mk"
+
 all:



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 22:48:07 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: directive-include.exp directive-include.mk

Log Message:
tests/make: demonstrate .include with erroneous expression


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

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 22:43:51 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: directive-include.exp directive-include.mk

Log Message:
tests/make: test .include with expressions


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/directive-include.exp
diff -u src/usr.bin/make/unit-tests/directive-include.exp:1.4 src/usr.bin/make/unit-tests/directive-include.exp:1.5
--- src/usr.bin/make/unit-tests/directive-include.exp:1.4	Tue Nov  3 17:17:31 2020
+++ src/usr.bin/make/unit-tests/directive-include.exp	Fri Dec  3 22:43:50 2021
@@ -3,6 +3,7 @@ lhs = "directive-include.mk null", rhs =
 CondParser_Eval: ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
 lhs = "directive-include.mk null", rhs = "directive-include.mk null", op = !=
 make: "directive-include.mk" line 25: Could not find nonexistent.mk
+make: "directive-include.mk" line 47: Could not find "
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directive-include.mk
diff -u src/usr.bin/make/unit-tests/directive-include.mk:1.5 src/usr.bin/make/unit-tests/directive-include.mk:1.6
--- src/usr.bin/make/unit-tests/directive-include.mk:1.5	Sat Nov 21 14:59:11 2020
+++ src/usr.bin/make/unit-tests/directive-include.mk	Fri Dec  3 22:43:50 2021
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.5 2020/11/21 14:59:11 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.6 2021/12/03 22:43:50 rillig Exp $
 #
 # Tests for the .include directive, which includes another file.
 
@@ -30,5 +30,20 @@
 # As of 2020-11-21, anything after the delimiter '"' is ignored.
 .include "/dev/null" and ignore anything in the rest of the line.
 
+# The filename to be included can contain expressions.
+DEV=	null
+.include "/dev/${DEV}"
+
+# Expressions in double quotes or angle quotes are first parsed naively, to
+# find the closing '"'.  In a second step, the expressions are expanded.  This
+# means that the expressions cannot include the characters '"' or '>'.  This
+# restriction is not practically relevant since the expressions inside
+# '.include' directives are typically kept as simple as possible.
+#
+# If the whole line were expanded before parsing, the filename to be included
+# would be empty, and the closing '"' would be in the trailing part of the
+# line, which is ignored as of 2021-12-03.
+DQUOT=	"
+.include "${DQUOT}"
+
 all:
-	@:;



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 22:43:51 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: directive-include.exp directive-include.mk

Log Message:
tests/make: test .include with expressions


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

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



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

2021-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec  3 22:41:18 UTC 2021

Modified Files:
src/sys/arch/sparc/dev: sxreg.h

Log Message:
add shift instructions


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/dev/sxreg.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/sparc/dev/sxreg.h
diff -u src/sys/arch/sparc/dev/sxreg.h:1.17 src/sys/arch/sparc/dev/sxreg.h:1.18
--- src/sys/arch/sparc/dev/sxreg.h:1.17	Fri Feb 22 23:01:25 2019
+++ src/sys/arch/sparc/dev/sxreg.h	Fri Dec  3 22:41:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sxreg.h,v 1.17 2019/02/22 23:01:25 macallan Exp $	*/
+/*	$NetBSD: sxreg.h,v 1.18 2021/12/03 22:41:18 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -225,6 +225,8 @@
 SX_UBYTE_0 | (sreg << 7) | (o))
 #define SX_STP(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE | \
 SX_PACKED | (sreg << 7) | (o))
+#define SX_STPS(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE_SELECT | \
+SX_PACKED | (sreg << 7) | (o))
 #define SX_STS(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE_SELECT \
 | SX_LONG | (sreg << 7) | (o))
 #define SX_STBS(reg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE_SELECT \
@@ -344,5 +346,32 @@
 		 ((sa) << 14) | ((d) << 7) | (sb))
 #define SX_SCATTER(sa, sb, d, cnt) (0xe000 | ((cnt) << 24) | SX_SCTR | \
 		 ((sa) << 14) | ((d) << 7) | (sb))
+		 
+/* shift group */
+#define SX_SRLV 	(0 << 21)	/* shift right logical, by vector */
+#define SX_SRLI 	(1 << 21)	/* shift right logical, by immediate */
+#define SX_SRAV 	(2 << 21)	/* shift right arithmetic, by vector */
+#define SX_SRAI 	(3 << 21)	/* shift right arithmetic, by immediate */
+#define SX_SLLV 	(4 << 21)	/* shift left logical, by vector */
+#define SX_SLLI 	(5 << 21)	/* shift left logical, by immediate */
+#define SX_SLFS 	(6 << 21)	/* shift left funnel, by SRCB */
+#define SX_SLFI 	(7 << 21)	/* shift left funnel, by immediate */
+
+#define SX_SRL_V(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SRLV | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_SRL_I(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SRLI | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_SRA_V(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SRAV | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_SRA_I(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SRAI | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_SLL_V(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SLLV | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_SLL_I(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SLLI | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_FUNNEL_S(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SLFS | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
+#define SX_FUNNEL_I(sa, sb, d, cnt) (0xc000 | ((cnt) << 24) | SX_SLFI | \
+		  ((sa) << 14) | ((d) << 7) | (sb))
 
 #endif /* SXREG_H */



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

2021-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec  3 22:41:18 UTC 2021

Modified Files:
src/sys/arch/sparc/dev: sxreg.h

Log Message:
add shift instructions


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/dev/sxreg.h

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 21:55:10 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: opt-tracefile.exp opt-tracefile.mk

Log Message:
tests/make: test option '-T' for tracing job events


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-tracefile.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-tracefile.mk

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 21:55:10 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: opt-tracefile.exp opt-tracefile.mk

Log Message:
tests/make: test option '-T' for tracing job events


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-tracefile.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-tracefile.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/opt-tracefile.exp
diff -u src/usr.bin/make/unit-tests/opt-tracefile.exp:1.1 src/usr.bin/make/unit-tests/opt-tracefile.exp:1.2
--- src/usr.bin/make/unit-tests/opt-tracefile.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/opt-tracefile.exp	Fri Dec  3 21:55:10 2021
@@ -1 +1,12 @@
+Making dependency1 from .
+Making dependency2 from .
+Making trace from dependency1 dependency2.
+0 BEG
+1 JOB
+1 DON
+1 JOB
+1 DON
+1 JOB
+1 DON
+0 END
 exit status 0

Index: src/usr.bin/make/unit-tests/opt-tracefile.mk
diff -u src/usr.bin/make/unit-tests/opt-tracefile.mk:1.2 src/usr.bin/make/unit-tests/opt-tracefile.mk:1.3
--- src/usr.bin/make/unit-tests/opt-tracefile.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/opt-tracefile.mk	Fri Dec  3 21:55:10 2021
@@ -1,8 +1,15 @@
-# $NetBSD: opt-tracefile.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: opt-tracefile.mk,v 1.3 2021/12/03 21:55:10 rillig Exp $
 #
-# Tests for the -T command line option.
+# Tests for the command line option '-T', which in jobs mode appends a trace
+# record to a trace log whenever a job is started or completed.
 
-# TODO: Implementation
+all: .PHONY
+	@rm -f opt-tracefile.log
+	@${MAKE} -f opt-tracefile.mk -j1 -Topt-tracefile.log trace
+	# Remove timestamps, process IDs and directory paths.
+	@awk '{ print $$2, $$3 }' opt-tracefile.log
 
-all:
-	@:;
+trace dependency1 dependency2: .PHONY
+	@echo 'Making ${.TARGET} from ${.ALLSRC:S,^$,,W}.'
+
+trace: dependency1 dependency2



Re: CVS commit: src/sys/net

2021-12-03 Thread Tobias Nygren
On Mon, 15 Nov 2021 07:07:06 +
Shoichi YAMAGUCHI  wrote:

> Date: Mon Nov 15 07:07:06 UTC 2021
> 
> Modified Files:
>   src/sys/net: if_ether.h if_ethersubr.c if_vlan.c
>   src/sys/net/lagg: if_lagg.c
> 
> Log Message:
> introduced APIs to configure VLAN TAG to ethernet devices

Hello,

This change seems to have broke something MTU related when
more than two VLANs are configured on the same NIC.
The first VLAN inherits the parent's MTU but the subsequent
ones have 4 byte too small MTU causing network problems.

Kernel from 2021-11-15:

# ifconfig |grep mtu
wm0: flags=0x8843 mtu 1500
vlan100: flags=0x8843 mtu 1500
vlan101: flags=0x8843 mtu 1500
vlan102: flags=0x8843 mtu 1500
vlan103: flags=0x8843 mtu 1500
vlan104: flags=0x8843 mtu 1500
vlan105: flags=0x8843 mtu 1500
vlan106: flags=0x8843 mtu 1500

Kernel from 2021-11-16:

wm0: flags=0x8843 mtu 1500
vlan100: flags=0x8843 mtu 1500
vlan101: flags=0x8843 mtu 1496
vlan102: flags=0x8843 mtu 1496
vlan103: flags=0x8843 mtu 1496
vlan104: flags=0x8843 mtu 1496
vlan105: flags=0x8843 mtu 1496
vlan106: flags=0x8843 mtu 1496

I could not force increase the MTU either:

root@tinfoilhat-b:log> ifconfig vlan100 mtu 1500
root@tinfoilhat-b:log> ifconfig vlan101 mtu 1500
ifconfig: SIOCSIFMTU: Invalid argument

Kind regards,
-Tobias


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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:43:52 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: document .MAKE.SAVE_DOLLARS in modifier ':@'


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk

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



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

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:43:52 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: document .MAKE.SAVE_DOLLARS in modifier ':@'


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.6 src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.7
--- src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.6	Thu Dec  2 22:41:01 2021
+++ src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk	Fri Dec  3 18:43:52 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-make-save_dollars.mk,v 1.6 2021/12/02 22:41:01 rillig Exp $
+# $NetBSD: varname-dot-make-save_dollars.mk,v 1.7 2021/12/03 18:43:52 rillig Exp $
 #
 # Tests for the special .MAKE.SAVE_DOLLARS variable, which controls whether
 # the assignment operator ':=' converts '$$' to a single '$' or keeps it
@@ -108,4 +108,23 @@ VAR:=			${CMD:sh}
 .  error
 .endif
 
+
+# In the modifier ':@var@body@', .MAKE.SAVE_DOLLARS does not affect the body.
+# In both cases, each '$$' is replaced with a single '$', no matter whether
+# directly or indirectly via another expression.
+.MAKE.SAVE_DOLLARS=	no
+DOLLARS=		
+VAR:=			${word:L:@word@-${DOLLARS}@}
+.if ${VAR} != "\$\$-\$\$"
+.  error
+.endif
+
+.MAKE.SAVE_DOLLARS=	yes
+DOLLARS=		
+VAR:=			${word:L:@word@-${DOLLARS}@}
+.if ${VAR} != "\$\$-\$\$"
+.  error
+.endif
+
+
 all:



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:29:35 UTC 2021

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

Log Message:
make: condense ParseModifierPartSubst

No functional change.


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

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.957 src/usr.bin/make/var.c:1.958
--- src/usr.bin/make/var.c:1.957	Fri Dec  3 18:23:03 2021
+++ src/usr.bin/make/var.c	Fri Dec  3 18:29:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.957 2021/12/03 18:23:03 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.958 2021/12/03 18:29:35 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.957 2021/12/03 18:23:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.958 2021/12/03 18:29:35 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2216,37 +2216,23 @@ ParseModifierPartSubst(
 	p = *pp;
 	LazyBuf_Init(part, p);
 
-	/*
-	 * Skim through until the matching delimiter is found; pick up
-	 * variable expressions on the way.
-	 */
 	while (*p != '\0' && *p != delim) {
-
 		if (IsEscapedModifierPart(p, delim, subst)) {
 			LazyBuf_Add(part, p[1]);
 			p += 2;
-			continue;
-		}
-
-		if (*p != '$') {	/* Unescaped, simple text */
+		} else if (*p != '$') {	/* Unescaped, simple text */
 			if (subst != NULL && *p == '&')
 LazyBuf_AddSubstring(part, subst->lhs);
 			else
 LazyBuf_Add(part, *p);
 			p++;
-			continue;
-		}
-
-		if (p[1] == delim) {	/* Unescaped $ at end of pattern */
+		} else if (p[1] == delim) {	/* Unescaped '$' at end */
 			if (out_pflags != NULL)
 out_pflags->anchorEnd = true;
 			else
 LazyBuf_Add(part, *p);
 			p++;
-			continue;
-		}
-
-		if (VarEvalMode_ShouldEval(emode))
+		} else if (VarEvalMode_ShouldEval(emode))
 			ParseModifierPartExpr(, part, ch, emode);
 		else
 			ParseModifierPartDollar(, part);



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:29:35 UTC 2021

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

Log Message:
make: condense ParseModifierPartSubst

No functional change.


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

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



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:23:03 UTC 2021

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

Log Message:
make: extract ParseModifierPartExpr from ParseModifierPartSubst

No functional change.


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

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.956 src/usr.bin/make/var.c:1.957
--- src/usr.bin/make/var.c:1.956	Fri Dec  3 18:08:51 2021
+++ src/usr.bin/make/var.c	Fri Dec  3 18:23:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.956 2021/12/03 18:08:51 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.957 2021/12/03 18:23:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.956 2021/12/03 18:08:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.957 2021/12/03 18:23:03 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2139,6 +2139,24 @@ IsEscapedModifierPart(const char *p, cha
 }
 
 /*
+ * In a part of a modifier, parse a subexpression and evaluate it.
+ */
+static void
+ParseModifierPartExpr(const char **pp, LazyBuf *part, const ModChain *ch,
+		  VarEvalMode emode)
+{
+	const char *p = *pp;
+	FStr nested_val;
+
+	(void)Var_Parse(, ch->expr->scope,
+	VarEvalMode_WithoutKeepDollar(emode), _val);
+	/* TODO: handle errors */
+	LazyBuf_AddStr(part, nested_val.str);
+	FStr_Done(_val);
+	*pp = p;
+}
+
+/*
  * In a part of a modifier, parse a subexpression but don't evaluate it.
  *
  * XXX: This whole block is very similar to Var_Parse with VARE_PARSE_ONLY.
@@ -2228,21 +2246,10 @@ ParseModifierPartSubst(
 			continue;
 		}
 
-		if (VarEvalMode_ShouldEval(emode)) {
-			/* Nested variable, evaluated */
-			const char *nested_p = p;
-			FStr nested_val;
-
-			(void)Var_Parse(_p, ch->expr->scope,
-			VarEvalMode_WithoutKeepDollar(emode), _val);
-			/* TODO: handle errors */
-			LazyBuf_AddStr(part, nested_val.str);
-			FStr_Done(_val);
-			p += nested_p - p;
-			continue;
-		}
-
-		ParseModifierPartDollar(, part);
+		if (VarEvalMode_ShouldEval(emode))
+			ParseModifierPartExpr(, part, ch, emode);
+		else
+			ParseModifierPartDollar(, part);
 	}
 
 	if (*p != delim) {



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:23:03 UTC 2021

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

Log Message:
make: extract ParseModifierPartExpr from ParseModifierPartSubst

No functional change.


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

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



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:08:51 UTC 2021

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

Log Message:
make: extract ParseModifierPartDollar from ParseModifierPartSubst

No functional change.


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

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.955 src/usr.bin/make/var.c:1.956
--- src/usr.bin/make/var.c:1.955	Sun Nov 28 22:58:55 2021
+++ src/usr.bin/make/var.c	Fri Dec  3 18:08:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.955 2021/11/28 22:58:55 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.956 2021/12/03 18:08:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.955 2021/11/28 22:58:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.956 2021/12/03 18:08:51 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2138,6 +2138,45 @@ IsEscapedModifierPart(const char *p, cha
 	return p[1] == '&' && subst != NULL;
 }
 
+/*
+ * In a part of a modifier, parse a subexpression but don't evaluate it.
+ *
+ * XXX: This whole block is very similar to Var_Parse with VARE_PARSE_ONLY.
+ * There may be subtle edge cases though that are not yet covered in the unit
+ * tests and that are parsed differently, depending on whether they are
+ * evaluated or not.
+ *
+ * This subtle difference is not documented in the manual page, neither is
+ * the difference between parsing ':D' and ':M' documented.  No code should
+ * ever depend on these details, but who knows.
+ */
+static void
+ParseModifierPartDollar(const char **pp, LazyBuf *part)
+{
+	const char *p = *pp;
+	const char *start = *pp;
+
+	if (p[1] == '(' || p[1] == '{') {
+		char startc = p[1];
+		int endc = startc == '(' ? ')' : '}';
+		int depth = 1;
+
+		for (p += 2; *p != '\0' && depth > 0; p++) {
+			if (p[-1] != '\\') {
+if (*p == startc)
+	depth++;
+if (*p == endc)
+	depth--;
+			}
+		}
+		LazyBuf_AddBytesBetween(part, start, p);
+		*pp = p;
+	} else {
+		LazyBuf_Add(part, *start);
+		*pp = p + 1;
+	}
+}
+
 /* See ParseModifierPart for the documentation. */
 static VarParseResult
 ParseModifierPartSubst(
@@ -2164,7 +2203,6 @@ ParseModifierPartSubst(
 	 * variable expressions on the way.
 	 */
 	while (*p != '\0' && *p != delim) {
-		const char *varstart;
 
 		if (IsEscapedModifierPart(p, delim, subst)) {
 			LazyBuf_Add(part, p[1]);
@@ -2204,43 +2242,7 @@ ParseModifierPartSubst(
 			continue;
 		}
 
-		/*
-		 * XXX: This whole block is very similar to Var_Parse without
-		 * VARE_WANTRES.  There may be subtle edge cases
-		 * though that are not yet covered in the unit tests and that
-		 * are parsed differently, depending on whether they are
-		 * evaluated or not.
-		 *
-		 * This subtle difference is not documented in the manual
-		 * page, neither is the difference between parsing :D and
-		 * :M documented. No code should ever depend on these
-		 * details, but who knows.
-		 */
-
-		varstart = p;	/* Nested variable, only parsed */
-		if (p[1] == '(' || p[1] == '{') {
-			/*
-			 * Find the end of this variable reference
-			 * and suck it in without further ado.
-			 * It will be interpreted later.
-			 */
-			char startc = p[1];
-			int endc = startc == '(' ? ')' : '}';
-			int depth = 1;
-
-			for (p += 2; *p != '\0' && depth > 0; p++) {
-if (p[-1] != '\\') {
-	if (*p == startc)
-		depth++;
-	if (*p == endc)
-		depth--;
-}
-			}
-			LazyBuf_AddBytesBetween(part, varstart, p);
-		} else {
-			LazyBuf_Add(part, *varstart);
-			p++;
-		}
+		ParseModifierPartDollar(, part);
 	}
 
 	if (*p != delim) {



CVS commit: src/usr.bin/make

2021-12-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec  3 18:08:51 UTC 2021

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

Log Message:
make: extract ParseModifierPartDollar from ParseModifierPartSubst

No functional change.


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

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



CVS commit: src/lib/libpuffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 17:12:17 UTC 2021

Modified Files:
src/lib/libpuffs: puffs.3 puffs.c puffs.h

Log Message:
Use size_t in place of voff_t in puffs_setrootinfo(3)

Chuck Silvers pointed out that voff_t was also supposed to be
kernel-only. The correct type to use in userland would be off_t, but
since changing vsize_t to either voff_t or off_t is an ABI change on
32-bit platforms, we use size_t knowing that it is technically
incorrect.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libpuffs/puffs.3
cvs rdiff -u -r1.126 -r1.127 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.129 -r1.130 src/lib/libpuffs/puffs.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/libpuffs/puffs.3
diff -u src/lib/libpuffs/puffs.3:1.65 src/lib/libpuffs/puffs.3:1.66
--- src/lib/libpuffs/puffs.3:1.65	Fri Dec  3 14:00:59 2021
+++ src/lib/libpuffs/puffs.3	Fri Dec  3 17:12:17 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs.3,v 1.65 2021/12/03 14:00:59 pho Exp $
+.\"	$NetBSD: puffs.3,v 1.66 2021/12/03 17:12:17 pho Exp $
 .\"
 .\" Copyright (c) 2006, 2007, 2008 Antti Kantee.  All rights reserved.
 .\"
@@ -55,7 +55,7 @@
 .Fn puffs_setroot "struct puffs_usermount *pu" "struct puffs_node *node"
 .Ft void
 .Fo puffs_setrootinfo
-.Fa "struct puffs_usermount *pu" "enum vtype vt" "voff_t vsize" "dev_t rdev"
+.Fa "struct puffs_usermount *pu" "enum vtype vt" "size_t vsize" "dev_t rdev"
 .Fc
 .Ft struct puffs_node *
 .Fn puffs_getroot "struct puffs_usermount *pu"

Index: src/lib/libpuffs/puffs.c
diff -u src/lib/libpuffs/puffs.c:1.126 src/lib/libpuffs/puffs.c:1.127
--- src/lib/libpuffs/puffs.c:1.126	Fri Dec  3 14:00:59 2021
+++ src/lib/libpuffs/puffs.c	Fri Dec  3 17:12:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.c,v 1.126 2021/12/03 14:00:59 pho Exp $	*/
+/*	$NetBSD: puffs.c,v 1.127 2021/12/03 17:12:17 pho Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: puffs.c,v 1.126 2021/12/03 14:00:59 pho Exp $");
+__RCSID("$NetBSD: puffs.c,v 1.127 2021/12/03 17:12:17 pho Exp $");
 #endif /* !lint */
 
 #include 
@@ -265,7 +265,7 @@ puffs_getroot(struct puffs_usermount *pu
 
 void
 puffs_setrootinfo(struct puffs_usermount *pu, enum vtype vt,
-	voff_t vsize, dev_t rdev)
+	size_t vsize, dev_t rdev)
 {
 	struct puffs_kargs *pargs = pu->pu_kargp;
 
@@ -275,7 +275,7 @@ puffs_setrootinfo(struct puffs_usermount
 	}
 
 	pargs->pa_root_vtype = vt;
-	pargs->pa_root_vsize = vsize;
+	pargs->pa_root_vsize = (voff_t)vsize;
 	pargs->pa_root_rdev = rdev;
 }
 

Index: src/lib/libpuffs/puffs.h
diff -u src/lib/libpuffs/puffs.h:1.129 src/lib/libpuffs/puffs.h:1.130
--- src/lib/libpuffs/puffs.h:1.129	Fri Dec  3 14:00:59 2021
+++ src/lib/libpuffs/puffs.h	Fri Dec  3 17:12:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.h,v 1.129 2021/12/03 14:00:59 pho Exp $	*/
+/*	$NetBSD: puffs.h,v 1.130 2021/12/03 17:12:17 pho Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -503,7 +503,7 @@ void			puffs_setroot(struct puffs_usermo
   struct puffs_node *);
 struct puffs_node 	*puffs_getroot(struct puffs_usermount *);
 void			puffs_setrootinfo(struct puffs_usermount *,
-	  enum vtype, voff_t, dev_t); 
+	  enum vtype, size_t, dev_t); 
 
 void			*puffs_getspecific(struct puffs_usermount *);
 void			puffs_setspecific(struct puffs_usermount *, void *);



CVS commit: src/lib/libpuffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 17:12:17 UTC 2021

Modified Files:
src/lib/libpuffs: puffs.3 puffs.c puffs.h

Log Message:
Use size_t in place of voff_t in puffs_setrootinfo(3)

Chuck Silvers pointed out that voff_t was also supposed to be
kernel-only. The correct type to use in userland would be off_t, but
since changing vsize_t to either voff_t or off_t is an ABI change on
32-bit platforms, we use size_t knowing that it is technically
incorrect.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libpuffs/puffs.3
cvs rdiff -u -r1.126 -r1.127 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.129 -r1.130 src/lib/libpuffs/puffs.h

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



CVS commit: src/lib/libpuffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 14:00:59 UTC 2021

Modified Files:
src/lib/libpuffs: puffs.3 puffs.c puffs.h puffs_ops.3

Log Message:
Avoid using register_t or vsize_t in 

 is a user-space header, and should not use any of
kernel-only types. It's not reasonable to require user-land
filesystems to #define _KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/libpuffs/puffs.3
cvs rdiff -u -r1.125 -r1.126 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.128 -r1.129 src/lib/libpuffs/puffs.h
cvs rdiff -u -r1.47 -r1.48 src/lib/libpuffs/puffs_ops.3

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



CVS commit: src/lib/libpuffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 14:00:59 UTC 2021

Modified Files:
src/lib/libpuffs: puffs.3 puffs.c puffs.h puffs_ops.3

Log Message:
Avoid using register_t or vsize_t in 

 is a user-space header, and should not use any of
kernel-only types. It's not reasonable to require user-land
filesystems to #define _KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/libpuffs/puffs.3
cvs rdiff -u -r1.125 -r1.126 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.128 -r1.129 src/lib/libpuffs/puffs.h
cvs rdiff -u -r1.47 -r1.48 src/lib/libpuffs/puffs_ops.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/libpuffs/puffs.3
diff -u src/lib/libpuffs/puffs.3:1.64 src/lib/libpuffs/puffs.3:1.65
--- src/lib/libpuffs/puffs.3:1.64	Fri Dec 27 10:13:59 2019
+++ src/lib/libpuffs/puffs.3	Fri Dec  3 14:00:59 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs.3,v 1.64 2019/12/27 10:13:59 msaitoh Exp $
+.\"	$NetBSD: puffs.3,v 1.65 2021/12/03 14:00:59 pho Exp $
 .\"
 .\" Copyright (c) 2006, 2007, 2008 Antti Kantee.  All rights reserved.
 .\"
@@ -55,7 +55,7 @@
 .Fn puffs_setroot "struct puffs_usermount *pu" "struct puffs_node *node"
 .Ft void
 .Fo puffs_setrootinfo
-.Fa "struct puffs_usermount *pu" "enum vtype vt" "vsize_t vsize" "dev_t rdev"
+.Fa "struct puffs_usermount *pu" "enum vtype vt" "voff_t vsize" "dev_t rdev"
 .Fc
 .Ft struct puffs_node *
 .Fn puffs_getroot "struct puffs_usermount *pu"

Index: src/lib/libpuffs/puffs.c
diff -u src/lib/libpuffs/puffs.c:1.125 src/lib/libpuffs/puffs.c:1.126
--- src/lib/libpuffs/puffs.c:1.125	Sat Oct 30 10:34:18 2021
+++ src/lib/libpuffs/puffs.c	Fri Dec  3 14:00:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.c,v 1.125 2021/10/30 10:34:18 nia Exp $	*/
+/*	$NetBSD: puffs.c,v 1.126 2021/12/03 14:00:59 pho Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: puffs.c,v 1.125 2021/10/30 10:34:18 nia Exp $");
+__RCSID("$NetBSD: puffs.c,v 1.126 2021/12/03 14:00:59 pho Exp $");
 #endif /* !lint */
 
 #include 
@@ -265,7 +265,7 @@ puffs_getroot(struct puffs_usermount *pu
 
 void
 puffs_setrootinfo(struct puffs_usermount *pu, enum vtype vt,
-	vsize_t vsize, dev_t rdev)
+	voff_t vsize, dev_t rdev)
 {
 	struct puffs_kargs *pargs = pu->pu_kargp;
 

Index: src/lib/libpuffs/puffs.h
diff -u src/lib/libpuffs/puffs.h:1.128 src/lib/libpuffs/puffs.h:1.129
--- src/lib/libpuffs/puffs.h:1.128	Mon Sep 23 12:00:57 2019
+++ src/lib/libpuffs/puffs.h	Fri Dec  3 14:00:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.h,v 1.128 2019/09/23 12:00:57 christos Exp $	*/
+/*	$NetBSD: puffs.h,v 1.129 2021/12/03 14:00:59 pho Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -223,7 +223,7 @@ struct puffs_ops {
 	int (*puffs_node_inactive)(struct puffs_usermount *, puffs_cookie_t);
 	int (*puffs_node_print)(struct puffs_usermount *, puffs_cookie_t);
 	int (*puffs_node_pathconf)(struct puffs_usermount *,
-	puffs_cookie_t, int, register_t *);
+	puffs_cookie_t, int, __register_t *);
 	int (*puffs_node_advlock)(struct puffs_usermount *,
 	puffs_cookie_t, void *, int, struct flock *, int);
 	int (*puffs_node_read)(struct puffs_usermount *, puffs_cookie_t,
@@ -385,7 +385,7 @@ enum {
 	int fsname##_node_print(struct puffs_usermount *,		\
 	puffs_cookie_t);		\
 	int fsname##_node_pathconf(struct puffs_usermount *,		\
-	puffs_cookie_t, int, register_t *);\
+	puffs_cookie_t, int, __register_t *);\
 	int fsname##_node_advlock(struct puffs_usermount *,		\
 	puffs_cookie_t, void *, int, struct flock *, int);		\
 	int fsname##_node_read(struct puffs_usermount *, puffs_cookie_t,\
@@ -503,7 +503,7 @@ void			puffs_setroot(struct puffs_usermo
   struct puffs_node *);
 struct puffs_node 	*puffs_getroot(struct puffs_usermount *);
 void			puffs_setrootinfo(struct puffs_usermount *,
-	  enum vtype, vsize_t, dev_t); 
+	  enum vtype, voff_t, dev_t); 
 
 void			*puffs_getspecific(struct puffs_usermount *);
 void			puffs_setspecific(struct puffs_usermount *, void *);

Index: src/lib/libpuffs/puffs_ops.3
diff -u src/lib/libpuffs/puffs_ops.3:1.47 src/lib/libpuffs/puffs_ops.3:1.48
--- src/lib/libpuffs/puffs_ops.3:1.47	Wed Aug  4 09:31:25 2021
+++ src/lib/libpuffs/puffs_ops.3	Fri Dec  3 14:00:59 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs_ops.3,v 1.47 2021/08/04 09:31:25 andvar Exp $
+.\"	$NetBSD: puffs_ops.3,v 1.48 2021/12/03 14:00:59 pho Exp $
 .\"
 .\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\"
@@ -120,7 +120,7 @@
 .Ft int
 .Fo puffs_node_pathconf
 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int name"
-.Fa "register_t *retval"
+.Fa "__register_t *retval"
 .Fc
 .Ft int
 .Fo puffs_node_advlock



CVS commit: src

2021-12-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Dec  3 13:27:40 UTC 2021

Modified Files:
src/lib: checkvers
src/lib/libcurses/PSD.doc: Makefile
src/sbin/iscsictl: iscsic_parse.c
src/sys/arch/evbarm/imx23_olinuxino: imx23_olinuxino_machdep.c
src/sys/arch/sgimips/hpc: pi1ppc.c pi1ppcvar.h
src/sys/compat/linux/arch/powerpc: linux_machdep.h
src/sys/dev/ic: README.ncr5380sbc atppc.c
src/sys/dev/isa: atppc_isa.c
src/sys/dev/pci: hifn7751var.h pci_subr.c
src/sys/dev/pckbport: synaptics.c
src/sys/net: if_gre.h
src/sys/netipsec: key.c
src/usr.bin/cap_mkdb: cap_mkdb.c
src/usr.bin/rump_dhcpclient: net.c
src/usr.sbin/lpr/common_source: lp.local.h

Log Message:
fix various typos in comments, log messages and documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/checkvers
cvs rdiff -u -r1.14 -r1.15 src/lib/libcurses/PSD.doc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sbin/iscsictl/iscsic_parse.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/hpc/pi1ppc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/hpc/pi1ppcvar.h
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux/arch/powerpc/linux_machdep.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/README.ncr5380sbc
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/atppc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/isa/atppc_isa.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/hifn7751var.h
cvs rdiff -u -r1.232 -r1.233 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pckbport/synaptics.c
cvs rdiff -u -r1.49 -r1.50 src/sys/net/if_gre.h
cvs rdiff -u -r1.271 -r1.272 src/sys/netipsec/key.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/cap_mkdb/cap_mkdb.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/rump_dhcpclient/net.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/lpr/common_source/lp.local.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/checkvers
diff -u src/lib/checkvers:1.7 src/lib/checkvers:1.8
--- src/lib/checkvers:1.7	Wed Apr 30 13:10:50 2008
+++ src/lib/checkvers	Fri Dec  3 13:27:37 2021
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#	$NetBSD: checkvers,v 1.7 2008/04/30 13:10:50 martin Exp $
+#	$NetBSD: checkvers,v 1.8 2021/12/03 13:27:37 andvar Exp $
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,7 +33,7 @@
 # checkvers [-q] [systemlibdir [library name]]
 #
 # This is a wrapper script around checkver.  It will find
-# all directories withing the current directory containing
+# all directories within the current directory containing
 # a shlib_version file and call checkver for each.
 #
 # As with checkver, a list of directories of installed libraries
@@ -44,7 +44,7 @@
 # will not work correctly if it finds shlib_version files
 # corresponding to a different library.
 #
-# This script produces no output if all library version are ok.
+# This script produces no output if all library versions are ok.
 # If the versions aren't ok the header will be displayed once
 # followed by a list of problematic libraries.
 #

Index: src/lib/libcurses/PSD.doc/Makefile
diff -u src/lib/libcurses/PSD.doc/Makefile:1.14 src/lib/libcurses/PSD.doc/Makefile:1.15
--- src/lib/libcurses/PSD.doc/Makefile:1.14	Tue Jul 15 13:27:58 2014
+++ src/lib/libcurses/PSD.doc/Makefile	Fri Dec  3 13:27:38 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2014/07/15 13:27:58 christos Exp $
+#	$NetBSD: Makefile,v 1.15 2021/12/03 13:27:38 andvar Exp $
 #	from: @(#)Makefile	8.2 (Berkeley) 5/23/94
 
 SECTION=reference/ref3
@@ -16,7 +16,7 @@ CLEANFILES+= ${CEXAMPLES} intro.2.tbl
 
 #
 # this section formats C input source into nice troffable (or nroffable)
-# versions.  It uses the capabilites of "vgrind", which sets keywords in
+# versions.  It uses the capabilities of "vgrind", which sets keywords in
 # bold font, and comments in italics.
 #
 

Index: src/sbin/iscsictl/iscsic_parse.c
diff -u src/sbin/iscsictl/iscsic_parse.c:1.3 src/sbin/iscsictl/iscsic_parse.c:1.4
--- src/sbin/iscsictl/iscsic_parse.c:1.3	Sat May 30 15:57:32 2015
+++ src/sbin/iscsictl/iscsic_parse.c	Fri Dec  3 13:27:38 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsic_parse.c,v 1.3 2015/05/30 15:57:32 joerg Exp $	*/
+/*	$NetBSD: iscsic_parse.c,v 1.4 2021/12/03 13:27:38 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -204,7 +204,7 @@ cl_get_target(iscsid_add_target_req_t **
 	size_t num, len, name;
 	int i, p;
 
-	/* count number of addreses first, so we know how much memory to allocate */
+	/* count number of addresses first, so we know how much memory to allocate */
 	for (i = (int)(num = name = 0); i < argc; i++) {
 		if (!argv[i] || argv[i][0] != '-')
 			continue;

Index: src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
diff -u 

CVS commit: src

2021-12-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Dec  3 13:27:40 UTC 2021

Modified Files:
src/lib: checkvers
src/lib/libcurses/PSD.doc: Makefile
src/sbin/iscsictl: iscsic_parse.c
src/sys/arch/evbarm/imx23_olinuxino: imx23_olinuxino_machdep.c
src/sys/arch/sgimips/hpc: pi1ppc.c pi1ppcvar.h
src/sys/compat/linux/arch/powerpc: linux_machdep.h
src/sys/dev/ic: README.ncr5380sbc atppc.c
src/sys/dev/isa: atppc_isa.c
src/sys/dev/pci: hifn7751var.h pci_subr.c
src/sys/dev/pckbport: synaptics.c
src/sys/net: if_gre.h
src/sys/netipsec: key.c
src/usr.bin/cap_mkdb: cap_mkdb.c
src/usr.bin/rump_dhcpclient: net.c
src/usr.sbin/lpr/common_source: lp.local.h

Log Message:
fix various typos in comments, log messages and documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/checkvers
cvs rdiff -u -r1.14 -r1.15 src/lib/libcurses/PSD.doc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sbin/iscsictl/iscsic_parse.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/hpc/pi1ppc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/hpc/pi1ppcvar.h
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux/arch/powerpc/linux_machdep.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/README.ncr5380sbc
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/atppc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/isa/atppc_isa.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/hifn7751var.h
cvs rdiff -u -r1.232 -r1.233 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pckbport/synaptics.c
cvs rdiff -u -r1.49 -r1.50 src/sys/net/if_gre.h
cvs rdiff -u -r1.271 -r1.272 src/sys/netipsec/key.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/cap_mkdb/cap_mkdb.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/rump_dhcpclient/net.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/lpr/common_source/lp.local.h

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



CVS commit: src/sys/fs/puffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 13:08:10 UTC 2021

Modified Files:
src/sys/fs/puffs: puffs_msgif.h

Log Message:
Avoid using register_t in 

The purpose of this header file is to interface between the
kernel-space and user-space, and is #include'd by a user-space header
. It should therefore not use any of kernel-only types, as
it's not reasonable to require user-land filesystems to #define
_KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/fs/puffs/puffs_msgif.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/fs/puffs/puffs_msgif.h
diff -u src/sys/fs/puffs/puffs_msgif.h:1.86 src/sys/fs/puffs/puffs_msgif.h:1.87
--- src/sys/fs/puffs/puffs_msgif.h:1.86	Mon Mar  8 17:34:30 2021
+++ src/sys/fs/puffs/puffs_msgif.h	Fri Dec  3 13:08:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.h,v 1.86 2021/03/08 17:34:30 christos Exp $	*/
+/*	$NetBSD: puffs_msgif.h,v 1.87 2021/12/03 13:08:10 pho Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -705,7 +705,7 @@ struct puffs_vnmsg_pathconf {
 	struct puffs_req	pvn_pr;
 
 	int			pvnr_name;		/* OUT	*/
-	register_t		pvnr_retval;		/* IN	*/
+	__register_t		pvnr_retval;		/* IN	*/
 };
 
 struct puffs_vnmsg_advlock {



CVS commit: src/sys/fs/puffs

2021-12-03 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Fri Dec  3 13:08:10 UTC 2021

Modified Files:
src/sys/fs/puffs: puffs_msgif.h

Log Message:
Avoid using register_t in 

The purpose of this header file is to interface between the
kernel-space and user-space, and is #include'd by a user-space header
. It should therefore not use any of kernel-only types, as
it's not reasonable to require user-land filesystems to #define
_KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/fs/puffs/puffs_msgif.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/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 10:54:19 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
fix the typo that martin spotted.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/tprof/tprof_armv8.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/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 10:54:19 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
fix the typo that martin spotted.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/tprof/tprof_armv8.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/tprof/tprof_armv8.c
diff -u src/sys/dev/tprof/tprof_armv8.c:1.12 src/sys/dev/tprof/tprof_armv8.c:1.13
--- src/sys/dev/tprof/tprof_armv8.c:1.12	Fri Dec  3 08:02:52 2021
+++ src/sys/dev/tprof/tprof_armv8.c	Fri Dec  3 10:54:19 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.12 2021/12/03 08:02:52 skrll Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.13 2021/12/03 10:54:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.12 2021/12/03 08:02:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.13 2021/12/03 10:54:19 skrll Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@ armv8_pmu_event_implemented(uint16_t eve
 	eid[0] = reg_pmceid0_el0_read();
 	eid[1] = reg_pmceid1_el0_read();
 
-	/* The low 32bits of PMCEID[01]_EL0 contain the commmon events 0 to n */
+	/* The low 32bits of PMCEID[01]_EL0 contain the common events 0 to n */
 	const u_int idx = event / 32;
 	const u_int bit = event % 32;
 



CVS commit: src/sys/arch/emips/stand/common

2021-12-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Dec  3 10:49:25 UTC 2021

Modified Files:
src/sys/arch/emips/stand/common: start.S

Log Message:
s/rigth/right/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/stand/common/start.S

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/emips/stand/common/start.S
diff -u src/sys/arch/emips/stand/common/start.S:1.3 src/sys/arch/emips/stand/common/start.S:1.4
--- src/sys/arch/emips/stand/common/start.S:1.3	Thu Feb  6 19:20:11 2014
+++ src/sys/arch/emips/stand/common/start.S	Fri Dec  3 10:49:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: start.S,v 1.3 2014/02/06 19:20:11 matt Exp $	*/
+/*	$NetBSD: start.S,v 1.4 2021/12/03 10:49:25 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
 /* PROM_MODE means the user plans to keep this code around while running an OS.
  * So we act kind of like PROM code (BIOS?), but we live in RAM.
  * So we need to safeguard ourselves against corruptions, some unavoidable.
- * Like the overriding of the exception vectors, rigth where our "start" code is.
+ * Like the overriding of the exception vectors, right where our "start" code is.
  */
 
 IMPORT(main,4)



CVS commit: src/sys/arch/emips/stand/common

2021-12-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Dec  3 10:49:25 UTC 2021

Modified Files:
src/sys/arch/emips/stand/common: start.S

Log Message:
s/rigth/right/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/stand/common/start.S

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



CVS commit: src/sys/compat/linux32/arch/aarch64

2021-12-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri Dec  3 09:20:23 UTC 2021

Modified Files:
src/sys/compat/linux32/arch/aarch64: linux32_machdep.c

Log Message:
Fixed a bug in sigreturn that sigmask was not restored.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/compat/linux32/arch/aarch64/linux32_machdep.c

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



CVS commit: src/sys/compat/linux32/arch/aarch64

2021-12-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri Dec  3 09:20:23 UTC 2021

Modified Files:
src/sys/compat/linux32/arch/aarch64: linux32_machdep.c

Log Message:
Fixed a bug in sigreturn that sigmask was not restored.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/compat/linux32/arch/aarch64/linux32_machdep.c

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

Modified files:

Index: src/sys/compat/linux32/arch/aarch64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/aarch64/linux32_machdep.c:1.1 src/sys/compat/linux32/arch/aarch64/linux32_machdep.c:1.2
--- src/sys/compat/linux32/arch/aarch64/linux32_machdep.c:1.1	Thu Nov 25 03:08:04 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_machdep.c	Fri Dec  3 09:20:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $	*/
+/*	$NetBSD: linux32_machdep.c,v 1.2 2021/12/03 09:20:23 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2021 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.1 2021/11/25 03:08:04 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.2 2021/12/03 09:20:23 ryo Exp $");
 
 #include 
 #include 
@@ -64,7 +64,6 @@ linux32_save_sigcontext(struct lwp *l, s
 
 	cpu_getmcontext32(l, _mcontext, _flags);
 
-	memset(luc, 0, sizeof(*luc));
 	luc->luc_mcontext.arm_r0 = gr[_REG_R0];
 	luc->luc_mcontext.arm_r1 = gr[_REG_R1];
 	luc->luc_mcontext.arm_r2 = gr[_REG_R2];
@@ -109,13 +108,27 @@ linux32_save_sigcontext(struct lwp *l, s
 static int
 linux32_restore_sigcontext(struct lwp *l, struct linux32_ucontext *luc)
 {
+	struct proc * const p = l->l_proc;
 	ucontext32_t uc;
 	__greg32_t *gr = uc.uc_mcontext.__gregs;
 	__vfpregset32_t *vfpregs = _mcontext.__vfpregs;
 	struct linux32_aux_sigframe *aux;
-	int i;
+	int i, error;
 
 	memset(, 0, sizeof(uc));
+
+	/* build .uc_sigmask */
+	linux32_to_native_sigset(_sigmask, >luc_sigmask);
+	uc.uc_flags |= _UC_SIGMASK;
+
+	/* build .uc_stack */
+	if (luc->luc_stack.ss_flags & LINUX_SS_ONSTACK)
+		uc.uc_stack.ss_flags |= SS_ONSTACK;
+	if (luc->luc_stack.ss_flags & LINUX_SS_DISABLE)
+		uc.uc_stack.ss_flags |= SS_DISABLE;
+	uc.uc_flags |= _UC_STACK;
+
+	/* build .uc_mcontext */
 	gr[_REG_R0] = luc->luc_mcontext.arm_r0;
 	gr[_REG_R1] = luc->luc_mcontext.arm_r1;
 	gr[_REG_R2] = luc->luc_mcontext.arm_r2;
@@ -148,7 +161,11 @@ linux32_restore_sigcontext(struct lwp *l
 		uc.uc_flags |= _UC_FPU;
 	}
 
-	return cpu_setmcontext32(l, _mcontext, uc.uc_flags);
+	mutex_enter(p->p_lock);
+	error = setucontext32(l, );
+	mutex_exit(p->p_lock);
+
+	return error;
 }
 
 void



CVS commit: src/sys/kern

2021-12-03 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Dec  3 08:33:30 UTC 2021

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

Log Message:
Only one space after comma


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/kern_hook.c

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

Modified files:

Index: src/sys/kern/kern_hook.c
diff -u src/sys/kern/kern_hook.c:1.11 src/sys/kern/kern_hook.c:1.12
--- src/sys/kern/kern_hook.c:1.11	Thu Sep 30 07:15:02 2021
+++ src/sys/kern/kern_hook.c	Fri Dec  3 08:33:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $	*/
+/*	$NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $");
 
 #include 
 #include 
@@ -524,7 +524,7 @@ simplehook_dohooks(khook_list_t *l)
 }
 
 khook_t *
-simplehook_establish(khook_list_t *l,  void (*fn)(void *), void *arg)
+simplehook_establish(khook_list_t *l, void (*fn)(void *), void *arg)
 {
 	struct hook_desc *hd;
 



CVS commit: src/sys/kern

2021-12-03 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Dec  3 08:33:30 UTC 2021

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

Log Message:
Only one space after comma


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/kern_hook.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/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 08:02:52 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Add a comment and simplify the code ever so slightly.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/tprof/tprof_armv8.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/tprof/tprof_armv8.c
diff -u src/sys/dev/tprof/tprof_armv8.c:1.11 src/sys/dev/tprof/tprof_armv8.c:1.12
--- src/sys/dev/tprof/tprof_armv8.c:1.11	Fri Dec  3 08:00:13 2021
+++ src/sys/dev/tprof/tprof_armv8.c	Fri Dec  3 08:02:52 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.11 2021/12/03 08:00:13 skrll Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.12 2021/12/03 08:02:52 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.11 2021/12/03 08:00:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.12 2021/12/03 08:02:52 skrll Exp $");
 
 #include 
 #include 
@@ -57,6 +57,7 @@ armv8_pmu_event_implemented(uint16_t eve
 	eid[0] = reg_pmceid0_el0_read();
 	eid[1] = reg_pmceid1_el0_read();
 
+	/* The low 32bits of PMCEID[01]_EL0 contain the commmon events 0 to n */
 	const u_int idx = event / 32;
 	const u_int bit = event % 32;
 
@@ -222,9 +223,7 @@ armv8_pmu_init_cpu(void *arg1, void *arg
 int
 armv8_pmu_init(void)
 {
-	uint64_t xc;
-
-	xc = xc_broadcast(0, armv8_pmu_init_cpu, NULL, NULL);
+	uint64_t xc = xc_broadcast(0, armv8_pmu_init_cpu, NULL, NULL);
 	xc_wait(xc);
 
 	return tprof_backend_register("tprof_armv8", _armv8_pmu_ops,



CVS commit: src/sys/dev/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 08:02:52 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Add a comment and simplify the code ever so slightly.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/tprof/tprof_armv8.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/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 08:00:13 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Use the first (not second) event counter as there might only be one
available.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/tprof/tprof_armv8.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/tprof/tprof_armv8.c
diff -u src/sys/dev/tprof/tprof_armv8.c:1.10 src/sys/dev/tprof/tprof_armv8.c:1.11
--- src/sys/dev/tprof/tprof_armv8.c:1.10	Fri Nov 26 13:24:28 2021
+++ src/sys/dev/tprof/tprof_armv8.c	Fri Dec  3 08:00:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.10 2021/11/26 13:24:28 christos Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.11 2021/12/03 08:00:13 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.10 2021/11/26 13:24:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.11 2021/12/03 08:00:13 skrll Exp $");
 
 #include 
 #include 
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: tprof_armv8.
 #include 
 
 static tprof_param_t armv8_pmu_param;
-static const u_int armv8_pmu_counter = 1;
+static const u_int armv8_pmu_counter = 0;
 static uint32_t counter_val;
 static uint32_t counter_reset_val;
 



CVS commit: src/sys/dev/tprof

2021-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec  3 08:00:13 UTC 2021

Modified Files:
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Use the first (not second) event counter as there might only be one
available.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/tprof/tprof_armv8.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/arm/sociox

2021-12-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Dec  3 05:28:33 UTC 2021

Removed Files:
src/sys/arch/arm/sociox: sni_exiu.c

Log Message:
retire sni_exiu.c in favour of ACPI0013 generic event divice to
respond power button press.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r0 src/sys/arch/arm/sociox/sni_exiu.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/arm/sociox

2021-12-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Dec  3 05:28:33 UTC 2021

Removed Files:
src/sys/arch/arm/sociox: sni_exiu.c

Log Message:
retire sni_exiu.c in favour of ACPI0013 generic event divice to
respond power button press.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r0 src/sys/arch/arm/sociox/sni_exiu.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/arm/sociox

2021-12-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Dec  3 05:21:52 UTC 2021

Modified Files:
src/sys/arch/arm/sociox: files.sociox

Log Message:
retire sni_exiu.c in favour of ACPI0013 generic event device implemented
by dev/acpi/acpi_ged.c


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sociox/files.sociox

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/arm/sociox/files.sociox
diff -u src/sys/arch/arm/sociox/files.sociox:1.9 src/sys/arch/arm/sociox/files.sociox:1.10
--- src/sys/arch/arm/sociox/files.sociox:1.9	Thu Mar 19 22:17:45 2020
+++ src/sys/arch/arm/sociox/files.sociox	Fri Dec  3 05:21:52 2021
@@ -1,6 +1,6 @@
-#	$NetBSD: files.sociox,v 1.9 2020/03/19 22:17:45 nisimura Exp $
+#	$NetBSD: files.sociox,v 1.10 2021/12/03 05:21:52 nisimura Exp $
 #
-# Configuration info for Socionext Unifier/SC2A11
+# Configuration info for Socionext SC2A11
 #
 #
 
@@ -32,9 +32,3 @@ device	snigpio: gpiobus
 attach	snigpio at acpinodebus with snigpio_acpi
 attach	snigpio at fdt with snigpio_fdt
 file	arch/arm/sociox/sni_gpio.c		snigpio
-
-# Socionext EXIU external interrupt controller unit
-device	sniexiu
-attach	sniexiu at acpinodebus with sniexitu_acpi
-attach	sniexiu at fdt with sniexiu_fdt
-file	arch/arm/sociox/sni_exiu.c		sniexiu



CVS commit: src/sys/arch/arm/sociox

2021-12-02 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Dec  3 05:21:52 UTC 2021

Modified Files:
src/sys/arch/arm/sociox: files.sociox

Log Message:
retire sni_exiu.c in favour of ACPI0013 generic event device implemented
by dev/acpi/acpi_ged.c


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sociox/files.sociox

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



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

2021-12-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Dec  2 22:41:01 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: fix test for .MAKE.SAVE_DOLLARS

The previous assumption was wrong that only literal '$$' that occur
directly in the right-hand side of a variable assignment would be
affected.  Indirect variable definitions are affected as well when they
are evaluated nestedly, as long as the '$$' appears in the text of the
variable that is actually parsed.  Whether the '$$' ends up in the
expanded value of the expression doesn't matter though.


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.5 src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.6
--- src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.5	Wed Dec  1 23:15:38 2021
+++ src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk	Thu Dec  2 22:41:01 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-make-save_dollars.mk,v 1.5 2021/12/01 23:15:38 rillig Exp $
+# $NetBSD: varname-dot-make-save_dollars.mk,v 1.6 2021/12/02 22:41:01 rillig Exp $
 #
 # Tests for the special .MAKE.SAVE_DOLLARS variable, which controls whether
 # the assignment operator ':=' converts '$$' to a single '$' or keeps it
@@ -17,8 +17,8 @@
 .endif
 
 
-# Even when dollars are preserved, it only applies to literal dollars, not
-# to those that come indirectly from other expressions.
+# When dollars are preserved, this setting not only applies to literal
+# dollars, but also to those that come indirectly from other expressions.
 DOLLARS=		
 .MAKE.SAVE_DOLLARS=	yes
 VAR:=			${DOLLARS}
@@ -29,6 +29,15 @@ VAR:=			${DOLLARS}
 .  error
 .endif
 
+# When dollars are preserved, this setting not only applies to literal
+# dollars, but also to those that come indirectly from other expressions.
+DOLLARS=		
+.MAKE.SAVE_DOLLARS=	no
+VAR:=			${DOLLARS}
+.if ${VAR} != "\$\$"
+.  error
+.endif
+
 # The 'yes' preserves the dollars from the literal.
 .MAKE.SAVE_DOLLARS=	yes
 VAR:=			
@@ -51,8 +60,10 @@ VAR:=		-${.MAKE.SAVE_DOLLARS::=yes}-
 .  error
 .endif
 
-# The '$' from the ':U' expressions are indirect, therefore .MAKE.SAVE_DOLLARS
-# doesn't apply to them.
+# The '$' from the ':U' expressions do not appear as literal '$$' to the
+# parser (no matter whether directly or indirectly), they only appear as '$$'
+# in the value of an expression, therefore .MAKE.SAVE_DOLLARS doesn't apply
+# here.
 .MAKE.SAVE_DOLLARS=	no
 VAR:=		${:U\$\$\$\$}-${.MAKE.SAVE_DOLLARS::=yes}-${:U\$\$\$\$}
 .if ${VAR} != "\$\$--\$\$"
@@ -77,4 +88,24 @@ VAR:=		
 .  error
 .endif
 
+# The variable '.MAKE.SAVE_DOLLARS' not only affects literal '$$' on the
+# right-hand side of the assignment operator ':=', it also affects dollars
+# in indirect expressions.
+#
+# In this example, it affects the command in CMD itself, not the result of
+# running that command.
+.MAKE.SAVE_DOLLARS=	no
+CMD=			echo ''
+VAR:=			${CMD:sh}
+.if ${VAR} != "\$\$"
+.  error
+.endif
+
+.MAKE.SAVE_DOLLARS=	yes
+CMD=			echo ''
+VAR:=			${CMD:sh}
+.if ${VAR} != "\$\$\$\$"
+.  error
+.endif
+
 all:



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

2021-12-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Dec  2 22:41:01 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: fix test for .MAKE.SAVE_DOLLARS

The previous assumption was wrong that only literal '$$' that occur
directly in the right-hand side of a variable assignment would be
affected.  Indirect variable definitions are affected as well when they
are evaluated nestedly, as long as the '$$' appears in the text of the
variable that is actually parsed.  Whether the '$$' ends up in the
expanded value of the expression doesn't matter though.


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

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



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2021-12-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  2 21:59:22 UTC 2021

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: bta2dpd.8

Log Message:
bta2dpd(8): s/conection/connection/


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8

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

Modified files:

Index: src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8
diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.5 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.6
--- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8:1.5	Sun Mar  7 13:09:43 2021
+++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8	Thu Dec  2 21:59:22 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bta2dpd.8,v 1.5 2021/03/07 13:09:43 nat Exp $
+.\"	$NetBSD: bta2dpd.8,v 1.6 2021/12/02 21:59:22 andvar Exp $
 .\"
 .\" Copyright (c) 2015 - 2016  Nathanial Sloss 
 .\" All rights reserved.
@@ -108,7 +108,7 @@ option and the maximum bitpool for your 
 .It Fl D
 Run in the background.
 .It Fl n
-Do not close conection on end of file (EOF).
+Do not close connection on end of file (EOF).
 Useful for
 .Xr pad 4 .
 .It Fl d Ar device



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2021-12-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  2 21:59:22 UTC 2021

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: bta2dpd.8

Log Message:
bta2dpd(8): s/conection/connection/


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.8

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



CVS commit: src/usr.sbin/btconfig

2021-12-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  2 21:55:22 UTC 2021

Modified Files:
src/usr.sbin/btconfig: btconfig.8

Log Message:
btconfig(8): s/fomat/format/ and article fix.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/btconfig/btconfig.8

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



CVS commit: src/usr.sbin/btconfig

2021-12-02 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  2 21:55:22 UTC 2021

Modified Files:
src/usr.sbin/btconfig: btconfig.8

Log Message:
btconfig(8): s/fomat/format/ and article fix.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/btconfig/btconfig.8

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

Modified files:

Index: src/usr.sbin/btconfig/btconfig.8
diff -u src/usr.sbin/btconfig/btconfig.8:1.18 src/usr.sbin/btconfig/btconfig.8:1.19
--- src/usr.sbin/btconfig/btconfig.8:1.18	Thu Mar 15 22:35:03 2012
+++ src/usr.sbin/btconfig/btconfig.8	Thu Dec  2 21:55:22 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: btconfig.8,v 1.18 2012/03/15 22:35:03 njoly Exp $
+.\" $NetBSD: btconfig.8,v 1.19 2021/12/02 21:55:22 andvar Exp $
 .\"
 .\" Copyright (c) 2006 Itronix Inc.
 .\" All rights reserved.
@@ -152,7 +152,7 @@ Enable Remote Signal Strength Indicator 
 This will only work if the device features indicate
 .Aq RSSI with inquiry result .
 .It ext
-Inquiry Result with RSSI format or Extended Inquiry Result fomat.
+Inquiry Result with RSSI format or Extended Inquiry Result format.
 This will only work where the device features indicate
 .Aq extended inquiry ,
 and the Extended Inquiry Result will only occur when the remote device
@@ -183,7 +183,7 @@ Super-user privileges are required to ch
 .Sh DIAGNOSTICS
 Messages indicating the specified device does not exist, the
 requested address is unknown, or the user is not privileged and
-tried to alter an device's configuration.
+tried to alter a device's configuration.
 .Sh SEE ALSO
 .Xr bcsp 4 ,
 .Xr bluetooth 4 ,



CVS commit: src/usr.sbin/fstyp

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 14:26:42 UTC 2021

Modified Files:
src/usr.sbin/fstyp: hammer2.c

Log Message:
PR/56530: RVP: use ioctl to get the partition size if possible (avoids SEGV)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/fstyp/hammer2.c

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

Modified files:

Index: src/usr.sbin/fstyp/hammer2.c
diff -u src/usr.sbin/fstyp/hammer2.c:1.8 src/usr.sbin/fstyp/hammer2.c:1.9
--- src/usr.sbin/fstyp/hammer2.c:1.8	Sun Jan 10 08:44:57 2021
+++ src/usr.sbin/fstyp/hammer2.c	Thu Dec  2 09:26:42 2021
@@ -1,4 +1,4 @@
-/*$NetBSD: hammer2.c,v 1.8 2021/01/10 13:44:57 martin Exp $  */
+/*$NetBSD: hammer2.c,v 1.9 2021/12/02 14:26:42 christos Exp $  */
 
 /*-
  * Copyright (c) 2017-2019 The DragonFly Project
@@ -27,7 +27,11 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.8 2021/01/10 13:44:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.9 2021/12/02 14:26:42 christos Exp $");
+
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -44,32 +48,37 @@ static ssize_t
 get_file_size(FILE *fp)
 {
 	ssize_t siz;
+	struct dkwedge_info dkw;
+
+	if (ioctl(fileno(fp), DIOCGWEDGEINFO, ) != -1) {
+		return (ssize_t)dkw.dkw_size * DEV_BSIZE;
+	}
 
 	if (fseek(fp, 0, SEEK_END) == -1) {
 		warnx("hammer2: failed to seek media end");
-		return (-1);
+		return -1;
 	}
 
 	siz = ftell(fp);
 	if (siz == -1) {
 		warnx("hammer2: failed to tell media end");
-		return (-1);
+		return -1;
 	}
 
-	return (siz);
+	return siz;
 }
 
 static hammer2_volume_data_t *
 read_voldata(FILE *fp, int i)
 {
 	if (i < 0 || i >= HAMMER2_NUM_VOLHDRS)
-		return (NULL);
+		return NULL;
 
 	if ((hammer2_off_t)i * (hammer2_off_t)HAMMER2_ZONE_BYTES64 >= (hammer2_off_t)get_file_size(fp))
-		return (NULL);
+		return NULL;
 
-	return (read_buf(fp, (off_t)i * (off_t)HAMMER2_ZONE_BYTES64,
-	sizeof(hammer2_volume_data_t)));
+	return read_buf(fp, (off_t)i * (off_t)HAMMER2_ZONE_BYTES64,
+	sizeof(hammer2_volume_data_t));
 }
 
 static int
@@ -86,20 +95,20 @@ test_voldata(FILE *fp)
 		voldata = read_voldata(fp, i);
 		if (voldata == NULL) {
 			warnx("hammer2: failed to read volume data");
-			return (1);
+			return 1;
 		}
 		if (voldata->magic != HAMMER2_VOLUME_ID_HBO &&
 		voldata->magic != HAMMER2_VOLUME_ID_ABO) {
 			free(voldata);
-			return (1);
+			return 1;
 		}
 		if (voldata->volu_id > HAMMER2_MAX_VOLUMES - 1) {
 			free(voldata);
-			return (1);
+			return 1;
 		}
 		if (voldata->nvolumes > HAMMER2_MAX_VOLUMES) {
 			free(voldata);
-			return (1);
+			return 1;
 		}
 
 		if (count == 0) {
@@ -109,21 +118,21 @@ test_voldata(FILE *fp)
 		} else {
 			if (voldata->nvolumes != count) {
 free(voldata);
-return (1);
+return 1;
 			}
 			if (!uuid_equal(, >fsid, NULL)) {
 free(voldata);
-return (1);
+return 1;
 			}
 			if (!uuid_equal(, >fstype, NULL)) {
 free(voldata);
-return (1);
+return 1;
 			}
 		}
 		free(voldata);
 	}
 
-	return (0);
+	return 0;
 }
 
 static hammer2_media_data_t*
@@ -140,7 +149,7 @@ read_media(FILE *fp, const hammer2_block
 
 	if (!bytes) {
 		warnx("hammer2: blockref has no data");
-		return (NULL);
+		return NULL;
 	}
 
 	io_off = bref->data_off & ~HAMMER2_OFF_MASK_RADIX;
@@ -153,7 +162,7 @@ read_media(FILE *fp, const hammer2_block
 
 	if (io_bytes > sizeof(hammer2_media_data_t)) {
 		warnx("hammer2: invalid I/O bytes");
-		return (NULL);
+		return NULL;
 	}
 
 	/*
@@ -163,26 +172,26 @@ read_media(FILE *fp, const hammer2_block
 	fbytes = (size_t)get_file_size(fp);
 	if ((ssize_t)fbytes == -1) {
 		warnx("hammer2: failed to get media size");
-		return (NULL);
+		return NULL;
 	}
 	if (io_base >= fbytes) {
 		warnx("hammer2: XXX read beyond HAMMER2 root volume limit unsupported");
-		return (NULL);
+		return NULL;
 	}
 
 	if (fseeko(fp, (off_t)io_base, SEEK_SET) == -1) {
 		warnx("hammer2: failed to seek media");
-		return (NULL);
+		return NULL;
 	}
 	media = read_buf(fp, (off_t)io_base, io_bytes);
 	if (media == NULL) {
 		warnx("hammer2: failed to read media");
-		return (NULL);
+		return NULL;
 	}
 	if (boff)
 		memcpy(media, (char *)media + boff, bytes);
 
-	return (media);
+	return media;
 }
 
 static int
@@ -196,7 +205,7 @@ find_pfs(FILE *fp, const hammer2_blockre
 
 	media = read_media(fp, bref, );
 	if (media == NULL)
-		return (-1);
+		return -1;
 
 	switch (bref->type) {
 	case HAMMER2_BREF_TYPE_INODE:
@@ -221,7 +230,7 @@ find_pfs(FILE *fp, const hammer2_blockre
 }
 			} else {
 free(media);
-return (-1);
+return -1;
 			}
 		}
 		break;
@@ -239,13 +248,13 @@ find_pfs(FILE *fp, const hammer2_blockre
 		if (bscan[i].type != HAMMER2_BREF_TYPE_EMPTY) {
 			if (find_pfs(fp, [i], pfs, res) == -1) {
 free(media);
-return (-1);
+return -1;
 			}
 		}
 	}
 	free(media);
 
-	return (0);
+	return 0;
 }
 
 static 

CVS commit: src/usr.sbin/fstyp

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 14:26:42 UTC 2021

Modified Files:
src/usr.sbin/fstyp: hammer2.c

Log Message:
PR/56530: RVP: use ioctl to get the partition size if possible (avoids SEGV)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/fstyp/hammer2.c

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



CVS commit: src/usr.sbin/fstyp

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 14:26:12 UTC 2021

Modified Files:
src/usr.sbin/fstyp: ntfs.c

Log Message:
PR/56530: RVP: fix iconv open error.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/fstyp/ntfs.c

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

Modified files:

Index: src/usr.sbin/fstyp/ntfs.c
diff -u src/usr.sbin/fstyp/ntfs.c:1.2 src/usr.sbin/fstyp/ntfs.c:1.3
--- src/usr.sbin/fstyp/ntfs.c:1.2	Sat Dec 28 03:22:30 2019
+++ src/usr.sbin/fstyp/ntfs.c	Thu Dec  2 09:26:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntfs.c,v 1.2 2019/12/28 08:22:30 tkusumi Exp $	*/
+/*	$NetBSD: ntfs.c,v 1.3 2021/12/02 14:26:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -35,10 +35,11 @@
  * SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: ntfs.c,v 1.2 2019/12/28 08:22:30 tkusumi Exp $");
+__RCSID("$NetBSD: ntfs.c,v 1.3 2021/12/02 14:26:12 christos Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -108,8 +109,7 @@ convert_label(const void *label /* LE */
 	iconv_t cd;
 	size_t rc;
 
-	/* dstname="" means convert to the current locale. */
-	cd = iconv_open("", NTFS_ENC);
+	cd = iconv_open(nl_langinfo(CODESET), NTFS_ENC);
 	if (cd == (iconv_t)-1) {
 		warn("ntfs: Could not open iconv");
 		return;



CVS commit: src/usr.sbin/fstyp

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 14:26:12 UTC 2021

Modified Files:
src/usr.sbin/fstyp: ntfs.c

Log Message:
PR/56530: RVP: fix iconv open error.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/fstyp/ntfs.c

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



CVS commit: src/sbin/mount

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 13:26:40 UTC 2021

Modified Files:
src/sbin/mount: mount.c

Log Message:
PR/56529: RVP: mount should try ffs when DIOCGWEDGEINFO returns an empty
dkw_ptype.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sbin/mount/mount.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/mount.c
diff -u src/sbin/mount/mount.c:1.105 src/sbin/mount/mount.c:1.106
--- src/sbin/mount/mount.c:1.105	Sun Nov 21 00:09:15 2021
+++ src/sbin/mount/mount.c	Thu Dec  2 08:26:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.c,v 1.105 2021/11/21 05:09:15 simonb Exp $	*/
+/*	$NetBSD: mount.c,v 1.106 2021/12/02 13:26:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)mount.c	8.25 (Berkeley) 5/8/95";
 #else
-__RCSID("$NetBSD: mount.c,v 1.105 2021/11/21 05:09:15 simonb Exp $");
+__RCSID("$NetBSD: mount.c,v 1.106 2021/12/02 13:26:39 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -348,7 +348,7 @@ hasopt(const char *mntopts, const char *
 			found = !negative;
 	}
 	free(optbuf);
-	return (found);
+	return found;
 }
 
 static int
@@ -376,7 +376,7 @@ mountfs(const char *vfstype, const char 
 
 	if (realpath(name, mntpath) == NULL) {
 		warn("realpath `%s'", name);
-		return (1);
+		return 1;
 	}
 
 	name = mntpath;
@@ -399,7 +399,7 @@ mountfs(const char *vfstype, const char 
 	else if (skipmounted) {
 		if ((numfs = getmntinfo(, MNT_WAIT)) == 0) {
 			warn("getmntinfo");
-			return (1);
+			return 1;
 		}
 		for(i = 0; i < numfs; i++) {
 			const char *mountedtype = sfp[i].f_fstypename;
@@ -427,7 +427,7 @@ mountfs(const char *vfstype, const char 
 	(int)sizeof(sfp[i].f_fstypename),
 	sfp[i].f_fstypename,
 	"already mounted");
-return (0);
+return 0;
 			}
 		}
 	}
@@ -482,7 +482,7 @@ mountfs(const char *vfstype, const char 
 		if (optbuf)
 			free(optbuf);
 		free(argv);
-		return (1);
+		return 1;
 
 	case 0:	/* Child. */
 		if (debug)
@@ -543,22 +543,22 @@ mountfs(const char *vfstype, const char 
 
 		if (waitpid(pid, , 0) == -1) {
 			warn("waitpid");
-			return (1);
+			return 1;
 		}
 
 		if (WIFEXITED(status)) {
 			if (WEXITSTATUS(status) != 0)
-return (WEXITSTATUS(status));
+return WEXITSTATUS(status);
 		} else if (WIFSIGNALED(status)) {
 			warnx("%s: %s", name, strsignal(WTERMSIG(status)));
-			return (1);
+			return 1;
 		}
 
 		if (buf == NULL) {
 			if (verbose) {
 if (statvfs(name, ) == -1) {
 	warn("statvfs %s", name);
-	return (1);
+	return 1;
 }
 prmount();
 			}
@@ -566,7 +566,7 @@ mountfs(const char *vfstype, const char 
 		break;
 	}
 
-	return (0);
+	return 0;
 }
 
 static void
@@ -628,13 +628,13 @@ getmntargs(struct statvfs *sfs, char *bu
 
 	if (mountfs(sfs->f_fstypename, sfs->f_mntfromname, sfs->f_mntonname, 0,
 	"getargs", NULL, 0, buf, buflen))
-		return (0);
+		return 0;
 	else {
 		if (*buf == '\0')
-			return (0);
+			return 0;
 		if ((buf = strchr(buf, '\n')) != NULL)
 			*buf = '\0';
-		return (1);
+		return 1;
 	}
 }
 
@@ -648,8 +648,8 @@ getmntpt(const char *name)
 	for (i = 0; i < mntsize; i++)
 		if (strcmp(mntbuf[i].f_mntfromname, name) == 0 ||
 		strcmp(mntbuf[i].f_mntonname, name) == 0)
-			return ([i]);
-	return (NULL);
+			return [i];
+	return NULL;
 }
 
 static void
@@ -736,19 +736,21 @@ getfslab(const char *str)
 
 		/* Silently fail here - mount call can display error */
 		if ((fd = open(buf, O_RDONLY)) == -1)
-			return (NULL);
+			return NULL;
 	}
 
 	/* Check to see if this is a wedge. */
 	if (ioctl(fd, DIOCGWEDGEINFO, ) == 0) {
 		/* Yup, this is easy. */
-		(void) close(fd);
-		return (dkw.dkw_ptype);
+		close(fd);
+		if (dkw.dkw_ptype && *dkw.dkw_ptype)
+			return dkw.dkw_ptype;
+		return NULL;
 	}
 
 	if (ioctl(fd, DIOCGDINFO, ) == -1) {
 		(void) close(fd);
-		return (NULL);
+		return NULL;
 	}
 
 	(void) close(fd);
@@ -756,7 +758,7 @@ getfslab(const char *str)
 	part = str[strlen(str) - 1] - 'a';
 
 	if (part < 0 || part >= dl.d_npartitions)
-		return (NULL);
+		return NULL;
 
 	/* Return NULL for unknown types - caller can fall back to ffs */
 	if ((fstype = dl.d_partitions[part].p_fstype) >= FSMAXMOUNTNAMES)
@@ -764,7 +766,7 @@ getfslab(const char *str)
 	else
 		vfstype = mountnames[fstype];
 
-	return (vfstype);
+	return vfstype;
 }
 
 static void



CVS commit: src/sbin/mount

2021-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  2 13:26:40 UTC 2021

Modified Files:
src/sbin/mount: mount.c

Log Message:
PR/56529: RVP: mount should try ffs when DIOCGWEDGEINFO returns an empty
dkw_ptype.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sbin/mount/mount.c

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



CVS commit: src/share/man/man4

2021-12-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec  2 05:10:05 UTC 2021

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

Log Message:
Add some devices.


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

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



CVS commit: src/share/man/man4

2021-12-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec  2 05:10:05 UTC 2021

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

Log Message:
Add some devices.


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

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

Modified files:

Index: src/share/man/man4/puc.4
diff -u src/share/man/man4/puc.4:1.42 src/share/man/man4/puc.4:1.43
--- src/share/man/man4/puc.4:1.42	Tue Mar 31 07:08:59 2020
+++ src/share/man/man4/puc.4	Thu Dec  2 05:10:04 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: puc.4,v 1.42 2020/03/31 07:08:59 ryo Exp $
+.\" $NetBSD: puc.4,v 1.43 2021/12/02 05:10:04 msaitoh Exp $
 .\"
 .\" Copyright (c) 1998 Christopher G. Demetriou
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" <>
 .\"
-.Dd March 31, 2020
+.Dd December 2, 2021
 .Dt PUC 4
 .Os
 .Sh NAME
@@ -67,6 +67,7 @@ The driver currently supports the follow
 .It Tn "Advantech PCI-1610 (4 port serial)"
 .It Tn "Advantech PCI-1612 (4 port serial)"
 .It Tn "Advantech PCI-1620 (8 port serial)"
+.It Tn "ASIX AX9910 (4 port serial)"
 .It Tn "Avlab Low Profile PCI 4S Quartet (4 port serial)"
 .It Tn "Avlab Low Profile PCI 4 Serial (4 port serial)"
 .It Tn "Avlab PCI 2S (2 port serial)"
@@ -124,7 +125,7 @@ The driver currently supports the follow
 .It Tn "NetMos NM9845 series (up to 6 serial and 1 parallel)"
 .It Tn "NetMos NM9855 series (up to 4 serial and 1 parallel)"
 .It Tn "NetMos NM9865 series (up to 4 serial and 2 parallel)"
-.It Tn "NetMos NM9900 PCIe (4 port serial)"
+.It Tn "NetMos NM9900 PCIe (4 port or 8 port serial)"
 .It Tn "NetMos NM9901 PCIe (1 serial or 1 parallel)"
 .It Tn "NetMos NM9904 PCIe (4 port serial)"
 .It Tn "NetMos NM9912 PCIe (2 serial or 1 parallel)"
@@ -135,6 +136,7 @@ The driver currently supports the follow
 .It Tn "Oxford Semiconductor OXPCIe952 (2 port serial, legacy mode)"
 .It Tn "Oxford Semiconductor OXPCIe954 (4 port serial)"
 .It Tn "Oxford Semiconductor OXmPCI952 (2 port serial)"
+.It Tn "Oxford Semiconductor Exsys EX-41098 (4 port serial)"
 .It Tn "Perle Systems PCI-RAS 4 modem ports"
 .It Tn "Perle Systems PCI-RAS 8 modem ports"
 .It Tn "Perle Systems PCI-RASV92 4 modem ports"



CVS commit: src/sys/compat

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:39:45 UTC 2021

Modified Files:
src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/aarch64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/aarch64/linux_syscall.h \
src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \
src/sys/compat/linux/arch/aarch64/linux_syscalls.c \
src/sys/compat/linux/arch/aarch64/linux_sysent.c \
src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.113 -r1.114 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.19 -r1.20 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.15 -r1.16 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.112 -r1.113 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.90 -r1.91 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/compat/linux32/arch/aarch64/linux32_syscall.h \
src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c \
src/sys/compat/linux32/arch/aarch64/linux32_sysent.c \
src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c
cvs rdiff -u -r1.86 -r1.87 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c

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

Modified files:

Index: src/sys/compat/linux/arch/aarch64/linux_syscall.h
diff -u src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.3 src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.4
--- 

CVS commit: src/sys/compat

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:39:45 UTC 2021

Modified Files:
src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/aarch64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/aarch64/linux_syscall.h \
src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \
src/sys/compat/linux/arch/aarch64/linux_syscalls.c \
src/sys/compat/linux/arch/aarch64/linux_sysent.c \
src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.113 -r1.114 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.19 -r1.20 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.15 -r1.16 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.112 -r1.113 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.90 -r1.91 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/compat/linux32/arch/aarch64/linux32_syscall.h \
src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c \
src/sys/compat/linux32/arch/aarch64/linux32_sysent.c \
src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c
cvs rdiff -u -r1.86 -r1.87 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c

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



CVS commit: src/sys/compat

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:29:49 UTC 2021

Modified Files:
src/sys/compat/linux/arch/aarch64: syscalls.master
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_limit.h linux_misc.c
src/sys/compat/linux32/arch/aarch64: syscalls.master
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/linux32/common: linux32_resource.c

Log Message:
add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/aarch64/syscalls.master
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.128 -r1.129 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.100 -r1.101 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/common/linux_limit.h
cvs rdiff -u -r1.255 -r1.256 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux32/arch/aarch64/syscalls.master
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_resource.c

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

Modified files:

Index: src/sys/compat/linux/arch/aarch64/syscalls.master
diff -u src/sys/compat/linux/arch/aarch64/syscalls.master:1.3 src/sys/compat/linux/arch/aarch64/syscalls.master:1.4
--- src/sys/compat/linux/arch/aarch64/syscalls.master:1.3	Thu Nov 25 02:29:33 2021
+++ src/sys/compat/linux/arch/aarch64/syscalls.master	Thu Dec  2 04:29:47 2021
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.3 2021/11/25 02:29:33 ryo Exp $
+	$NetBSD: syscalls.master,v 1.4 2021/12/02 04:29:47 ryo Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -490,7 +490,8 @@
 259	UNIMPL
 260	STD		{ int|linux_sys||wait4(int pid, int *status, \
 			int options, struct rusage50 *rusage); }
-261	UNIMPL		prlimit64
+261	STD		{ int|linux_sys||prlimit64(pid_t pid, int which, \
+			struct rlimit *new_rlp, struct rlimit *old_rlp); }
 262	UNIMPL		fanotify_init
 263	UNIMPL		fanotify_mark
 264	UNIMPL		name_to_handle_at

Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.101 src/sys/compat/linux/arch/alpha/syscalls.master:1.102
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.101	Mon Sep 20 02:20:02 2021
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Thu Dec  2 04:29:47 2021
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.101 2021/09/20 02:20:02 thorpej Exp $
+	$NetBSD: syscalls.master,v 1.102 2021/12/02 04:29:47 ryo Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -794,7 +794,8 @@
 493	UNIMPL		perf_counter_open
 494	UNIMPL		fanotify_init
 495	UNIMPL		fanotify_mark
-496	UNIMPL		prlimit64
+496	STD		{ int|linux_sys||prlimit64(pid_t pid, int which, \
+			struct rlimit *new_rlp, struct rlimit *old_rlp); }
 497	UNIMPL		name_to_handle_at
 498	UNIMPL		open_by_handle_at
 499	UNIMPL		clock_adjtime

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.66 src/sys/compat/linux/arch/amd64/syscalls.master:1.67
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.66	Mon Sep 20 02:20:02 2021
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Thu Dec  2 04:29:48 2021
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.66 2021/09/20 02:20:02 thorpej Exp $
+	$NetBSD: syscalls.master,v 1.67 2021/12/02 04:29:48 ryo Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -552,7 +552,8 @@
 			unsigned int flags, struct timespec *timeout); }
 300	UNIMPL		fanotify_init
 301	UNIMPL		fanotify_mark
-302	UNIMPL		prlimit64
+302	STD		{ int|linux_sys||prlimit64(pid_t pid, int which, \
+			struct rlimit *new_rlp, struct rlimit *old_rlp); }
 303	UNIMPL		name_to_handle_at
 304	UNIMPL		open_by_handle_at
 305	UNIMPL		clock_adjtime

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.74 src/sys/compat/linux/arch/arm/syscalls.master:1.75
--- src/sys/compat/linux/arch/arm/syscalls.master:1.74	Wed Nov 24 18:52:13 2021
+++ src/sys/compat/linux/arch/arm/syscalls.master	Thu Dec  2 04:29:48 2021
@@ -1,4 +1,4 @@

CVS commit: src/sys/compat

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:29:49 UTC 2021

Modified Files:
src/sys/compat/linux/arch/aarch64: syscalls.master
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_limit.h linux_misc.c
src/sys/compat/linux32/arch/aarch64: syscalls.master
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/linux32/common: linux32_resource.c

Log Message:
add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/aarch64/syscalls.master
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.128 -r1.129 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.100 -r1.101 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/common/linux_limit.h
cvs rdiff -u -r1.255 -r1.256 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux32/arch/aarch64/syscalls.master
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_resource.c

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



CVS commit: src/sys/compat/common

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:26:10 UTC 2021

Modified Files:
src/sys/compat/common: kern_sig_16.c

Log Message:
don't call MODULE_HOOK_SET(), if exec_sigcode_alloc() fails.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/common/kern_sig_16.c

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

Modified files:

Index: src/sys/compat/common/kern_sig_16.c
diff -u src/sys/compat/common/kern_sig_16.c:1.7 src/sys/compat/common/kern_sig_16.c:1.8
--- src/sys/compat/common/kern_sig_16.c:1.7	Fri Nov 26 08:06:11 2021
+++ src/sys/compat/common/kern_sig_16.c	Thu Dec  2 04:26:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig_16.c,v 1.7 2021/11/26 08:06:11 ryo Exp $	*/
+/*	$NetBSD: kern_sig_16.c,v 1.8 2021/12/02 04:26:09 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.7 2021/11/26 08:06:11 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.8 2021/12/02 04:26:09 ryo Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -161,10 +161,12 @@ kern_sig_16_init(void)
 		emul_netbsd.e_sigobject = NULL;
 	}
 	rw_exit(_lock);
+	if (error)
+		return error;
 	MODULE_HOOK_SET(sendsig_sigcontext_16_hook, sendsig_sigcontext);
 #endif
 
-	return error;
+	return 0;
 }
 
 int



CVS commit: src/sys/compat/common

2021-12-01 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec  2 04:26:10 UTC 2021

Modified Files:
src/sys/compat/common: kern_sig_16.c

Log Message:
don't call MODULE_HOOK_SET(), if exec_sigcode_alloc() fails.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/common/kern_sig_16.c

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



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:56:56 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: deptgt-default.exp

Log Message:
tests/make: test target '.DEFAULT'


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-default.exp

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



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:56:56 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: deptgt-default.exp

Log Message:
tests/make: test target '.DEFAULT'


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-default.exp

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

Modified files:

Index: src/usr.bin/make/unit-tests/deptgt-default.exp
diff -u src/usr.bin/make/unit-tests/deptgt-default.exp:1.1 src/usr.bin/make/unit-tests/deptgt-default.exp:1.2
--- src/usr.bin/make/unit-tests/deptgt-default.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/deptgt-default.exp	Wed Dec  1 23:56:56 2021
@@ -1 +1,2 @@
+Default command is making 'not-a-target' from 'not-a-target'.
 exit status 0



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:56:29 UTC 2021

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

Log Message:
tests/make: test target '.DEFAULT'


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-default.mk

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



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:56:29 UTC 2021

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

Log Message:
tests/make: test target '.DEFAULT'


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-default.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/deptgt-default.mk
diff -u src/usr.bin/make/unit-tests/deptgt-default.mk:1.2 src/usr.bin/make/unit-tests/deptgt-default.mk:1.3
--- src/usr.bin/make/unit-tests/deptgt-default.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/deptgt-default.mk	Wed Dec  1 23:56:29 2021
@@ -1,8 +1,17 @@
-# $NetBSD: deptgt-default.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: deptgt-default.mk,v 1.3 2021/12/01 23:56:29 rillig Exp $
 #
-# Tests for the special target .DEFAULT in dependency declarations.
+# Tests for the special target .DEFAULT in dependency declarations, which
+# attaches its associated commands to all targets that don't specify any way
+# to create them.
 
-# TODO: Implementation
+all: test-default not-a-target
+
+test-default: .PHONY
+
+has-commands: .PHONY
+	@echo 'Making ${.TARGET} from ${.IMPSRC}.'
+
+.DEFAULT: dependency-is-ignored
+	@echo "Default command is making '${.TARGET}' from '${.IMPSRC}'."
 
 all:
-	@:;



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:15:38 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: clean up test for .MAKE.SAVE_DOLLARS


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.4 src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.5
--- src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.4	Tue Nov 30 23:58:10 2021
+++ src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk	Wed Dec  1 23:15:38 2021
@@ -1,12 +1,12 @@
-# $NetBSD: varname-dot-make-save_dollars.mk,v 1.4 2021/11/30 23:58:10 rillig Exp $
+# $NetBSD: varname-dot-make-save_dollars.mk,v 1.5 2021/12/01 23:15:38 rillig Exp $
 #
 # Tests for the special .MAKE.SAVE_DOLLARS variable, which controls whether
 # the assignment operator ':=' converts '$$' to a single '$' or keeps it
 # as-is.
 #
 # See also:
-#	var-op-expand.mk
-#	varmisc.mk		for the boolean values
+#	var-op-expand.mk	for ':=' in general
+#	varmisc.mk		for parsing the boolean values
 
 # Initially, the variable .MAKE.SAVE_DOLLARS is undefined. At this point the
 # behavior of the assignment operator ':=' depends.  NetBSD's usr.bin/make
@@ -18,23 +18,25 @@
 
 
 # Even when dollars are preserved, it only applies to literal dollars, not
-# those that come indirectly from other expressions.
-.MAKE.SAVE_DOLLARS=	yes
+# to those that come indirectly from other expressions.
 DOLLARS=		
+.MAKE.SAVE_DOLLARS=	yes
 VAR:=			${DOLLARS}
 # The reduction from 8 '$' to 4 '$' happens when ${VAR} is evaluated in the
-# condition; .MAKE.SAVE_DOLLARS only applies to the operator ':='.
+# condition; .MAKE.SAVE_DOLLARS only applies at the moment where the
+# assignment is performed using ':='.
 .if ${VAR} != "\$\$\$\$"
 .  error
 .endif
 
-# Dollars from the literal value are preserved now.
+# The 'yes' preserves the dollars from the literal.
 .MAKE.SAVE_DOLLARS=	yes
 VAR:=			
 .if ${VAR} != "\$\$\$\$"
 .  error
 .endif
 
+# The 'no' converts each '$$' to '$'.
 .MAKE.SAVE_DOLLARS=	no
 VAR:=			
 .if ${VAR} != "\$\$"
@@ -42,14 +44,14 @@ VAR:=			
 .endif
 
 # It's even possible to change the dollar interpretation in the middle of
-# evaluating an expression, even though there is no practical need for it.
+# evaluating an expression, but there is no practical need for it.
 .MAKE.SAVE_DOLLARS=	no
 VAR:=		-${.MAKE.SAVE_DOLLARS::=yes}-
 .if ${VAR} != "\$--\$\$"
 .  error
 .endif
 
-# The '$' from the ':U' expressions are indirect, therefore SAVE_DOLLARS
+# The '$' from the ':U' expressions are indirect, therefore .MAKE.SAVE_DOLLARS
 # doesn't apply to them.
 .MAKE.SAVE_DOLLARS=	no
 VAR:=		${:U\$\$\$\$}-${.MAKE.SAVE_DOLLARS::=yes}-${:U\$\$\$\$}



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

2021-12-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  1 23:15:38 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk

Log Message:
tests/make: clean up test for .MAKE.SAVE_DOLLARS


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk

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



CVS commit: src/external/bsd/flex/bin

2021-12-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  1 21:44:12 UTC 2021

Modified Files:
src/external/bsd/flex/bin: flex.1

Log Message:
flex(1): fix option name in man page.

>From Anon.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/bin/flex.1

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

Modified files:

Index: src/external/bsd/flex/bin/flex.1
diff -u src/external/bsd/flex/bin/flex.1:1.3 src/external/bsd/flex/bin/flex.1:1.4
--- src/external/bsd/flex/bin/flex.1:1.3	Wed Sep 15 06:52:33 2010
+++ src/external/bsd/flex/bin/flex.1	Wed Dec  1 21:44:12 2021
@@ -1,6 +1,6 @@
-.\" $NetBSD: flex.1,v 1.3 2010/09/15 06:52:33 wiz Exp $
+.\" $NetBSD: flex.1,v 1.4 2021/12/01 21:44:12 wiz Exp $
 .\"
-.TH FLEX 1 "February 2008" "Version 2.5"
+.TH FLEX 1 "December 2021" "Version 2.5"
 .SH NAME
 flex, lex \- fast lexical analyzer generator
 .SH SYNOPSIS
@@ -2679,7 +2679,7 @@ compression.
 is often a good compromise between speed and size for production
 scanners.
 .TP
-.B \-ooutput, \-\-outputfile=FILE
+.B \-ooutput, \-\-outfile=FILE
 directs flex to write the scanner to the file
 .B output
 instead of



  1   2   3   4   5   6   7   8   9   10   >