CVS commit: src/tests/bin/sh

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 05:54:54 UTC 2023

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Adjust the tilde expansion test to deal with (very) recent changes
to what the shell produces for tilde expansions, when the expansion
of the tilde prefix ends with '/' and the character immediately following
is another '/' - previously /bin/sh (and most other shells, but not all)
retained both slashes, and this test expected that behaviour.

No longer, now only one of the two will appear.  Adjust the expected
test results accordingly, and add an extra loop iteration to make sure
this is thoroughly tested (one more tilde expansion value).

Also, add two new test cases that test for the new (explicit - though
it was always stated this way, but not as explicitly) that if HOME is
an empty string (not unset - that remains an unspecified case, as it
was) then the expansion of ~ must generate "", and not nothing.
The current test was unable to distinguish those two, since it
simply looked for characters in the output, so add a new test cases
explicitly to test for this particular case.   This also means (also
previously in the standard, but not as explicitly) that shells are
not permitted to decide "The ~ expansion produces an empty string, that
is weird, let's generate something else instead" which some shells were
doing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/bin/sh/t_expand.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/bin/sh/t_expand.sh
diff -u src/tests/bin/sh/t_expand.sh:1.22 src/tests/bin/sh/t_expand.sh:1.23
--- src/tests/bin/sh/t_expand.sh:1.22	Sat May  4 02:52:22 2019
+++ src/tests/bin/sh/t_expand.sh	Mon Mar  6 05:54:54 2023
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.22 2019/05/04 02:52:22 kre Exp $
+# $NetBSD: t_expand.sh,v 1.23 2023/03/06 05:54:54 kre Exp $
 #
 # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -432,7 +432,7 @@ tilde_head() {
 	atf_set descr "Checks that the ~ expansions work"
 }
 tilde_body() {
-	for HOME in '' / /home/foo \
+	for HOME in '' / /home/foo /home/foo/ \
 /a/very/long/home/directory/path/that/might/push/the/tilde/expansion/code/beyond/what/it/would/normally/ever/see/on/any/sane/system/and/perhaps/expose/some/bugs
 	do
 		export HOME
@@ -440,22 +440,22 @@ tilde_body() {
 		atf_check -s exit:0 -e empty \
 			-o inline:'HOME\t'"${HOME}"'
 ~\t'"${HOME}"'
-~/foobar\t'"${HOME}"'/foobar
+~/foobar\t'"${HOME%/}"'/foobar
 "$V"\t'"${HOME}"'
 "$X"\t~
 "$Y"\t'"${HOME}"':'"${HOME}"'
-"$YY"\t'"${HOME}"'/foo:'"${HOME}"'/bar
-"$Z"\t'"${HOME}"'/~
+"$YY"\t'"${HOME%/}"'/foo:'"${HOME%/}"'/bar
+"$Z"\t'"${HOME%/}"'/~
 ${U:-~}\t'"${HOME}"'
 $V\t'"${HOME}"'
 $X\t~
 $Y\t'"${HOME}"':'"${HOME}"'
-$YY\t'"${HOME}"'/foo:'"${HOME}"'/bar
-$Z\t'"${HOME}"'/~
+$YY\t'"${HOME%/}"'/foo:'"${HOME%/}"'/bar
+$Z\t'"${HOME%/}"'/~
 ${U:=~}\t'"${HOME}"'
 ${UU:=~:~}\t'"${HOME}"':'"${HOME}"'
-${UUU:=~/:~}\t'"${HOME}"'/:'"${HOME}"'
-${U4:=~/:~/}\t'"${HOME}"'/:'"${HOME}"'/\n' \
+${UUU:=~/:~}\t'"${HOME%/}"'/:'"${HOME}"'
+${U4:=~/:~/}\t'"${HOME%/}"'/:'"${HOME%/}"'/\n' \
 			${TEST_SH} -s <<- \EOF
 unset -v U UU UUU U4
 V=~
@@ -484,6 +484,15 @@ ${U4:=~/:~/}\t'"${HOME}"'/:'"${HOME}"'/\
 			EOF
 	done
 
+	# Verify that when HOME is "" expanding a bare ~
+	# makes an empty word, not nothing (or anything else)
+	HOME=""
+	export HOME
+	atf_check -s exit:0 -e empty -o inline:'1:<>\n' ${TEST_SH} -c \
+		'set -- ~ ; IFS=, ; printf '"'%d:<%s>\\n'"' "$#" "$*"'
+	atf_check -s exit:0 -e empty -o inline:'4:<,X,,/>\n' ${TEST_SH} -c \
+		'set -- ~ X ~ ~/ ; IFS=, ; printf '"'%d:<%s>\\n'"' "$#" "$*"'
+
 	# Testing ~user is harder, so, perhaps later...
 }
 



CVS commit: src/tests/bin/sh

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 05:54:54 UTC 2023

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Adjust the tilde expansion test to deal with (very) recent changes
to what the shell produces for tilde expansions, when the expansion
of the tilde prefix ends with '/' and the character immediately following
is another '/' - previously /bin/sh (and most other shells, but not all)
retained both slashes, and this test expected that behaviour.

No longer, now only one of the two will appear.  Adjust the expected
test results accordingly, and add an extra loop iteration to make sure
this is thoroughly tested (one more tilde expansion value).

Also, add two new test cases that test for the new (explicit - though
it was always stated this way, but not as explicitly) that if HOME is
an empty string (not unset - that remains an unspecified case, as it
was) then the expansion of ~ must generate "", and not nothing.
The current test was unable to distinguish those two, since it
simply looked for characters in the output, so add a new test cases
explicitly to test for this particular case.   This also means (also
previously in the standard, but not as explicitly) that shells are
not permitted to decide "The ~ expansion produces an empty string, that
is weird, let's generate something else instead" which some shells were
doing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/bin/sh/t_expand.sh

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



CVS commit: src/bin/sh

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 05:54:34 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
Adjust tilde expansion as will be documented in the forthcoming
version of the POSIX standard (Issue 8).   I believe we were already
compliant with what is to be required, but POSIX is now encouraging
(and will likely require in a later version) that if a tilde expansion
produces a string which ends in a '/' and the '~' that was expanded
is immediately followed by a '/' in the input word, that one of those
two slashes be omitted.   The worst (current) example of this is
when HOME=/ and we expand ~/foo - previously producing //foo which is
(in POSIX) a path with implementation defined semantics, and so not
what we should be generating by accident.   Change that, so now if
the ~ prefix expansion ends in a '/' and there is a '/' following
immediately after, the resulting word contains only one of those
chars (in the example just given, we will now produce /foo instead).

POSIX is also making it clear that the expansion that results from
the tilde expansion is treated as quoted (not subject to pathname
expansion, or field splitting, or any var/arith/command substitutions)
and that if HOME="" the expansion of ~ must generate "" (not nothing).
Our implementation did all of that already (though older versions
used to treat an empty expansion of HOME the same as if HOME was
unset - that was fixed some time ago).

The actual modification made here is probably smaller than this log entry,
and without added comments, certainly is!


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/bin/sh/expand.c

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.141 src/bin/sh/expand.c:1.142
--- src/bin/sh/expand.c:1.141	Mon Nov 22 05:17:43 2021
+++ src/bin/sh/expand.c	Mon Mar  6 05:54:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.141 2021/11/22 05:17:43 kre Exp $	*/
+/*	$NetBSD: expand.c,v 1.142 2023/03/06 05:54:34 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c	8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.141 2021/11/22 05:17:43 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.142 2023/03/06 05:54:34 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -388,7 +388,7 @@ argstr(const char *p, int flag)
 STATIC const char *
 exptilde(const char *p, int flag)
 {
-	char c;
+	char c, last;
 	const char *startp = p;
 	struct passwd *pw;
 	const char *home;
@@ -457,15 +457,35 @@ exptilde(const char *p, int flag)
 	 * Posix XCU 2.6.1: The value of $HOME (for ~) or the initial
 	 *		working directory from getpwnam() for ~user
 	 * Nothing there about "except if a null string".  So do what it wants.
+	 * In later drafts (to become Issue 8), it is even required that in
+	 * this case, (where HOME='') a bare ~ expands to "" (which must not
+	 * be reduced to nothing).
 	 */
-	if (home == NULL /* || *home == '\0' */) {
+	last = '\0';		/* just in case *home == '\0' (already) */
+	if (home == NULL) {
 		CTRACE(DBG_EXPAND, (": returning unused \"%s\"\n", startp));
 		return startp;
 	} while ((c = *home++) != '\0') {
 		if ((quotes && NEEDESC(c)) || ISCTL(c))
 			STPUTC(CTLESC, expdest);
 		STPUTC(c, expdest);
+		last = c;
 	}
+
+	/*
+	 * If HOME (or whatver) ended in a '/' (last == '/'), and
+	 * the ~prefix was terminated by a '/', then only keep one
+	 * of them - since we already took the one from HOME, just
+	 * skip over the one that ended the tilde prefix.
+	 *
+	 * Current (Issue 8) drafts say this is permitted, and recommend
+	 * it - a later version of the standard will probably require it.
+	 * This is to prevent ~/foo generating //foo when HOME=/ (and
+	 * other cases like it, but that's the important one).
+	 */
+	if (last == '/' && *p == '/')
+		p++;
+
 	CTRACE(DBG_EXPAND, (": added %d \"%.*s\" returning \"%s\"\n",
 	  expdest - stackblock() - offs, expdest - stackblock() - offs,
 	  stackblock() + offs, p));



CVS commit: src/bin/sh

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 05:54:34 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
Adjust tilde expansion as will be documented in the forthcoming
version of the POSIX standard (Issue 8).   I believe we were already
compliant with what is to be required, but POSIX is now encouraging
(and will likely require in a later version) that if a tilde expansion
produces a string which ends in a '/' and the '~' that was expanded
is immediately followed by a '/' in the input word, that one of those
two slashes be omitted.   The worst (current) example of this is
when HOME=/ and we expand ~/foo - previously producing //foo which is
(in POSIX) a path with implementation defined semantics, and so not
what we should be generating by accident.   Change that, so now if
the ~ prefix expansion ends in a '/' and there is a '/' following
immediately after, the resulting word contains only one of those
chars (in the example just given, we will now produce /foo instead).

POSIX is also making it clear that the expansion that results from
the tilde expansion is treated as quoted (not subject to pathname
expansion, or field splitting, or any var/arith/command substitutions)
and that if HOME="" the expansion of ~ must generate "" (not nothing).
Our implementation did all of that already (though older versions
used to treat an empty expansion of HOME the same as if HOME was
unset - that was fixed some time ago).

The actual modification made here is probably smaller than this log entry,
and without added comments, certainly is!


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/bin/sh/expand.c

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



CVS commit: src/usr.sbin/cpuctl

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 01:28:54 UTC 2023

Modified Files:
src/usr.sbin/cpuctl: cpuctl.8 cpuctl.c

Log Message:
Unless -v is given, ignore EEXIST errors from the IOC_CPU_UCODE_APPLY ioctl()
used to implement "cpuctl ucode N",  which indicates that the microcode
to be loaded already exists in the CPU, and as such, isn't really a
very interesting "error".


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/cpuctl/cpuctl.8
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/cpuctl/cpuctl.c

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



CVS commit: src/usr.sbin/cpuctl

2023-03-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar  6 01:28:54 UTC 2023

Modified Files:
src/usr.sbin/cpuctl: cpuctl.8 cpuctl.c

Log Message:
Unless -v is given, ignore EEXIST errors from the IOC_CPU_UCODE_APPLY ioctl()
used to implement "cpuctl ucode N",  which indicates that the microcode
to be loaded already exists in the CPU, and as such, isn't really a
very interesting "error".


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/cpuctl/cpuctl.8
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/cpuctl/cpuctl.c

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

Modified files:

Index: src/usr.sbin/cpuctl/cpuctl.8
diff -u src/usr.sbin/cpuctl/cpuctl.8:1.20 src/usr.sbin/cpuctl/cpuctl.8:1.21
--- src/usr.sbin/cpuctl/cpuctl.8:1.20	Fri May 17 23:51:35 2019
+++ src/usr.sbin/cpuctl/cpuctl.8	Mon Mar  6 01:28:54 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cpuctl.8,v 1.20 2019/05/17 23:51:35 gutteridge Exp $
+.\"	$NetBSD: cpuctl.8,v 1.21 2023/03/06 01:28:54 kre Exp $
 .\"
 .\" Copyright (c) 2007, 2008, 2012, 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -72,6 +72,10 @@ Set the specified CPUs on line, making t
 .Op Ar file
 .Xc
 This applies the microcode patch to CPUs.
+Unless
+.Fl v
+was given, errors indicating that the microcode
+already exists on the CPU in question are ignored.
 If
 .Ar cpu
 is not specified or \-1, all CPUs are updated.

Index: src/usr.sbin/cpuctl/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.32 src/usr.sbin/cpuctl/cpuctl.c:1.33
--- src/usr.sbin/cpuctl/cpuctl.c:1.32	Tue Feb  1 10:45:02 2022
+++ src/usr.sbin/cpuctl/cpuctl.c	Mon Mar  6 01:28:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuctl.c,v 1.32 2022/02/01 10:45:02 mrg Exp $	*/
+/*	$NetBSD: cpuctl.c,v 1.33 2023/03/06 01:28:54 kre Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2012, 2015 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include 
-__RCSID("$NetBSD: cpuctl.c,v 1.32 2022/02/01 10:45:02 mrg Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.33 2023/03/06 01:28:54 kre Exp $");
 #endif /* not lint */
 
 #include 
@@ -247,7 +247,7 @@ cpu_ucode(char **argv)
 		cpuset_destroy(cpuset);
 	}
 	error = ioctl(fd, IOC_CPU_UCODE_APPLY, );
-	if (error < 0) {
+	if (error < 0 && (verbose || errno != EEXIST)) {
 		if (uc.fwname[0])
 			err(EXIT_FAILURE, "%s", uc.fwname);
 		else



CVS commit: src/share/man/man9

2023-03-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar  6 01:03:45 UTC 2023

Modified Files:
src/share/man/man9: portfeatures.9

Log Message:
fix typos


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/portfeatures.9

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

Modified files:

Index: src/share/man/man9/portfeatures.9
diff -u src/share/man/man9/portfeatures.9:1.1 src/share/man/man9/portfeatures.9:1.2
--- src/share/man/man9/portfeatures.9:1.1	Mon Mar  6 00:49:31 2023
+++ src/share/man/man9/portfeatures.9	Mon Mar  6 01:03:45 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: portfeatures.9,v 1.1 2023/03/06 00:49:31 uwe Exp $
+.\"	$NetBSD: portfeatures.9,v 1.2 2023/03/06 01:03:45 wiz Exp $
 .\"
 .\" Copyright (c) The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,9 +32,9 @@
 .Nd the __HAVEs (\|and the have nots\|)
 .
 .Sh DESCRIPTION
-Machine-independent kernel code adapts to differeces in hardware
+Machine-independent kernel code adapts to differences in hardware
 capabilities provided by the machine-dependent parts of the kernel.
-A port declares its capabilities by definining various
+A port declares its capabilities by defining various
 .Li __HAVE_ Ns Ar feature
 macros.
 This manual page provides an index of such macros with pointers to



CVS commit: src/share/man/man9

2023-03-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar  6 01:03:45 UTC 2023

Modified Files:
src/share/man/man9: portfeatures.9

Log Message:
fix typos


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/portfeatures.9

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



CVS commit: src

2023-03-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Mar  6 00:49:32 UTC 2023

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: portfeatures.9

Log Message:
portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now.  Please add short
descriptions and xrefs.  If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.


To generate a diff of this commit:
cvs rdiff -u -r1.2425 -r1.2426 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.465 -r1.466 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/portfeatures.9

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2425 src/distrib/sets/lists/comp/mi:1.2426
--- src/distrib/sets/lists/comp/mi:1.2425	Fri Oct 28 05:23:09 2022
+++ src/distrib/sets/lists/comp/mi	Mon Mar  6 00:49:31 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2425 2022/10/28 05:23:09 ozaki-r Exp $
+#	$NetBSD: mi,v 1.2426 2023/03/06 00:49:31 uwe Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -12350,6 +12350,7 @@
 ./usr/share/man/cat9/pool_sethardlimit.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/pool_sethiwat.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/pool_setlowat.0		comp-sys-catman		.cat
+./usr/share/man/cat9/portfeatures.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/postsig.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/powerhook_disestablish.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/powerhook_establish.0	comp-sys-catman		.cat
@@ -20581,6 +20582,7 @@
 ./usr/share/man/html9/pool_sethardlimit.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pool_sethiwat.html	comp-sys-htmlman	html
 ./usr/share/man/html9/pool_setlowat.html	comp-sys-htmlman	html
+./usr/share/man/html9/portfeatures.html		comp-sys-htmlman	html
 ./usr/share/man/html9/postsig.html		comp-sys-htmlman	html
 ./usr/share/man/html9/powerhook_disestablish.html	comp-sys-htmlman	html
 ./usr/share/man/html9/powerhook_establish.html	comp-sys-htmlman	html
@@ -28973,6 +28975,7 @@
 ./usr/share/man/man9/pool_sethardlimit.9	comp-sys-man		.man
 ./usr/share/man/man9/pool_sethiwat.9		comp-sys-man		.man
 ./usr/share/man/man9/pool_setlowat.9		comp-sys-man		.man
+./usr/share/man/man9/portfeatures.9		comp-sys-man		.man
 ./usr/share/man/man9/postsig.9			comp-sys-man		.man
 ./usr/share/man/man9/powerhook_disestablish.9	comp-sys-man		.man
 ./usr/share/man/man9/powerhook_establish.9	comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.465 src/share/man/man9/Makefile:1.466
--- src/share/man/man9/Makefile:1.465	Sun Sep  4 21:37:50 2022
+++ src/share/man/man9/Makefile	Mon Mar  6 00:49:31 2023
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.465 2022/09/04 21:37:50 thorpej Exp $
+#   $NetBSD: Makefile,v 1.466 2023/03/06 00:49:31 uwe Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -44,8 +44,8 @@ MAN=	accept_filter.9 accf_data.9 accf_ht
 	panic.9 pathbuf.9 pci.9 pci_configure_bus.9 pci_intr.9 \
 	pci_msi.9 pckbport.9 pcmcia.9 pcq.9 pcu.9 \
 	percpu.9 pfil.9 physio.9 pktqueue.9 pmap.9 pmatch.9 pmf.9 pool.9 \
-	pool_cache.9 powerhook_establish.9 ppsratecheck.9 preempt.9 \
-	proc_find.9 pserialize.9 pslist.9 psref.9 putter.9 \
+	pool_cache.9 portfeatures.9 powerhook_establish.9 ppsratecheck.9 \
+	preempt.9 proc_find.9 pserialize.9 pslist.9 psref.9 putter.9 \
 	radio.9 ras.9 rasops.9 ratecheck.9 resettodr.9 rnd.9 \
 	roundup.9 rssadapt.9 rt_timer.9 rwlock.9 RUN_ONCE.9 STACK.9 \
 	scanc.9 \

Added files:

Index: src/share/man/man9/portfeatures.9
diff -u /dev/null src/share/man/man9/portfeatures.9:1.1
--- /dev/null	Mon Mar  6 00:49:32 2023
+++ src/share/man/man9/portfeatures.9	Mon Mar  6 00:49:31 2023
@@ -0,0 +1,78 @@
+.\"	$NetBSD: portfeatures.9,v 1.1 2023/03/06 00:49:31 uwe Exp $
+.\"
+.\" Copyright (c) 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 AUTHOR ``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.

CVS commit: src

2023-03-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Mar  6 00:49:32 UTC 2023

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: portfeatures.9

Log Message:
portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now.  Please add short
descriptions and xrefs.  If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.


To generate a diff of this commit:
cvs rdiff -u -r1.2425 -r1.2426 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.465 -r1.466 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/portfeatures.9

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



CVS commit: src/sys/dev/usb

2023-03-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  5 23:28:54 UTC 2023

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

Log Message:
ucom(4): Simplify logic fixing PR kern/57259.

cv_timedwait only ever returns 0 or EWOULDBLOCK, so this would always
return ERESTART anyway.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/ucom.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/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.137 src/sys/dev/usb/ucom.c:1.138
--- src/sys/dev/usb/ucom.c:1.137	Sun Mar  5 13:49:12 2023
+++ src/sys/dev/usb/ucom.c	Sun Mar  5 23:28:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $	*/
+/*	$NetBSD: ucom.c,v 1.138 2023/03/05 23:28:54 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.138 2023/03/05 23:28:54 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -552,14 +552,10 @@ ucomopen(dev_t dev, int flag, int mode, 
 			ms = MIN(INT_MAX - 1000, delta.tv_sec*1000);
 			ms += howmany(delta.tv_usec, 1000);
 			ticks = MAX(1, MIN(INT_MAX, mstohz(ms)));
-			error = cv_timedwait(>sc_statecv, >sc_lock,
+			(void)cv_timedwait(>sc_statecv, >sc_lock,
 			ticks);
 			mutex_exit(>sc_lock);
-			/* The successful passage of time is not an error. */
-			if (error == EWOULDBLOCK) {
-error = 0;
-			}
-			return error ? error : ERESTART;
+			return ERESTART;
 		}
 		timerclear(>sc_hup_time);
 	}



CVS commit: src/sys/dev/usb

2023-03-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  5 23:28:54 UTC 2023

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

Log Message:
ucom(4): Simplify logic fixing PR kern/57259.

cv_timedwait only ever returns 0 or EWOULDBLOCK, so this would always
return ERESTART anyway.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/ucom.c

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



CVS commit: src/sbin/nvmectl

2023-03-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Mar  5 23:24:06 UTC 2023

Modified Files:
src/sbin/nvmectl: devlist.c

Log Message:
In "devlist" mode, exit with a 0 return code if any nvme devices are
found, rather than exiting with 1 return code always.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/nvmectl/devlist.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/nvmectl/devlist.c
diff -u src/sbin/nvmectl/devlist.c:1.5 src/sbin/nvmectl/devlist.c:1.6
--- src/sbin/nvmectl/devlist.c:1.5	Wed Apr 18 10:11:44 2018
+++ src/sbin/nvmectl/devlist.c	Sun Mar  5 23:24:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: devlist.c,v 1.5 2018/04/18 10:11:44 nonaka Exp $	*/
+/*	$NetBSD: devlist.c,v 1.6 2023/03/05 23:24:06 simonb Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: devlist.c,v 1.5 2018/04/18 10:11:44 nonaka Exp $");
+__RCSID("$NetBSD: devlist.c,v 1.6 2023/03/05 23:24:06 simonb Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/devlist.c 329824 2018-02-22 13:32:31Z wma $");
 #endif
@@ -118,8 +118,10 @@ devlist(int argc, char *argv[])
 		close(fd);
 	}
 
-	if (found == 0)
+	if (found == 0) {
 		printf("No NVMe controllers found.\n");
+		exit(1);
+	}
 
-	exit(1);
+	exit(0);
 }



CVS commit: src/sbin/nvmectl

2023-03-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Mar  5 23:24:06 UTC 2023

Modified Files:
src/sbin/nvmectl: devlist.c

Log Message:
In "devlist" mode, exit with a 0 return code if any nvme devices are
found, rather than exiting with 1 return code always.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/nvmectl/devlist.c

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



CVS commit: src/doc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:37:17 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
mpc is updated to 1.3.1.


To generate a diff of this commit:
cvs rdiff -u -r1.1914 -r1.1915 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.1914 src/doc/3RDPARTY:1.1915
--- src/doc/3RDPARTY:1.1914	Sun Mar  5 22:13:48 2023
+++ src/doc/3RDPARTY	Sun Mar  5 22:37:17 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1914 2023/03/05 22:13:48 mrg Exp $
+#	$NetBSD: 3RDPARTY,v 1.1915 2023/03/05 22:37:17 mrg Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1530,7 +1530,7 @@ Notes:
 3. Carefully check for non-autoconf GPL components leaked into the dist area.
 
 Package:	mpc
-Version:	1.2.1
+Version:	1.3.1
 Current Vers:	1.3.1
 Maintainer:
 Archive Site:	http://www.multiprecision.org/mpc/download/



CVS commit: src/doc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:37:17 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
mpc is updated to 1.3.1.


To generate a diff of this commit:
cvs rdiff -u -r1.1914 -r1.1915 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/external/lgpl3/mpc/lib/libmpc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:36:58 UTC 2023

Modified Files:
src/external/lgpl3/mpc/lib/libmpc: Makefile

Log Message:
updates for mpc 1.3.1


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/mpc/lib/libmpc/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/lgpl3/mpc/lib/libmpc/Makefile
diff -u src/external/lgpl3/mpc/lib/libmpc/Makefile:1.6 src/external/lgpl3/mpc/lib/libmpc/Makefile:1.7
--- src/external/lgpl3/mpc/lib/libmpc/Makefile:1.6	Sat May 14 11:12:31 2022
+++ src/external/lgpl3/mpc/lib/libmpc/Makefile	Sun Mar  5 22:36:58 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2022/05/14 11:12:31 rillig Exp $
+#	$NetBSD: Makefile,v 1.7 2023/03/05 22:36:58 mrg Exp $
 
 .include 
 
@@ -23,11 +23,13 @@ SRCS=	\
 	add_fr.c \
 	add_si.c \
 	add_ui.c \
+	agm.c \
 	arg.c \
 	asin.c \
 	asinh.c \
 	atan.c \
 	atanh.c \
+	balls.c \
 	clear.c \
 	cmp.c \
 	cmp_abs.c \
@@ -41,6 +43,7 @@ SRCS=	\
 	div_fr.c \
 	div_ui.c \
 	dot.c \
+	eta.c \
 	exp.c \
 	fma.c \
 	fr_div.c \
@@ -74,6 +77,7 @@ SRCS=	\
 	pow_ui.c \
 	pow_z.c \
 	proj.c \
+	radius.c \
 	real.c \
 	rootofunity.c \
 	urandom.c \



CVS commit: src/external/lgpl3/mpc/lib/libmpc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:36:58 UTC 2023

Modified Files:
src/external/lgpl3/mpc/lib/libmpc: Makefile

Log Message:
updates for mpc 1.3.1


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/mpc/lib/libmpc/Makefile

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



CVS import: src/external/lgpl3/mpc/dist

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:35:54 UTC 2023

Update of /cvsroot/src/external/lgpl3/mpc/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7882

Log Message:
initial import of mpc 1.3.1.  changes from 1.2.1 include:

New function: mpc_agm
New rounding modes "away from zero", indicated by the letter "A" and
corresponding to MPFR_RNDA on the designated real or imaginary part.
New experimental ball arithmetic.
New experimental function: mpc_eta_fund
Bug fixes:
- mpc_asin for asin(z) with small |Re(z)| and tiny |Im(z)|
- mpc_pow_fr: sign of zero part of result when the base has up to sign
  the same real and imaginary part, and the exponent is an even positive
  integer
- mpc_fma: the returned int value was incorrect in some cases
  (indicating whether the rounded real/imaginary parts were
  smaller/equal/greater than the exact values), but the computed complex
  value was correct.
- Remove the unmaintained Makefile.vc; build files for Visual Studio are
  maintained independently by Brian Gladman.

Status:

Vendor Tag: mpc
Release Tags:   mpc-1-3-1

U src/external/lgpl3/mpc/dist/Makefile.am
U src/external/lgpl3/mpc/dist/Makefile.in
U src/external/lgpl3/mpc/dist/config.h.in
U src/external/lgpl3/mpc/dist/aclocal.m4
U src/external/lgpl3/mpc/dist/AUTHORS
U src/external/lgpl3/mpc/dist/README
U src/external/lgpl3/mpc/dist/ChangeLog
U src/external/lgpl3/mpc/dist/configure
U src/external/lgpl3/mpc/dist/INSTALL
U src/external/lgpl3/mpc/dist/configure.ac
U src/external/lgpl3/mpc/dist/COPYING.LESSER
U src/external/lgpl3/mpc/dist/NEWS
U src/external/lgpl3/mpc/dist/TODO
U src/external/lgpl3/mpc/dist/m4/ltoptions.m4
U src/external/lgpl3/mpc/dist/m4/lt~obsolete.m4
U src/external/lgpl3/mpc/dist/m4/ltsugar.m4
U src/external/lgpl3/mpc/dist/m4/ltversion.m4
U src/external/lgpl3/mpc/dist/m4/libtool.m4
U src/external/lgpl3/mpc/dist/m4/mpc.m4
U src/external/lgpl3/mpc/dist/m4/valgrind-tests.m4
U src/external/lgpl3/mpc/dist/m4/ax_gcc_version.m4
U src/external/lgpl3/mpc/dist/m4/ax_gcc_option.m4
U src/external/lgpl3/mpc/dist/tools/Makefile.am
U src/external/lgpl3/mpc/dist/tools/Makefile.in
U src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.am
U src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.in
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float128.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/README
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-double.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-longdouble.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float.c
U src/external/lgpl3/mpc/dist/tools/bench/Makefile.am
U src/external/lgpl3/mpc/dist/tools/bench/Makefile.in
U src/external/lgpl3/mpc/dist/tools/bench/benchtime.h
U src/external/lgpl3/mpc/dist/tools/bench/mpcbench.c
U src/external/lgpl3/mpc/dist/build-aux/missing
C src/external/lgpl3/mpc/dist/build-aux/config.guess
U src/external/lgpl3/mpc/dist/build-aux/ltmain.sh
U src/external/lgpl3/mpc/dist/build-aux/test-driver
U src/external/lgpl3/mpc/dist/build-aux/depcomp
U src/external/lgpl3/mpc/dist/build-aux/compile
U src/external/lgpl3/mpc/dist/build-aux/mdate-sh
U src/external/lgpl3/mpc/dist/build-aux/install-sh
U src/external/lgpl3/mpc/dist/build-aux/texinfo.tex
U src/external/lgpl3/mpc/dist/build-aux/ar-lib
U src/external/lgpl3/mpc/dist/build-aux/config.sub
U src/external/lgpl3/mpc/dist/tests/tpow_fr.c
U src/external/lgpl3/mpc/dist/tests/tanh.dat
U src/external/lgpl3/mpc/dist/tests/div_fr.dsc
U src/external/lgpl3/mpc/dist/tests/atan.dat
U src/external/lgpl3/mpc/dist/tests/copy_parameter.c
U src/external/lgpl3/mpc/dist/tests/tui_div.c
U src/external/lgpl3/mpc/dist/tests/tsqr.c
U src/external/lgpl3/mpc/dist/tests/asinh.dsc
U src/external/lgpl3/mpc/dist/tests/norm.dsc
U src/external/lgpl3/mpc/dist/tests/pow_z.dat
U src/external/lgpl3/mpc/dist/tests/tsum.c
U src/external/lgpl3/mpc/dist/tests/pow_ui.dat
U src/external/lgpl3/mpc/dist/tests/Makefile.am
U src/external/lgpl3/mpc/dist/tests/ttan.c
U src/external/lgpl3/mpc/dist/tests/add_fr.dsc
U src/external/lgpl3/mpc/dist/tests/tmul_fr.c
U src/external/lgpl3/mpc/dist/tests/cosh.dsc
N src/external/lgpl3/mpc/dist/tests/tagm.c
U src/external/lgpl3/mpc/dist/tests/tio_str.c
U src/external/lgpl3/mpc/dist/tests/tswap.c
U src/external/lgpl3/mpc/dist/tests/tmul_si.c
U src/external/lgpl3/mpc/dist/tests/tpl_native.c
U src/external/lgpl3/mpc/dist/tests/setprec_parameters.c
U src/external/lgpl3/mpc/dist/tests/Makefile.in
U src/external/lgpl3/mpc/dist/tests/pow_si.dat
U src/external/lgpl3/mpc/dist/tests/sinh.dsc
U src/external/lgpl3/mpc/dist/tests/data_check.tpl
N src/external/lgpl3/mpc/dist/tests/agm.dat
U src/external/lgpl3/mpc/dist/tests/tasinh.c
U src/external/lgpl3/mpc/dist/tests/div_fr.dat
U src/external/lgpl3/mpc/dist/tests/timag.c
U src/external/lgpl3/mpc/dist/tests/tpow_ld.c
U src/external/lgpl3/mpc/dist/tests/check_data.c
U src/external/lgpl3/mpc/dist/tests/tdiv.c
U src/external/lgpl3/mpc/dist/tests/clear_parameters.c
U 

CVS import: src/external/lgpl3/mpc/dist

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:35:54 UTC 2023

Update of /cvsroot/src/external/lgpl3/mpc/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7882

Log Message:
initial import of mpc 1.3.1.  changes from 1.2.1 include:

New function: mpc_agm
New rounding modes "away from zero", indicated by the letter "A" and
corresponding to MPFR_RNDA on the designated real or imaginary part.
New experimental ball arithmetic.
New experimental function: mpc_eta_fund
Bug fixes:
- mpc_asin for asin(z) with small |Re(z)| and tiny |Im(z)|
- mpc_pow_fr: sign of zero part of result when the base has up to sign
  the same real and imaginary part, and the exponent is an even positive
  integer
- mpc_fma: the returned int value was incorrect in some cases
  (indicating whether the rounded real/imaginary parts were
  smaller/equal/greater than the exact values), but the computed complex
  value was correct.
- Remove the unmaintained Makefile.vc; build files for Visual Studio are
  maintained independently by Brian Gladman.

Status:

Vendor Tag: mpc
Release Tags:   mpc-1-3-1

U src/external/lgpl3/mpc/dist/Makefile.am
U src/external/lgpl3/mpc/dist/Makefile.in
U src/external/lgpl3/mpc/dist/config.h.in
U src/external/lgpl3/mpc/dist/aclocal.m4
U src/external/lgpl3/mpc/dist/AUTHORS
U src/external/lgpl3/mpc/dist/README
U src/external/lgpl3/mpc/dist/ChangeLog
U src/external/lgpl3/mpc/dist/configure
U src/external/lgpl3/mpc/dist/INSTALL
U src/external/lgpl3/mpc/dist/configure.ac
U src/external/lgpl3/mpc/dist/COPYING.LESSER
U src/external/lgpl3/mpc/dist/NEWS
U src/external/lgpl3/mpc/dist/TODO
U src/external/lgpl3/mpc/dist/m4/ltoptions.m4
U src/external/lgpl3/mpc/dist/m4/lt~obsolete.m4
U src/external/lgpl3/mpc/dist/m4/ltsugar.m4
U src/external/lgpl3/mpc/dist/m4/ltversion.m4
U src/external/lgpl3/mpc/dist/m4/libtool.m4
U src/external/lgpl3/mpc/dist/m4/mpc.m4
U src/external/lgpl3/mpc/dist/m4/valgrind-tests.m4
U src/external/lgpl3/mpc/dist/m4/ax_gcc_version.m4
U src/external/lgpl3/mpc/dist/m4/ax_gcc_option.m4
U src/external/lgpl3/mpc/dist/tools/Makefile.am
U src/external/lgpl3/mpc/dist/tools/Makefile.in
U src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.am
U src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.in
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float128.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/README
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-double.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-longdouble.c
U src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float.c
U src/external/lgpl3/mpc/dist/tools/bench/Makefile.am
U src/external/lgpl3/mpc/dist/tools/bench/Makefile.in
U src/external/lgpl3/mpc/dist/tools/bench/benchtime.h
U src/external/lgpl3/mpc/dist/tools/bench/mpcbench.c
U src/external/lgpl3/mpc/dist/build-aux/missing
C src/external/lgpl3/mpc/dist/build-aux/config.guess
U src/external/lgpl3/mpc/dist/build-aux/ltmain.sh
U src/external/lgpl3/mpc/dist/build-aux/test-driver
U src/external/lgpl3/mpc/dist/build-aux/depcomp
U src/external/lgpl3/mpc/dist/build-aux/compile
U src/external/lgpl3/mpc/dist/build-aux/mdate-sh
U src/external/lgpl3/mpc/dist/build-aux/install-sh
U src/external/lgpl3/mpc/dist/build-aux/texinfo.tex
U src/external/lgpl3/mpc/dist/build-aux/ar-lib
U src/external/lgpl3/mpc/dist/build-aux/config.sub
U src/external/lgpl3/mpc/dist/tests/tpow_fr.c
U src/external/lgpl3/mpc/dist/tests/tanh.dat
U src/external/lgpl3/mpc/dist/tests/div_fr.dsc
U src/external/lgpl3/mpc/dist/tests/atan.dat
U src/external/lgpl3/mpc/dist/tests/copy_parameter.c
U src/external/lgpl3/mpc/dist/tests/tui_div.c
U src/external/lgpl3/mpc/dist/tests/tsqr.c
U src/external/lgpl3/mpc/dist/tests/asinh.dsc
U src/external/lgpl3/mpc/dist/tests/norm.dsc
U src/external/lgpl3/mpc/dist/tests/pow_z.dat
U src/external/lgpl3/mpc/dist/tests/tsum.c
U src/external/lgpl3/mpc/dist/tests/pow_ui.dat
U src/external/lgpl3/mpc/dist/tests/Makefile.am
U src/external/lgpl3/mpc/dist/tests/ttan.c
U src/external/lgpl3/mpc/dist/tests/add_fr.dsc
U src/external/lgpl3/mpc/dist/tests/tmul_fr.c
U src/external/lgpl3/mpc/dist/tests/cosh.dsc
N src/external/lgpl3/mpc/dist/tests/tagm.c
U src/external/lgpl3/mpc/dist/tests/tio_str.c
U src/external/lgpl3/mpc/dist/tests/tswap.c
U src/external/lgpl3/mpc/dist/tests/tmul_si.c
U src/external/lgpl3/mpc/dist/tests/tpl_native.c
U src/external/lgpl3/mpc/dist/tests/setprec_parameters.c
U src/external/lgpl3/mpc/dist/tests/Makefile.in
U src/external/lgpl3/mpc/dist/tests/pow_si.dat
U src/external/lgpl3/mpc/dist/tests/sinh.dsc
U src/external/lgpl3/mpc/dist/tests/data_check.tpl
N src/external/lgpl3/mpc/dist/tests/agm.dat
U src/external/lgpl3/mpc/dist/tests/tasinh.c
U src/external/lgpl3/mpc/dist/tests/div_fr.dat
U src/external/lgpl3/mpc/dist/tests/timag.c
U src/external/lgpl3/mpc/dist/tests/tpow_ld.c
U src/external/lgpl3/mpc/dist/tests/check_data.c
U src/external/lgpl3/mpc/dist/tests/tdiv.c
U src/external/lgpl3/mpc/dist/tests/clear_parameters.c
U 

CVS commit: src/doc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:13:48 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
note mpfr has a new version (4.2.0) and is updated, and
that mpc has a new version (1.3.1).


To generate a diff of this commit:
cvs rdiff -u -r1.1913 -r1.1914 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.1913 src/doc/3RDPARTY:1.1914
--- src/doc/3RDPARTY:1.1913	Sun Feb 19 18:09:45 2023
+++ src/doc/3RDPARTY	Sun Mar  5 22:13:48 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1913 2023/02/19 18:09:45 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1914 2023/03/05 22:13:48 mrg Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1531,7 +1531,7 @@ Notes:
 
 Package:	mpc
 Version:	1.2.1
-Current Vers:	1.2.1
+Current Vers:	1.3.1
 Maintainer:
 Archive Site:	http://www.multiprecision.org/mpc/download/
 Home Page:	http://www.multiprecision.org/mpc/
@@ -1542,8 +1542,8 @@ Location:	external/lgpl3/mpc/dist
 Notes:
 
 Package:	mpfr
-Version:	4.1.0
-Current Vers:	4.1.0
+Version:	4.2.0
+Current Vers:	4.2.0
 Maintainer:
 Archive Site:	http://www.mpfr.org/mpfr-current/
 Home Page:	http://www.mpfr.org/



CVS commit: src/doc

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:13:48 UTC 2023

Modified Files:
src/doc: 3RDPARTY

Log Message:
note mpfr has a new version (4.2.0) and is updated, and
that mpc has a new version (1.3.1).


To generate a diff of this commit:
cvs rdiff -u -r1.1913 -r1.1914 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/external/lgpl3/mpfr/lib/libmpfr

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:12:02 UTC 2023

Modified Files:
src/external/lgpl3/mpfr/lib/libmpfr: Makefile

Log Message:
updates for mpfr 4.2.0.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/lgpl3/mpfr/lib/libmpfr/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/lgpl3/mpfr/lib/libmpfr/Makefile
diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.22 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.23
--- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.22	Sun Apr 25 23:55:55 2021
+++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile	Sun Mar  5 22:12:02 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2021/04/25 23:55:55 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2023/03/05 22:12:02 mrg Exp $
 
 .include 
 
@@ -23,6 +23,7 @@ SRCS=	\
 	abort_prec_max.c \
 	acos.c \
 	acosh.c \
+	acosu.c \
 	add.c \
 	add1.c \
 	add1sp.c \
@@ -32,9 +33,12 @@ SRCS=	\
 	ai.c \
 	asin.c \
 	asinh.c \
+	asinu.c \
 	atan.c \
 	atan2.c \
+	atan2u.c \
 	atanh.c \
+	atanu.c \
 	bernoulli.c \
 	beta.c \
 	buildopt.c \
@@ -45,13 +49,14 @@ SRCS=	\
 	clears.c \
 	cmp.c \
 	cmp2.c \
-	cmpabs.c \
-	cmpabs_ui.c \
 	cmp_d.c \
 	cmp_ld.c \
 	cmp_si.c \
 	cmp_ui.c \
+	cmpabs.c \
+	cmpabs_ui.c \
 	comparisons.c \
+	compound.c \
 	const_catalan.c \
 	const_euler.c \
 	const_log2.c \
@@ -60,6 +65,7 @@ SRCS=	\
 	copysign.c \
 	cos.c \
 	cosh.c \
+	cosu.c \
 	cot.c \
 	coth.c \
 	csc.c \
@@ -83,7 +89,9 @@ SRCS=	\
 	exceptions.c \
 	exp.c \
 	exp10.c \
+	exp10m1.c \
 	exp2.c \
+	exp2m1.c \
 	exp3.c \
 	exp_2.c \
 	expm1.c \
@@ -99,6 +107,7 @@ SRCS=	\
 	fits_ushort.c \
 	fma.c \
 	fmma.c \
+	fmod_ui.c \
 	fms.c \
 	fpif.c \
 	frac.c \
@@ -122,7 +131,7 @@ SRCS=	\
 	get_ui.c \
 	get_uj.c \
 	get_z.c \
-	get_z_exp.c \
+	get_z_2exp.c \
 	gmp_op.c \
 	grandom.c \
 	hypot.c \
@@ -144,8 +153,10 @@ SRCS=	\
 	lngamma.c \
 	log.c \
 	log10.c \
+	log10p1.c \
 	log1p.c \
 	log2.c \
+	log2p1.c \
 	log_ui.c \
 	logging.c \
 	min_prec.c \
@@ -170,9 +181,12 @@ SRCS=	\
 	pool.c \
 	pow.c \
 	pow_si.c \
+	pow_sj.c \
 	pow_ui.c \
+	pow_uj.c \
 	pow_z.c \
 	powerof2.c \
+	powr.c \
 	print_raw.c \
 	print_rnd_mode.c \
 	printf.c \
@@ -214,7 +228,7 @@ SRCS=	\
 	set_ui_2exp.c \
 	set_uj.c \
 	set_z.c \
-	set_z_exp.c \
+	set_z_2exp.c \
 	set_zero.c \
 	setmax.c \
 	setmin.c \
@@ -226,6 +240,7 @@ SRCS=	\
 	sin_cos.c \
 	sinh.c \
 	sinh_cosh.c \
+	sinu.c \
 	sqr.c \
 	sqrt.c \
 	sqrt_ui.c \
@@ -241,6 +256,7 @@ SRCS=	\
 	swap.c \
 	tan.c \
 	tanh.c \
+	tanu.c \
 	total_order.c \
 	ubf.c \
 	uceil_exp2.c \



CVS commit: src/external/lgpl3/mpfr/lib/libmpfr

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:12:02 UTC 2023

Modified Files:
src/external/lgpl3/mpfr/lib/libmpfr: Makefile

Log Message:
updates for mpfr 4.2.0.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/lgpl3/mpfr/lib/libmpfr/Makefile

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



CVS commit: src/external/lgpl3/mpfr/dist

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:11:12 UTC 2023

Modified Files:
src/external/lgpl3/mpfr/dist: Makefile.in VERSION config.guess
config.sub
src/external/lgpl3/mpfr/dist/src: Makefile.in mpfr-longlong.h
vasprintf.c
src/external/lgpl3/mpfr/dist/tests: tasin.c tatan.c texp.c
Removed Files:
src/external/lgpl3/mpfr/dist/src: get_z_exp.c set_z_exp.c
src/external/lgpl3/mpfr/dist/tests: tset_z_exp.c

Log Message:
merge mpfr 4.2.0.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/mpfr/dist/Makefile.in \
src/external/lgpl3/mpfr/dist/VERSION
cvs rdiff -u -r1.7 -r1.8 src/external/lgpl3/mpfr/dist/config.guess
cvs rdiff -u -r1.4 -r1.5 src/external/lgpl3/mpfr/dist/config.sub
cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/mpfr/dist/src/Makefile.in
cvs rdiff -u -r1.1.1.4 -r0 src/external/lgpl3/mpfr/dist/src/get_z_exp.c \
src/external/lgpl3/mpfr/dist/src/set_z_exp.c
cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h \
src/external/lgpl3/mpfr/dist/src/vasprintf.c
cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/mpfr/dist/tests/tasin.c \
src/external/lgpl3/mpfr/dist/tests/tatan.c \
src/external/lgpl3/mpfr/dist/tests/texp.c
cvs rdiff -u -r1.1.1.5 -r0 src/external/lgpl3/mpfr/dist/tests/tset_z_exp.c

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



CVS import: src/external/lgpl3/mpfr/dist

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:08:43 UTC 2023

Update of /cvsroot/src/external/lgpl3/mpfr/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3779

Log Message:
initial import of MPFR 4.2.0.  changes from 4.1.0 include:

Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes
in the behavior of the formatted output functions may be visible,
regarded as underspecified behavior or bug fixes (see below).

New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
mpfr_atanu and mpfr_atan2u.

New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi,
mpfr_asinpi, mpfr_atanpi and mpfr_atan2pi.

New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
mpfr_compound_si.

New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj,
mpfr_pow_sj and mpfr_rootn_si (mpfr_pown is actually a macro defined as
an alias for mpfr_pow_sj).

Bug fixes.
- In particular, for the formatted output functions (mpfr_printf, etc.),
the case where the precision consists only of a period has been fixed to
be like .0 as specified in the ISO C standard, and the manual has been
corrected and clarified.
- The macros of the custom interface have also been fixed:
they now behave like functions (except a minor limitation for
mpfr_custom_init_set).

Status:

Vendor Tag: mpfr
Release Tags:   mpfr-4-2-0

U src/external/lgpl3/mpfr/dist/test-driver
U src/external/lgpl3/mpfr/dist/COPYING.LESSER
C src/external/lgpl3/mpfr/dist/Makefile.in
U src/external/lgpl3/mpfr/dist/configure
U src/external/lgpl3/mpfr/dist/README
U src/external/lgpl3/mpfr/dist/NEWS
U src/external/lgpl3/mpfr/dist/ar-lib
U src/external/lgpl3/mpfr/dist/BUGS
U src/external/lgpl3/mpfr/dist/PATCHES
U src/external/lgpl3/mpfr/dist/configure.ac
U src/external/lgpl3/mpfr/dist/mpfr.pc.in
U src/external/lgpl3/mpfr/dist/acinclude.m4
U src/external/lgpl3/mpfr/dist/install-sh
U src/external/lgpl3/mpfr/dist/INSTALL
U src/external/lgpl3/mpfr/dist/TODO
U src/external/lgpl3/mpfr/dist/ltmain.sh
C src/external/lgpl3/mpfr/dist/config.guess
U src/external/lgpl3/mpfr/dist/COPYING
U src/external/lgpl3/mpfr/dist/ChangeLog
U src/external/lgpl3/mpfr/dist/compile
U src/external/lgpl3/mpfr/dist/aclocal.m4
U src/external/lgpl3/mpfr/dist/Makefile.am
U src/external/lgpl3/mpfr/dist/depcomp
U src/external/lgpl3/mpfr/dist/AUTHORS
U src/external/lgpl3/mpfr/dist/missing
C src/external/lgpl3/mpfr/dist/VERSION
N src/external/lgpl3/mpfr/dist/version-ext.sh
C src/external/lgpl3/mpfr/dist/config.sub
U src/external/lgpl3/mpfr/dist/examples/threads.c
U src/external/lgpl3/mpfr/dist/examples/sample.c
U src/external/lgpl3/mpfr/dist/examples/divworst.c
U src/external/lgpl3/mpfr/dist/examples/rndo-add.c
U src/external/lgpl3/mpfr/dist/examples/ReadMe
U src/external/lgpl3/mpfr/dist/examples/can_round.c
U src/external/lgpl3/mpfr/dist/examples/version.c
U src/external/lgpl3/mpfr/dist/m4/libtool.m4
U src/external/lgpl3/mpfr/dist/m4/ltversion.m4
N src/external/lgpl3/mpfr/dist/m4/ax_pthread.m4
U src/external/lgpl3/mpfr/dist/m4/ltoptions.m4
U src/external/lgpl3/mpfr/dist/m4/lt~obsolete.m4
U src/external/lgpl3/mpfr/dist/m4/ltsugar.m4
N src/external/lgpl3/mpfr/dist/tests/tcosu.c
U src/external/lgpl3/mpfr/dist/tests/tbuildopt.c
U src/external/lgpl3/mpfr/dist/tests/tstckintc.c
U src/external/lgpl3/mpfr/dist/tests/thyperbolic.c
U src/external/lgpl3/mpfr/dist/tests/tsum.c
U src/external/lgpl3/mpfr/dist/tests/troot.c
U src/external/lgpl3/mpfr/dist/tests/tsi_op.c
U src/external/lgpl3/mpfr/dist/tests/tsub_d.c
U src/external/lgpl3/mpfr/dist/tests/tdim.c
U src/external/lgpl3/mpfr/dist/tests/tadd_ui.c
U src/external/lgpl3/mpfr/dist/tests/mpfr-test.h
U src/external/lgpl3/mpfr/dist/tests/Makefile.in
U src/external/lgpl3/mpfr/dist/tests/tget_sj.c
N src/external/lgpl3/mpfr/dist/tests/tatan2u.c
U src/external/lgpl3/mpfr/dist/tests/tversion.c
U src/external/lgpl3/mpfr/dist/tests/tgamma_inc.c
U src/external/lgpl3/mpfr/dist/tests/tset_d.c
U src/external/lgpl3/mpfr/dist/tests/tfits.c
N src/external/lgpl3/mpfr/dist/tests/tpowr.c
U src/external/lgpl3/mpfr/dist/tests/tget_set_d64.c
U src/external/lgpl3/mpfr/dist/tests/tmul_2exp.c
U src/external/lgpl3/mpfr/dist/tests/tadd.c
U src/external/lgpl3/mpfr/dist/tests/tcosh.c
U src/external/lgpl3/mpfr/dist/tests/tcoth.c
U src/external/lgpl3/mpfr/dist/tests/tgmpop.c
U src/external/lgpl3/mpfr/dist/tests/turandom.c
U src/external/lgpl3/mpfr/dist/tests/tasinh.c
U src/external/lgpl3/mpfr/dist/tests/tset_sj.c
U src/external/lgpl3/mpfr/dist/tests/teint.c
U src/external/lgpl3/mpfr/dist/tests/tlog_ui.c
U src/external/lgpl3/mpfr/dist/tests/tfmma.c
U src/external/lgpl3/mpfr/dist/tests/tui_div.c
U src/external/lgpl3/mpfr/dist/tests/terf.c
U src/external/lgpl3/mpfr/dist/tests/tnrandom.c
U src/external/lgpl3/mpfr/dist/tests/trandom_deviate.c
U src/external/lgpl3/mpfr/dist/tests/random2.c
U src/external/lgpl3/mpfr/dist/tests/tlngamma.c
U src/external/lgpl3/mpfr/dist/tests/tsqrt.c
U src/external/lgpl3/mpfr/dist/tests/tget_set_d128.c

CVS import: src/external/lgpl3/mpfr/dist

2023-03-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar  5 22:08:43 UTC 2023

Update of /cvsroot/src/external/lgpl3/mpfr/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3779

Log Message:
initial import of MPFR 4.2.0.  changes from 4.1.0 include:

Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes
in the behavior of the formatted output functions may be visible,
regarded as underspecified behavior or bug fixes (see below).

New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
mpfr_atanu and mpfr_atan2u.

New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi,
mpfr_asinpi, mpfr_atanpi and mpfr_atan2pi.

New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
mpfr_compound_si.

New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj,
mpfr_pow_sj and mpfr_rootn_si (mpfr_pown is actually a macro defined as
an alias for mpfr_pow_sj).

Bug fixes.
- In particular, for the formatted output functions (mpfr_printf, etc.),
the case where the precision consists only of a period has been fixed to
be like .0 as specified in the ISO C standard, and the manual has been
corrected and clarified.
- The macros of the custom interface have also been fixed:
they now behave like functions (except a minor limitation for
mpfr_custom_init_set).

Status:

Vendor Tag: mpfr
Release Tags:   mpfr-4-2-0

U src/external/lgpl3/mpfr/dist/test-driver
U src/external/lgpl3/mpfr/dist/COPYING.LESSER
C src/external/lgpl3/mpfr/dist/Makefile.in
U src/external/lgpl3/mpfr/dist/configure
U src/external/lgpl3/mpfr/dist/README
U src/external/lgpl3/mpfr/dist/NEWS
U src/external/lgpl3/mpfr/dist/ar-lib
U src/external/lgpl3/mpfr/dist/BUGS
U src/external/lgpl3/mpfr/dist/PATCHES
U src/external/lgpl3/mpfr/dist/configure.ac
U src/external/lgpl3/mpfr/dist/mpfr.pc.in
U src/external/lgpl3/mpfr/dist/acinclude.m4
U src/external/lgpl3/mpfr/dist/install-sh
U src/external/lgpl3/mpfr/dist/INSTALL
U src/external/lgpl3/mpfr/dist/TODO
U src/external/lgpl3/mpfr/dist/ltmain.sh
C src/external/lgpl3/mpfr/dist/config.guess
U src/external/lgpl3/mpfr/dist/COPYING
U src/external/lgpl3/mpfr/dist/ChangeLog
U src/external/lgpl3/mpfr/dist/compile
U src/external/lgpl3/mpfr/dist/aclocal.m4
U src/external/lgpl3/mpfr/dist/Makefile.am
U src/external/lgpl3/mpfr/dist/depcomp
U src/external/lgpl3/mpfr/dist/AUTHORS
U src/external/lgpl3/mpfr/dist/missing
C src/external/lgpl3/mpfr/dist/VERSION
N src/external/lgpl3/mpfr/dist/version-ext.sh
C src/external/lgpl3/mpfr/dist/config.sub
U src/external/lgpl3/mpfr/dist/examples/threads.c
U src/external/lgpl3/mpfr/dist/examples/sample.c
U src/external/lgpl3/mpfr/dist/examples/divworst.c
U src/external/lgpl3/mpfr/dist/examples/rndo-add.c
U src/external/lgpl3/mpfr/dist/examples/ReadMe
U src/external/lgpl3/mpfr/dist/examples/can_round.c
U src/external/lgpl3/mpfr/dist/examples/version.c
U src/external/lgpl3/mpfr/dist/m4/libtool.m4
U src/external/lgpl3/mpfr/dist/m4/ltversion.m4
N src/external/lgpl3/mpfr/dist/m4/ax_pthread.m4
U src/external/lgpl3/mpfr/dist/m4/ltoptions.m4
U src/external/lgpl3/mpfr/dist/m4/lt~obsolete.m4
U src/external/lgpl3/mpfr/dist/m4/ltsugar.m4
N src/external/lgpl3/mpfr/dist/tests/tcosu.c
U src/external/lgpl3/mpfr/dist/tests/tbuildopt.c
U src/external/lgpl3/mpfr/dist/tests/tstckintc.c
U src/external/lgpl3/mpfr/dist/tests/thyperbolic.c
U src/external/lgpl3/mpfr/dist/tests/tsum.c
U src/external/lgpl3/mpfr/dist/tests/troot.c
U src/external/lgpl3/mpfr/dist/tests/tsi_op.c
U src/external/lgpl3/mpfr/dist/tests/tsub_d.c
U src/external/lgpl3/mpfr/dist/tests/tdim.c
U src/external/lgpl3/mpfr/dist/tests/tadd_ui.c
U src/external/lgpl3/mpfr/dist/tests/mpfr-test.h
U src/external/lgpl3/mpfr/dist/tests/Makefile.in
U src/external/lgpl3/mpfr/dist/tests/tget_sj.c
N src/external/lgpl3/mpfr/dist/tests/tatan2u.c
U src/external/lgpl3/mpfr/dist/tests/tversion.c
U src/external/lgpl3/mpfr/dist/tests/tgamma_inc.c
U src/external/lgpl3/mpfr/dist/tests/tset_d.c
U src/external/lgpl3/mpfr/dist/tests/tfits.c
N src/external/lgpl3/mpfr/dist/tests/tpowr.c
U src/external/lgpl3/mpfr/dist/tests/tget_set_d64.c
U src/external/lgpl3/mpfr/dist/tests/tmul_2exp.c
U src/external/lgpl3/mpfr/dist/tests/tadd.c
U src/external/lgpl3/mpfr/dist/tests/tcosh.c
U src/external/lgpl3/mpfr/dist/tests/tcoth.c
U src/external/lgpl3/mpfr/dist/tests/tgmpop.c
U src/external/lgpl3/mpfr/dist/tests/turandom.c
U src/external/lgpl3/mpfr/dist/tests/tasinh.c
U src/external/lgpl3/mpfr/dist/tests/tset_sj.c
U src/external/lgpl3/mpfr/dist/tests/teint.c
U src/external/lgpl3/mpfr/dist/tests/tlog_ui.c
U src/external/lgpl3/mpfr/dist/tests/tfmma.c
U src/external/lgpl3/mpfr/dist/tests/tui_div.c
U src/external/lgpl3/mpfr/dist/tests/terf.c
U src/external/lgpl3/mpfr/dist/tests/tnrandom.c
U src/external/lgpl3/mpfr/dist/tests/trandom_deviate.c
U src/external/lgpl3/mpfr/dist/tests/random2.c
U src/external/lgpl3/mpfr/dist/tests/tlngamma.c
U src/external/lgpl3/mpfr/dist/tests/tsqrt.c
U src/external/lgpl3/mpfr/dist/tests/tget_set_d128.c

CVS commit: src/sys/arch/evbarm/fdt

2023-03-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  5 22:04:54 UTC 2023

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Locate wedges as boot device and also match a partition GUID.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/evbarm/fdt/fdt_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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.100 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.101
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.100	Sun Feb  5 22:42:39 2023
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Sun Mar  5 22:04:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.100 2023/02/05 22:42:39 mrg Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.101 2023/03/05 22:04:54 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.100 2023/02/05 22:42:39 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.101 2023/03/05 22:04:54 mlelstv Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -743,9 +743,6 @@ fdt_detect_root_device(device_t dev)
 {
 	int error, len;
 
-	if (booted_device)
-		return;
-
 	const int chosen = OF_finddevice("/chosen");
 	if (chosen < 0)
 		return;
@@ -801,8 +798,15 @@ fdt_detect_root_device(device_t dev)
 		const struct uuid *guid =
 		fdtbus_get_prop(chosen, "netbsd,gpt-guid", );
 
-		if (guid != NULL && len == 16)
-			booted_device = dev;
+		if (guid == NULL || len != 16)
+			return;
+
+		char guidstr[UUID_STR_LEN];
+		uuid_snprintf(guidstr, sizeof(guidstr), guid);
+
+		device_t dv = dkwedge_find_by_wname(guidstr);
+		if (dv != NULL)
+			booted_device = dv;
 
 		return;
 	}
@@ -895,8 +899,7 @@ fdt_cpu_rootconf(void)
 		if (device_class(dev) != DV_DISK)
 			continue;
 
-		if (device_is_a(dev, "ld") || device_is_a(dev, "sd") || device_is_a(dev, "wd"))
-			fdt_detect_root_device(dev);
+		fdt_detect_root_device(dev);
 
 		if (booted_device != NULL)
 			break;



CVS commit: src/sys/arch/evbarm/fdt

2023-03-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  5 22:04:54 UTC 2023

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Locate wedges as boot device and also match a partition GUID.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/evbarm/fdt/fdt_machdep.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/xdebug

2023-03-05 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Mar  5 18:03:35 UTC 2023

Modified Files:
src/distrib/sets/lists/xdebug: md.i386 md.sparc64

Log Message:
s/degub/debug/ in syspkgs definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/xdebug/md.i386
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/xdebug/md.sparc64

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/xdebug/md.i386
diff -u src/distrib/sets/lists/xdebug/md.i386:1.58 src/distrib/sets/lists/xdebug/md.i386:1.59
--- src/distrib/sets/lists/xdebug/md.i386:1.58	Sun Feb 26 20:16:13 2023
+++ src/distrib/sets/lists/xdebug/md.i386	Sun Mar  5 18:03:35 2023
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.58 2023/02/26 20:16:13 mrg Exp $
+# $NetBSD: md.i386,v 1.59 2023/03/05 18:03:35 andvar Exp $
 ./usr/X11R7/lib/libI810XvMC_g.axdebug-libI810XvMC-debuglib	xorg,debuglib
 ./usr/X11R7/lib/libIntelXvMC_g.a			xdebug-libIntelXvMC-debuglib	xorg,debuglib
 ./usr/X11R7/lib/libchromeXvMCPro_g.a			xdebug-libchromeXvMCPro-debuglib	xorg,debuglib
@@ -101,7 +101,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_alpine.so.1.debug	xdebug-obsolete	obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_drv.so.1.debug	xdebug-xf86-video-cirrus-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_laguna.so.1.debug	xdebug-obsolete	obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/elographics_drv.so.1.debug	xdegub-xf86-input-elographics-debug	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/elographics_drv.so.1.debug	xdebug-xf86-input-elographics-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/geode_drv.so.2.debug	xdebug-xf86-video-geode-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug	xdebug-obsolete		obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i128_drv.so.1.debug	xdebug-xf86-video-i128-debug		xorg,debug

Index: src/distrib/sets/lists/xdebug/md.sparc64
diff -u src/distrib/sets/lists/xdebug/md.sparc64:1.19 src/distrib/sets/lists/xdebug/md.sparc64:1.20
--- src/distrib/sets/lists/xdebug/md.sparc64:1.19	Fri Jul 15 04:47:56 2022
+++ src/distrib/sets/lists/xdebug/md.sparc64	Sun Mar  5 18:03:35 2023
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.19 2022/07/15 04:47:56 mrg Exp $
+# $NetBSD: md.sparc64,v 1.20 2023/03/05 18:03:35 andvar Exp $
 ./usr/X11R7/lib/modules/extensions/libcfb32_g.a		xdebug-obsolete	xorg,obsolete
 ./usr/X11R7/lib/modules/extensions/libcfb_g.a		xdebug-obsolete	xorg,obsolete
 ./usr/X11R7/lib/modules/extensions/libdbe_g.a		xdebug-obsolete	xorg,obsolete
@@ -72,7 +72,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/mouse_drv.so.1.debug	xdebug-xf86-input-mouse-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/r128_drv.so.6.debug	xdebug-xf86-video-r128-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/radeon_drv.so.6.debug	xdebug-xf86-video-radeon-kms-debug		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/suncg6_drv.so.1.debug	xdebug-xf86-video-suncg6-degub		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/suncg6_drv.so.1.debug	xdebug-xf86-video-suncg6-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sunffb_drv.so.1.debug	xdebug-xf86-video-sunffb-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sunleo_drv.so.1.debug	-unknown-		xorg,debug,xorg_server_ver=110
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sunleo_drv.so.1.debug	xdebug-obsolete		xorg,obsolete,xorg_server_ver=120



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

2023-03-05 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Mar  5 18:03:35 UTC 2023

Modified Files:
src/distrib/sets/lists/xdebug: md.i386 md.sparc64

Log Message:
s/degub/debug/ in syspkgs definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/xdebug/md.i386
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/xdebug/md.sparc64

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



CVS commit: src/lib/libc/sys

2023-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  5 16:24:31 UTC 2023

Modified Files:
src/lib/libc/sys: open.2

Log Message:
Document the error code when O_REGULAR is specified and the last
path component is not a regular file.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libc/sys/open.2

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



CVS commit: src/lib/libc/sys

2023-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  5 16:24:31 UTC 2023

Modified Files:
src/lib/libc/sys: open.2

Log Message:
Document the error code when O_REGULAR is specified and the last
path component is not a regular file.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libc/sys/open.2

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/sys/open.2
diff -u src/lib/libc/sys/open.2:1.65 src/lib/libc/sys/open.2:1.66
--- src/lib/libc/sys/open.2:1.65	Wed Mar 17 08:13:29 2021
+++ src/lib/libc/sys/open.2	Sun Mar  5 16:24:31 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: open.2,v 1.65 2021/03/17 08:13:29 wiz Exp $
+.\"	$NetBSD: open.2,v 1.66 2023/03/05 16:24:31 thorpej Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)open.2	8.2 (Berkeley) 11/16/93
 .\"
-.Dd March 17, 2021
+.Dd March 5, 2023
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -365,6 +365,9 @@ was specified, but the last path compone
 specifies returning
 .Bq Er ELOOP
 for this case.
+.It Bq Er EFTYPE
+.Dv O_REGULAR
+is specified and the last path component is not a regular file.
 .It Bq Er EINTR
 The
 .Fn open



CVS commit: src/sys/kern

2023-03-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  5 14:40:32 UTC 2023

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

Log Message:
open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

SA_RESTART
This flag affects the behavior of interruptible functions;
that is, those specified to fail with errno set to [EINTR].
If set, and a function specified as interruptible is
interrupted by this signal, the function shall restart and
shall not fail with [EINTR] unless otherwise specified.  If
an interruptible function which uses a timeout is restarted,
the duration of the timeout following the restart is set to
an unspecified value that does not exceed the original
timeout value.  If the flag is not set, interruptible
functions interrupted by this signal shall fail with errno
set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:

Author: Kirk McKusick 
Date:   Tue Apr 10 19:36:33 1990 -0800

eliminate longjmp from the kernel (for karels)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#)vfs_syscalls.c  7.42 (Berkeley) 3/26/90
+ * @(#)vfs_syscalls.c  7.43 (Berkeley) 4/10/90
  */

 #include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
if (error = vn_open(ndp, fmode, (cmode & 0) &~ S_ISVTX)) {
crfree(fp->f_cred);
fp->f_count--;
-   if (error == -1)/* XXX from fdopen */
-   return (0); /* XXX from fdopen */
+   if (error == EJUSTRETURN)   /* XXX from fdopen */
+   return (0); /* XXX from fdopen */
+   if (error == ERESTART)
+   error = EINTR;
scp->sc_ofile[indx] = NULL;
return (error);
}

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe)

