CVS commit: src/etc/defaults

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 01:27:32 UTC 2023

Modified Files:
src/etc/defaults: rc.conf

Log Message:
/etc/rc.d/certctl_init: Default off.

Otherwise in systems without certctl_init=YES, such as systems
installed with sysinst(8) where it's unnecessary because the rehash
has already happened at install time, you'll get spurious warnings.

PR install/57629

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/etc/defaults/rc.conf

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.165 src/etc/defaults/rc.conf:1.166
--- src/etc/defaults/rc.conf:1.165	Sun Jul  2 12:39:05 2023
+++ src/etc/defaults/rc.conf	Wed Sep 27 01:27:32 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.165 2023/07/02 12:39:05 nia Exp $
+#	$NetBSD: rc.conf,v 1.166 2023/09/27 01:27:32 riastradh Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -144,6 +144,7 @@ sysdb=YES	# build system databases
 rndctl=NO		rndctl_flags=""		# configure rndctl(8)
 gpio=NO		# configure GPIO devices
 modules=YES	# process /etc/modules.conf
+certctl_init=NO	# rehash /etc/openssl/certs
 
 # cope with other OSes using the real time clock at localtime on this
 # machine (by adjusting kern.rtc_offset at boot)



CVS commit: src/etc/defaults

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 01:27:32 UTC 2023

Modified Files:
src/etc/defaults: rc.conf

Log Message:
/etc/rc.d/certctl_init: Default off.

Otherwise in systems without certctl_init=YES, such as systems
installed with sysinst(8) where it's unnecessary because the rehash
has already happened at install time, you'll get spurious warnings.

PR install/57629

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/etc/defaults/rc.conf

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



CVS commit: src/external/mpl/mozilla-certdata/share

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:28:32 UTC 2023

Modified Files:
src/external/mpl/mozilla-certdata/share: Makefile

Log Message:
mozilla-certdata: Run certdata.awk with LC_ALL=C.

This has to be able to printf("%c", ...) to emit arbitrary bytes of
output in order to decode the octal-formatted DER data and print it
as raw binary DER data.

Relevant only at import time, doesn't affect builds.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/mozilla-certdata/share/Makefile

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



CVS commit: src/external/mpl/mozilla-certdata/share

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:28:32 UTC 2023

Modified Files:
src/external/mpl/mozilla-certdata/share: Makefile

Log Message:
mozilla-certdata: Run certdata.awk with LC_ALL=C.

This has to be able to printf("%c", ...) to emit arbitrary bytes of
output in order to decode the octal-formatted DER data and print it
as raw binary DER data.

Relevant only at import time, doesn't affect builds.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/mozilla-certdata/share/Makefile

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

Modified files:

Index: src/external/mpl/mozilla-certdata/share/Makefile
diff -u src/external/mpl/mozilla-certdata/share/Makefile:1.2 src/external/mpl/mozilla-certdata/share/Makefile:1.3
--- src/external/mpl/mozilla-certdata/share/Makefile:1.2	Sat Sep  2 17:39:52 2023
+++ src/external/mpl/mozilla-certdata/share/Makefile	Wed Sep 27 00:28:32 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2023/09/02 17:39:52 riastradh Exp $
+#	$NetBSD: Makefile,v 1.3 2023/09/27 00:28:32 riastradh Exp $
 #
 
 MOZCERTS=	/usr/share/certs/mozilla
