CVS commit: src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May  5 02:53:02 UTC 2024

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/tests/lib/libm: Makefile
Added Files:
src/tests/lib/libm: t_next.c

Log Message:
tests/lib/libm: Test nextafter/nexttoward and variants.

The tests are fairly trivial but should work without any conditionals
about floating-point formats.


To generate a diff of this commit:
cvs rdiff -u -r1.434 -r1.435 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1314 -r1.1315 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_next.c

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.434 src/distrib/sets/lists/debug/mi:1.435
--- src/distrib/sets/lists/debug/mi:1.434	Sun Apr 28 18:55:04 2024
+++ src/distrib/sets/lists/debug/mi	Sun May  5 02:53:01 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.434 2024/04/28 18:55:04 rillig Exp $
+# $NetBSD: mi,v 1.435 2024/05/05 02:53:01 riastradh Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -2320,6 +2320,7 @@
 ./usr/libdata/debug/usr/tests/lib/libm/t_libm.debug			tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libm/t_log.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libm/t_modf.debug			tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libm/t_next.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libm/t_pow.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libm/t_precision.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libm/t_round.debug			tests-lib-debug		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1314 src/distrib/sets/lists/tests/mi:1.1315
--- src/distrib/sets/lists/tests/mi:1.1314	Sun Apr 28 14:39:22 2024
+++ src/distrib/sets/lists/tests/mi	Sun May  5 02:53:01 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1314 2024/04/28 14:39:22 rillig Exp $
+# $NetBSD: mi,v 1.1315 2024/05/05 02:53:01 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3946,6 +3946,7 @@
 ./usr/tests/lib/libm/t_libmtests-obsolete		obsolete
 ./usr/tests/lib/libm/t_logtests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libm/t_modftests-lib-tests		compattestfile,atf
+./usr/tests/lib/libm/t_nexttests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libm/t_powtests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libm/t_precision			tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libm/t_roundtests-lib-tests		compattestfile,atf

Index: src/tests/lib/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.48 src/tests/lib/libm/Makefile:1.49
--- src/tests/lib/libm/Makefile:1.48	Sat Aug 27 08:31:58 2022
+++ src/tests/lib/libm/Makefile	Sun May  5 02:53:02 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2022/08/27 08:31:58 christos Exp $
+# $NetBSD: Makefile,v 1.49 2024/05/05 02:53:02 riastradh Exp $
 
 .include 
 
@@ -35,6 +35,7 @@ TESTS_C+=	t_infinity
 TESTS_C+=	t_ldexp
 TESTS_C+=	t_log
 TESTS_C+=	t_modf
+TESTS_C+=	t_next
 TESTS_C+=	t_pow
 TESTS_C+=	t_precision
 TESTS_C+=	t_round

Added files:

Index: src/tests/lib/libm/t_next.c
diff -u /dev/null src/tests/lib/libm/t_next.c:1.1
--- /dev/null	Sun May  5 02:53:02 2024
+++ src/tests/lib/libm/t_next.c	Sun May  5 02:53:02 2024
@@ -0,0 +1,159 @@
+/*	$NetBSD: t_next.c,v 1.1 2024/05/05 02:53:02 riastradh Exp $	*/
+
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF 

CVS commit: src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May  5 02:53:02 UTC 2024

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/tests/lib/libm: Makefile
Added Files:
src/tests/lib/libm: t_next.c

Log Message:
tests/lib/libm: Test nextafter/nexttoward and variants.

The tests are fairly trivial but should work without any conditionals
about floating-point formats.


To generate a diff of this commit:
cvs rdiff -u -r1.434 -r1.435 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1314 -r1.1315 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_next.c

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



CVS commit: src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May  5 02:50:11 UTC 2024

Modified Files:
src: UPDATING
src/lib/libm: Makefile
Added Files:
src/lib/libm/arch/i387: s_rintl.S

Log Message:
libm: New s_rintl.S for x86.

Prompted by PR lib/58054.


To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/UPDATING
cvs rdiff -u -r1.227 -r1.228 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/i387/s_rintl.S

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



CVS commit: src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May  5 02:50:11 UTC 2024

Modified Files:
src: UPDATING
src/lib/libm: Makefile
Added Files:
src/lib/libm/arch/i387: s_rintl.S

Log Message:
libm: New s_rintl.S for x86.

Prompted by PR lib/58054.


To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/UPDATING
cvs rdiff -u -r1.227 -r1.228 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/i387/s_rintl.S

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.349 src/UPDATING:1.350
--- src/UPDATING:1.349	Tue Apr 23 03:25:39 2024
+++ src/UPDATING	Sun May  5 02:50:11 2024
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.349 2024/04/23 03:25:39 maya Exp $
+$NetBSD: UPDATING,v 1.350 2024/05/05 02:50:11 riastradh Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20240504:
+	Update builds on x86 require making the `cleandir' target in
+	lib/libm, or deleting the objdir for lib/libm.
+
 20240423:
 	Update builds with x11 may fail after switching to Mesa 21.
 

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.227 src/lib/libm/Makefile:1.228
--- src/lib/libm/Makefile:1.227	Tue Mar 26 20:12:47 2024
+++ src/lib/libm/Makefile	Sun May  5 02:50:11 2024
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.227 2024/03/26 20:12:47 rillig Exp $
+#  $NetBSD: Makefile,v 1.228 2024/05/05 02:50:11 riastradh Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -131,8 +131,10 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S 
 	s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
 	s_finite.S s_finitef.S s_floor.S s_floorf.S \
 	s_log1p.S s_log1pf.S s_logb.S s_logbf.S s_logbl.S \
-	s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
-	s_significandf.S lrint.S
+	s_rint.S s_rintf.S s_rintl.S \
+	s_scalbn.S s_scalbnf.S \
+	s_significand.S s_significandf.S \
+	lrint.S
 # do not pick up the i387 asm version for the following functions;
 # it is incorrect
 .for f in cos cosf modf ilogb ilogbl ilogbf sin sinf tan tanf

Added files:

Index: src/lib/libm/arch/i387/s_rintl.S
diff -u /dev/null src/lib/libm/arch/i387/s_rintl.S:1.1
--- /dev/null	Sun May  5 02:50:11 2024
+++ src/lib/libm/arch/i387/s_rintl.S	Sun May  5 02:50:11 2024
@@ -0,0 +1,39 @@
+/*	$NetBSD: s_rintl.S,v 1.1 2024/05/05 02:50:11 riastradh Exp $	*/
+
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+#include "abi.h"
+
+RCSID("$NetBSD: s_rintl.S,v 1.1 2024/05/05 02:50:11 riastradh Exp $")
+
+ENTRY(rintl)
+	fldt	ARG_LONG_DOUBLE_ONE
+	frndint
+	ret
+END(rintl)



CVS commit: src/tests/usr.bin/mtree

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  4 20:24:37 UTC 2024

Modified Files:
src/tests/usr.bin/mtree: t_sets.sh

Log Message:
tests/usr.bin/mtree: Fail gracefully with unknown sets.

Rather than `bogus test program', make a test fail.

PR misc/57877


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/mtree/t_sets.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/usr.bin/mtree/t_sets.sh
diff -u src/tests/usr.bin/mtree/t_sets.sh:1.5 src/tests/usr.bin/mtree/t_sets.sh:1.6
--- src/tests/usr.bin/mtree/t_sets.sh:1.5	Sun Apr 28 07:27:42 2024
+++ src/tests/usr.bin/mtree/t_sets.sh	Sat May  4 20:24:37 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sets.sh,v 1.5 2024/04/28 07:27:42 rillig Exp $
+#	$NetBSD: t_sets.sh,v 1.6 2024/05/04 20:24:37 riastradh Exp $
 #
 # Copyright (c) 2024 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -40,6 +40,7 @@ set_case()
 
 	eval "set_${set}_head() { atf_set descr \"/etc/mtree/set.${set}\"; }"
 	eval "set_${set}_body() { check_mtree ${set}; }"
+	eval "set_${set}_defined="
 }
 
 set_case base
@@ -62,8 +63,22 @@ set_case xdebug
 set_case xfont
 set_case xserver
 
+sets_unknown=
+
+sets_unknown_head()
+{
+	atf_set descr "Verify this tests lists all sets"
+}
+sets_unknown_body()
+{
+	test -z "$sets_unknown" || atf_tc_fail "Unknown sets: ${sets_unknown}"
+}
+
 atf_init_test_cases()
 {
+	local mtree set defined
+
+	atf_add_test_case sets_unknown
 
 	# base is always installed -- hard-code this in case we make a
 	# mistake with the automatic set detection.
@@ -92,6 +107,15 @@ atf_init_test_cases()
 			;;
 		*)	;;
 		esac
-		atf_add_test_case set_"${set}"
+
+		# If we have a test for this set, add it.  Otherwise,
+		# add it to the unknown list to make the test suite
+		# fail.
+		eval 'defined=${set_'"$set"'_defined+yes}'
+		if [ -n "$defined" ]; then
+			atf_add_test_case set_"${set}"
+		else
+			sets_unknown="${sets_unknown}${sets_unknown:+ }${set}"
+		fi
 	done
 }