This change appears to have served two related purposes:

1. The fdopen function (the erstwhile open routine for /dev/fd/N)
   used to return -1 as a hack to mean it had just duplicated the fd;
   it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
   return EJUSTRETURN, now defined to be -2, presumably to avoid a
   conflict with ERESTART, defined to be -1.  So this change finished
   part of the change by Mike Karels to use a different magic return
   code from fdopen.

   Of course, today we use still another disgusting hack, EDUPFD, for
   the same purpose, so none of this is relevant any more.

2. Prior to April 1990, the kernel handled signals during tsleep(9)
   by longjmping out to the system call entry point or similar.  In
   April 1990, Mike Karels worked to convert all of that into
   explicit unwind logic by passing through EINTR or ERESTART as
   appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

   r246472 | kib | 2013-02-07 14:53:33 + (Thu, 07 Feb 2013) | 11 lines

   Stop translating the ERESTART error from the open(2) into EINTR.
   Posix requires that open(2) is restartable for SA_RESTART.

   For non-posix objects, in particular, devfs nodes, still disable
   automatic restart of the opens. The open call to a driver could have
   significant side effects for the hardware.

   Noted and reviewed by:  jilles
   Discussed with: bde
   MFC after:  2 weeks

Index: vfs_syscalls.c
===
--- vfs_syscalls.c  (revision 246471)
+++ vfs_syscalls.c  (revision 246472)
@@ -1106,8 +1106,6 @@
goto success;
}