@@ -65,6 +65,7 @@ regen: .PHONY
 	rm -f certs/*.pem
 	rm -f ${TRUSTDOMAINS:=.trust}
 	mkdir tmp
+	env LC_ALL=C \
 	awk -f certdata.awk \
 		-v CERTDIR=certs \
 		-v CODETRUST=code.trust \



CVS commit: src/distrib/utils/embedded/files

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:27:07 UTC 2023

Modified Files:
src/distrib/utils/embedded/files: ec2_init

Log Message:
ec2_init: Suppress error message for nonexistent sysctl.

We're querying to see whether the sysctl node is available and if so
what its text is, not interested in the error message.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/files/ec2_init

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

Modified files:

Index: src/distrib/utils/embedded/files/ec2_init
diff -u src/distrib/utils/embedded/files/ec2_init:1.5 src/distrib/utils/embedded/files/ec2_init:1.6
--- src/distrib/utils/embedded/files/ec2_init:1.5	Sat Oct 15 18:32:30 2022
+++ src/distrib/utils/embedded/files/ec2_init	Wed Sep 27 00:27:07 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ec2_init,v 1.5 2022/10/15 18:32:30 jmcneill Exp $
+# $NetBSD: ec2_init,v 1.6 2023/09/27 00:27:07 riastradh Exp $
 #
 # PROVIDE: ec2_init
 # REQUIRE: NETWORKING
@@ -15,7 +15,7 @@ stop_cmd=":"
 
 CLOUD_TYPE=EC2	# default
 
-case "$(/sbin/sysctl -n machdep.dmi.chassis-asset-tag)" in
+case "$(/sbin/sysctl -n machdep.dmi.chassis-asset-tag 2>/dev/null)" in
 OracleCloud*)
 	CLOUD_TYPE=OCI
 	;;



CVS commit: src/distrib/utils/embedded/files

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:27:07 UTC 2023

Modified Files:
src/distrib/utils/embedded/files: ec2_init

Log Message:
ec2_init: Suppress error message for nonexistent sysctl.

We're querying to see whether the sysctl node is available and if so
what its text is, not interested in the error message.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/files/ec2_init

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



CVS commit: src

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:24:13 UTC 2023

Modified Files:
src/distrib/amd64/liveimage/emuimage: rc.conf.emuimage
src/distrib/evbarm/liveimage/armimage: rc.conf.armimage
src/distrib/sets/lists/etc: mi
src/distrib/utils/embedded/conf: evbarm.conf evbmips.conf riscv.conf
usermode.conf x86.conf
src/etc/rc.d: Makefile
Added Files:
src/etc/rc.d: certctl_init

Log Message:
/etc/rc.d/cerctl_init: New script for certctl rehash in live images.

This is very limited -- it does not supplant postinstall to rehash
certificates on upgrade; it only runs certctl rehash if
/etc/openssl/certs is an empty directory, as you get in live images
not created with sysinst.

We could also have a more general-purpose way to run postinstall(8)
on first boot of an image, but that has a lot more moving parts to
think about, so let's start with this limited-scope low-risk
approach.

PR install/57629

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage
cvs rdiff -u -r1.1 -r1.2 \
src/distrib/evbarm/liveimage/armimage/rc.conf.armimage
cvs rdiff -u -r1.272 -r1.273 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.41 -r1.42 src/distrib/utils/embedded/conf/evbarm.conf
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/conf/evbmips.conf
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/conf/riscv.conf
cvs rdiff -u -r1.6 -r1.7 src/distrib/utils/embedded/conf/usermode.conf
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/embedded/conf/x86.conf
cvs rdiff -u -r1.117 -r1.118 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/certctl_init

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

Modified files:

Index: src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage
diff -u src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage:1.2 src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage:1.3
--- src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage:1.2	Wed Jul 13 18:51:03 2022
+++ src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage	Wed Sep 27 00:24:12 2023
@@ -1,4 +1,4 @@
-# $NetBSD: rc.conf.emuimage,v 1.2 2022/07/13 18:51:03 hgutch Exp $
+# $NetBSD: rc.conf.emuimage,v 1.3 2023/09/27 00:24:12 riastradh Exp $
 
 is_ec2() {
 	val=NO
@@ -24,6 +24,7 @@ is_ec2() {
 	printf $val
 }
 
+certctl_init=YES
 resize_disklabel=YES
 resize_root=YES
 resize_root_flags="-p"

Index: src/distrib/evbarm/liveimage/armimage/rc.conf.armimage
diff -u src/distrib/evbarm/liveimage/armimage/rc.conf.armimage:1.1 src/distrib/evbarm/liveimage/armimage/rc.conf.armimage:1.2
--- src/distrib/evbarm/liveimage/armimage/rc.conf.armimage:1.1	Sat Jul 24 14:00:08 2021
+++ src/distrib/evbarm/liveimage/armimage/rc.conf.armimage	Wed Sep 27 00:24:12 2023
@@ -1,4 +1,4 @@
-# $NetBSD: rc.conf.armimage,v 1.1 2021/07/24 14:00:08 jmcneill Exp $
+# $NetBSD: rc.conf.armimage,v 1.2 2023/09/27 00:24:12 riastradh Exp $
 
 is_ec2() {
 	val=NO
@@ -23,6 +23,7 @@ is_ec2() {
 	printf $val
 }
 
+certctl_init=YES
 resize_gpt=YES
 resize_root=YES
 resize_root_flags="-p"

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.272 src/distrib/sets/lists/etc/mi:1.273
--- src/distrib/sets/lists/etc/mi:1.272	Mon Aug 28 23:57:18 2023
+++ src/distrib/sets/lists/etc/mi	Wed Sep 27 00:24:12 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.272 2023/08/28 23:57:18 riastradh Exp $
+# $NetBSD: mi,v 1.273 2023/09/27 00:24:12 riastradh Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -204,6 +204,7 @@
 ./etc/rc.d/bthcidetc-obsolete		obsolete
 ./etc/rc.d/btuartdetc-obsolete		obsolete
 ./etc/rc.d/ccd	etc-sys-rc
+./etc/rc.d/certctl_initetc-sys-rc
 ./etc/rc.d/cgd	etc-sys-rc
 ./etc/rc.d/clearcritlocaletc-sys-rc
 ./etc/rc.d/cleartmpetc-sys-rc

Index: src/distrib/utils/embedded/conf/evbarm.conf
diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.41 src/distrib/utils/embedded/conf/evbarm.conf:1.42
--- src/distrib/utils/embedded/conf/evbarm.conf:1.41	Sun Oct 30 15:08:50 2022
+++ src/distrib/utils/embedded/conf/evbarm.conf	Wed Sep 27 00:24:13 2023
@@ -1,4 +1,4 @@
-# $NetBSD: evbarm.conf,v 1.41 2022/10/30 15:08:50 jmcneill Exp $
+# $NetBSD: evbarm.conf,v 1.42 2023/09/27 00:24:13 riastradh Exp $
 # evbarm shared config
 #
 image=$HOME/${board}.img
@@ -173,6 +173,7 @@ ntpd=YES
 ntpd_flags="-g"
 creds_msdos=YES
 creds_msdos_partition=/boot
+certctl_init=YES
 EOF
 
 	if $resize; then

Index: src/distrib/utils/embedded/conf/evbmips.conf
diff -u src/distrib/utils/embedded/conf/evbmips.conf:1.3 src/distrib/utils/embedded/conf/evbmips.conf:1.4
--- src/distrib/utils/embedded/conf/evbmips.conf:1.3	Tue Jul  6 11:49:36 2021
+++ src/distrib/utils/embedded/conf/evbmips.conf	Wed Sep 27 00:24:13 2023
@@ -1,4 +1,4 @@
-# $NetBSD: evbmips.conf,v 1.3 

CVS commit: src

2023-09-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep 27 00:24:13 UTC 2023

Modified Files:
src/distrib/amd64/liveimage/emuimage: rc.conf.emuimage
src/distrib/evbarm/liveimage/armimage: rc.conf.armimage
src/distrib/sets/lists/etc: mi
src/distrib/utils/embedded/conf: evbarm.conf evbmips.conf riscv.conf
usermode.conf x86.conf
src/etc/rc.d: Makefile
Added Files:
src/etc/rc.d: certctl_init

Log Message:
/etc/rc.d/cerctl_init: New script for certctl rehash in live images.

This is very limited -- it does not supplant postinstall to rehash
certificates on upgrade; it only runs certctl rehash if
/etc/openssl/certs is an empty directory, as you get in live images
not created with sysinst.

We could also have a more general-purpose way to run postinstall(8)
on first boot of an image, but that has a lot more moving parts to
think about, so let's start with this limited-scope low-risk
approach.

PR install/57629

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage
cvs rdiff -u -r1.1 -r1.2 \
src/distrib/evbarm/liveimage/armimage/rc.conf.armimage
cvs rdiff -u -r1.272 -r1.273 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.41 -r1.42 src/distrib/utils/embedded/conf/evbarm.conf
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/conf/evbmips.conf
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/conf/riscv.conf
cvs rdiff -u -r1.6 -r1.7 src/distrib/utils/embedded/conf/usermode.conf
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/embedded/conf/x86.conf
cvs rdiff -u -r1.117 -r1.118 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/certctl_init

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



CVS commit: src/doc

2023-09-26 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Tue Sep 26 21:38:11 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
3RDPARTY: note jemalloc is now at 5.3.0

While here, mention that there is a second, much older version still in
tree, should someone else stumble over both and be confused (e.g., ask
nxr.netbsd.org about jemalloc, forget that it doesn't index anything
under src/external, then read code in the wrong place).


To generate a diff of this commit:
cvs rdiff -u -r1.1954 -r1.1955 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1954 src/doc/3RDPARTY:1.1955
--- src/doc/3RDPARTY:1.1954	Sat Sep 16 18:41:57 2023
+++ src/doc/3RDPARTY	Tue Sep 26 21:38:11 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1954 2023/09/16 18:41:57 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1955 2023/09/26 21:38:11 gutteridge Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -613,16 +613,19 @@ sync with ipsec-tools-0_7-branch)
 
 Package:	jemalloc
 Version:	5.1.0
-Current Vers:	5.2.1
+Current Vers:	5.3.0
 Maintainer:	Jason Evans
 Archive Site:	https://github.com/jemalloc/jemalloc
 Home Page:	https://jemalloc.net
-Date:		2021-03-01
+Date:		2023-09-26
 Mailing List:	
 Responsible:	christos
 License:	BSD
 Location:	external/bsd/jemalloc
 Notes:
+There are two versions of this in-tree, the principal one tracking the
+modern upstream, and a much older one found directly at src/lib/libc/stdlib
+which is still in use and receiving local updates as well.
 
 Package:	KAME IPv6
 Version:	KAME/NetBSD SNAP kit



CVS commit: src/doc

2023-09-26 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Tue Sep 26 21:38:11 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
3RDPARTY: note jemalloc is now at 5.3.0

While here, mention that there is a second, much older version still in
tree, should someone else stumble over both and be confused (e.g., ask
nxr.netbsd.org about jemalloc, forget that it doesn't index anything
under src/external, then read code in the wrong place).


To generate a diff of this commit:
cvs rdiff -u -r1.1954 -r1.1955 src/doc/3RDPARTY

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



CVS commit: src/sbin/gpt

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:55:46 UTC 2023

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

Log Message:
When extracting the attributes (to printable form), avoid simply ignoring
any attribute bits which are unknown, print them as a hex value.  This
avoids "Attributes: " for most windows filesystem types, which all seem
to have but 63 set (which is supposed to mean "don't assign a drive letter"
which is akin to "noauto" in fstab - except it is set even on partitions
which do get mounted, so must mean something subtly different).

These upper 16 attribute bits are supposed to be file system type speficic
(in practice, they seem to be common to all filesystem types from one vendor)
but we don't have the info (yet anyway) to treat them like that.

ChromeOS seems to treat some of the bits as bit fields containing numeric
values - add #if 0'd (but compile tested) code to deal with those (maybe,
compile tested - but not execution tested) should someone ever get an
environment where these things occur, and could add the missing definitions
to actually test this.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sbin/gpt/gpt.c

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



CVS commit: src/sbin/gpt

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:55:46 UTC 2023

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

Log Message:
When extracting the attributes (to printable form), avoid simply ignoring
any attribute bits which are unknown, print them as a hex value.  This
avoids "Attributes: " for most windows filesystem types, which all seem
to have but 63 set (which is supposed to mean "don't assign a drive letter"
which is akin to "noauto" in fstab - except it is set even on partitions
which do get mounted, so must mean something subtly different).

These upper 16 attribute bits are supposed to be file system type speficic
(in practice, they seem to be common to all filesystem types from one vendor)
but we don't have the info (yet anyway) to treat them like that.

ChromeOS seems to treat some of the bits as bit fields containing numeric
values - add #if 0'd (but compile tested) code to deal with those (maybe,
compile tested - but not execution tested) should someone ever get an
environment where these things occur, and could add the missing definitions
to actually test this.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sbin/gpt/gpt.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/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.84 src/sbin/gpt/gpt.c:1.85
--- src/sbin/gpt/gpt.c:1.84	Tue Nov 22 00:25:52 2022
+++ src/sbin/gpt/gpt.c	Tue Sep 26 15:55:46 2023
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.84 2022/11/22 00:25:52 mlelstv Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.85 2023/09/26 15:55:46 kre Exp $");
 #endif
 
 #include 
@@ -1239,13 +1239,62 @@ const char *
 gpt_attr_list(char *buf, size_t len, uint64_t attributes)
 {
 	size_t i;
+	/*
+	 * a uint64_t (attributes) has at most 16 hex digits
+	 * in its representation, add 2 for "0x", and 2 more
+	 * for surrounding [ ], plus one for a trailing \0,
+	 * and we need 21 bytes, round that up to 24
+	 */
+	char xbuf[24];
+
 	strlcpy(buf, "", len);	
 