CVS commit: src/tests/usr.bin/mtree

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  4 20:24:37 UTC 2024

Modified Files:
src/tests/usr.bin/mtree: t_sets.sh

Log Message:
tests/usr.bin/mtree: Fail gracefully with unknown sets.

Rather than `bogus test program', make a test fail.

PR misc/57877


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/mtree/t_sets.sh

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



CVS commit: src/lib/libm/src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  4 19:21:51 UTC 2024

Modified Files:
src/lib/libm/src: s_rintl.c

Log Message:
s_rintl.c: Reduce FreeBSD diff and fix on ld128 platforms.

EXT_FRACBITS, the number of bits in the _binary encoding_ that stores
the trailing significand field, is never 113.  In IEEE 754 binary128,
it is 112, even though there are 113 bits of precision in the set of
floating-point numbers -- the leading 1 bit is implicit in binary128.
So ld128 platforms like aarch64 and sparc64 were skipping the real
definition and just defining rintl as an alias for rint, which is
wrong.

In contrast, LDBL_MANT_DIG, the number of bits of precision in the set
of floating-point numbers (p, in IEEE 754 parlance), is 113 in IEEE 754
binary128.  This is also the constant used in FreeBSD libm anyway.  So
let's just use that instead of trying to translate it to our private
EXT_FRACBITS (not defined in FreeBSD) with a fencepos terror.  And
delete the buggy rintl=rint alias.

PR lib/58054


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/s_rintl.c

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

Modified files:

Index: src/lib/libm/src/s_rintl.c
diff -u src/lib/libm/src/s_rintl.c:1.6 src/lib/libm/src/s_rintl.c:1.7
--- src/lib/libm/src/s_rintl.c:1.6	Tue Apr  2 18:39:51 2024
+++ src/lib/libm/src/s_rintl.c	Sat May  4 19:21:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_rintl.c,v 1.6 2024/04/02 18:39:51 christos Exp $	*/
+/*	$NetBSD: s_rintl.c,v 1.7 2024/05/04 19:21:51 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Schultz 
@@ -30,7 +30,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/msun/src/s_rintl.c,v 1.5 2008/02/22 11:59:05 bde Exp $");
 #else
-__RCSID("$NetBSD: s_rintl.c,v 1.6 2024/04/02 18:39:51 christos Exp $");
+__RCSID("$NetBSD: s_rintl.c,v 1.7 2024/05/04 19:21:51 riastradh Exp $");
 #endif
 
 #include 
@@ -39,20 +39,17 @@ __RCSID("$NetBSD: s_rintl.c,v 1.6 2024/0
 #include "math.h"
 #include "math_private.h"
 
-#ifdef __HAVE_LONG_DOUBLE
+#define	BIAS	(LDBL_MAX_EXP - 1)
 
-# if EXT_FRACBITS == 64 || EXT_FRACBITS == 113 && LDBL_MAX_EXP == 0x4000
-
-#  define BIAS (LDBL_MAX_EXP - 1)
 static const float
 shift[2] = {
-#  if EXT_FRACBITS == 64
+#if LDBL_MANT_DIG == 64
 	0x1.0p63, -0x1.0p63
-#  elif EXT_FRACBITS == 113
+#elif LDBL_MANT_DIG == 113
 	0x1.0p112, -0x1.0p112
-#  else
-#   error "Unsupported long double format"
-#  endif
+#else
+#error "Unsupported long double format"
+#endif
 };
 static const float zero[2] = { 0.0, -0.0 };
 
@@ -64,12 +61,11 @@ rintl(long double x)
 	int ex, sign;
 
 	u.extu_ld = x;
-	u.extu_ext.ext_frach &= ~0x8000;
 	expsign = GET_EXPSIGN();
 	ex = expsign & 0x7fff;
 
-	if (ex >= BIAS + EXT_FRACBITS - 1) {
-		if (ex == BIAS + EXT_FRACBITS)
+	if (ex >= BIAS + LDBL_MANT_DIG - 1) {
+		if (ex == BIAS + LDBL_MAX_EXP)
 			return (x + x);	/* Inf, NaN, or unsupported format */
 		return (x);		/* finite and already an integer */
 	}
@@ -94,13 +90,3 @@ rintl(long double x)
 
 	return (x);
 }
-# else
-
-long double
-rintl(long double x)
-{
-	return rint(x);
-}
-
-# endif
-#endif /* __HAVE_LONG_DOUBLE */



CVS commit: src/lib/libm/src

2024-05-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  4 19:21:51 UTC 2024

Modified Files:
src/lib/libm/src: s_rintl.c

Log Message:
s_rintl.c: Reduce FreeBSD diff and fix on ld128 platforms.

EXT_FRACBITS, the number of bits in the _binary encoding_ that stores
the trailing significand field, is never 113.  In IEEE 754 binary128,
it is 112, even though there are 113 bits of precision in the set of
floating-point numbers -- the leading 1 bit is implicit in binary128.
So ld128 platforms like aarch64 and sparc64 were skipping the real
definition and just defining rintl as an alias for rint, which is
wrong.

In contrast, LDBL_MANT_DIG, the number of bits of precision in the set
of floating-point numbers (p, in IEEE 754 parlance), is 113 in IEEE 754
binary128.  This is also the constant used in FreeBSD libm anyway.  So
let's just use that instead of trying to translate it to our private
EXT_FRACBITS (not defined in FreeBSD) with a fencepos terror.  And
delete the buggy rintl=rint alias.

PR lib/58054


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/s_rintl.c

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



CVS commit: src/distrib/sets/lists/man

2024-05-04 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May  4 19:16:23 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
add the catman pages to the set for mkcsmapper and mkesdb


To generate a diff of this commit:
cvs rdiff -u -r1.1774 -r1.1775 src/distrib/sets/lists/man/mi

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



CVS commit: src/distrib/sets/lists/man

2024-05-04 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May  4 19:16:23 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
add the catman pages to the set for mkcsmapper and mkesdb


To generate a diff of this commit:
cvs rdiff -u -r1.1774 -r1.1775 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1774 src/distrib/sets/lists/man/mi:1.1775
--- src/distrib/sets/lists/man/mi:1.1774	Sat May  4 19:10:04 2024
+++ src/distrib/sets/lists/man/mi	Sat May  4 19:16:22 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1774 2024/05/04 19:10:04 reed Exp $
+# $NetBSD: mi,v 1.1775 2024/05/04 19:16:22 reed Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -337,8 +337,10 @@
 ./usr/share/man/cat1/midiplay.0			man-audio-catman	.cat
 ./usr/share/man/cat1/midirecord.0		man-audio-catman	.cat
 ./usr/share/man/cat1/mixerctl.0			man-audio-catman	.cat
+./usr/share/man/cat1/mkcsmapper.0		man-util-catman		.cat
 ./usr/share/man/cat1/mkdep.0			man-c-catman		.cat
 ./usr/share/man/cat1/mkdir.0			man-util-catman		.cat
+./usr/share/man/cat1/mkesdb.0			man-util-catman		.cat
 ./usr/share/man/cat1/mkfifo.0			man-sysutil-catman	.cat
 ./usr/share/man/cat1/mkfilters.0		man-ipf-catman		ipfilter,.cat
 ./usr/share/man/cat1/mklocale.0			man-util-catman		.cat



CVS commit: src

2024-05-04 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May  4 19:10:05 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/manhtml: mi
src/usr.bin/mkcsmapper: Makefile
src/usr.bin/mkesdb: Makefile

Log Message:
Install the mkcsmapper.1 and mkesdb.1 manpages.


To generate a diff of this commit:
cvs rdiff -u -r1.1773 -r1.1774 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/mkcsmapper/Makefile
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/mkesdb/Makefile

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1773 src/distrib/sets/lists/man/mi:1.1774
--- src/distrib/sets/lists/man/mi:1.1773	Tue Apr 30 19:35:28 2024
+++ src/distrib/sets/lists/man/mi	Sat May  4 19:10:04 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1773 2024/04/30 19:35:28 andvar Exp $
+# $NetBSD: mi,v 1.1774 2024/05/04 19:10:04 reed Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3833,8 +3833,10 @@
 ./usr/share/man/man1/midiplay.1			man-audio-man		.man
 ./usr/share/man/man1/midirecord.1		man-audio-man		.man
 ./usr/share/man/man1/mixerctl.1			man-audio-man		.man
+./usr/share/man/man1/mkcsmapper.1		man-util-man		.man
 ./usr/share/man/man1/mkdep.1			man-c-man		.man
 ./usr/share/man/man1/mkdir.1			man-util-man		.man
+./usr/share/man/man1/mkesdb.1			man-util-man		.man
 ./usr/share/man/man1/mkfifo.1			man-sysutil-man		.man
 ./usr/share/man/man1/mkfilters.1		man-ipf-man		ipfilter,.man
 ./usr/share/man/man1/mklocale.1			man-util-man		.man

Index: src/distrib/sets/lists/manhtml/mi
diff -u src/distrib/sets/lists/manhtml/mi:1.2 src/distrib/sets/lists/manhtml/mi:1.3
--- src/distrib/sets/lists/manhtml/mi:1.2	Tue Apr 30 19:35:28 2024
+++ src/distrib/sets/lists/manhtml/mi	Sat May  4 19:10:04 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2 2024/04/30 19:35:28 andvar Exp $
+# $NetBSD: mi,v 1.3 2024/05/04 19:10:04 reed Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -286,8 +286,10 @@
 ./usr/share/man/html1/midiplay.html		man-audio-htmlman	html
 ./usr/share/man/html1/midirecord.html		man-audio-htmlman	html
 ./usr/share/man/html1/mixerctl.html		man-audio-htmlman	html
+./usr/share/man/html1/mkcsmapper.html		man-util-htmlman	html
 ./usr/share/man/html1/mkdep.html		man-c-htmlman		html
 ./usr/share/man/html1/mkdir.html		man-util-htmlman	html
+./usr/share/man/html1/mkesdb.html		man-util-htmlman	html
 ./usr/share/man/html1/mkfifo.html		man-sysutil-htmlman	html
 ./usr/share/man/html1/mkfilters.html		man-ipf-htmlman		ipfilter,html
 ./usr/share/man/html1/mklocale.html		man-util-htmlman	html

Index: src/usr.bin/mkcsmapper/Makefile
diff -u src/usr.bin/mkcsmapper/Makefile:1.7 src/usr.bin/mkcsmapper/Makefile:1.8
--- src/usr.bin/mkcsmapper/Makefile:1.7	Thu Oct 29 14:37:16 2009
+++ src/usr.bin/mkcsmapper/Makefile	Sat May  4 19:10:05 2024
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/10/29 14:37:16 christos Exp $
-
-NOMAN=# defined (must come before bsd.own.mk)
+#	$NetBSD: Makefile,v 1.8 2024/05/04 19:10:05 reed Exp $
 
 .ifndef HOSTPROG
 .include 

Index: src/usr.bin/mkesdb/Makefile
diff -u src/usr.bin/mkesdb/Makefile:1.7 src/usr.bin/mkesdb/Makefile:1.8
--- src/usr.bin/mkesdb/Makefile:1.7	Wed Oct 28 22:22:44 2009
+++ src/usr.bin/mkesdb/Makefile	Sat May  4 19:10:04 2024
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/10/28 22:22:44 christos Exp $
-
-NOMAN=# defined (must come before bsd.own.mk)
+#	$NetBSD: Makefile,v 1.8 2024/05/04 19:10:04 reed Exp $
 
 .ifndef HOSTPROG
 .include 



CVS commit: src

2024-05-04 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May  4 19:10:05 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/manhtml: mi
src/usr.bin/mkcsmapper: Makefile
src/usr.bin/mkesdb: Makefile

Log Message:
Install the mkcsmapper.1 and mkesdb.1 manpages.


To generate a diff of this commit:
cvs rdiff -u -r1.1773 -r1.1774 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/mkcsmapper/Makefile
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/mkesdb/Makefile

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



CVS commit: [netbsd-8] src

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 18:57:00 UTC 2024

Modified Files:
src/doc [netbsd-8]: LAST_MINUTE
src/external/gpl2/groff/tmac [netbsd-8]: mdoc.local
src/sys/sys [netbsd-8]: param.h

Log Message:
Welcome to 8.3


To generate a diff of this commit:
cvs rdiff -u -r1.2.60.3 -r1.2.60.4 src/doc/LAST_MINUTE
cvs rdiff -u -r1.2.4.7 -r1.2.4.8 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.542.2.11 -r1.542.2.12 src/sys/sys/param.h

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

Modified files:

Index: src/doc/LAST_MINUTE
diff -u src/doc/LAST_MINUTE:1.2.60.3 src/doc/LAST_MINUTE:1.2.60.4
--- src/doc/LAST_MINUTE:1.2.60.3	Tue Mar 31 05:08:40 2020
+++ src/doc/LAST_MINUTE	Sat May  4 18:57:00 2024
@@ -1,6 +1,6 @@
-#	$NetBSD: LAST_MINUTE,v 1.2.60.3 2020/03/31 05:08:40 martin Exp $
+#	$NetBSD: LAST_MINUTE,v 1.2.60.4 2024/05/04 18:57:00 martin Exp $
 
-This file contains important information on the NetBSD 8.2 release that
+This file contains important information on the NetBSD 8.3 release that
 did not make it into the main documentation.
 
 [all]

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.2.4.7 src/external/gpl2/groff/tmac/mdoc.local:1.2.4.8
--- src/external/gpl2/groff/tmac/mdoc.local:1.2.4.7	Tue Apr 14 15:50:27 2020
+++ src/external/gpl2/groff/tmac/mdoc.local	Sat May  4 18:56:59 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.2.4.7 2020/04/14 15:50:27 martin Exp $
+.\" $NetBSD: mdoc.local,v 1.2.4.8 2024/05/04 18:56:59 martin Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~8.2_STABLE
+.ds doc-operating-system NetBSD\~8.3
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~8.2_STABLE
+.ds doc-default-operating-system NetBSD\~8.3
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3
@@ -65,6 +65,7 @@
 .ds doc-operating-system-NetBSD-8.08.0
 .ds doc-operating-system-NetBSD-8.18.1
 .ds doc-operating-system-NetBSD-8.28.2
+.ds doc-operating-system-NetBSD-8.38.3
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-5.4   5.4
 .ds doc-operating-system-FreeBSD-5.5   5.5

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.542.2.11 src/sys/sys/param.h:1.542.2.12
--- src/sys/sys/param.h:1.542.2.11	Sat Feb  6 15:22:19 2021
+++ src/sys/sys/param.h	Sat May  4 18:56:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.542.2.11 2021/02/06 15:22:19 martin Exp $	*/
+/*	$NetBSD: param.h,v 1.542.2.12 2024/05/04 18:56:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	80200	/* NetBSD 8.2_STABLE */
+#define	__NetBSD_Version__	80300	/* NetBSD 8.3 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-8] src

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 18:57:00 UTC 2024

Modified Files:
src/doc [netbsd-8]: LAST_MINUTE
src/external/gpl2/groff/tmac [netbsd-8]: mdoc.local
src/sys/sys [netbsd-8]: param.h

Log Message:
Welcome to 8.3


To generate a diff of this commit:
cvs rdiff -u -r1.2.60.3 -r1.2.60.4 src/doc/LAST_MINUTE
cvs rdiff -u -r1.2.4.7 -r1.2.4.8 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.542.2.11 -r1.542.2.12 src/sys/sys/param.h

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



CVS commit: [netbsd-8] src/distrib/notes/common

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 18:53:21 UTC 2024

Modified Files:
src/distrib/notes/common [netbsd-8]: main

Log Message:
Prepare for 8.3


To generate a diff of this commit:
cvs rdiff -u -r1.535.2.7 -r1.535.2.8 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.535.2.7 src/distrib/notes/common/main:1.535.2.8
--- src/distrib/notes/common/main:1.535.2.7	Sun Mar 29 11:59:06 2020
+++ src/distrib/notes/common/main	Sat May  4 18:53:21 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.535.2.7 2020/03/29 11:59:06 martin Exp $
+.\"	$NetBSD: main,v 1.535.2.8 2024/05/04 18:53:21 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST " sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd May 13, 2019
+.Dd May 4, 2024
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -480,17 +480,17 @@ would not exist.
 .
 .if \n[FOR_RELEASE] \{\
 .Pp
-.Ss Changes Between The NetBSD 8.1 and 8.2 Releases
+.Ss Changes Between The NetBSD 8.2 and 8.3 Releases
 .Pp
 The
 .Nx
 \*V release
-is the first security/critical update of the NetBSD 8 release branch.
+is the third security/critical update of the NetBSD 8 release branch.
 It represents a selected subset of fixes deemed important for
 security or stability reasons.
 The complete list of changes can be found in the
-CHANGES-8.2:
-.Lk https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.2/CHANGES-8.2
+CHANGES-8.3:
+.Lk https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.3/CHANGES-8.3
 file in the top level directory of the NetBSD
 \*V release
 tree.
@@ -568,6 +568,8 @@ Changes between the initial 8.0 branch a
 Changes between the 8.0 release and the 8.1 release.
 .It Li CHANGES-8.2
 Changes between the 8.1 release and the 8.2 release.
+.It Li CHANGES-8.3
+Changes between the 8.2 release and the 8.3 release.
 .It Li CHANGES.prev
 Changes in previous
 .Nx



CVS commit: [netbsd-8] src/distrib/notes/common

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 18:53:21 UTC 2024

Modified Files:
src/distrib/notes/common [netbsd-8]: main

Log Message:
Prepare for 8.3


To generate a diff of this commit:
cvs rdiff -u -r1.535.2.7 -r1.535.2.8 src/distrib/notes/common/main

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



CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:22:59 UTC 2024

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c

Log Message:
ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c

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

Modified files:

Index: src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.19 src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.20
--- src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.19	Fri May  3 15:50:42 2024
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c	Sat May  4 18:22:59 2024
@@ -682,7 +682,7 @@ terminate_cleanup(void)
 	if (outfile == NULL)
 		return;
 
-#if !defined (__FreeBSD__) && !defined(__NetBSD__)
+#if !defined (__FreeBSD__) && !(defined(__NetBSD__) || HAVE_NBTOOL_CONFIG_H)
 	if (dounlink) {
 		fprintf(stderr, "Removing %s\n", outfile);
 		unlink(outfile);



CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:22:59 UTC 2024

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c

Log Message:
ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c

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



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:20:44 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
ctfmerge(1): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.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/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1
diff -u src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.4 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.5
--- src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.4	Sat May  4 13:11:41 2024
+++ src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1	Sat May  4 18:20:44 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: ctfmerge.1,v 1.4 2024/05/04 13:11:41 christos Exp $
+.\" $NetBSD: ctfmerge.1,v 1.5 2024/05/04 18:20:44 uwe Exp $
 .\"
 .\" Copyright (c) 2010 The FreeBSD Foundation 
 .\" All rights reserved. 
@@ -41,7 +41,7 @@
 .Fl l Ar label
 .Fl L Ar labelenv
 .Fl o Ar outfile
-file ...
+.Ar
 .Nm
 .Op Fl fgstv
 .Fl l Ar label
@@ -50,14 +50,14 @@ file ...
 .Fl d Ar uniqfile
 .Op Fl g
 .Op Fl D Ar uniqlabel
-file ...
+.Ar
 .Nm
 .Op Fl fgstv
 .Fl l Ar label
 .Fl L Ar labelenv
 .Fl o Ar outfile
 .Fl w Ar withfile
-file ...
+.Ar
 .Nm
 .Op Fl g
 .Fl c Ar srcfile
@@ -69,13 +69,17 @@ utility merges several CTF data sections
 output file, unifying common data.
 .Pp
 The following options are available:
-.Bl -tag -width indent
+.Bl -tag -width Fl
 .It Fl f
 Match global symbols to global CTF data.
 .It Fl g
 Don't delete the original debugging sections.
 .It Fl s
-Use the .dynsym ELF section instead of the .symtab ELF section.
+Use the
+.Ql .dynsym
+ELF section instead of the
+.Ql .symtab
+ELF section.
 .It Fl t
 Make sure that all object files have a CTF section.
 .It Fl v
@@ -110,24 +114,32 @@ into
 .Sh ENVIRONMENT VARIABLES
 The following environment variables are used in
 .Nm :
-.Bl -tag -width x
-.It CTFMERGE_TERMINATE_NO_UNLINK
+.Bl -tag -width Ev
+.It Ev CTFMERGE_TERMINATE_NO_UNLINK
 Don't remove temporary files on exit, so that they can be examined
 for debugging.
-.It CTFMERGE_MAX_SLOTS
+.It Ev CTFMERGE_MAX_SLOTS
 Number of round-robin slots in the input queue that it is processed by
 worker threads.
-Each slot represents a file batch (default 5).
-.It CTFMERGE_PHASE1_BATCH_SIZE
-Number of files in a slot that are needed before processing starts (default 8).
-.It CTFMERGE_NUM_THREADS
+Each slot represents a file batch
+.Pq default 5 .
+.It Ev CTFMERGE_PHASE1_BATCH_SIZE
+Number of files in a slot that are needed before processing starts
+.Pq default 8 .
+.It Ev CTFMERGE_NUM_THREADS
 Set the number of worker threads.
 If the number of processors can be determined it defaults to
-min(processors * 3 / 2, nslots), if not it defaults to 2.
-.It CTFMERGE_INPUT_THROTTLE
-Max queue size to queue (defaults to 10).
-.It CTFMERGE_DEBUG_LEVEL
-Increase debugging verbosity (maximum is 3).
+.Fo min
+.Fa "processors\|*\|3\|/\|2"
+.Fa "nslots"
+.Fc
+if not it defaults to 2.
+.It Ev CTFMERGE_INPUT_THROTTLE
+Max queue size to queue
+.Pq defaults to 10 .
+.It Ev CTFMERGE_DEBUG_LEVEL
+Increase debugging verbosity
+.Pq maximum is 3 .
 .El
 .Sh EXIT STATUS
 .Ex -std



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat May  4 18:20:44 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
ctfmerge(1): brush up markup


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1

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



CVS commit: src/common/lib/libc/gen

2024-05-04 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat May  4 17:58:24 UTC 2024

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs

Revert the part of rev 1.32 (reapplying "Do away with separate pool_cache
for some kernel objects") that changed the memory allocation for radixtree
nodes from PR_NOWAIT to KM_SLEEP as part of changing from a pool to kmem.
uvm_pageinsert_tree() calls into the radixtree code while holding
the object's vmobjlock, but that same lock is taken by the pagedaemon
in the process of reclaiming pages, and if the pagedaemon happens to
choose the same object to reclaim from that uvm_pageinsert_tree()
is being called on, then these two threads will deadlock.
The previous code already handled memory allocation failures
in uvm_pageinsert_tree() so we can simply change it back to nosleep.

Fixes a hang reported by simonb@, and the fix was also tested by him.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.33 src/common/lib/libc/gen/radixtree.c:1.34
--- src/common/lib/libc/gen/radixtree.c:1.33	Sat Sep 23 19:17:38 2023
+++ src/common/lib/libc/gen/radixtree.c	Sat May  4 17:58:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.33 2023/09/23 19:17:38 ad Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.34 2024/05/04 17:58:24 chs Exp $	*/
 
 /*-
  * Copyright (c)2011,2012,2013 YAMAMOTO Takashi,
@@ -112,7 +112,7 @@
 #include 
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, "$NetBSD: radixtree.c,v 1.33 2023/09/23 19:17:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radixtree.c,v 1.34 2024/05/04 17:58:24 chs Exp $");
 #include 
 #include 
 #include 
@@ -122,7 +122,7 @@ __KERNEL_RCSID(0, "$NetBSD: radixtree.c,
 #include 
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID("$NetBSD: radixtree.c,v 1.33 2023/09/23 19:17:38 ad Exp $");
+__RCSID("$NetBSD: radixtree.c,v 1.34 2024/05/04 17:58:24 chs Exp $");
 #include 
 #include 
 #include 
@@ -410,9 +410,10 @@ radix_tree_alloc_node(void)
 
 #if defined(_KERNEL)
 	/*
-	 * note that kmem_alloc can block.
+	 * We must not block waiting for memory because this function
+	 * can be called in contexts where waiting for memory is illegal.
 	 */
-	n = kmem_intr_alloc(sizeof(struct radix_tree_node), KM_SLEEP);
+	n = kmem_intr_alloc(sizeof(struct radix_tree_node), KM_NOSLEEP);
 #elif defined(_STANDALONE)
 	n = alloc(sizeof(*n));
 #else /* defined(_STANDALONE) */



CVS commit: src/common/lib/libc/gen

2024-05-04 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat May  4 17:58:24 UTC 2024

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs

Revert the part of rev 1.32 (reapplying "Do away with separate pool_cache
for some kernel objects") that changed the memory allocation for radixtree
nodes from PR_NOWAIT to KM_SLEEP as part of changing from a pool to kmem.
uvm_pageinsert_tree() calls into the radixtree code while holding
the object's vmobjlock, but that same lock is taken by the pagedaemon
in the process of reclaiming pages, and if the pagedaemon happens to
choose the same object to reclaim from that uvm_pageinsert_tree()
is being called on, then these two threads will deadlock.
The previous code already handled memory allocation failures
in uvm_pageinsert_tree() so we can simply change it back to nosleep.

Fixes a hang reported by simonb@, and the fix was also tested by him.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/common/lib/libc/gen/radixtree.c

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



CVS commit: src/doc

2024-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  4 16:57:15 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
Note about recent hp300 topcat(4) framebuffer improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.3052 -r1.3053 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3052 src/doc/CHANGES:1.3053
--- src/doc/CHANGES:1.3052	Sat May  4 09:37:39 2024
+++ src/doc/CHANGES	Sat May  4 16:57:15 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3052 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3053 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -358,6 +358,15 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 		[christos 20240427]
 	i386: Rewrite viac7temp(4) temperature sensor to use MSR, which works
 		on far more CPUs.  [andvar 20240430]
+	hp300: Fix a wrong palette color setting problems on HP98543 4 bpp
+		topcat(4) framebuffer on HP360. [tsutsui 20240501]
 	lint(1): Support _Alignas and attribute aligned.  [rillig 20240501].
+	hp300: Fix "garbage pixels" problems on scrolling ops etc. on
+		HP98543 and HP98547 topcat(4) color framebuffers.
+		[tsutsui 20240501]
+	hp300: Treat HP98542 and HP98543 1024x400 framebuffers as
+		"pseudo doubled" 512x400 bitmap pixels as HP-UX did, because
+		even modern LCDs cannot handle such 1024x400 resolutions
+		properly. [tsutsui 20240501]
 	evbarm: Add device tree for Red Pitaya SDRlab 122-16.
 		[dyoung 20240504]



CVS commit: src/doc

2024-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  4 16:57:15 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
Note about recent hp300 topcat(4) framebuffer improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.3052 -r1.3053 src/doc/CHANGES

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



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

2024-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  4 16:06:57 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: topcat.c

Log Message:
Add comments about quirks of 98542/98543 framebuffers with 1024x400 pixels.


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

2024-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May  4 16:06:57 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: topcat.c

Log Message:
Add comments about quirks of 98542/98543 framebuffers with 1024x400 pixels.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/dev/topcat.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/hp300/dev/topcat.c
diff -u src/sys/arch/hp300/dev/topcat.c:1.11 src/sys/arch/hp300/dev/topcat.c:1.12
--- src/sys/arch/hp300/dev/topcat.c:1.11	Wed May  1 19:28:33 2024
+++ src/sys/arch/hp300/dev/topcat.c	Sat May  4 16:06:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: topcat.c,v 1.11 2024/05/01 19:28:33 tsutsui Exp $	*/
+/*	$NetBSD: topcat.c,v 1.12 2024/05/04 16:06:57 tsutsui Exp $	*/
 /*	$OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -351,11 +351,24 @@ topcat_reset(struct diofb *fb, int scode
 	/*
 	 * Some displays, such as the HP332 and HP340 internal video
 	 * and HP98542/98543 appear to return a display width of 1024
-	 * instead of 512.
+	 * instead of 512. It looks these boards have actually have
+	 * enough 64KB (1bpp) or 256KB (4bpp) VRAM and RAMDAC capabilities
+	 * to display 1024x400 pixels.
 	 * 
-	 * It looks these boards have VRAM with sparse address layout,
-	 * i.e. 1 bit or 4 bits per pixel but 2 bytes per pixel, so
-	 * we have to handle 512 pixels per line with 1024 bytes per line.
+	 * However HP's officlal "Service Information Manual" for
+	 * "HP 900 Series 300 Computers Models 330/350" says:
+	 *  "The medium-resolution board uses eight memory chips per plane.
+	 *   This is enough to display 512 doubled pixels by 400 scan lines."
+	 *
+	 * This "512 doubled pixels" implies that the native HP-UX treated
+	 * these 1024x400 framebuffers as pseudo 512x400 ones because
+	 * ancient 1980s CRTs (such as 35741) didn't display such higher
+	 * resolution. Furthermore, even modern LCDs can only handle
+	 * upto 720 pixels in the "400 line" as VGA compatible mode.
+	 *
+	 * As mentioned above, we treat these 1024x400 1 bit or 4 bit
+	 * framebuffers as "2 bytes per pixel" ones, so we have to handle
+	 * 512 pixels per line with 1024 bytes per line.
 	 */
 	if (fb->planes <= 4 && fb->dwidth == 1024 && fb->dheight == 400) {
 		fb->dwidth = 512;
@@ -580,7 +593,8 @@ topcat_putchar8(void *cookie, int row, i
 }
 
 /*
- * Put a single character on 1 bpp or 4 bpp variants with sparse VRAM addresses
+ * Put a single character on 1 bpp (98542) or 4 bpp (98543) variants
+ * with 1024x400 VRAM to treat them as a pseudo 512x400 bitmap.
  */
 static void
 topcat_putchar1_4(void *cookie, int row, int col, u_int uc, long attr)
@@ -612,8 +626,8 @@ topcat_putchar1_4(void *cookie, int row,
 	tc_waitbusy(tc, diofb->planemask);
 
 	/*
-	 * At least HP98543 requires to write 4 bpp data onto
-	 * both odd and even addresses.
+	 * We have to put pixel data to both odd and even addresses
+	 * to handle "doubled pixels" as noted above.
 	 */
 	if (uc == ' ') {
 		uint16_t c = clr[0];



CVS commit: src/lib/libc/arch/hppa/gen

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 14:48:28 UTC 2024

Modified Files:
src/lib/libc/arch/hppa/gen: _setjmp.S

Log Message:
Remove magic numbers. NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/hppa/gen/_setjmp.S

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



CVS commit: src/sys/arch/amiga/amiga

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:45:10 UTC 2024

Modified Files:
src/sys/arch/amiga/amiga: trap.c

Log Message:
Don't panic on NULL pointer dereference when done by copyin, ...


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amiga/amiga/trap.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/amiga/amiga/trap.c
diff -u src/sys/arch/amiga/amiga/trap.c:1.142 src/sys/arch/amiga/amiga/trap.c:1.143
--- src/sys/arch/amiga/amiga/trap.c:1.142	Sat Jan 20 00:15:30 2024
+++ src/sys/arch/amiga/amiga/trap.c	Sat May  4 13:45:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.142 2024/01/20 00:15:30 thorpej Exp $	*/
+/*	$NetBSD: trap.c,v 1.143 2024/05/04 13:45:10 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -45,7 +45,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.142 2024/01/20 00:15:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.143 2024/05/04 13:45:10 mlelstv Exp $");
 
 #include 
 #include 
@@ -364,7 +364,7 @@ trapmmufault(int type, u_int code, u_int
 		ftype = VM_PROT_READ;
 	va = trunc_page((vaddr_t)v);
 #ifdef DEBUG
-	if (map == kernel_map && va == 0) {
+	if (map == kernel_map && va == 0 && onfault == 0) {
 		printf("trap: bad kernel access at %x pc %x\n", v, fp->f_pc);
 		panictrap(type, code, v, fp);
 	}



CVS commit: src/sys/arch/amiga/amiga

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:45:10 UTC 2024

Modified Files:
src/sys/arch/amiga/amiga: trap.c

Log Message:
Don't panic on NULL pointer dereference when done by copyin, ...


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amiga/amiga/trap.c

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



CVS commit: src/sys/kern

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:33:18 UTC 2024

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

Log Message:
Account for trailing NUL bytes when calculating userland buffer size.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_iostat.c

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

Modified files:

Index: src/sys/kern/subr_iostat.c
diff -u src/sys/kern/subr_iostat.c:1.25 src/sys/kern/subr_iostat.c:1.26
--- src/sys/kern/subr_iostat.c:1.25	Wed May 22 08:47:02 2019
+++ src/sys/kern/subr_iostat.c	Sat May  4 13:33:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_iostat.c,v 1.25 2019/05/22 08:47:02 hannken Exp $	*/
+/*	$NetBSD: subr_iostat.c,v 1.26 2024/05/04 13:33:18 mlelstv Exp $	*/
 /*	NetBSD: subr_disk.c,v 1.69 2005/05/29 22:24:15 christos Exp	*/
 
 /*-
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_iostat.c,v 1.25 2019/05/22 08:47:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_iostat.c,v 1.26 2024/05/04 13:33:18 mlelstv Exp $");
 
 #include 
 #include 
@@ -370,6 +370,8 @@ iostati_getnames(int disk_only, char *ol
 			memset(bf, 0, sizeof(bf));
 			if (first) {
 strncpy(bf, stats->io_name, sizeof(bf));
+/* account for trailing NUL byte */
+needed += 1;
 first = 0;
 			} else {
 bf[0] = ' ';



CVS commit: src/sys/kern

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:33:18 UTC 2024

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

Log Message:
Account for trailing NUL bytes when calculating userland buffer size.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_iostat.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/seq

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:29:41 UTC 2024

Modified Files:
src/usr.bin/seq: seq.c

Log Message:
Bail if increment is too small for the precision to avoid an infinite loop.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/seq/seq.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/seq/seq.c
diff -u src/usr.bin/seq/seq.c:1.13 src/usr.bin/seq/seq.c:1.14
--- src/usr.bin/seq/seq.c:1.13	Sat Feb 24 10:10:04 2024
+++ src/usr.bin/seq/seq.c	Sat May  4 13:29:41 2024
@@ -31,7 +31,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 2005\
  The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: seq.c,v 1.13 2024/02/24 10:10:04 mlelstv Exp $");
+__RCSID("$NetBSD: seq.c,v 1.14 2024/05/04 13:29:41 mlelstv Exp $");
 #endif /* not lint */
 
 #include 
@@ -105,6 +105,7 @@ main(int argc, char *argv[])
 	double first = 1.0;
 	double last = 0.0;
 	double incr = 0.0;
+	double prev;
 	struct lconv *locale;
 	char *fmt = NULL;
 	const char *sep = "\n";
@@ -208,15 +209,23 @@ main(int argc, char *argv[])
 
 	if (incr > 0) {
 		printf(fmt, first);
+		prev = first;
 		for (first += incr; first <= last; first += incr) {
+			if (first <= prev)
+errx(1, "increment too small\n");
 			fputs(sep, stdout);
 			printf(fmt, first);
+			prev = first;
 		}
 	} else {
 		printf(fmt, first);
+		prev = first;
 		for (first += incr; first >= last; first += incr) {
+			if (first >= prev)
+errx(1, "increment too small\n");
 			fputs(sep, stdout);
 			printf(fmt, first);
+			prev = first;
 		}
 	}
 	if (term != NULL)



CVS commit: src/usr.bin/seq

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 13:29:41 UTC 2024

Modified Files:
src/usr.bin/seq: seq.c

Log Message:
Bail if increment is too small for the precision to avoid an infinite loop.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/seq/seq.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/gzip

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:18:06 UTC 2024

Modified Files:
src/usr.bin/gzip: unlz.c

Log Message:
PR/58233: RVP: Fix lzip dictionary size calculation


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/gzip/unlz.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/gzip/unlz.c
diff -u src/usr.bin/gzip/unlz.c:1.9 src/usr.bin/gzip/unlz.c:1.10
--- src/usr.bin/gzip/unlz.c:1.9	Sat May  4 09:17:03 2024
+++ src/usr.bin/gzip/unlz.c	Sat May  4 09:18:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unlz.c,v 1.9 2024/05/04 13:17:03 christos Exp $	*/
+/*	$NetBSD: unlz.c,v 1.10 2024/05/04 13:18:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -602,7 +602,7 @@ static unsigned
 lz_get_dict_size(unsigned char c)
 {
 	unsigned dict_size = 1 << (c & 0x1f);
-	dict_size -= (dict_size >> 2) * ( (c >> 5) & 0x7);
+	dict_size -= (dict_size >> 4) * ( (c >> 5) & 0x7);
 	if (dict_size < MIN_DICTIONARY_SIZE || dict_size > MAX_DICTIONARY_SIZE)
 		return 0;
 	return dict_size;



CVS commit: src/usr.bin/gzip

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:18:06 UTC 2024

Modified Files:
src/usr.bin/gzip: unlz.c

Log Message:
PR/58233: RVP: Fix lzip dictionary size calculation


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/gzip/unlz.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/gzip

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:17:03 UTC 2024

Modified Files:
src/usr.bin/gzip: unlz.c unxz.c

Log Message:
PR/58223: RVP: Don't write to stdout when testing.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/gzip/unlz.c src/usr.bin/gzip/unxz.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/gzip/unlz.c
diff -u src/usr.bin/gzip/unlz.c:1.8 src/usr.bin/gzip/unlz.c:1.9
--- src/usr.bin/gzip/unlz.c:1.8	Sat Jun 10 00:45:25 2023
+++ src/usr.bin/gzip/unlz.c	Sat May  4 09:17:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unlz.c,v 1.8 2023/06/10 04:45:25 simonb Exp $	*/
+/*	$NetBSD: unlz.c,v 1.9 2024/05/04 13:17:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -295,7 +295,7 @@ lz_flush(struct lz_decoder *lz)
 
 	size_t size = (size_t)offs;
 	lz_crc_update(>crc, lz->obuf + lz->spos, size);
-	if (fwrite(lz->obuf + lz->spos, 1, size, lz->fout) != size)
+	if (!tflag && fwrite(lz->obuf + lz->spos, 1, size, lz->fout) != size)
 		return -1;
 
 	lz->wrapped = lz->pos >= lz->dict_size;
Index: src/usr.bin/gzip/unxz.c
diff -u src/usr.bin/gzip/unxz.c:1.8 src/usr.bin/gzip/unxz.c:1.9
--- src/usr.bin/gzip/unxz.c:1.8	Sat Oct  6 12:36:45 2018
+++ src/usr.bin/gzip/unxz.c	Sat May  4 09:17:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unxz.c,v 1.8 2018/10/06 16:36:45 martin Exp $	*/
+/*	$NetBSD: unxz.c,v 1.9 2024/05/04 13:17:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: unxz.c,v 1.8 2018/10/06 16:36:45 martin Exp $");
+__RCSID("$NetBSD: unxz.c,v 1.9 2024/05/04 13:17:03 christos Exp $");
 
 #include 
 #include 
@@ -99,7 +99,8 @@ unxz(int i, int o, char *pre, size_t pre
 		if (strm.avail_out == 0 || ret != LZMA_OK) {
 			const size_t write_size = sizeof(obuf) - strm.avail_out;
 
-			if (write(o, obuf, write_size) != (ssize_t)write_size)
+			if (!tflag &&
+			write(o, obuf, write_size) != (ssize_t)write_size)
 maybe_err("write failed");
 
 			strm.next_out = obuf;



CVS commit: src/usr.bin/gzip

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:17:03 UTC 2024

Modified Files:
src/usr.bin/gzip: unlz.c unxz.c

Log Message:
PR/58223: RVP: Don't write to stdout when testing.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/gzip/unlz.c src/usr.bin/gzip/unxz.c

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



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:11:41 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
Document environment variable use.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.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/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1
diff -u src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.3 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.4
--- src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1:1.3	Mon May 28 17:05:11 2018
+++ src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1	Sat May  4 09:11:41 2024
@@ -1,3 +1,4 @@
+.\" $NetBSD: ctfmerge.1,v 1.4 2024/05/04 13:11:41 christos Exp $
 .\"
 .\" Copyright (c) 2010 The FreeBSD Foundation 
 .\" All rights reserved. 
@@ -28,7 +29,7 @@
 .\"
 .\" $FreeBSD: head/cddl/usr.bin/ctfmerge/ctfmerge.1 239969 2012-09-01 06:23:13Z joel $
 .\"
-.Dd July 7, 2010
+.Dd May 4, 2024
 .Dt CTFMERGE 1
 .Os
 .Sh NAME
@@ -106,6 +107,28 @@ Copy CTF data from
 into
 .Ar destfile .
 .El
+.Sh ENVIRONMENT VARIABLES
+The following environment variables are used in
+.Nm :
+.Bl -tag -width x
+.It CTFMERGE_TERMINATE_NO_UNLINK
+Don't remove temporary files on exit, so that they can be examined
+for debugging.
+.It CTFMERGE_MAX_SLOTS
+Number of round-robin slots in the input queue that it is processed by
+worker threads.
+Each slot represents a file batch (default 5).
+.It CTFMERGE_PHASE1_BATCH_SIZE
+Number of files in a slot that are needed before processing starts (default 8).
+.It CTFMERGE_NUM_THREADS
+Set the number of worker threads.
+If the number of processors can be determined it defaults to
+min(processors * 3 / 2, nslots), if not it defaults to 2.
+.It CTFMERGE_INPUT_THROTTLE
+Max queue size to queue (defaults to 10).
+.It CTFMERGE_DEBUG_LEVEL
+Increase debugging verbosity (maximum is 3).
+.El
 .Sh EXIT STATUS
 .Ex -std
 .Sh SEE ALSO



CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge

2024-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  4 13:11:41 UTC 2024

Modified Files:
src/external/cddl/osnet/usr.bin/ctfmerge: ctfmerge.1

Log Message:
Document environment variable use.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/usr.bin/ctfmerge/ctfmerge.1

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



CVS commit: src/sys/dev/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:49:16 UTC 2024

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

Log Message:
Use device_printf instead of autoconf messages for errors.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/dev/usb/uhub.c

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



CVS commit: src/sys/dev/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:49:16 UTC 2024

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

Log Message:
Use device_printf instead of autoconf messages for errors.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/dev/usb/uhub.c

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

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.161 src/sys/dev/usb/uhub.c:1.162
--- src/sys/dev/usb/uhub.c:1.161	Wed Apr  6 22:01:45 2022
+++ src/sys/dev/usb/uhub.c	Sat May  4 12:49:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.161 2022/04/06 22:01:45 mlelstv Exp $	*/
+/*	$NetBSD: uhub.c,v 1.162 2024/05/04 12:49:15 mlelstv Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 /*	$OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
 
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.161 2022/04/06 22:01:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.162 2024/05/04 12:49:15 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -864,7 +864,7 @@ uhub_explore(struct usbd_device *dev)
 			 * some other serious problem.  Since we cannot leave
 			 * at 0 we have to disable the port instead.
 			 */
-			aprint_error_dev(sc->sc_dev,
+			device_printf(sc->sc_dev,
 			"device problem, disabling port %d\n", port);
 			usbd_clear_port_feature(dev, port, UHF_PORT_ENABLE);
 		} else {



CVS commit: src/sys/dev/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:45:14 UTC 2024

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

Log Message:
Make usb address and hub topology available to drvctl.


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/dev/usb/usb_subr.c

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

Modified files:

Index: src/sys/dev/usb/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.278 src/sys/dev/usb/usb_subr.c:1.279
--- src/sys/dev/usb/usb_subr.c:1.278	Tue Apr 11 08:50:07 2023
+++ src/sys/dev/usb/usb_subr.c	Sat May  4 12:45:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.278 2023/04/11 08:50:07 riastradh Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.279 2024/05/04 12:45:13 mlelstv Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.278 2023/04/11 08:50:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.279 2024/05/04 12:45:13 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1083,6 +1083,24 @@ usbd_properties(device_t dv, struct usbd
 	vendor = UGETW(dd->idVendor);
 	product = UGETW(dd->idProduct);
 
+	prop_dictionary_set_uint8(dict, "address", dev->ud_addr);
+
+	if (dev->ud_myhub) {
+		struct usbd_device *hdev = dev->ud_myhub;
+		struct usbd_hub *hub = hdev->ud_hub;
+		int p;
+
+		KASSERT(hub != NULL);
+
+		prop_dictionary_set_uint8(dict, "hub-address", hdev->ud_addr);
+		for (p=1; p <= hub->uh_hubdesc.bNbrPorts; ++p) {
+			if (hub->uh_ports[p-1].up_dev == dev) {
+prop_dictionary_set_uint8(dict, "hub-port", p);
+break;
+			}
+		}
+	}
+
 	prop_dictionary_set_uint8(dict, "class", class);
 	prop_dictionary_set_uint8(dict, "subclass", subclass);
 	prop_dictionary_set_uint16(dict, "release", release);



CVS commit: src/sys/dev/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:45:14 UTC 2024

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

Log Message:
Make usb address and hub topology available to drvctl.


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/dev/usb/usb_subr.c

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



CVS commit: src/lib/libc/arch/riscv/gen

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 12:43:36 UTC 2024

Modified Files:
src/lib/libc/arch/riscv/gen: makecontext.c

Log Message:
makecontext: correct the type to setup register based arguments.

Use __greg_t rather than int for register based arguments. This fixes
various atf tests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/makecontext.c

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



CVS commit: src/lib/libc/arch/riscv/gen

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 12:43:36 UTC 2024

Modified Files:
src/lib/libc/arch/riscv/gen: makecontext.c

Log Message:
makecontext: correct the type to setup register based arguments.

Use __greg_t rather than int for register based arguments. This fixes
various atf tests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/makecontext.c

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

Modified files:

Index: src/lib/libc/arch/riscv/gen/makecontext.c
diff -u src/lib/libc/arch/riscv/gen/makecontext.c:1.2 src/lib/libc/arch/riscv/gen/makecontext.c:1.3
--- src/lib/libc/arch/riscv/gen/makecontext.c:1.2	Sun May  7 12:41:47 2023
+++ src/lib/libc/arch/riscv/gen/makecontext.c	Sat May  4 12:43:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: makecontext.c,v 1.2 2023/05/07 12:41:47 skrll Exp $	*/
+/*	$NetBSD: makecontext.c,v 1.3 2024/05/04 12:43:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.2 2023/05/07 12:41:47 skrll Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.3 2024/05/04 12:43:36 skrll Exp $");
 #endif
 
 #include 
@@ -75,7 +75,7 @@ makecontext(ucontext_t *ucp, void (*func
 	va_start(ap, argc);
 	/* Up to the first eight arguments are passed in a0(x10)-a7(x17) */
 	for (i = 0; i < argc && i < 8; i++)
-		gr[_REG_A0 + i] = va_arg(ap, int);
+		gr[_REG_A0 + i] = va_arg(ap, __greg_t);
 	/* Pass remaining arguments on the stack above the backchain/lr gap. */
 	for (sp += 0; i < argc; i++)
 		*sp++ = va_arg(ap, long);



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

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 12:42:09 UTC 2024

Modified Files:
src/sys/arch/riscv/include: mcontext.h

Log Message:
Fix the __greg_t typedef for riscv32


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/riscv/include/mcontext.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/riscv/include/mcontext.h
diff -u src/sys/arch/riscv/include/mcontext.h:1.7 src/sys/arch/riscv/include/mcontext.h:1.8
--- src/sys/arch/riscv/include/mcontext.h:1.7	Sun May  7 12:41:48 2023
+++ src/sys/arch/riscv/include/mcontext.h	Sat May  4 12:42:09 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: mcontext.h,v 1.7 2023/05/07 12:41:48 skrll Exp $ */
+/* $NetBSD: mcontext.h,v 1.8 2024/05/04 12:42:09 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@ union __fpreg {
 #define _BSD_FPREG_T_	union __fpreg
 #endif
 
-typedef	__uint64_t	__greg_t;
+typedef	long		__greg_t;
 typedef	__greg_t	__gregset_t[_NGREG];
 typedef	__uint32_t	__greg32_t;
 typedef	__greg32_t	__gregset32_t[_NGREG];



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

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 12:42:09 UTC 2024

Modified Files:
src/sys/arch/riscv/include: mcontext.h

Log Message:
Fix the __greg_t typedef for riscv32


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/riscv/include/mcontext.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/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:41:03 UTC 2024

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

Log Message:
Use device_printf instead of autoconf messages for errors.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/usb/usbnet.c

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

Modified files:

Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.119 src/sys/dev/usb/usbnet.c:1.120
--- src/sys/dev/usb/usbnet.c:1.119	Fri Feb  2 22:00:33 2024
+++ src/sys/dev/usb/usbnet.c	Sat May  4 12:41:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.119 2024/02/02 22:00:33 andvar Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.120 2024/05/04 12:41:03 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.119 2024/02/02 22:00:33 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.120 2024/05/04 12:41:03 mlelstv Exp $");
 
 #include 
 #include 
@@ -377,7 +377,7 @@ usbnet_rxeof(struct usbd_xfer *xfer, voi
 	usbd_get_xfer_status(xfer, NULL, NULL, _len, NULL);
 
 	if (total_len > un->un_rx_bufsz) {
-		aprint_error_dev(un->un_dev,
+		device_printf(un->un_dev,
 		"rxeof: too large transfer (%u > %u)\n",
 		total_len, un->un_rx_bufsz);
 		goto done;
@@ -471,7 +471,7 @@ usbnet_pipe_intr(struct usbd_xfer *xfer,
 
 	if (status != USBD_NORMAL_COMPLETION) {
 		if (usbd_ratecheck(>unp_intr_notice)) {
-			aprint_error_dev(un->un_dev, "usb error on intr: %s\n",
+			device_printf(un->un_dev, "usb error on intr: %s\n",
 			usbd_errstr(status));
 		}
 		if (status == USBD_STALLED)



CVS commit: src/sys/dev/usb

2024-05-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  4 12:41:03 UTC 2024

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

Log Message:
Use device_printf instead of autoconf messages for errors.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/usb/usbnet.c

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



CVS commit: [netbsd-10] src/doc

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 12:05:45 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.1

Log Message:
Ammend ticket #674 for additional pullups


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-10.1

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



CVS commit: [netbsd-10] src/doc

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 12:05:45 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.1

Log Message:
Ammend ticket #674 for additional pullups


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-10.1

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

Modified files:

Index: src/doc/CHANGES-10.1
diff -u src/doc/CHANGES-10.1:1.1.2.7 src/doc/CHANGES-10.1:1.1.2.8
--- src/doc/CHANGES-10.1:1.1.2.7	Sun Apr 28 13:43:59 2024
+++ src/doc/CHANGES-10.1	Sat May  4 12:05:45 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.1,v 1.1.2.7 2024/04/28 13:43:59 martin Exp $
+# $NetBSD: CHANGES-10.1,v 1.1.2.8 2024/05/04 12:05:45 martin Exp $
 
 A complete list of changes from the NetBSD 10.0 release on 2024-03-28
 until the 10.1 release:
@@ -167,7 +167,7 @@ sbin/raidctl/raidctl.c1.79
 sys/dev/raidframe/raidframeio.h			1.12
 sys/dev/raidframe/rf_diskqueue.c		1.64
 sys/dev/raidframe/rf_diskqueue.h		1.30
-sys/dev/raidframe/rf_disks.c			1.94
+sys/dev/raidframe/rf_disks.c			1.94,1.95
 sys/dev/raidframe/rf_disks.h			1.15
 sys/dev/raidframe/rf_driver.c			1.141
 sys/dev/raidframe/rf_netbsdkintf.c		1.414



CVS commit: [netbsd-10] src/sys/dev/raidframe

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 12:04:56 UTC 2024

Modified Files:
src/sys/dev/raidframe [netbsd-10]: rf_disks.c

Log Message:
Additionally pull up to fix the llvm build after #674:

sys/dev/raidframe/rf_disks.c1.95

snprintf() should really include a format.


To generate a diff of this commit:
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/sys/dev/raidframe/rf_disks.c

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



CVS commit: [netbsd-10] src/sys/dev/raidframe

2024-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  4 12:04:56 UTC 2024

Modified Files:
src/sys/dev/raidframe [netbsd-10]: rf_disks.c

Log Message:
Additionally pull up to fix the llvm build after #674:

sys/dev/raidframe/rf_disks.c1.95

snprintf() should really include a format.


To generate a diff of this commit:
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/sys/dev/raidframe/rf_disks.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/raidframe/rf_disks.c
diff -u src/sys/dev/raidframe/rf_disks.c:1.93.4.1 src/sys/dev/raidframe/rf_disks.c:1.93.4.2
--- src/sys/dev/raidframe/rf_disks.c:1.93.4.1	Sun Apr 28 12:09:08 2024
+++ src/sys/dev/raidframe/rf_disks.c	Sat May  4 12:04:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_disks.c,v 1.93.4.1 2024/04/28 12:09:08 martin Exp $	*/
+/*	$NetBSD: rf_disks.c,v 1.93.4.2 2024/05/04 12:04:56 martin Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.93.4.1 2024/04/28 12:09:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.93.4.2 2024/05/04 12:04:56 martin Exp $");
 
 #include 
 
@@ -1269,9 +1269,9 @@ rf_swap_components(RF_Raid_t *raidPtr, i
 	RF_ASSERT(raidPtr->accesses_suspended == 0);
 	
 	/* Swap the component names... */
-	snprintf(tmpdevname, sizeof(tmpdevname),raidPtr->Disks[a].devname);
-	snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), raidPtr->Disks[b].devname);
-	snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), tmpdevname);
+	snprintf(tmpdevname, sizeof(tmpdevname), "%s", raidPtr->Disks[a].devname);
+	snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), "%s", raidPtr->Disks[b].devname);
+	snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), "%s", tmpdevname);
 
 	/* and the vp */
 	tmp_ci_vp = raidPtr->raid_cinfo[a].ci_vp;



CVS commit: src/doc

2024-05-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  4 09:37:39 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
recent changes


To generate a diff of this commit:
cvs rdiff -u -r1.3051 -r1.3052 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3051 src/doc/CHANGES:1.3052
--- src/doc/CHANGES:1.3051	Thu Apr 25 17:22:48 2024
+++ src/doc/CHANGES	Sat May  4 09:37:39 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3051 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3052 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -348,3 +348,16 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	x86, sparc64: Create "DVD" ISOs that contain all the sets excluded
 		from the normal ISOs for size reasons - also useful on
 		virtual machines.  [nia 20240424]
+	i386: Remove kernel modules, redundant kernels, and amdgpu firmware
+		from the CD-ROM image to help it fit on a CD-ROM
+		once more.  [nia 20240426]
+	httpd(8): Make directory listings mobile-friendly, from D. Bohdan.
+		[maya 20240426]
+	thinkpad(4): Expose a sysctl interface to control some aspects of
+		charging behavior on supported systems, from Malte Dehling.
+		[christos 20240427]
+	i386: Rewrite viac7temp(4) temperature sensor to use MSR, which works
+		on far more CPUs.  [andvar 20240430]
+	lint(1): Support _Alignas and attribute aligned.  [rillig 20240501].
+	evbarm: Add device tree for Red Pitaya SDRlab 122-16.
+		[dyoung 20240504]



CVS commit: src/doc

2024-05-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  4 09:37:39 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
recent changes


To generate a diff of this commit:
cvs rdiff -u -r1.3051 -r1.3052 src/doc/CHANGES

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



CVS commit: src/sys/arch/hppa/stand/boot

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 07:04:24 UTC 2024

Modified Files:
src/sys/arch/hppa/stand/boot: Makefile

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/boot/Makefile

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/hppa/stand/boot/Makefile
diff -u src/sys/arch/hppa/stand/boot/Makefile:1.1 src/sys/arch/hppa/stand/boot/Makefile:1.2
--- src/sys/arch/hppa/stand/boot/Makefile:1.1	Mon Feb 24 07:23:43 2014
+++ src/sys/arch/hppa/stand/boot/Makefile	Sat May  4 07:04:24 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2014/02/24 07:23:43 skrll Exp $
+#	$NetBSD: Makefile,v 1.2 2024/05/04 07:04:24 skrll Exp $
 
 #	$OpenBSD: Makefile,v 1.10 2000/05/31 19:56:51 mickey Exp $
 
@@ -17,9 +17,9 @@ CPPFLAGS+=	-D__daddr_t=int32_t
 #CPPFLAGS+=	-DLIFDEBUG -DDEBUGBUG -DDEBUG
 CPPFLAGS+=	-DBOOTARG_APIVER=3
 CPPFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes
-WARNS=	2
+WARNS=		2
 
-CPPFLAGS+=		-D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS
+CPPFLAGS+=	-D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS
 SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
 
 .include "../Makefile.buildboot"



CVS commit: src/sys/arch/hppa/stand/boot

2024-05-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  4 07:04:24 UTC 2024

Modified Files:
src/sys/arch/hppa/stand/boot: Makefile

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/boot/Makefile

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



CVS commit: src

2024-05-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat May  4 06:52:17 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_004.c msg_005.c
src/usr.bin/xlint/lint1: decl.c

Log Message:
lint: increase debug logging for declarations

All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_004.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_005.c
cvs rdiff -u -r1.401 -r1.402 src/usr.bin/xlint/lint1/decl.c

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



CVS commit: src

2024-05-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat May  4 06:52:17 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_004.c msg_005.c
src/usr.bin/xlint/lint1: decl.c

Log Message:
lint: increase debug logging for declarations

All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_004.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_005.c
cvs rdiff -u -r1.401 -r1.402 src/usr.bin/xlint/lint1/decl.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_004.c
diff -u src/tests/usr.bin/xlint/lint1/msg_004.c:1.7 src/tests/usr.bin/xlint/lint1/msg_004.c:1.8
--- src/tests/usr.bin/xlint/lint1/msg_004.c:1.7	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/msg_004.c	Sat May  4 06:52:17 2024
@@ -1,7 +1,10 @@
-/*	$NetBSD: msg_004.c,v 1.7 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: msg_004.c,v 1.8 2024/05/04 06:52:17 rillig Exp $	*/
 # 3 "msg_004.c"
 
 // Test for message: illegal type combination [4]
+//
+// See also:
+//	msg_005.c
 
 /* lint1-extra-flags: -X 351 */
 

Index: src/tests/usr.bin/xlint/lint1/msg_005.c
diff -u src/tests/usr.bin/xlint/lint1/msg_005.c:1.5 src/tests/usr.bin/xlint/lint1/msg_005.c:1.6
--- src/tests/usr.bin/xlint/lint1/msg_005.c:1.5	Fri Jun 17 18:54:53 2022
+++ src/tests/usr.bin/xlint/lint1/msg_005.c	Sat May  4 06:52:17 2024
@@ -1,29 +1,146 @@
-/*	$NetBSD: msg_005.c,v 1.5 2022/06/17 18:54:53 rillig Exp $	*/
+/*	$NetBSD: msg_005.c,v 1.6 2024/05/04 06:52:17 rillig Exp $	*/
 # 3 "msg_005.c"
 
 // Test for message: modifying typedef with '%s'; only qualifiers allowed [5]
 
-typedef int number;
+typedef char char_alias;
+typedef signed char schar_alias;
+typedef unsigned char uchar_alias;
+typedef short short_alias;
+typedef unsigned short ushort_alias;
+typedef int int_alias;
+typedef unsigned int uint_alias;
+typedef long long_alias;
+typedef unsigned long ulong_alias;
+typedef long long llong_alias;
+typedef unsigned long long ullong_alias;
+typedef float float_alias;
+typedef double double_alias;
+typedef long double ldouble_alias;
+typedef float _Complex fcomplex_alias;
+typedef double _Complex dcomplex_alias;
+typedef long double _Complex lcomplex_alias;
 
 /* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
-typedef number signed signed_number;
-
+typedef char_alias signed err_s_char;
+/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
+typedef char_alias unsigned err_u_char;
+/* expect+1: error: illegal type combination [4] */
+typedef schar_alias signed err_s_schar;
+/* expect+1: error: illegal type combination [4] */
+typedef schar_alias unsigned err_u_schar;
+/* expect+1: error: illegal type combination [4] */
+typedef uchar_alias signed err_s_uchar;
+/* expect+1: error: illegal type combination [4] */
+typedef uchar_alias unsigned err_u_uchar;
+/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
+typedef short_alias signed err_s_short;
+/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
+typedef short_alias unsigned err_u_short;
+/* expect+1: error: illegal type combination [4] */
+typedef ushort_alias signed err_s_ushort;
+/* expect+1: error: illegal type combination [4] */
+typedef ushort_alias unsigned err_u_ushort;
+/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
+typedef int_alias signed err_s_int;
+/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
+typedef int_alias unsigned err_u_int;
+/* expect+1: error: illegal type combination [4] */
+typedef uint_alias signed err_s_uint;
+/* expect+1: error: illegal type combination [4] */
+typedef uint_alias unsigned err_u_uint;
+/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
+typedef long_alias signed err_s_long;
+/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
+typedef long_alias unsigned err_u_long;
+/* expect+1: error: illegal type combination [4] */
+typedef ulong_alias signed err_s_ulong;
+/* expect+1: error: illegal type combination [4] */
+typedef ulong_alias unsigned err_u_ulong;
+/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
+typedef llong_alias signed err_s_llong;
 /* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
-typedef number unsigned unsigned_number;
+typedef llong_alias unsigned err_u_llong;
+/* expect+1: error: illegal type combination [4] */
+typedef ullong_alias signed err_s_ullong;
+/* expect+1: error: illegal type combination