-   if (error == ERESTART)
-   error = EINTR;
goto bad;
}
td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a 

CVS commit: src/sys/kern

2023-03-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  5 14:40:32 UTC 2023

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

Log Message:
open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

SA_RESTART
This flag affects the behavior of interruptible functions;
that is, those specified to fail with errno set to [EINTR].
If set, and a function specified as interruptible is
interrupted by this signal, the function shall restart and
shall not fail with [EINTR] unless otherwise specified.  If
an interruptible function which uses a timeout is restarted,
the duration of the timeout following the restart is set to
an unspecified value that does not exceed the original
timeout value.  If the flag is not set, interruptible
functions interrupted by this signal shall fail with errno
set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:

Author: Kirk McKusick 
Date:   Tue Apr 10 19:36:33 1990 -0800

eliminate longjmp from the kernel (for karels)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#)vfs_syscalls.c  7.42 (Berkeley) 3/26/90
+ * @(#)vfs_syscalls.c  7.43 (Berkeley) 4/10/90
  */

 #include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
if (error = vn_open(ndp, fmode, (cmode & 0) &~ S_ISVTX)) {
crfree(fp->f_cred);
fp->f_count--;
-   if (error == -1)/* XXX from fdopen */
-   return (0); /* XXX from fdopen */
+   if (error == EJUSTRETURN)   /* XXX from fdopen */
+   return (0); /* XXX from fdopen */
+   if (error == ERESTART)
+   error = EINTR;
scp->sc_ofile[indx] = NULL;
return (error);
}

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe)