-	for (i = 0; i < __arraycount(gpt_attr); i++)
+	for (i = 0; i < __arraycount(gpt_attr); i++) {
+		/*
+		 * if the attribute is specified in one of bits
+		 * 48..63, it should depend upon the defining
+		 * partition type for that attribute.   Currently
+		 * we have no idea what that is, so...
+		 *
+		 * Also note that for some partition types, these
+		 * fields are not a single bit boolean, but several
+		 * bits to form a numeric value.  That we could handle.
+		 */
+
 		if (attributes & gpt_attr[i].mask) {
 			strlcat(buf, buf[0] ? ", " : "", len); 
 			strlcat(buf, gpt_attr[i].name, len);
+#if 0
+	/*
+	 * there are none currently defined, so this is untestable
+	 * (it does build however).
+	 */
+			if (gpt_attr[i].mask & (gpt_attr[i].mask - 1)) {
+/* This only happens in bits 46..63 */
+
+/*
+ * xbuf is big enough for "=65535\0"
+ * which is the biggest possible value
+ */
+snprintf(xbuf, sizeof xbuf, "=%ju",
+(uintmax_t) (
+  (attributes & gpt_attr[i].mask) >>
+  (ffs((int)(gpt_attr[i].mask >> 48)) + 47)
+));
+
+strlcat(buf, xbuf, len);
+			}
+#endif
+			attributes &=~ gpt_attr[i].mask;
 		}
+	}
+
+	if (attributes != 0) {
+		snprintf(xbuf, sizeof xbuf, "[%#jx]", (uintmax_t)attributes);
+		strlcat(buf, buf[0] ? ", " : "", len);
+		strlcat(buf, xbuf, len);
+	}
+
 	return buf;
 }
 