This change appears to have served two related purposes:

1. The fdopen function (the erstwhile open routine for /dev/fd/N)
   used to return -1 as a hack to mean it had just duplicated the fd;
   it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
   return EJUSTRETURN, now defined to be -2, presumably to avoid a
   conflict with ERESTART, defined to be -1.  So this change finished
   part of the change by Mike Karels to use a different magic return
   code from fdopen.

   Of course, today we use still another disgusting hack, EDUPFD, for
   the same purpose, so none of this is relevant any more.

2. Prior to April 1990, the kernel handled signals during tsleep(9)
   by longjmping out to the system call entry point or similar.  In
   April 1990, Mike Karels worked to convert all of that into
   explicit unwind logic by passing through EINTR or ERESTART as
   appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

   r246472 | kib | 2013-02-07 14:53:33 + (Thu, 07 Feb 2013) | 11 lines

   Stop translating the ERESTART error from the open(2) into EINTR.
   Posix requires that open(2) is restartable for SA_RESTART.

   For non-posix objects, in particular, devfs nodes, still disable
   automatic restart of the opens. The open call to a driver could have
   significant side effects for the hardware.

   Noted and reviewed by:  jilles
   Discussed with: bde
   MFC after:  2 weeks

Index: vfs_syscalls.c
===
--- vfs_syscalls.c  (revision 246471)
+++ vfs_syscalls.c  (revision 246472)
@@ -1106,8 +1106,6 @@
goto success;
}

-   if (error == ERESTART)
-   error = EINTR;
goto bad;
}
td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a 

CVS commit: [netbsd-10] src/doc

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:38:29 UTC 2023

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

Log Message:
Tickets #110 - #112


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-10.0

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

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:38:29 UTC 2023

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

Log Message:
Tickets #110 - #112


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-10.0

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.0
diff -u src/doc/CHANGES-10.0:1.1.2.39 src/doc/CHANGES-10.0:1.1.2.40
--- src/doc/CHANGES-10.0:1.1.2.39	Fri Mar  3 17:03:36 2023
+++ src/doc/CHANGES-10.0	Sun Mar  5 14:38:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.39 2023/03/03 17:03:36 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.40 2023/03/05 14:38:29 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -1416,3 +1416,22 @@ sys/arch/arm/ti/if_cpsw.c			1.17
 	debugging is requested.
 	[sekiya, ticket #109]
 
+external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c 1.81
+
+	Adapt zfs_netbsd_access() to ACL support.
+	[hannken, ticket #110]
+
+sys/miscfs/genfs/genfs_vnops.c			1.220
+
+	PR 57246: fix genfs_can_chtimes() to allow setting the current
+	time with only write permission on the file.
+	[hannken, ticket #111]
+
+sbin/nvmectl/logpage.c1.11
+sbin/nvmectl/nvmectl.h1.10
+sbin/nvmectl/util.c1.3
+
+	nvmectl(8): data units read/written are counted in 1000s of 512 bytes.
+	Convert to human-readable value.
+	[mlelstv, ticket #112]
+



CVS commit: [netbsd-10] src/sbin/nvmectl

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:37:14 UTC 2023

Modified Files:
src/sbin/nvmectl [netbsd-10]: logpage.c nvmectl.h util.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #112):

sbin/nvmectl/nvmectl.h: revision 1.10
sbin/nvmectl/logpage.c: revision 1.11
sbin/nvmectl/util.c: revision 1.3

Data units read/written are counted in 1000s of 512 bytes.

Convert to human-readable value.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/sbin/nvmectl/logpage.c
cvs rdiff -u -r1.9 -r1.9.6.1 src/sbin/nvmectl/nvmectl.h
cvs rdiff -u -r1.2 -r1.2.16.1 src/sbin/nvmectl/util.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/sbin/nvmectl

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:37:14 UTC 2023

Modified Files:
src/sbin/nvmectl [netbsd-10]: logpage.c nvmectl.h util.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #112):

sbin/nvmectl/nvmectl.h: revision 1.10
sbin/nvmectl/logpage.c: revision 1.11
sbin/nvmectl/util.c: revision 1.3

Data units read/written are counted in 1000s of 512 bytes.

Convert to human-readable value.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/sbin/nvmectl/logpage.c
cvs rdiff -u -r1.9 -r1.9.6.1 src/sbin/nvmectl/nvmectl.h
cvs rdiff -u -r1.2 -r1.2.16.1 src/sbin/nvmectl/util.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/nvmectl/logpage.c
diff -u src/sbin/nvmectl/logpage.c:1.10 src/sbin/nvmectl/logpage.c:1.10.2.1
--- src/sbin/nvmectl/logpage.c:1.10	Sun Jul 31 13:49:23 2022
+++ src/sbin/nvmectl/logpage.c	Sun Mar  5 14:37:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: logpage.c,v 1.10 2022/07/31 13:49:23 mlelstv Exp $	*/
+/*	$NetBSD: logpage.c,v 1.10.2.1 2023/03/05 14:37:14 martin Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: logpage.c,v 1.10 2022/07/31 13:49:23 mlelstv Exp $");
+__RCSID("$NetBSD: logpage.c,v 1.10.2.1 2023/03/05 14:37:14 martin Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/logpage.c 329824 2018-02-22 13:32:31Z wma $");
 #endif
@@ -263,9 +263,9 @@ print_log_health(const struct nvm_identi
 	printf("Percentage used:%u\n",
 	health->percentage_used);
 
-	print_bignum("Data units (512 byte) read:", health->data_units_read, "");
-	print_bignum("Data units (512 byte) written:", health->data_units_written,
-	"");
+	print_bignum1("Data units read:", health->data_units_read, "", "B", 512000);
+	print_bignum1("Data units written:", health->data_units_written,
+	"", "B", 512000);
 	print_bignum("Host read commands:", health->host_read_commands, "");
 	print_bignum("Host write commands:", health->host_write_commands, "");
 	print_bignum("Controller busy time (minutes):", health->controller_busy_time,

Index: src/sbin/nvmectl/nvmectl.h
diff -u src/sbin/nvmectl/nvmectl.h:1.9 src/sbin/nvmectl/nvmectl.h:1.9.6.1
--- src/sbin/nvmectl/nvmectl.h:1.9	Sun Sep 27 18:17:35 2020
+++ src/sbin/nvmectl/nvmectl.h	Sun Mar  5 14:37:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmectl.h,v 1.9 2020/09/27 18:17:35 jdolecek Exp $	*/
+/*	$NetBSD: nvmectl.h,v 1.9.6.1 2023/03/05 14:37:14 martin Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -109,6 +109,7 @@ __dead void dispatch(int argc, char *arg
 /* Utility Routines */
 void nvme_strvis(uint8_t *, int, const uint8_t *, int);
 void print_bignum(const char *, uint64_t v[2], const char *);
+void print_bignum1(const char *, uint64_t v[2], const char *, const char *, long);
 uint64_t le48dec(const void *);
 
 #endif	/* __NVMECTL_H__ */

Index: src/sbin/nvmectl/util.c
diff -u src/sbin/nvmectl/util.c:1.2 src/sbin/nvmectl/util.c:1.2.16.1
--- src/sbin/nvmectl/util.c:1.2	Wed Apr 18 10:11:44 2018
+++ src/sbin/nvmectl/util.c	Sun Mar  5 14:37:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.2 2018/04/18 10:11:44 nonaka Exp $	*/
+/*	$NetBSD: util.c,v 1.2.16.1 2023/03/05 14:37:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 2017 Netflix, Inc
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: util.c,v 1.2 2018/04/18 10:11:44 nonaka Exp $");
+__RCSID("$NetBSD: util.c,v 1.2.16.1 2023/03/05 14:37:14 martin Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/util.c 320423 2017-06-27 20:24:25Z imp $");
 #endif
@@ -84,10 +84,47 @@ nvme_strvis(u_char *dst, int dlen, const
 #define	METRIX_PREFIX_BUFSIZ	17
 #define	NO_METRIX_PREFIX_BUFSIZ	42
 
+static void
+unit_string(BIGNUM *bn, const char *unit, long scale, char *out, size_t len)
+{
+	size_t ulen = strlen(unit);
+	uint8_t tmp[4];
+	BN_CTX *ctx;
+	BIGNUM *sn;
+
+	if (6 + ulen + 3 >= len)
+		return;
+
+	if (scale > 1) {
+		ctx = BN_CTX_new();
+		if (ctx == NULL)
+			return;
+
+		tmp[0] = (scale >> 24) & 0xff;
+		tmp[1] = (scale >> 16) & 0xff;
+		tmp[2] = (scale >>  8) & 0xff;
+		tmp[3] = scale & 0xff;
+
+		sn = BN_bin2bn(tmp, sizeof(tmp), NULL);
+		if (sn != NULL) {
+			BN_mul(bn, bn, sn, ctx);
+			BN_free(sn);
+		}	
+
+		BN_CTX_free(ctx);
+	}
+
+	strncpy(out, " (", len);
+	humanize_bignum(out+2, 6 + ulen, bn, unit, HN_AUTOSCALE, HN_DECIMAL);
+	strncat(out, ")", len);
+}
+
 void
-print_bignum(const char *title, uint64_t v[2], const char *suffix)
+print_bignum1(const char *title, uint64_t v[2], const char *suffix,
+const char *unit, long scale)
 {
 	char buf[64];
+	char buf2[64];
 	uint8_t tmp[16];
 	uint64_t h, l;
 
@@ -119,15 +156,25 @@ print_bignum(const char *title, uint64_t
 #endif
 
 	buf[0] = '\0';
+	buf2[0] = '\0';
+
 	BIGNUM *bn = BN_bin2bn(tmp, sizeof(tmp), NULL);
 	if (bn != NULL) {
 		

CVS commit: [netbsd-10] src/sys/miscfs/genfs

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:34:59 UTC 2023

Modified Files:
src/sys/miscfs/genfs [netbsd-10]: genfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #111):

sys/miscfs/genfs/genfs_vnops.c: revision 1.220

Fix genfs_can_chtimes() to also handle the condition:

  If the time pointer is null, then write permission
  on the file is also sufficient.

>From FreeBSD.

Should fix PR kern/57246 "NFS group permissions regression"


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.219.4.1 src/sys/miscfs/genfs/genfs_vnops.c

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

Modified files:

Index: src/sys/miscfs/genfs/genfs_vnops.c
diff -u src/sys/miscfs/genfs/genfs_vnops.c:1.219 src/sys/miscfs/genfs/genfs_vnops.c:1.219.4.1
--- src/sys/miscfs/genfs/genfs_vnops.c:1.219	Sun Mar 27 17:10:55 2022
+++ src/sys/miscfs/genfs/genfs_vnops.c	Sun Mar  5 14:34:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_vnops.c,v 1.219 2022/03/27 17:10:55 christos Exp $	*/
+/*	$NetBSD: genfs_vnops.c,v 1.219.4.1 2023/03/05 14:34:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.219 2022/03/27 17:10:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.219.4.1 2023/03/05 14:34:59 martin Exp $");
 
 #include 
 #include 
@@ -1315,23 +1315,14 @@ genfs_can_chtimes(vnode_t *vp, kauth_cre
 	 * will be allowed to set the times [..] to the current 
 	 * server time.
 	 */
-	if ((error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred)) != 0)
-		return (vaflags & VA_UTIMES_NULL) == 0 ? EPERM : EACCES;
-
-	/* Must be owner, or... */
-	if (kauth_cred_geteuid(cred) == owner_uid)
-		return (0);
-
-	/* set the times to the current time, and... */
-	if ((vaflags & VA_UTIMES_NULL) == 0)
-		return (EPERM);
+	error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred);
+	if (error != 0 && (vaflags & VA_UTIMES_NULL) != 0)
+		error = VOP_ACCESS(vp, VWRITE, cred);
 
-	/* have write access. */
-	error = VOP_ACCESS(vp, VWRITE, cred);
 	if (error)
-		return (error);
+		return (vaflags & VA_UTIMES_NULL) == 0 ? EPERM : EACCES;
 
-	return (0);
+	return 0;
 }
 
 /*



CVS commit: [netbsd-10] src/sys/miscfs/genfs

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:34:59 UTC 2023

Modified Files:
src/sys/miscfs/genfs [netbsd-10]: genfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #111):

sys/miscfs/genfs/genfs_vnops.c: revision 1.220

Fix genfs_can_chtimes() to also handle the condition:

  If the time pointer is null, then write permission
  on the file is also sufficient.

>From FreeBSD.

Should fix PR kern/57246 "NFS group permissions regression"


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.219.4.1 src/sys/miscfs/genfs/genfs_vnops.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/external/cddl/osnet/dist/uts/common/fs/zfs

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:32:42 UTC 2023

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-10]: zfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #110):

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.81

Adapt zfs_netbsd_access() to ACL support.  As ZFS itself only
handles VREAD, VWRITE, VEXEC and VAPPEND we use kauth_authorize_vnode()
to handle VADMIN.

>From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.80.2.1 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.80 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.80.2.1
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.80	Mon Oct  3 16:04:19 2022
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Sun Mar  5 14:32:41 2023
@@ -5169,33 +5169,47 @@ zfs_netbsd_access(void *v)
 		accmode_t a_accmode;
 		kauth_cred_t a_cred;
 	} */ *ap = v;
-	struct vnode *vp = ap->a_vp;
-	accmode_t accmode = ap->a_accmode;
-	mode_t zfs_mode = 0;
+	vnode_t *vp = ap->a_vp;
+	znode_t *zp = VTOZ(vp);
+	accmode_t accmode;
 	kauth_cred_t cred = ap->a_cred;
-	int error;
+	int error = 0;
 
 	/*
-	 * XXX This is really random, especially the left shift by six,
-	 * and it exists only because of randomness in zfs_unix_to_v4
-	 * and zfs_zaccess_rwx in zfs_acl.c.
+	 * ZFS itself only knowns about VREAD, VWRITE, VEXEC and VAPPEND,
 	 */
-	if (accmode & VREAD)
-		zfs_mode |= S_IROTH;
-	if (accmode & VWRITE)
-		zfs_mode |= S_IWOTH;
-	if (accmode & VEXEC)
-		zfs_mode |= S_IXOTH;
-	zfs_mode <<= 6;
+	accmode = ap->a_accmode & (VREAD|VWRITE|VEXEC|VAPPEND);
+	if (accmode != 0)
+		error = zfs_access(vp, accmode, 0, cred, NULL);
 
-	KASSERT(VOP_ISLOCKED(vp));
-	error = zfs_access(vp, zfs_mode, 0, cred, NULL);
+	/*
+	 * VADMIN has to be handled by kauth_authorize_vnode().
+	 */
+	if (error == 0) {
+		accmode = ap->a_accmode & ~(VREAD|VWRITE|VEXEC|VAPPEND);
+		if (accmode != 0) {
+			error = kauth_authorize_vnode(cred,
+			KAUTH_ACCESS_ACTION(accmode, vp->v_type,
+			zp->z_mode & ALLPERMS), vp, NULL,
+			genfs_can_access(vp, cred, zp->z_uid,
+			zp->z_gid, zp->z_mode & ALLPERMS, NULL, accmode));
+		}
+	}
+
+	/*
+	 * For VEXEC, ensure that at least one execute bit is set for
+	 * non-directories.
+	 */
+	if (error == 0 && (ap->a_accmode & VEXEC) != 0 && vp->v_type != VDIR &&
+	(zp->z_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0) {
+		error = EACCES;
+	}
 
 	/* We expect EACCES as common error. */
 	if (error == EPERM)
 		error = EACCES;
 
-	return (error);
+	return error;
 }
 
 static int



CVS commit: [netbsd-10] src/external/cddl/osnet/dist/uts/common/fs/zfs

2023-03-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  5 14:32:42 UTC 2023

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-10]: zfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #110):

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.81