CVS commit: src/sbin/gpt

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:48:31 UTC 2023

Modified Files:
src/sbin/gpt: gpt_uuid.c

Log Message:
Recognise Windows Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/gpt/gpt_uuid.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/gpt/gpt_uuid.c
diff -u src/sbin/gpt/gpt_uuid.c:1.19 src/sbin/gpt/gpt_uuid.c:1.20
--- src/sbin/gpt/gpt_uuid.c:1.19	Mon Mar 30 10:41:53 2020
+++ src/sbin/gpt/gpt_uuid.c	Tue Sep 26 15:48:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt_uuid.c,v 1.19 2020/03/30 10:41:53 martin Exp $	*/
+/*	$NetBSD: gpt_uuid.c,v 1.20 2023/09/26 15:48:30 kre Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt_uuid.c,v 1.19 2020/03/30 10:41:53 martin Exp $");
+__RCSID("$NetBSD: gpt_uuid.c,v 1.20 2023/09/26 15:48:30 kre Exp $");
 #endif
 
 #include 
@@ -80,6 +80,7 @@ static const struct {
 	{ GPT_ENT_TYPE_LINUX_LVM, "linux-lvm", "Linux LVM" },
 	{ GPT_ENT_TYPE_MS_BASIC_DATA, "windows", "Windows basic data" },
 	{ GPT_ENT_TYPE_MS_RESERVED, "windows-reserved", "Windows reserved" },
+	{ GPT_ENT_TYPE_MS_RECOVERY, "windows-recovery", "Windows recovery" },
 	{ GPT_ENT_TYPE_NETBSD_CCD, "ccd", "NetBSD ccd component" },
 	{ GPT_ENT_TYPE_NETBSD_CGD, "cgd", "NetBSD Cryptographic Disk" },
 	{ GPT_ENT_TYPE_NETBSD_FFS, "ffs", "NetBSD FFSv1/FFSv2" },



CVS commit: src/sbin/gpt

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:48:31 UTC 2023

Modified Files:
src/sbin/gpt: gpt_uuid.c

Log Message:
Recognise Windows Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/gpt/gpt_uuid.c

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



CVS commit: src/sys/sys

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:47:11 UTC 2023

Modified Files:
src/sys/sys: disklabel_gpt.h

Log Message:
Add the GUID for Microsoft Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/disklabel_gpt.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/sys/disklabel_gpt.h
diff -u src/sys/sys/disklabel_gpt.h:1.15 src/sys/sys/disklabel_gpt.h:1.16
--- src/sys/sys/disklabel_gpt.h:1.15	Sun Aug 28 13:50:50 2022
+++ src/sys/sys/disklabel_gpt.h	Tue Sep 26 15:47:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel_gpt.h,v 1.15 2022/08/28 13:50:50 riastradh Exp $	*/
+/*	$NetBSD: disklabel_gpt.h,v 1.16 2023/09/26 15:47:11 kre Exp $	*/
 
 /*
  * Copyright (c) 2002 Marcel Moolenaar
@@ -147,6 +147,8 @@ struct gpt_ent {
 	{0xe3c9e316,0x0b5c,0x4db8,0x81,0x7d,{0xf9,0x2d,0xf0,0x02,0x15,0xae}}
 #define	GPT_ENT_TYPE_MS_BASIC_DATA	\
 	{0xebd0a0a2,0xb9e5,0x4433,0x87,0xc0,{0x68,0xb6,0xb7,0x26,0x99,0xc7}}
+#define	GPT_ENT_TYPE_MS_RECOVERY	\
+	{0xde94bba4,0x06d1,0x4d40,0xa1,0x6a,{0xbf,0xd5,0x01,0x79,0xd6,0xac}}
 #define	GPT_ENT_TYPE_MS_LDM_METADATA	\
 	{0x5808c8aa,0x7e8f,0x42e0,0x85,0xd2,{0xe1,0xe9,0x04,0x34,0xcf,0xb3}}
 #define	GPT_ENT_TYPE_MS_LDM_DATA	\



CVS commit: src/sys/sys

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:47:11 UTC 2023

Modified Files:
src/sys/sys: disklabel_gpt.h

Log Message:
Add the GUID for Microsoft Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/disklabel_gpt.h

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



CVS commit: src/sys/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 14:33:55 UTC 2023

Modified Files:
src/sys/arch/m68k/include: cacheops_60.h cpuframe.h db_machdep.h
frame.h m68k.h pcb.h
src/sys/arch/m68k/m68k: copy.s db_disasm.c db_trace.c oc_cksum.s
pmap_motorola.c sunos_machdep.c sunos_sigcode.s switch_subr.s
vm_machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/cacheops_60.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cpuframe.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/pcb.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/copy.s
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/sunos_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/sunos_sigcode.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/vm_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/arch/m68k/include/cacheops_60.h
diff -u src/sys/arch/m68k/include/cacheops_60.h:1.13 src/sys/arch/m68k/include/cacheops_60.h:1.14
--- src/sys/arch/m68k/include/cacheops_60.h:1.13	Mon Apr 28 20:23:26 2008
+++ src/sys/arch/m68k/include/cacheops_60.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cacheops_60.h,v 1.13 2008/04/28 20:23:26 martin Exp $	*/
+/*	$NetBSD: cacheops_60.h,v 1.14 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@ TBIAS_60(void)
 			  " movc  %%cacr,%0;"
 			  " orl   %1,%0;"
 			  " movc  %0,%%cacr" /* clear all branch cache
-			 		entries */
+	entries */
 			  : "=d" (tmp) : "i" (IC60_CABC) );
 }
 