Adapt zfs_netbsd_access() to ACL support.  As ZFS itself only
handles VREAD, VWRITE, VEXEC and VAPPEND we use kauth_authorize_vnode()
to handle VADMIN.

>From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.80.2.1 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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



CVS commit: src/sys/dev/usb

2023-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  5 13:49:12 UTC 2023

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

Log Message:
In the HUP-wait path in ucomopen():
- Use cv_timedwait() rather than cv_timedwait_sig(); the wait here is
  bounded (and fairly short besides) and seems appropriate to treat like
  other uninterruptible waits.  The behavior is now consistent with com(4)
  in this regard.
- Map EWOULDBLOCK return from cv_timedwait() to 0, as the successful passage
  of time is not an error in this case.
- If the HUP-wait time has passed, clear the HUP-wait timestamp.

kern/57259 (although insufficient -- another change to vfs_syscalls.c
is required)


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/usb/ucom.c

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



CVS commit: src/sys/dev/usb

2023-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  5 13:49:12 UTC 2023

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

Log Message:
In the HUP-wait path in ucomopen():
- Use cv_timedwait() rather than cv_timedwait_sig(); the wait here is
  bounded (and fairly short besides) and seems appropriate to treat like
  other uninterruptible waits.  The behavior is now consistent with com(4)
  in this regard.