@@ -93,7 +93,7 @@ TBIAU_60(void)
 			  " movc  %%cacr,%0;"
 			  " orl   %1,%0;"
 			  " movc  %0,%%cacr" /* clear all branch cache
-			 		entries */
+	entries */
 			  : "=d" (tmp) : "i" (IC60_CUBC) );
 }
 

Index: src/sys/arch/m68k/include/cpuframe.h
diff -u src/sys/arch/m68k/include/cpuframe.h:1.9 src/sys/arch/m68k/include/cpuframe.h:1.10
--- src/sys/arch/m68k/include/cpuframe.h:1.9	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/cpuframe.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuframe.h,v 1.9 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: cpuframe.h,v 1.10 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,8 +64,8 @@ struct frame {
 			u_int	f_fa;
 			u_int	f_fslw;
 			/* for 060FP type 4 FP disabled frames: */
-#define 		f_fea	f_fa
-#define 		f_pcfi	f_fslw
+#define			f_fea	f_fa
+#define			f_pcfi	f_fslw
 		} F_fmt4;
 
 		struct fmt7 {

Index: src/sys/arch/m68k/include/db_machdep.h
diff -u src/sys/arch/m68k/include/db_machdep.h:1.34 src/sys/arch/m68k/include/db_machdep.h:1.35
--- src/sys/arch/m68k/include/db_machdep.h:1.34	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/db_machdep.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.h,v 1.34 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.35 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Mach Operating System
@@ -102,7 +102,7 @@ typedef long kgdb_reg_t;
 
 void	Debugger(void);		/* XXX */
 void	kdb_kintr(db_regs_t *);
-int 	kdb_trap(int, db_regs_t *);
+int	kdb_trap(int, db_regs_t *);
 
 #endif /* _KERNEL */
 

Index: src/sys/arch/m68k/include/frame.h
diff -u src/sys/arch/m68k/include/frame.h:1.32 src/sys/arch/m68k/include/frame.h:1.33
--- src/sys/arch/m68k/include/frame.h:1.32	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/frame.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.32 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: frame.h,v 1.33 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -147,17 +147,17 @@
 #define FSLW_PBE	0x4000
 #define FSLW_SBE	0x2000
 #define FSLW_PTA	0x1000
-#define FSLW_PTB 	0x0800
-#define FSLW_IL 	0x0400
-#define FSLW_PF 	0x0200
-#define FSLW_SP 	0x0100
-#define FSLW_WP 	0x0080
-#define FSLW_TWE 	0x0040
-#define FSLW_RE 	0x0020
-#define FSLW_WE 	0x0010
-#define FSLW_TTR 	0x0008
-#define FSLW_BPE 	0x0004
-#define FSLW_SEE 	0x0001
+#define FSLW_PTB	0x0800
+#define FSLW_IL		0x0400
+#define FSLW_PF		0x0200
+#define FSLW_SP		0x0100
+#define FSLW_WP		0x0080
+#define FSLW_TWE	0x0040
+#define FSLW_RE		0x0020
+#define FSLW_WE		0x0010
+#define 

CVS commit: src/sys/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 14:33:55 UTC 2023

Modified Files:
src/sys/arch/m68k/include: cacheops_60.h cpuframe.h db_machdep.h
frame.h m68k.h pcb.h
src/sys/arch/m68k/m68k: copy.s db_disasm.c db_trace.c oc_cksum.s
pmap_motorola.c sunos_machdep.c sunos_sigcode.s switch_subr.s
vm_machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/cacheops_60.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cpuframe.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/pcb.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/copy.s
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/sunos_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/sunos_sigcode.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/vm_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/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 12:46:30 UTC 2023

Modified Files:
src/sys/arch/m68k/include: asm.h bus_dma.h cacheops_30.h cpuframe.h
db_machdep.h fenv.h frame.h ieeefp.h int_limits.h m68k.h
pmap_motorola.h
src/sys/arch/m68k/m68k: bus_dma.c copypage.s db_disasm.h db_memrw.c
db_trace.c m68k_machdep.c oc_cksum.s pmap_motorola.c switch_subr.s
trap_subr.s w16copy.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/bus_dma.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cacheops_30.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/cpuframe.h \
src/sys/arch/m68k/include/fenv.h src/sys/arch/m68k/include/int_limits.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/ieeefp.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/m68k/include/pmap_motorola.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/m68k/copypage.s
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/db_disasm.h \
src/sys/arch/m68k/m68k/m68k_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/db_memrw.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/trap_subr.s
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/m68k/w16copy.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/m68k/include/asm.h
diff -u src/sys/arch/m68k/include/asm.h:1.34 src/sys/arch/m68k/include/asm.h:1.35
--- src/sys/arch/m68k/include/asm.h:1.34	Fri Apr 17 14:19:43 2020
+++ src/sys/arch/m68k/include/asm.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.34 2020/04/17 14:19:43 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.35 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@
 
 /*
  * The m68k ALTENTRY macro is very different than the traditional
- * implementation used by other NetBSD ports.  Usually ALTENTRY 
+ * implementation used by other NetBSD ports.  Usually ALTENTRY
  * simply provides an alternate function entry point.  The m68k
  * definition takes a second argument and jumps inside the second
  * function when profiling is enabled.

Index: src/sys/arch/m68k/include/bus_dma.h
diff -u src/sys/arch/m68k/include/bus_dma.h:1.13 src/sys/arch/m68k/include/bus_dma.h:1.14
--- src/sys/arch/m68k/include/bus_dma.h:1.13	Sun Dec  5 04:54:20 2021
+++ src/sys/arch/m68k/include/bus_dma.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.h,v 1.13 2021/12/05 04:54:20 msaitoh Exp $ */
+/* $NetBSD: bus_dma.h,v 1.14 2023/09/26 12:46:30 tsutsui Exp $ */
 
 /*
  * This file was extracted from alpha/include/bus.h
@@ -193,7 +193,7 @@ struct m68k_bus_dma_tag {
 #define	bus_dmamem_mmap(t, sg, n, o, p, f)			\
 	(*(t)->_dmamem_mmap)((t), (sg), (n), (o), (p), (f))
 
-#define bus_dmatag_subregion(t, mna, mxa, nt, f) EOPNOTSUPP   
+#define bus_dmatag_subregion(t, mna, mxa, nt, f) EOPNOTSUPP
 #define bus_dmatag_destroy(t)
 
 /*

Index: src/sys/arch/m68k/include/cacheops_30.h
diff -u src/sys/arch/m68k/include/cacheops_30.h:1.9 src/sys/arch/m68k/include/cacheops_30.h:1.10
--- src/sys/arch/m68k/include/cacheops_30.h:1.9	Mon Apr 28 20:23:26 2008
+++ src/sys/arch/m68k/include/cacheops_30.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cacheops_30.h,v 1.9 2008/04/28 20:23:26 martin Exp $	*/
+/*	$NetBSD: cacheops_30.h,v 1.10 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@ TBIA_30(void)
 	__asm volatile (" pflusha;"
 			  " movc %0,%%cacr" : : "d" (tmp));
 }
-	
+
 /*
  * Invalidate any TLB entry for given VA (TB Invalidate Single)
  */

Index: src/sys/arch/m68k/include/cpuframe.h
diff -u src/sys/arch/m68k/include/cpuframe.h:1.8 src/sys/arch/m68k/include/cpuframe.h:1.9
--- src/sys/arch/m68k/include/cpuframe.h:1.8	Sun Dec  5 02:53:51 2021
+++ src/sys/arch/m68k/include/cpuframe.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuframe.h,v 1.8 2021/12/05 02:53:51 msaitoh Exp $	*/
+/*	$NetBSD: cpuframe.h,v 1.9 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,7 +64,7 @@ struct frame {
 			u_int	f_fa;
 			u_int	f_fslw;
 			/* for 060FP type 4 FP disabled frames: */
-#define 		f_fea	f_fa	
+#define 		f_fea	f_fa
 #define 		f_pcfi	f_fslw
 		} F_fmt4;
 
@@ -187,8 +187,8 @@ 

CVS commit: src/sys/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 12:46:30 UTC 2023

Modified Files:
src/sys/arch/m68k/include: asm.h bus_dma.h cacheops_30.h cpuframe.h
db_machdep.h fenv.h frame.h ieeefp.h int_limits.h m68k.h
pmap_motorola.h
src/sys/arch/m68k/m68k: bus_dma.c copypage.s db_disasm.h db_memrw.c
db_trace.c m68k_machdep.c oc_cksum.s pmap_motorola.c switch_subr.s
trap_subr.s w16copy.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/bus_dma.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cacheops_30.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/cpuframe.h \
src/sys/arch/m68k/include/fenv.h src/sys/arch/m68k/include/int_limits.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/ieeefp.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/m68k/include/pmap_motorola.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/m68k/copypage.s
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/db_disasm.h \
src/sys/arch/m68k/m68k/m68k_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/db_memrw.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/trap_subr.s
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/m68k/w16copy.s

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



CVS commit: src/tests/sbin/fsck_ffs

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 12:15:45 UTC 2023

Modified Files:
src/tests/sbin/fsck_ffs: quotas_common.sh t_check_quotas.sh
t_enable_quotas.sh t_extattr.sh

Log Message:
Perform quoting of variable expansions, etc correctly.   That includes
(some) removing of quotes from where they're useless (superstition).