- Map EWOULDBLOCK return from cv_timedwait() to 0, as the successful passage
  of time is not an error in this case.
- If the HUP-wait time has passed, clear the HUP-wait timestamp.

kern/57259 (although insufficient -- another change to vfs_syscalls.c
is required)


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/usb/ucom.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/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.136 src/sys/dev/usb/ucom.c:1.137
--- src/sys/dev/usb/ucom.c:1.136	Fri Feb 17 23:44:18 2023
+++ src/sys/dev/usb/ucom.c	Sun Mar  5 13:49:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.136 2023/02/17 23:44:18 riastradh Exp $	*/
+/*	$NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.136 2023/02/17 23:44:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -552,11 +552,16 @@ ucomopen(dev_t dev, int flag, int mode, 
 			ms = MIN(INT_MAX - 1000, delta.tv_sec*1000);
 			ms += howmany(delta.tv_usec, 1000);
 			ticks = MAX(1, MIN(INT_MAX, mstohz(ms)));
-			error = cv_timedwait_sig(>sc_statecv, >sc_lock,
+			error = cv_timedwait(>sc_statecv, >sc_lock,
 			ticks);
 			mutex_exit(>sc_lock);
+			/* The successful passage of time is not an error. */
+			if (error == EWOULDBLOCK) {
+error = 0;
+			}
 			return error ? error : ERESTART;
 		}
+		timerclear(>sc_hup_time);
 	}
 
 	/*