This should be NFC for these tests, as the data being quoted doesn't
happen to require it, but depending upon the data not altering, or the
code not being copied to a different environment is unwise, when it is
so easy to simply do it correctly.

A few line wrapping and white space changes as well.

Nothing changed here is intended to alter the way that the tests run,
or results generated.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/fsck_ffs/quotas_common.sh \
src/tests/sbin/fsck_ffs/t_check_quotas.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/fsck_ffs/t_enable_quotas.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/fsck_ffs/t_extattr.sh

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

Modified files:

Index: src/tests/sbin/fsck_ffs/quotas_common.sh
diff -u src/tests/sbin/fsck_ffs/quotas_common.sh:1.2 src/tests/sbin/fsck_ffs/quotas_common.sh:1.3
--- src/tests/sbin/fsck_ffs/quotas_common.sh:1.2	Sun Mar  6 17:08:41 2011
+++ src/tests/sbin/fsck_ffs/quotas_common.sh	Tue Sep 26 12:15:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $ 
+# $NetBSD: quotas_common.sh,v 1.3 2023/09/26 12:15:44 kre Exp $ 
 
 create_with_quotas()
 {
@@ -7,13 +7,13 @@ create_with_quotas()
 	local uid=$(id -u)
 	local gid=$(id -g)
 
-	atf_check -o ignore -e ignore newfs -B ${endian} -O ${vers} \
-		-s 4000 -F ${IMG}
-	atf_check -o ignore -e ignore tunefs -q user -q group -F ${IMG}
+	atf_check -o ignore -e ignore newfs -B "${endian}" -O "${vers}" \
+		-s 4000 -F "${IMG}"
+	atf_check -o ignore -e ignore tunefs -q user -q group -F "${IMG}"
 	atf_check -s exit:0 -o 'match:NO USER QUOTA INODE \(CREATED\)' \
-	-o 'match:USER QUOTA MISMATCH FOR ID '${uid}': 0/0 SHOULD BE 1/1' \
-	-o 'match:GROUP QUOTA MISMATCH FOR ID '${gid}': 0/0 SHOULD BE 1/1' \
-	fsck_ffs -p -F ${IMG}
+	-o "match:USER QUOTA MISMATCH FOR ID ${uid}: 0/0 SHOULD BE 1/1" \
+	-o "match:GROUP QUOTA MISMATCH FOR ID ${gid}: 0/0 SHOULD BE 1/1" \
+	fsck_ffs -p -F "${IMG}"
 }
 
 # from tests/ipf/h_common.sh via tests/sbin/resize_ffs
@@ -25,20 +25,23 @@ test_case()
 	
 	atf_test_case "${name}"
 
-	eval "${name}_head() { \
-		atf_set "descr" "Checks ${descr} quotas inodes"
+	eval "${name}_head() {
+		atf_set descr 'Checks ${descr} quotas inodes'
 	}"
-	eval "${name}_body() { \
-		${check_function} " "${@}" "; \
+	eval "${name}_body() {
+		${check_function} $*
 	}"
-	tests="${tests} ${name}"
+	tests="${tests} '${name}'"
 }
 
 atf_init_test_cases()
 {
 	IMG=fsimage
 	DIR=target
-	for i in ${tests}; do
-		atf_add_test_case $i
+
+	eval "set -- ${tests}"
+	for i
+	do
+		atf_add_test_case "$i"
 	done
 }
Index: src/tests/sbin/fsck_ffs/t_check_quotas.sh
diff -u src/tests/sbin/fsck_ffs/t_check_quotas.sh:1.2 src/tests/sbin/fsck_ffs/t_check_quotas.sh:1.3
--- src/tests/sbin/fsck_ffs/t_check_quotas.sh:1.2	Sun Mar  6 17:08:41 2011
+++ src/tests/sbin/fsck_ffs/t_check_quotas.sh	Tue Sep 26 12:15:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: t_check_quotas.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $ 
+# $NetBSD: t_check_quotas.sh,v 1.3 2023/09/26 12:15:44 kre Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -27,27 +27,29 @@
 
 for e in le be; do
   for v in 1 2; do
-test_case corrupt_list_${e}_${v} corrupt_list \
-	"recovery of corrupted free list in" ${e} ${v}
-test_case expand1_list_${e}_${v} expand_list \
-	"allocation of direct block in" 40 ${e} ${v}
-test_case expand2_list_${e}_${v} expand_list \
-	"allocation of indirect block in" 1000 ${e} ${v}
+test_case "corrupt_list_${e}_${v}" corrupt_list \
+	"recovery of corrupted free list in" "${e}" "${v}"
+test_case "expand1_list_${e}_${v}" expand_list \
+	"allocation of direct block in" 40 "${e}" "${v}"
+test_case "expand2_list_${e}_${v}" expand_list \
+	"allocation of indirect block in" 1000 "${e}" "${v}"
   done
 done
 
 corrupt_list()
 {
-	create_with_quotas $*
-	local blkno=$(printf "inode 3\nblks\n" | /sbin/fsdb -nF -f ${IMG} | awk '$1 == "0:" {print $2}')
+	create_with_quotas "$@"
+	local blkno=$(printf "inode 3\nblks\n" |
+		/sbin/fsdb -nF -f "${IMG}" |
+		awk '$1 == "0:" {print $2}')
 	blkno=$(($blkno * 512 + 104))
 	#clear the free list
-	atf_check -o ignore -e ignore dd if=/dev/zero of=${IMG} bs=1 \
-		count=8 seek=${blkno} conv=notrunc
+	atf_check -o ignore -e ignore dd if=/dev/zero "of=${IMG}" bs=1 \
+		count=8 "seek=${blkno}" conv=notrunc
 	atf_check -s exit:0 \
 		-o "match:QUOTA ENTRY NOT IN LIST \(FIXED\)" \
-		fsck_ffs -fp -F ${IMG}
-	atf_check -s exit:0 -o "match:3 files" fsck_ffs -nf 

CVS commit: src/tests/sbin/fsck_ffs

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 12:15:45 UTC 2023

Modified Files:
src/tests/sbin/fsck_ffs: quotas_common.sh t_check_quotas.sh
t_enable_quotas.sh t_extattr.sh

Log Message:
Perform quoting of variable expansions, etc correctly.   That includes
(some) removing of quotes from where they're useless (superstition).

This should be NFC for these tests, as the data being quoted doesn't
happen to require it, but depending upon the data not altering, or the
code not being copied to a different environment is unwise, when it is
so easy to simply do it correctly.

A few line wrapping and white space changes as well.

Nothing changed here is intended to alter the way that the tests run,
or results generated.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/fsck_ffs/quotas_common.sh \
src/tests/sbin/fsck_ffs/t_check_quotas.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/fsck_ffs/t_enable_quotas.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/fsck_ffs/t_extattr.sh

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