CVS commit: src

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 07:57:52 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile opt-jobs-no-action.mk
Added Files:
src/usr.bin/make/unit-tests: opt-no-action-runflags.exp
opt-no-action-runflags.mk

Log Message:
make(1): add test for the -n option combined with RunFlags


To generate a diff of this commit:
cvs rdiff -u -r1.986 -r1.987 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-no-action-runflags.exp \
src/usr.bin/make/unit-tests/opt-no-action-runflags.mk

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



CVS commit: src

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 07:57:52 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile opt-jobs-no-action.mk
Added Files:
src/usr.bin/make/unit-tests: opt-no-action-runflags.exp
opt-no-action-runflags.mk

Log Message:
make(1): add test for the -n option combined with RunFlags


To generate a diff of this commit:
cvs rdiff -u -r1.986 -r1.987 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-no-action-runflags.exp \
src/usr.bin/make/unit-tests/opt-no-action-runflags.mk

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.986 src/distrib/sets/lists/tests/mi:1.987
--- src/distrib/sets/lists/tests/mi:1.986	Wed Dec  9 00:25:00 2020
+++ src/distrib/sets/lists/tests/mi	Wed Dec  9 07:57:51 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.986 2020/12/09 00:25:00 rillig Exp $
+# $NetBSD: mi,v 1.987 2020/12/09 07:57:51 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5229,6 +5229,8 @@
 ./usr/tests/usr.bin/make/unit-tests/opt-m-include-dir.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-no-action-at-all.exp			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-no-action-at-all.mk			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-no-action-runflags.exp			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-no-action-runflags.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-no-action.exptests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-no-action.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-query.exptests-usr.bin-tests	compattestfile,atf

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.241 src/usr.bin/make/unit-tests/Makefile:1.242
--- src/usr.bin/make/unit-tests/Makefile:1.241	Wed Dec  9 00:25:00 2020
+++ src/usr.bin/make/unit-tests/Makefile	Wed Dec  9 07:57:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.241 2020/12/09 00:25:00 rillig Exp $
+# $NetBSD: Makefile,v 1.242 2020/12/09 07:57:52 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -242,6 +242,7 @@ TESTS+=		opt-keep-going-multiple
 TESTS+=		opt-m-include-dir
 TESTS+=		opt-no-action
 TESTS+=		opt-no-action-at-all
+TESTS+=		opt-no-action-runflags
 TESTS+=		opt-query
 TESTS+=		opt-raw
 TESTS+=		opt-silent
@@ -475,6 +476,10 @@ SED_CMDS.opt-debug-jobs+=	-e 's,JobFinis
 SED_CMDS.opt-debug-jobs+=	-e 's,Command: ${.SHELL:T},Command: ,'
 # The "-q" may be there or not, see jobs.c, variable shells.
 SED_CMDS.opt-debug-jobs+=	-e 's,^\(.Command: \) -q,\1,'
+SED_CMDS.opt-no-action-runflags= \
+	-e '/^echo hide-from-output/d' \
+	-e 's,hide-from-output ,,' \
+	-e 's,hide-from-output,,'
 # For Compat_RunCommand, useShell == FALSE.
 SED_CMDS.sh-dots=		-e 's,^.*\.\.\.:.*,,'
 # For Compat_RunCommand, useShell == TRUE.

Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.3 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.4
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.3	Wed Dec  9 07:24:52 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.mk	Wed Dec  9 07:57:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: opt-jobs-no-action.mk,v 1.3 2020/12/09 07:24:52 rillig Exp $
+# $NetBSD: opt-jobs-no-action.mk,v 1.4 2020/12/09 07:57:52 rillig Exp $
 #
 # Tests for the combination of the options -j and -n, which prints the
 # commands instead of actually running them.
@@ -7,7 +7,11 @@
 # without the -j.  This is because all this code is implemented twice, once
 # in compat.c and once in job.c.
 #
-# See opt-jobs.mk for the corresponding tests without the -n option.
+# See also:
+#	opt-jobs.mk
+#		The corresponding tests without the -n option
+#	opt-no-action-combined.mk
+#		The corresponding tests without the -j option
 
 .MAKEFLAGS: -j1 -n
 
@@ -61,7 +65,6 @@ documented: .PHONY
 # Test all combinations of the 3 RunFlags.
 #
 # TODO: Closely inspect the output whether it makes sense.
-# XXX: The output should not contain the 'echo silent=...' lines.
 # XXX: silent=no always=no ignerr={no,yes} should be almost the same.
 #
 SILENT.no=	# none

Added files:

Index: src/usr.bin/make/unit-tests/opt-no-action-runflags.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-no-action-runflags.exp:1.1
--- /dev/null	Wed Dec  9 07:57:52 2020
+++ src/usr.bin/make/unit-tests/opt-no-action-runflags.exp	Wed Dec  9 07:57:52 2020
@@ -0,0 +1,34 @@
+begin combined
+

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

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 07:24:52 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): refine test for combining -j1 and -n


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

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



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

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 07:24:52 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): refine test for combining -j1 and -n


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.exp
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.2 src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.3
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.2	Wed Dec  9 00:43:48 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.exp	Wed Dec  9 07:24:52 2020
@@ -22,51 +22,55 @@ echo silent=no always=no ignerr=no
 silent=no always=no ignerr=no
 # .echoOff
 # .errOnOrEcho
-echo "true"
+echo "echo running"
 # .errExit
-{ true 
+{ echo running 
 } || exit $?
 # .echoOn
 echo
 
 echo silent=no always=no ignerr=yes
 silent=no always=no ignerr=yes
-false
+echo running; false
 echo
 
 echo silent=no always=yes ignerr=no
 silent=no always=yes ignerr=no
-true
+echo running
+running
 echo
 
 echo silent=no always=yes ignerr=yes
 silent=no always=yes ignerr=yes
-false
+echo running; false
+running
 *** Error code 1 (ignored)
 echo
 
 echo silent=yes always=no ignerr=no
 silent=yes always=no ignerr=no
 # .errExit
-{ true 
+{ echo running 
 } || exit $?
 # .echoOn
 echo
 
 echo silent=yes always=no ignerr=yes
 silent=yes always=no ignerr=yes
-false
+echo running; false
 # .echoOn
 echo
 
 echo silent=yes always=yes ignerr=no
 silent=yes always=yes ignerr=no
-true
+echo running
+running
 echo
 
 echo silent=yes always=yes ignerr=yes
 silent=yes always=yes ignerr=yes
-false
+echo running; false
+running
 *** Error code 1 (ignored)
 echo
 
Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.2 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.3
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.2	Wed Dec  9 00:43:48 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.mk	Wed Dec  9 07:24:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: opt-jobs-no-action.mk,v 1.2 2020/12/09 00:43:48 rillig Exp $
+# $NetBSD: opt-jobs-no-action.mk,v 1.3 2020/12/09 07:24:52 rillig Exp $
 #
 # Tests for the combination of the options -j and -n, which prints the
 # commands instead of actually running them.
@@ -30,13 +30,6 @@
 	ignore="\# .errOffOrExecIgnore\n""%s\n" \
 	errout="\# .errExit\n""{ %s \n} || exit $$?\n"
 
-SILENT.no=	# none
-SILENT.yes=	@
-ALWAYS.no=	# none
-ALWAYS.yes=	+
-IGNERR.no=	true
-IGNERR.yes=	-false
-
 all: documented combined
 .ORDER: documented combined
 
@@ -64,10 +57,20 @@ documented: .PHONY
 
 	@+echo
 
+
 # Test all combinations of the 3 RunFlags.
 #
 # TODO: Closely inspect the output whether it makes sense.
 # XXX: The output should not contain the 'echo silent=...' lines.
+# XXX: silent=no always=no ignerr={no,yes} should be almost the same.
+#
+SILENT.no=	# none
+SILENT.yes=	@
+ALWAYS.no=	# none
+ALWAYS.yes=	+
+IGNERR.no=	echo running
+IGNERR.yes=	-echo running; false
+#
 combined:
 	@+echo 'begin $@'
 	@+echo



CVS commit: src/sys/dev/usb

2020-12-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec  9 07:10:01 UTC 2020

Modified Files:
src/sys/dev/usb: ohci.c ohcivar.h

Log Message:
Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Also addresses the issue seen in PR kern/55835

Thanks to both Andreas Gustafsson and Edgar Fuß for testing.  Apologies to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/ohcivar.h

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

Modified files:

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.310 src/sys/dev/usb/ohci.c:1.311
--- src/sys/dev/usb/ohci.c:1.310	Wed Jun  3 15:38:02 2020
+++ src/sys/dev/usb/ohci.c	Wed Dec  9 07:10:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.310 2020/06/03 15:38:02 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.311 2020/12/09 07:10:01 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012, 2016, 2020 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.310 2020/06/03 15:38:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.311 2020/12/09 07:10:01 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -390,6 +390,7 @@ ohci_detach(struct ohci_softc *sc, int f
 	if (sc->sc_hcca != NULL)
 		usb_freemem(>sc_bus, >sc_hccadma);
 	pool_cache_destroy(sc->sc_xferpool);
+	cv_destroy(>sc_abort_cv);
 
 	return rv;
 }
@@ -492,6 +493,7 @@ ohci_alloc_std(ohci_softc_t *sc)
 	memset(>td, 0, sizeof(ohci_td_t));
 	std->nexttd = NULL;
 	std->xfer = NULL;
+	std->held = NULL;
 
 	return std;
 }
@@ -539,14 +541,17 @@ ohci_alloc_std_chain(ohci_softc_t *sc, s
 
 	DPRINTFN(8, "xfer %#jx nstd %jd", (uintptr_t)xfer, nstd, 0, 0);
 
-	for (size_t j = 0; j < ox->ox_nstd;) {
+	for (size_t j = 0; j < ox->ox_nstd; j++) {
 		ohci_soft_td_t *cur = ohci_alloc_std(sc);
 		if (cur == NULL)
 			goto nomem;
 
-		ox->ox_stds[j++] = cur;
+		ox->ox_stds[j] = cur;
+		cur->held = >ox_stds[j];
 		cur->xfer = xfer;
 		cur->flags = 0;
+		DPRINTFN(10, "xfer=%#jx new std=%#jx held at %#jx", (uintptr_t)ox,
+		(uintptr_t)cur, (uintptr_t)cur->held, 0);
 	}
 
 	return 0;
@@ -802,6 +807,9 @@ ohci_init(ohci_softc_t *sc)
 	for (i = 0; i < OHCI_HASH_SIZE; i++)
 		LIST_INIT(>sc_hash_itds[i]);
 
+	TAILQ_INIT(>sc_abortingxfers);
+	cv_init(>sc_abort_cv, "ohciabt");
+
 	sc->sc_xferpool = pool_cache_init(sizeof(struct ohci_xfer), 0, 0, 0,
 	"ohcixfer", NULL, IPL_USB, NULL, NULL, NULL);
 
@@ -1338,6 +1346,21 @@ ohci_intr1(ohci_softc_t *sc)
 		 */
 		usb_schedsoftintr(>sc_bus);
 	}
+	if (eintrs & OHCI_SF) {
+		struct ohci_xfer *ox, *tmp;
+		TAILQ_FOREACH_SAFE(ox, >sc_abortingxfers, ox_abnext, tmp) {
+			DPRINTFN(10, "SF %#jx xfer %#jx", (uintptr_t)sc,
+			(uintptr_t)ox, 0, 0);
+			ox->ox_abintrs &= ~OHCI_SF;
+			KASSERT(ox->ox_abintrs == 0);
+			TAILQ_REMOVE(>sc_abortingxfers, ox, ox_abnext);
+		}
+		cv_broadcast(>sc_abort_cv);
+
+		KASSERT(TAILQ_EMPTY(>sc_abortingxfers));
+		DPRINTFN(10, "end SOF %#jx", (uintptr_t)sc, 0, 0, 0);
+		/* Don't remove OHIC_SF from eintrs so it is blocked below */
+	}
 	if (eintrs & OHCI_RD) {
 		DPRINTFN(5, "resume detect sc=%#jx", (uintptr_t)sc, 0, 0, 0);
 		printf("%s: resume detect\n", device_xname(sc->sc_dev));
@@ -1414,12 +1437,22 @@ ohci_softintr(void *v)
 	struct ohci_pipe *opipe;
 	int len, cc;
 	int i, j, actlen, iframes, uedir;
-	ohci_physaddr_t done;
+	ohci_physaddr_t done = 0;
 
 	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(>sc_lock));
 
 	OHCIHIST_FUNC(); OHCIHIST_CALLED();
 
+	/*
+	 * Only read hccadone if WDH is set - we might get here from places
+	 * other than an interrupt
+	 */
+	if (!(OREAD4(sc, OHCI_INTERRUPT_STATUS) & OHCI_WDH)) {
+		DPRINTFN(10, "no WDH %#jx", (uintptr_t)sc, 0, 0, 0);
+		return;
+	}
+
+	DPRINTFN(10, "WDH %#jx", (uintptr_t)sc, 0, 0, 0);
 	usb_syncmem(>sc_hccadma, offsetof(struct ohci_hcca, hcca_done_head),
 	sizeof(sc->sc_hcca->hcca_done_head),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
@@ -1472,11 +1505,19 @@ ohci_softintr(void *v)
 	DPRINTFN(10, "--- TD dump end ---", 0, 0, 0, 0);
 
 	for (std = sdone; std; std = stdnext) {
-		xfer = std->xfer;
 		stdnext = std->dnext;
-		DPRINTFN(10, "std=%#jx xfer=%#jx hcpriv=%#jx", (uintptr_t)std,
-		(uintptr_t)xfer, (uintptr_t)(xfer ? xfer->ux_hcpriv : 0),
-		0);
+		if (std->held == NULL) {
+			DPRINTFN(10, "std=%#jx held is null", (uintptr_t)std,
+			0, 0, 0);
+			ohci_hash_rem_td(sc, std);
+			ohci_free_std_locked(sc, std);
+			continue;
+		}
+
+		xfer = 

CVS commit: src/sys/dev/usb

2020-12-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec  9 07:10:01 UTC 2020

Modified Files:
src/sys/dev/usb: ohci.c ohcivar.h

Log Message:
Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Also addresses the issue seen in PR kern/55835

Thanks to both Andreas Gustafsson and Edgar Fuß for testing.  Apologies to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/ohcivar.h

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



CVS commit: src/share/man/man4

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 05:48:56 UTC 2020

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

Log Message:
Remove an old description.
This behavior was modified in sys/dev/audio/audio.c rev 1.65 (Mar. 2020).


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/share/man/man4/audio.4

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

Modified files:

Index: src/share/man/man4/audio.4
diff -u src/share/man/man4/audio.4:1.103 src/share/man/man4/audio.4:1.104
--- src/share/man/man4/audio.4:1.103	Sat Mar 28 05:47:41 2020
+++ src/share/man/man4/audio.4	Wed Dec  9 05:48:56 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: audio.4,v 1.103 2020/03/28 05:47:41 wiz Exp $
+.\"	$NetBSD: audio.4,v 1.104 2020/12/09 05:48:56 isaki Exp $
 .\"
 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -85,8 +85,6 @@ are identical.
 .Pp
 On a full-duplex device, reads and writes may operate concurrently
 without interference.
-If a full-duplex capable audio device is opened for both reading and writing
-it will start in play mode but not start in record mode.
 .Pp
 On a half-duplex device, if there are any recording descriptors already,
 opening with write mode will fail.



CVS commit: src/share/man/man4

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 05:48:56 UTC 2020

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

Log Message:
Remove an old description.
This behavior was modified in sys/dev/audio/audio.c rev 1.65 (Mar. 2020).


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/share/man/man4/audio.4

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



CVS commit: src/sys/dev/audio

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 04:30:39 UTC 2020

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Rewrite error handling on audio_open().
This also fixes a few resource leaks on error case.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/audio/audio.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/audio

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 04:30:39 UTC 2020

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Rewrite error handling on audio_open().
This also fixes a few resource leaks on error case.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/audio/audio.c

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

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.80 src/sys/dev/audio/audio.c:1.81
--- src/sys/dev/audio/audio.c:1.80	Wed Dec  9 04:24:08 2020
+++ src/sys/dev/audio/audio.c	Wed Dec  9 04:30:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.80 2020/12/09 04:24:08 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.81 2020/12/09 04:30:39 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.80 2020/12/09 04:24:08 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.81 2020/12/09 04:30:39 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2082,6 +2082,8 @@ audio_open(dev_t dev, struct audio_softc
 	audio_file_t *af;
 	audio_ring_t *hwbuf;
 	bool fullduplex;
+	bool cred_held;
+	bool hw_opened;
 	bool rmixer_started;
 	int fd;
 	int error;
@@ -2093,6 +2095,9 @@ audio_open(dev_t dev, struct audio_softc
 	ISDEVSOUND(dev) ? "sound" : "audio",
 	flags, sc->sc_popens, sc->sc_ropens);
 
+	fp = NULL;
+	cred_held = false;
+	hw_opened = false;
 	rmixer_started = false;
 
 	af = kmem_zalloc(sizeof(audio_file_t), KM_SLEEP);
@@ -2104,7 +2109,7 @@ audio_open(dev_t dev, struct audio_softc
 		af->mode |= AUMODE_RECORD;
 	if (af->mode == 0) {
 		error = ENXIO;
-		goto bad1;
+		goto bad;
 	}
 
 	fullduplex = (sc->sc_props & AUDIO_PROP_FULLDUPLEX);
@@ -2120,7 +2125,7 @@ audio_open(dev_t dev, struct audio_softc
 			if (sc->sc_ropens != 0) {
 TRACE(1, "record track already exists");
 error = ENODEV;
-goto bad1;
+goto bad;
 			}
 			/* Play takes precedence */
 			af->mode &= ~AUMODE_RECORD;
@@ -2129,7 +2134,7 @@ audio_open(dev_t dev, struct audio_softc
 			if (sc->sc_popens != 0) {
 TRACE(1, "play track already exists");
 error = ENODEV;
-goto bad1;
+goto bad;
 			}
 		}
 	}
@@ -2176,13 +2181,14 @@ audio_open(dev_t dev, struct audio_softc
 	}
 	error = audio_file_setinfo(sc, af, );
 	if (error)
-		goto bad2;
+		goto bad;
 
 	if (sc->sc_popens + sc->sc_ropens == 0) {
 		/* First open */
 
 		sc->sc_cred = kauth_cred_get();
 		kauth_cred_hold(sc->sc_cred);
+		cred_held = true;
 
 		if (sc->hw_if->open) {
 			int hwflags;
@@ -2215,8 +2221,16 @@ audio_open(dev_t dev, struct audio_softc
 			mutex_exit(sc->sc_intr_lock);
 			mutex_exit(sc->sc_lock);
 			if (error)
-goto bad2;
+goto bad;
 		}
+		/*
+		 * Regardless of whether we called hw_if->open (whether
+		 * hw_if->open exists) or not, we move to the Opened phase
+		 * here.  Therefore from this point, we have to call
+		 * hw_if->close (if exists) whenever abort.
+		 * Note that both of hw_if->{open,close} are optional.
+		 */
+		hw_opened = true;
 
 		/*
 		 * Set speaker mode when a half duplex.
@@ -2236,14 +2250,14 @@ audio_open(dev_t dev, struct audio_softc
 mutex_exit(sc->sc_intr_lock);
 mutex_exit(sc->sc_lock);
 if (error)
-	goto bad3;
+	goto bad;
 			}
 		}
 	} else if (sc->sc_multiuser == false) {
 		uid_t euid = kauth_cred_geteuid(kauth_cred_get());
 		if (euid != 0 && euid != kauth_cred_geteuid(sc->sc_cred)) {
 			error = EPERM;
-			goto bad2;
+			goto bad;
 		}
 	}
 
@@ -2260,7 +2274,7 @@ audio_open(dev_t dev, struct audio_softc
 			mutex_exit(sc->sc_intr_lock);
 			mutex_exit(sc->sc_lock);
 			if (error)
-goto bad3;
+goto bad;
 		}
 	}
 	/*
@@ -2279,7 +2293,7 @@ audio_open(dev_t dev, struct audio_softc
 			mutex_exit(sc->sc_intr_lock);
 			mutex_exit(sc->sc_lock);
 			if (error)
-goto bad3;
+goto bad;
 		}
 
 		mutex_enter(sc->sc_lock);
@@ -2288,10 +2302,15 @@ audio_open(dev_t dev, struct audio_softc
 		rmixer_started = true;
 	}
 
-	if (bellfile == NULL) {
+	if (bellfile) {
+		*bellfile = af;
+	} else {
 		error = fd_allocfile(, );
 		if (error)
-			goto bad4;
+			goto bad;
+
+		error = fd_clone(fp, fd, flags, _fileops, af);
+		KASSERTMSG(error == EMOVEFD, "error=%d", error);
 	}
 
 	/*
@@ -2308,24 +2327,21 @@ audio_open(dev_t dev, struct audio_softc
 	mutex_exit(sc->sc_intr_lock);
 	mutex_exit(sc->sc_lock);
 
-	if (bellfile) {
-		*bellfile = af;
-	} else {
-		error = fd_clone(fp, fd, flags, _fileops, af);
-		KASSERTMSG(error == EMOVEFD, "error=%d", error);
-	}
-
 	TRACEF(3, af, "done");
 	return error;
 
-bad4:
+bad:
+	if (fp) {
+		fd_abort(curproc, fp, fd);
+	}
+
 	if (rmixer_started) {
 		mutex_enter(sc->sc_lock);
 		audio_rmixer_halt(sc);
 		mutex_exit(sc->sc_lock);
 	}
-bad3:
-	if (sc->sc_popens + sc->sc_ropens == 0) {
+
+	if (hw_opened) {
 		if (sc->hw_if->close) {
 			mutex_enter(sc->sc_lock);
 			

CVS commit: src/sys/dev/audio

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 04:24:08 UTC 2020

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Fix that audio_open() didn't halt the recording mixer correctly
if fd_allocfile() failed, since rev 1.65.
Will fix PR kern/55848.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/audio/audio.c

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

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.79 src/sys/dev/audio/audio.c:1.80
--- src/sys/dev/audio/audio.c:1.79	Mon Sep  7 03:36:11 2020
+++ src/sys/dev/audio/audio.c	Wed Dec  9 04:24:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.79 2020/09/07 03:36:11 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.80 2020/12/09 04:24:08 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.79 2020/09/07 03:36:11 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.80 2020/12/09 04:24:08 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2082,6 +2082,7 @@ audio_open(dev_t dev, struct audio_softc
 	audio_file_t *af;
 	audio_ring_t *hwbuf;
 	bool fullduplex;
+	bool rmixer_started;
 	int fd;
 	int error;
 
@@ -2092,6 +2093,8 @@ audio_open(dev_t dev, struct audio_softc
 	ISDEVSOUND(dev) ? "sound" : "audio",
 	flags, sc->sc_popens, sc->sc_ropens);
 
+	rmixer_started = false;
+
 	af = kmem_zalloc(sizeof(audio_file_t), KM_SLEEP);
 	af->sc = sc;
 	af->dev = dev;
@@ -2282,12 +2285,13 @@ audio_open(dev_t dev, struct audio_softc
 		mutex_enter(sc->sc_lock);
 		audio_rmixer_start(sc);
 		mutex_exit(sc->sc_lock);
+		rmixer_started = true;
 	}
 
 	if (bellfile == NULL) {
 		error = fd_allocfile(, );
 		if (error)
-			goto bad3;
+			goto bad4;
 	}
 
 	/*
@@ -2314,10 +2318,12 @@ audio_open(dev_t dev, struct audio_softc
 	TRACEF(3, af, "done");
 	return error;
 
-	/*
-	 * Since track here is not yet linked to sc_files,
-	 * you can call track_destroy() without sc_intr_lock.
-	 */
+bad4:
+	if (rmixer_started) {
+		mutex_enter(sc->sc_lock);
+		audio_rmixer_halt(sc);
+		mutex_exit(sc->sc_lock);
+	}
 bad3:
 	if (sc->sc_popens + sc->sc_ropens == 0) {
 		if (sc->hw_if->close) {
@@ -2329,6 +2335,10 @@ bad3:
 		}
 	}
 bad2:
+	/*
+	 * Since track here is not yet linked to sc_files,
+	 * you can call track_destroy() without sc_intr_lock.
+	 */
 	if (af->rtrack) {
 		audio_track_destroy(af->rtrack);
 		af->rtrack = NULL;



CVS commit: src/sys/dev/audio

2020-12-08 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Dec  9 04:24:08 UTC 2020

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Fix that audio_open() didn't halt the recording mixer correctly
if fd_allocfile() failed, since rev 1.65.
Will fix PR kern/55848.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/audio/audio.c

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



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

2020-12-08 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Dec  9 04:02:20 UTC 2020

Modified Files:
src/sys/arch/sparc/sparc: pmap.c

Log Message:
sp_tlb_flush() - fix inline asm miscompiled by newer gcc versions.

As one national park director once said: "my problems start when the
dumber of my visitors meet the smarter of my bears".

Old inline asm used specific hardcoded registers "assuming that gcc
doesn't do anything funny with these".  Unfortunately now it does,
especially when this function is inlined.  We ended up restoring a
wrong context.  The result was mysterious infinite memory faults.

Rewrite in safer inline asm, so that gcc is not confused.

Many thanks to chs@ for his patience.


To generate a diff of this commit:
cvs rdiff -u -r1.367 -r1.368 src/sys/arch/sparc/sparc/pmap.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/pmap.c
diff -u src/sys/arch/sparc/sparc/pmap.c:1.367 src/sys/arch/sparc/sparc/pmap.c:1.368
--- src/sys/arch/sparc/sparc/pmap.c:1.367	Sat Mar 14 14:05:43 2020
+++ src/sys/arch/sparc/sparc/pmap.c	Wed Dec  9 04:02:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.367 2020/03/14 14:05:43 ad Exp $ */
+/*	$NetBSD: pmap.c,v 1.368 2020/12/09 04:02:20 uwe Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.367 2020/03/14 14:05:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.368 2020/12/09 04:02:20 uwe Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -631,42 +631,39 @@ void 		(*pmap_rmu_p)(struct pmap *, vadd
 /*
  * SP versions of the tlb flush operations.
  *
- * Turn off traps to prevent register window overflows
- * from writing user windows to the wrong stack.
+ * Turn off traps to prevent register window overflows from writing
+ * user windows to the wrong stack.  Cf. tlb_flush_page_real() 
  */
 static void
 sp_tlb_flush(int va, int ctx, int lvl)
 {
-	/*
-	 * XXX convert %o3 (oldpsr), %o4 (SRMMU_CXR) and %o5 (old context)
-	 * into generically named registers.  right now we're assuming that
-	 * gcc doesn't do anything funny with these registers.
-	 */
-
-	/* Traps off */
-	__asm("rd	%psr, %o3");
-	__asm("wr	%%o3, %0, %%psr" :: "n" (PSR_ET));
+	int opsr, octx;
 
-	/* Save context */
-	__asm("mov	%0, %%o4" :: "n"(SRMMU_CXR));
-	__asm("lda	[%%o4]%0, %%o5" :: "n"(ASI_SRMMU));
-
-	/* Set new context and flush type bits */
 	va &= ~0xfff;
-	__asm("sta	%1, [%%o4]%0" :: "n"(ASI_SRMMU), "r"(ctx));
 	va |= lvl;
 
-	/* Do the TLB flush */
-	__asm("sta	%%g0, [%1]%0" :: "n"(ASI_SRMMUFP), "r"(va));
+	/*
+	 * Turn off traps.
+	 *
+	 * Like setpsr((opsr = getpsr()) & ~PSR_ET); but we can shave
+	 * off one instruction b/c we never disable traps recursively,
+	 * so we can use the xor done by wrpsr itself to clear the
+	 * bit.
+	 *
+	 * XXX: Add to asm.h?  We can use this in cache.c too.
+	 */
+	opsr = getpsr();	/* KDASSERT(opsr & PSR_ET); */
+	__asm volatile ("wr %0, %1, %%psr" :: "r"(opsr), "n"(PSR_ET));
+	__asm volatile ("nop; nop;nop");
+
+	octx = getcontext4m();	/* save context */
 
-	/* Restore context */
-	__asm("sta	%%o5, [%%o4]%0" :: "n"(ASI_SRMMU));
+	/* Do the TLB flush in "ctx" */
+	setcontext4m(ctx);
+	__asm volatile("sta %%g0, [%0]%1" :: "r"(va), "n"(ASI_SRMMUFP));
 
-	/* and turn traps on again */
-	__asm("wr	%o3, 0, %psr");
-	__asm("nop");
-	__asm("nop");
-	__asm("nop");
+	setcontext4m(octx);	/* restore context */
+	setpsr(opsr);		/* turn traps on again */
 }
 
 static inline void



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

2020-12-08 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Dec  9 04:02:20 UTC 2020

Modified Files:
src/sys/arch/sparc/sparc: pmap.c

Log Message:
sp_tlb_flush() - fix inline asm miscompiled by newer gcc versions.

As one national park director once said: "my problems start when the
dumber of my visitors meet the smarter of my bears".

Old inline asm used specific hardcoded registers "assuming that gcc
doesn't do anything funny with these".  Unfortunately now it does,
especially when this function is inlined.  We ended up restoring a
wrong context.  The result was mysterious infinite memory faults.

Rewrite in safer inline asm, so that gcc is not confused.

Many thanks to chs@ for his patience.


To generate a diff of this commit:
cvs rdiff -u -r1.367 -r1.368 src/sys/arch/sparc/sparc/pmap.c

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



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

2020-12-08 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Dec  9 02:46:57 UTC 2020

Modified Files:
src/common/lib/libc/arch/arm/gen: byte_swap_4.S

Log Message:
arm bswap32: Improve the comments showing the byte flow.

It's confusing to use 1-4 for bytes 1-4 and then 0 for literal zero,
so use a-d for bytes 1-4.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/gen/byte_swap_4.S

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

Modified files:

Index: src/common/lib/libc/arch/arm/gen/byte_swap_4.S
diff -u src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.7 src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.8
--- src/common/lib/libc/arch/arm/gen/byte_swap_4.S:1.7	Mon Aug 19 03:44:47 2013
+++ src/common/lib/libc/arch/arm/gen/byte_swap_4.S	Wed Dec  9 02:46:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: byte_swap_4.S,v 1.7 2013/08/19 03:44:47 matt Exp $	*/
+/*	$NetBSD: byte_swap_4.S,v 1.8 2020/12/09 02:46:57 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -40,21 +40,21 @@ ENTRY(FUNC)
 #ifdef _ARM_ARCH_6
 	rev	r0, r0
 #elif !defined(__thumb__)
-	eor	r1, r0, r0, ror #16	/* 4.3.2.1 -> 42.31.42.31 */
-	bic	r1, r1, #0x00FF	/* 42.31.42.31 -> 42.0.42.31 */
-	mov	r0, r0, ror #8		/* 4.3.2.1 -> 1.4.3.2 */
-	eor	r0, r0, r1, lsr #8	/* 1.4.3.2 ^ 0.42.0.42 -> 1.2.3.4 */
+	eor	r1, r0, r0, ror #16	/* d.c.b.a -> db.ca.db.ca */
+	bic	r1, r1, #0x00FF	/* db.ca.db.ca -> db.0.db.ca */
+	mov	r0, r0, ror #8		/* d.c.b.a -> a.d.c.b */
+	eor	r0, r0, r1, lsr #8	/* a.d.c.b ^ 0.db.0.db -> a.b.c.d */
 #else
 	movs	r3, #16
-	lsls	r1, r0, #8		/* 4.3.2.1 -> 3.2.1.0 /*
-	lsrs	r0, r0, #8		/* 4.3.2.1 -> 0.4.3.2 */
-	rors	r1, r3			/* 3.2.1.0 -> 1.0.3.2 */
-	rors	r0, r3			/* 0.4.3.2 -> 3.2.0.4 */
-	lsrs	r1, r1, #8		/* 1.0.3.2 -> 0.1.0.3 */
-	lsls	r1, r1, #8		/* 0.1.0.3 -> 1.0.3.0 */
-	lsls	r0, r0, #8		/* 3.2.0.4 -> 2.0.4.0 */
-	lsrs	r0, r0, #8		/* 2.0.4.0 -> 0.2.0.4 */
-	orrs	r0, r0, r1		/* 1.0.3.0 | 0.2.0.4 -> 1.2.3.4 */
+	lsls	r1, r0, #8		/* d.c.b.a -> c.b.a.0 /*
+	lsrs	r0, r0, #8		/* d.c.b.a -> 0.d.c.b */
+	rors	r1, r3			/* c.b.a.0 -> a.0.c.b */
+	rors	r0, r3			/* 0.d.c.b -> c.b.0.d */
+	lsrs	r1, r1, #8		/* a.0.c.b -> 0.a.0.c */
+	lsls	r1, r1, #8		/* 0.a.0.c -> a.0.c.0 */
+	lsls	r0, r0, #8		/* c.b.0.d -> b.0.d.0 */
+	lsrs	r0, r0, #8		/* b.0.d.0 -> 0.b.0.d */
+	orrs	r0, r0, r1		/* a.0.c.0 | 0.b.0.d -> a.b.c.d */
 #endif
 	RET
 END(FUNC)



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

2020-12-08 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Dec  9 02:46:57 UTC 2020

Modified Files:
src/common/lib/libc/arch/arm/gen: byte_swap_4.S

Log Message:
arm bswap32: Improve the comments showing the byte flow.

It's confusing to use 1-4 for bytes 1-4 and then 0 for literal zero,
so use a-d for bytes 1-4.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/gen/byte_swap_4.S

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



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

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 00:43:48 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): add more tests for combining -j1 and -n


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

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



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

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 00:43:48 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): add more tests for combining -j1 and -n


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

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

Modified files:

Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.exp
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.1 src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.2
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.1	Wed Dec  9 00:25:00 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.exp	Wed Dec  9 00:43:48 2020
@@ -12,4 +12,64 @@ echo "false regular"
 false ignore-errors
 echo run despite the -n option
 run despite the -n option
+echo
+
+echo 'begin combined'
+begin combined
+echo
+
+echo silent=no always=no ignerr=no
+silent=no always=no ignerr=no
+# .echoOff
+# .errOnOrEcho
+echo "true"
+# .errExit
+{ true 
+} || exit $?
+# .echoOn
+echo
+
+echo silent=no always=no ignerr=yes
+silent=no always=no ignerr=yes
+false
+echo
+
+echo silent=no always=yes ignerr=no
+silent=no always=yes ignerr=no
+true
+echo
+
+echo silent=no always=yes ignerr=yes
+silent=no always=yes ignerr=yes
+false
+*** Error code 1 (ignored)
+echo
+
+echo silent=yes always=no ignerr=no
+silent=yes always=no ignerr=no
+# .errExit
+{ true 
+} || exit $?
+# .echoOn
+echo
+
+echo silent=yes always=no ignerr=yes
+silent=yes always=no ignerr=yes
+false
+# .echoOn
+echo
+
+echo silent=yes always=yes ignerr=no
+silent=yes always=yes ignerr=no
+true
+echo
+
+echo silent=yes always=yes ignerr=yes
+silent=yes always=yes ignerr=yes
+false
+*** Error code 1 (ignored)
+echo
+
+echo 'end combined'
+end combined
 exit status 0
Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.1 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.2
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.1	Wed Dec  9 00:25:00 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.mk	Wed Dec  9 00:43:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: opt-jobs-no-action.mk,v 1.1 2020/12/09 00:25:00 rillig Exp $
+# $NetBSD: opt-jobs-no-action.mk,v 1.2 2020/12/09 00:43:48 rillig Exp $
 #
 # Tests for the combination of the options -j and -n, which prints the
 # commands instead of actually running them.
@@ -6,6 +6,8 @@
 # The format of the output differs from the output of only the -n option,
 # without the -j.  This is because all this code is implemented twice, once
 # in compat.c and once in job.c.
+#
+# See opt-jobs.mk for the corresponding tests without the -n option.
 
 .MAKEFLAGS: -j1 -n
 
@@ -28,7 +30,18 @@
 	ignore="\# .errOffOrExecIgnore\n""%s\n" \
 	errout="\# .errExit\n""{ %s \n} || exit $$?\n"
 
-all:
+SILENT.no=	# none
+SILENT.yes=	@
+ALWAYS.no=	# none
+ALWAYS.yes=	+
+IGNERR.no=	true
+IGNERR.yes=	-false
+
+all: documented combined
+.ORDER: documented combined
+
+# Explain the most basic cases in detail.
+documented: .PHONY
 	# The following command is regular, it is printed twice:
 	# - first using the template shell.errOnOrEcho,
 	# - then using the template shell.errExit.
@@ -49,7 +62,22 @@ all:
 	# '!silent' in Compat_RunCommand.
 	+echo run despite the -n option
 
-	# TODO: test all 8 combinations of '-', '+', '@'.
-	# TODO: for each of the above test, test '-true' and '-false'.
-	# The code with its many branches feels like a big mess.
-	# See opt-jobs.mk for the corresponding tests without the -n option.
+	@+echo
+
+# Test all combinations of the 3 RunFlags.
+#
+# TODO: Closely inspect the output whether it makes sense.
+# XXX: The output should not contain the 'echo silent=...' lines.
+combined:
+	@+echo 'begin $@'
+	@+echo
+.for silent in no yes
+.  for always in no yes
+.for ignerr in no yes
+	@+echo silent=${silent} always=${always} ignerr=${ignerr}
+	${SILENT.${silent}}${ALWAYS.${always}}${IGNERR.${ignerr}}
+	@+echo
+.endfor
+.  endfor
+.endfor
+	@+echo 'end $@'



CVS commit: src

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 00:25:01 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile
Added Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): add test for combining -j1 with -n


To generate a diff of this commit:
cvs rdiff -u -r1.985 -r1.986 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.240 -r1.241 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-jobs-no-action.exp \
src/usr.bin/make/unit-tests/opt-jobs-no-action.mk

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.985 src/distrib/sets/lists/tests/mi:1.986
--- src/distrib/sets/lists/tests/mi:1.985	Mon Dec  7 21:35:43 2020
+++ src/distrib/sets/lists/tests/mi	Wed Dec  9 00:25:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.985 2020/12/07 21:35:43 rillig Exp $
+# $NetBSD: mi,v 1.986 2020/12/09 00:25:00 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5217,6 +5217,8 @@
 ./usr/tests/usr.bin/make/unit-tests/opt-include-dir.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-jobs-internal.exp			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-jobs-internal.mk			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-jobs-no-action.exp			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/opt-jobs-no-action.mk			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-jobs.exptests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-jobs.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-keep-going-multiple.exp			tests-usr.bin-tests	compattestfile,atf

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.240 src/usr.bin/make/unit-tests/Makefile:1.241
--- src/usr.bin/make/unit-tests/Makefile:1.240	Mon Dec  7 22:27:56 2020
+++ src/usr.bin/make/unit-tests/Makefile	Wed Dec  9 00:25:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.240 2020/12/07 22:27:56 rillig Exp $
+# $NetBSD: Makefile,v 1.241 2020/12/09 00:25:00 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -236,6 +236,7 @@ TESTS+=		opt-ignore
 TESTS+=		opt-include-dir
 TESTS+=		opt-jobs
 TESTS+=		opt-jobs-internal
+TESTS+=		opt-jobs-no-action
 TESTS+=		opt-keep-going
 TESTS+=		opt-keep-going-multiple
 TESTS+=		opt-m-include-dir

Added files:

Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.exp
diff -u /dev/null src/usr.bin/make/unit-tests/opt-jobs-no-action.exp:1.1
--- /dev/null	Wed Dec  9 00:25:01 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.exp	Wed Dec  9 00:25:00 2020
@@ -0,0 +1,15 @@
+# .echoOff
+# .errOnOrEcho
+echo "false regular"
+# .errExit
+{ false regular 
+} || exit $?
+# .echoOn
+# .errExit
+{ : silent 
+} || exit $?
+# .echoOn
+false ignore-errors
+echo run despite the -n option
+run despite the -n option
+exit status 0
Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
diff -u /dev/null src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.1
--- /dev/null	Wed Dec  9 00:25:01 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.mk	Wed Dec  9 00:25:00 2020
@@ -0,0 +1,55 @@
+# $NetBSD: opt-jobs-no-action.mk,v 1.1 2020/12/09 00:25:00 rillig Exp $
+#
+# Tests for the combination of the options -j and -n, which prints the
+# commands instead of actually running them.
+#
+# The format of the output differs from the output of only the -n option,
+# without the -j.  This is because all this code is implemented twice, once
+# in compat.c and once in job.c.
+
+.MAKEFLAGS: -j1 -n
+
+# Change the templates for running the commands in jobs mode, to make it
+# easier to see what actually happens.
+#
+# The shell attributes are handled by Job_ParseShell.
+# The shell attributes 'quiet' and 'echo' don't need a trailing newline,
+# this is handled by the [0] != '\0' checks in Job_ParseShell.
+# The '\#' is handled by ParseGetLine.
+# The '\n' is handled by Str_Words in Job_ParseShell.
+# The '$$' is handled by Var_Subst in ParseDependency.
+.SHELL: \
+	name=sh \
+	path=${.SHELL} \
+	quiet="\# .echoOff" \
+	echo="\# .echoOn" \
+	filter="\# .noPrint\n" \
+	check="\# .errOnOrEcho\n""echo \"%s\"\n" \
+	ignore="\# .errOffOrExecIgnore\n""%s\n" \
+	errout="\# .errExit\n""{ %s \n} || exit $$?\n"
+
+all:
+	# The following command is regular, it is printed twice:
+	# - first using the template shell.errOnOrEcho,
+	# - then using the template shell.errExit.
+	false regular
+
+	# The following command is silent, it is printed once, using the
+	# template shell.errExit.
+	@: silent
+
+	# The following command ignores errors, it is printed once, 

CVS commit: src

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Dec  9 00:25:01 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: Makefile
Added Files:
src/usr.bin/make/unit-tests: opt-jobs-no-action.exp
opt-jobs-no-action.mk

Log Message:
make(1): add test for combining -j1 with -n


To generate a diff of this commit:
cvs rdiff -u -r1.985 -r1.986 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.240 -r1.241 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-jobs-no-action.exp \
src/usr.bin/make/unit-tests/opt-jobs-no-action.mk

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



CVS commit: src/sys/rump/librump/rumpvfs

2020-12-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Dec  9 00:03:32 UTC 2020

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
make rump's uvm_aio_aiodone_pages() look more like the kernel version.
fixes some more rumpy assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpvfs/vm_vfs.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/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.40 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.41
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.40	Thu Oct 22 03:05:17 2020
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Wed Dec  9 00:03:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.40 2020/10/22 03:05:17 chs Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.41 2020/12/09 00:03:32 chs Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.40 2020/10/22 03:05:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.41 2020/12/09 00:03:32 chs Exp $");
 
 #include 
 
@@ -48,6 +48,16 @@ uvm_aio_aiodone_pages(struct vm_page **p
 		pg = pgs[i];
 		KASSERT((pg->flags & PG_PAGEOUT) == 0 ||
 			(pg->flags & PG_FAKE) == 0);
+
+		if (pg->flags & PG_FAKE) {
+			KASSERT(!write);
+			pg->flags &= ~PG_FAKE;
+			KASSERT(uvm_pagegetdirty(pg) == UVM_PAGE_STATUS_CLEAN);
+			uvm_pagelock(pg);
+			uvm_pageenqueue(pg);
+			uvm_pageunlock(pg);
+		}
+
 	}
 	uvm_page_unbusy(pgs, npages);
 	rw_exit(uobj->vmobjlock);



CVS commit: src/sys/rump/librump/rumpvfs

2020-12-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Dec  9 00:03:32 UTC 2020

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
make rump's uvm_aio_aiodone_pages() look more like the kernel version.
fixes some more rumpy assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpvfs/vm_vfs.c

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



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 21:34:49 UTC 2020

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

Log Message:
make(1): in jobs mode, invert local variable noSpecials to run


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.350 src/usr.bin/make/job.c:1.351
--- src/usr.bin/make/job.c:1.350	Tue Dec  8 20:17:18 2020
+++ src/usr.bin/make/job.c	Tue Dec  8 21:34:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.350 2020/12/08 20:17:18 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.351 2020/12/08 21:34:49 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.350 2020/12/08 20:17:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.351 2020/12/08 21:34:49 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -792,10 +792,10 @@ JobPrintSpecialsEchoCtl(Job *job, RunFla
 
 static void
 JobPrintSpecials(Job *const job, const char *const escCmd,
-		 Boolean const noSpecials, RunFlags *const inout_runFlags,
+		 Boolean const run, RunFlags *const inout_runFlags,
 		 const char **const inout_cmdTemplate)
 {
-	if (noSpecials)
+	if (!run)
 		inout_runFlags->ignerr = FALSE;
 	else if (commandShell->hasErrCtl)
 		JobPrintSpecialsErrCtl(job, inout_runFlags->echo);
@@ -829,11 +829,8 @@ static void
 JobPrintCommand(Job *job, char *cmd)
 {
 	const char *const cmdp = cmd;
-	/*
-	 * true if we shouldn't worry about inserting special commands into
-	 * the input stream.
-	 */
-	Boolean noSpecials;
+
+	Boolean run;
 
 	RunFlags runFlags;
 	/* Template to use when printing the command */
@@ -841,7 +838,7 @@ JobPrintCommand(Job *job, char *cmd)
 	char *cmdStart;		/* Start of expanded command */
 	char *escCmd = NULL;	/* Command with quotes/backticks escaped */
 
-	noSpecials = !GNode_ShouldExecute(job->node);
+	run = GNode_ShouldExecute(job->node);
 
 	numCommands++;
 
@@ -853,7 +850,8 @@ JobPrintCommand(Job *job, char *cmd)
 
 	ParseRunOptions(, );
 
-	if (runFlags.always && noSpecials) {
+	/* The '+' command flag overrides the -n or -N options. */
+	if (runFlags.always && !run) {
 		/*
 		 * We're not actually executing anything...
 		 * but this one needs to be - use compat mode just for it.
@@ -873,7 +871,7 @@ JobPrintCommand(Job *job, char *cmd)
 		escCmd = EscapeShellDblQuot(cmd);
 
 	if (!runFlags.echo) {
-		if (!(job->flags & JOB_SILENT) && !noSpecials &&
+		if (!(job->flags & JOB_SILENT) && run &&
 		commandShell->hasEchoCtl) {
 			JobPrintln(job, commandShell->echoOff);
 		} else {
@@ -883,8 +881,7 @@ JobPrintCommand(Job *job, char *cmd)
 	}
 
 	if (runFlags.ignerr) {
-		JobPrintSpecials(job, escCmd, noSpecials, ,
-		);
+		JobPrintSpecials(job, escCmd, run, , );
 	} else {
 
 		/*



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 21:34:49 UTC 2020

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

Log Message:
make(1): in jobs mode, invert local variable noSpecials to run


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/usr.bin/make/job.c

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



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:17:18 UTC 2020

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

Log Message:
make(1): negate RunFlags.silent to become RunFlags.echo

This reduces the number of negations in the code.


To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.349 src/usr.bin/make/job.c:1.350
--- src/usr.bin/make/job.c:1.349	Tue Dec  8 20:10:24 2020
+++ src/usr.bin/make/job.c	Tue Dec  8 20:17:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.349 2020/12/08 20:10:24 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.350 2020/12/08 20:17:18 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.349 2020/12/08 20:10:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.350 2020/12/08 20:17:18 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -220,8 +220,8 @@ typedef struct Shell {
 } Shell;
 
 typedef struct RunFlags {
-	/* true if we put a no echo command into the command file */
-	Boolean silent;
+	/* Whether to echo the command before running it. */
+	Boolean echo;
 
 	Boolean always;
 
@@ -686,13 +686,13 @@ static void
 ParseRunOptions(char **pp, RunFlags *out_runFlags)
 {
 	char *p = *pp;
-	out_runFlags->silent = FALSE;
+	out_runFlags->echo = TRUE;
 	out_runFlags->ignerr = FALSE;
 	out_runFlags->always = FALSE;
 
 	for (;;) {
 		if (*p == '@')
-			out_runFlags->silent = !DEBUG(LOUD);
+			out_runFlags->echo = DEBUG(LOUD);
 		else if (*p == '-')
 			out_runFlags->ignerr = TRUE;
 		else if (*p == '+')
@@ -748,9 +748,9 @@ JobPrintln(Job *job, const char *line)
  * it any more complex than it already is?
  */
 static void
-JobPrintSpecialsErrCtl(Job *job, Boolean silent)
+JobPrintSpecialsErrCtl(Job *job, Boolean echo)
 {
-	if (!(job->flags & JOB_SILENT) && !silent && commandShell->hasEchoCtl) {
+	if (!(job->flags & JOB_SILENT) && echo && commandShell->hasEchoCtl) {
 		JobPrintln(job, commandShell->echoOff);
 		JobPrintln(job, commandShell->errOffOrExecIgnore);
 		JobPrintln(job, commandShell->echoOn);
@@ -772,13 +772,13 @@ JobPrintSpecialsEchoCtl(Job *job, RunFla
 {
 	job->flags |= JOB_IGNERR;
 
-	if (!(job->flags & JOB_SILENT) && !inout_runFlags->silent) {
+	if (!(job->flags & JOB_SILENT) && inout_runFlags->echo) {
 		if (commandShell->hasEchoCtl)
 			JobPrintln(job, commandShell->echoOff);
 		JobPrintf(job, commandShell->errOnOrEcho, escCmd);
-		inout_runFlags->silent = TRUE;
+		inout_runFlags->echo = FALSE;
 	} else {
-		if (!inout_runFlags->silent)
+		if (inout_runFlags->echo)
 			JobPrintf(job, commandShell->errOnOrEcho, escCmd);
 	}
 	*inout_cmdTemplate = commandShell->errOffOrExecIgnore;
@@ -798,7 +798,7 @@ JobPrintSpecials(Job *const job, const c
 	if (noSpecials)
 		inout_runFlags->ignerr = FALSE;
 	else if (commandShell->hasErrCtl)
-		JobPrintSpecialsErrCtl(job, inout_runFlags->silent);
+		JobPrintSpecialsErrCtl(job, inout_runFlags->echo);
 	else if (commandShell->errOffOrExecIgnore != NULL &&
 		 commandShell->errOffOrExecIgnore[0] != '\0') {
 		JobPrintSpecialsEchoCtl(job, inout_runFlags, escCmd,
@@ -872,13 +872,13 @@ JobPrintCommand(Job *job, char *cmd)
 	if (!commandShell->hasErrCtl)
 		escCmd = EscapeShellDblQuot(cmd);
 
-	if (runFlags.silent) {
+	if (!runFlags.echo) {
 		if (!(job->flags & JOB_SILENT) && !noSpecials &&
 		commandShell->hasEchoCtl) {
 			JobPrintln(job, commandShell->echoOff);
 		} else {
 			if (commandShell->hasErrCtl)
-runFlags.silent = FALSE;
+runFlags.echo = TRUE;
 		}
 	}
 
@@ -895,12 +895,12 @@ JobPrintCommand(Job *job, char *cmd)
 
 		if (!commandShell->hasErrCtl && commandShell->errExit &&
 		commandShell->errExit[0] != '\0') {
-			if (!(job->flags & JOB_SILENT) && !runFlags.silent) {
+			if (!(job->flags & JOB_SILENT) && runFlags.echo) {
 if (commandShell->hasEchoCtl)
 	JobPrintln(job, commandShell->echoOff);
 JobPrintf(job, commandShell->errOnOrEcho,
 escCmd);
-runFlags.silent = TRUE;
+runFlags.echo = FALSE;
 			}
 			/*
 			 * If it's a comment line or blank, treat as an
@@ -930,14 +930,14 @@ JobPrintCommand(Job *job, char *cmd)
 		 * echoOff command. Otherwise we issue it and pretend it was on
 		 * for the whole command...
 		 */
-		if (!runFlags.silent && !(job->flags & JOB_SILENT) &&
+		if (runFlags.echo && !(job->flags & JOB_SILENT) &&
 		commandShell->hasEchoCtl) {
 			JobPrintln(job, commandShell->echoOff);
-			runFlags.silent = TRUE;
+			runFlags.echo = FALSE;
 		}
 		JobPrintln(job, commandShell->errOnOrEcho);
 	}
-	if (runFlags.silent && commandShell->hasEchoCtl)
+	if (!runFlags.echo && commandShell->hasEchoCtl)
 		JobPrintln(job, 

CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:17:18 UTC 2020

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

Log Message:
make(1): negate RunFlags.silent to become RunFlags.echo

This reduces the number of negations in the code.


To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/usr.bin/make/job.c

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



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:10:24 UTC 2020

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

Log Message:
make(1): move flags errOff into RunFlags.ignerr


To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.348 src/usr.bin/make/job.c:1.349
--- src/usr.bin/make/job.c:1.348	Tue Dec  8 20:04:17 2020
+++ src/usr.bin/make/job.c	Tue Dec  8 20:10:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.348 2020/12/08 20:04:17 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.349 2020/12/08 20:10:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.348 2020/12/08 20:04:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.349 2020/12/08 20:10:24 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -224,6 +224,12 @@ typedef struct RunFlags {
 	Boolean silent;
 
 	Boolean always;
+
+	/*
+	 * true if we turned error checking off before printing the command
+	 * and need to turn it back on
+	 */
+	Boolean ignerr;
 } RunFlags;
 
 /*
@@ -677,18 +683,18 @@ JobFindPid(int pid, JobStatus status, Bo
 
 /* Parse leading '@', '-' and '+', which control the exact execution mode. */
 static void
-ParseRunOptions(char **pp, RunFlags *out_runFlags, Boolean *out_errOff)
+ParseRunOptions(char **pp, RunFlags *out_runFlags)
 {
 	char *p = *pp;
 	out_runFlags->silent = FALSE;
-	*out_errOff = FALSE;
+	out_runFlags->ignerr = FALSE;
 	out_runFlags->always = FALSE;
 
 	for (;;) {
 		if (*p == '@')
 			out_runFlags->silent = !DEBUG(LOUD);
 		else if (*p == '-')
-			*out_errOff = TRUE;
+			out_runFlags->ignerr = TRUE;
 		else if (*p == '+')
 			out_runFlags->always = TRUE;
 		else
@@ -762,7 +768,7 @@ JobPrintSpecialsErrCtl(Job *job, Boolean
  */
 static void
 JobPrintSpecialsEchoCtl(Job *job, RunFlags *inout_runFlags, const char *escCmd,
-			const char **inout_cmdTemplate, Boolean *out_errOff)
+			const char **inout_cmdTemplate)
 {
 	job->flags |= JOB_IGNERR;
 
@@ -781,25 +787,24 @@ JobPrintSpecialsEchoCtl(Job *job, RunFla
 	 * The error ignoration (hee hee) is already taken care of by the
 	 * errOffOrExecIgnore template, so pretend error checking is still on.
 	 */
-	*out_errOff = FALSE;
+	inout_runFlags->ignerr = FALSE;
 }
 
 static void
 JobPrintSpecials(Job *const job, const char *const escCmd,
 		 Boolean const noSpecials, RunFlags *const inout_runFlags,
-		 const char **const inout_cmdTemplate,
-		 Boolean *const inout_errOff)
+		 const char **const inout_cmdTemplate)
 {
 	if (noSpecials)
-		*inout_errOff = FALSE;
+		inout_runFlags->ignerr = FALSE;
 	else if (commandShell->hasErrCtl)
 		JobPrintSpecialsErrCtl(job, inout_runFlags->silent);
 	else if (commandShell->errOffOrExecIgnore != NULL &&
 		 commandShell->errOffOrExecIgnore[0] != '\0') {
 		JobPrintSpecialsEchoCtl(job, inout_runFlags, escCmd,
-		inout_cmdTemplate, inout_errOff);
+		inout_cmdTemplate);
 	} else
-		*inout_errOff = FALSE;
+		inout_runFlags->ignerr = FALSE;
 }
 
 /*
@@ -831,11 +836,6 @@ JobPrintCommand(Job *job, char *cmd)
 	Boolean noSpecials;
 
 	RunFlags runFlags;
-	/*
-	 * true if we turned error checking off before printing the command
-	 * and need to turn it back on
-	 */
-	Boolean errOff;
 	/* Template to use when printing the command */
 	const char *cmdTemplate;
 	char *cmdStart;		/* Start of expanded command */
@@ -851,7 +851,7 @@ JobPrintCommand(Job *job, char *cmd)
 
 	cmdTemplate = "%s\n";
 
-	ParseRunOptions(, , );
+	ParseRunOptions(, );
 
 	if (runFlags.always && noSpecials) {
 		/*
@@ -882,9 +882,9 @@ JobPrintCommand(Job *job, char *cmd)
 		}
 	}
 
-	if (errOff) {
+	if (runFlags.ignerr) {
 		JobPrintSpecials(job, escCmd, noSpecials, ,
-		, );
+		);
 	} else {
 
 		/*
@@ -911,7 +911,7 @@ JobPrintCommand(Job *job, char *cmd)
 cmdTemplate = commandShell->errOffOrExecIgnore;
 			else
 cmdTemplate = commandShell->errExit;
-			errOff = FALSE;
+			runFlags.ignerr = FALSE;
 		}
 	}
 
@@ -924,7 +924,7 @@ JobPrintCommand(Job *job, char *cmd)
 	JobPrintf(job, cmdTemplate, cmd);
 	free(cmdStart);
 	free(escCmd);
-	if (errOff) {
+	if (runFlags.ignerr) {
 		/*
 		 * If echoing is already off, there's no point in issuing the
 		 * echoOff command. Otherwise we issue it and pretend it was on



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:10:24 UTC 2020

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

Log Message:
make(1): move flags errOff into RunFlags.ignerr


To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/usr.bin/make/job.c

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



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:04:17 UTC 2020

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

Log Message:
make(1): move flag runAlways into RunFlags


To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/job.c

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



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 20:04:17 UTC 2020

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

Log Message:
make(1): move flag runAlways into RunFlags


To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.347 src/usr.bin/make/job.c:1.348
--- src/usr.bin/make/job.c:1.347	Tue Dec  8 19:58:20 2020
+++ src/usr.bin/make/job.c	Tue Dec  8 20:04:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.347 2020/12/08 19:58:20 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.348 2020/12/08 20:04:17 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.347 2020/12/08 19:58:20 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.348 2020/12/08 20:04:17 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -222,6 +222,8 @@ typedef struct Shell {
 typedef struct RunFlags {
 	/* true if we put a no echo command into the command file */
 	Boolean silent;
+
+	Boolean always;
 } RunFlags;
 
 /*
@@ -675,14 +677,12 @@ JobFindPid(int pid, JobStatus status, Bo
 
 /* Parse leading '@', '-' and '+', which control the exact execution mode. */
 static void
-ParseRunOptions(char **pp,
-		RunFlags *out_runFlags, Boolean *out_errOff,
-		Boolean *out_runAlways)
+ParseRunOptions(char **pp, RunFlags *out_runFlags, Boolean *out_errOff)
 {
 	char *p = *pp;
 	out_runFlags->silent = FALSE;
 	*out_errOff = FALSE;
-	*out_runAlways = FALSE;
+	out_runFlags->always = FALSE;
 
 	for (;;) {
 		if (*p == '@')
@@ -690,7 +690,7 @@ ParseRunOptions(char **pp,
 		else if (*p == '-')
 			*out_errOff = TRUE;
 		else if (*p == '+')
-			*out_runAlways = TRUE;
+			out_runFlags->always = TRUE;
 		else
 			break;
 		p++;
@@ -742,9 +742,9 @@ JobPrintln(Job *job, const char *line)
  * it any more complex than it already is?
  */
 static void
-JobPrintSpecialsErrCtl(Job *job, Boolean shutUp)
+JobPrintSpecialsErrCtl(Job *job, Boolean silent)
 {
-	if (!(job->flags & JOB_SILENT) && !shutUp && commandShell->hasEchoCtl) {
+	if (!(job->flags & JOB_SILENT) && !silent && commandShell->hasEchoCtl) {
 		JobPrintln(job, commandShell->echoOff);
 		JobPrintln(job, commandShell->errOffOrExecIgnore);
 		JobPrintln(job, commandShell->echoOn);
@@ -836,7 +836,6 @@ JobPrintCommand(Job *job, char *cmd)
 	 * and need to turn it back on
 	 */
 	Boolean errOff;
-	Boolean runAlways;
 	/* Template to use when printing the command */
 	const char *cmdTemplate;
 	char *cmdStart;		/* Start of expanded command */
@@ -852,9 +851,9 @@ JobPrintCommand(Job *job, char *cmd)
 
 	cmdTemplate = "%s\n";
 
-	ParseRunOptions(, , , );
+	ParseRunOptions(, , );
 
-	if (runAlways && noSpecials) {
+	if (runFlags.always && noSpecials) {
 		/*
 		 * We're not actually executing anything...
 		 * but this one needs to be - use compat mode just for it.



CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 19:58:20 UTC 2020

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

Log Message:
make(1): move flag shutUp into struct RunFlags

Running a command is controlled by several flags.  Instead of passing
them around individually, it's easier to have them grouped.


To generate a diff of this commit:
cvs rdiff -u -r1.346 -r1.347 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.346 src/usr.bin/make/job.c:1.347
--- src/usr.bin/make/job.c:1.346	Tue Dec  8 00:50:04 2020
+++ src/usr.bin/make/job.c	Tue Dec  8 19:58:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.346 2020/12/08 00:50:04 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.347 2020/12/08 19:58:20 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.346 2020/12/08 00:50:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.347 2020/12/08 19:58:20 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -219,6 +219,11 @@ typedef struct Shell {
 	const char *exit;	/* exit on error */
 } Shell;
 
+typedef struct RunFlags {
+	/* true if we put a no echo command into the command file */
+	Boolean silent;
+} RunFlags;
+
 /*
  * error handling variables
  */
@@ -671,17 +676,17 @@ JobFindPid(int pid, JobStatus status, Bo
 /* Parse leading '@', '-' and '+', which control the exact execution mode. */
 static void
 ParseRunOptions(char **pp,
-		Boolean *out_shutUp, Boolean *out_errOff,
+		RunFlags *out_runFlags, Boolean *out_errOff,
 		Boolean *out_runAlways)
 {
 	char *p = *pp;
-	*out_shutUp = FALSE;
+	out_runFlags->silent = FALSE;
 	*out_errOff = FALSE;
 	*out_runAlways = FALSE;
 
 	for (;;) {
 		if (*p == '@')
-			*out_shutUp = !DEBUG(LOUD);
+			out_runFlags->silent = !DEBUG(LOUD);
 		else if (*p == '-')
 			*out_errOff = TRUE;
 		else if (*p == '+')
@@ -756,18 +761,18 @@ JobPrintSpecialsErrCtl(Job *job, Boolean
  * Set cmdTemplate to use the weirdness instead of the simple "%s\n" template.
  */
 static void
-JobPrintSpecialsEchoCtl(Job *job, Boolean *inout_shutUp, const char *escCmd,
+JobPrintSpecialsEchoCtl(Job *job, RunFlags *inout_runFlags, const char *escCmd,
 			const char **inout_cmdTemplate, Boolean *out_errOff)
 {
 	job->flags |= JOB_IGNERR;
 
-	if (!(job->flags & JOB_SILENT) && !*inout_shutUp) {
+	if (!(job->flags & JOB_SILENT) && !inout_runFlags->silent) {
 		if (commandShell->hasEchoCtl)
 			JobPrintln(job, commandShell->echoOff);
 		JobPrintf(job, commandShell->errOnOrEcho, escCmd);
-		*inout_shutUp = TRUE;
+		inout_runFlags->silent = TRUE;
 	} else {
-		if (!*inout_shutUp)
+		if (!inout_runFlags->silent)
 			JobPrintf(job, commandShell->errOnOrEcho, escCmd);
 	}
 	*inout_cmdTemplate = commandShell->errOffOrExecIgnore;
@@ -781,17 +786,17 @@ JobPrintSpecialsEchoCtl(Job *job, Boolea
 
 static void
 JobPrintSpecials(Job *const job, const char *const escCmd,
-		 Boolean const noSpecials, Boolean *const inout_shutUp,
+		 Boolean const noSpecials, RunFlags *const inout_runFlags,
 		 const char **const inout_cmdTemplate,
 		 Boolean *const inout_errOff)
 {
 	if (noSpecials)
 		*inout_errOff = FALSE;
 	else if (commandShell->hasErrCtl)
-		JobPrintSpecialsErrCtl(job, *inout_shutUp);
+		JobPrintSpecialsErrCtl(job, inout_runFlags->silent);
 	else if (commandShell->errOffOrExecIgnore != NULL &&
 		 commandShell->errOffOrExecIgnore[0] != '\0') {
-		JobPrintSpecialsEchoCtl(job, inout_shutUp, escCmd,
+		JobPrintSpecialsEchoCtl(job, inout_runFlags, escCmd,
 		inout_cmdTemplate, inout_errOff);
 	} else
 		*inout_errOff = FALSE;
@@ -824,8 +829,8 @@ JobPrintCommand(Job *job, char *cmd)
 	 * the input stream.
 	 */
 	Boolean noSpecials;
-	/* true if we put a no echo command into the command file */
-	Boolean shutUp;
+
+	RunFlags runFlags;
 	/*
 	 * true if we turned error checking off before printing the command
 	 * and need to turn it back on
@@ -847,7 +852,7 @@ JobPrintCommand(Job *job, char *cmd)
 
 	cmdTemplate = "%s\n";
 
-	ParseRunOptions(, , , );
+	ParseRunOptions(, , , );
 
 	if (runAlways && noSpecials) {
 		/*
@@ -868,19 +873,19 @@ JobPrintCommand(Job *job, char *cmd)
 	if (!commandShell->hasErrCtl)
 		escCmd = EscapeShellDblQuot(cmd);
 
-	if (shutUp) {
+	if (runFlags.silent) {
 		if (!(job->flags & JOB_SILENT) && !noSpecials &&
 		commandShell->hasEchoCtl) {
 			JobPrintln(job, commandShell->echoOff);
 		} else {
 			if (commandShell->hasErrCtl)
-shutUp = FALSE;
+runFlags.silent = FALSE;
 		}
 	}
 
 	if (errOff) {
-		JobPrintSpecials(job, escCmd, noSpecials, , ,
-		);
+		JobPrintSpecials(job, escCmd, noSpecials, ,
+		, );
 	} else {
 
 		/*
@@ -891,12 +896,12 @@ JobPrintCommand(Job *job, char *cmd)
 
 		if 

CVS commit: src/usr.bin/make

2020-12-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Dec  8 19:58:20 UTC 2020

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

Log Message:
make(1): move flag shutUp into struct RunFlags

Running a command is controlled by several flags.  Instead of passing
them around individually, it's easier to have them grouped.


To generate a diff of this commit:
cvs rdiff -u -r1.346 -r1.347 src/usr.bin/make/job.c

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



CVS commit: [netbsd-8] src/doc

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:49:33 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1626


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-8.3

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-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.54 src/doc/CHANGES-8.3:1.1.2.55
--- src/doc/CHANGES-8.3:1.1.2.54	Mon Dec  7 20:24:05 2020
+++ src/doc/CHANGES-8.3	Tue Dec  8 18:49:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.54 2020/12/07 20:24:05 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.55 2020/12/08 18:49:33 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1416,3 +1416,25 @@ xsrc/external/mit/libX11/dist/modules/im
 
 	PR 55640: fix off by one in X Input Method.
 	[maya, ticket #1634]
+
+external/bsd/pkg_install/Makefile.inc   up to 1.7
+external/bsd/pkg_install/dist/add/perform.c up to 1.7
+external/bsd/pkg_install/dist/admin/check.c up to 1.4
+external/bsd/pkg_install/dist/admin/main.c  up to 1.6
+external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
+external/bsd/pkg_install/dist/create/perform.c  up to 1.3
+external/bsd/pkg_install/dist/create/pl.c   up to 1.4
+external/bsd/pkg_install/dist/info/perform.cup to 1.3
+external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
+external/bsd/pkg_install/dist/lib/lib.h up to 1.10
+external/bsd/pkg_install/dist/lib/license.c up to 1.10
+external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
+external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
+external/bsd/pkg_install/dist/lib/version.h up to 1.17
+external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
+external/bsd/pkg_install/lib/Makefile   up to 1.11
+external/bsd/pkg_install/lib/config.h   up to 1.3
+
+	Import pkg_info 20201205, move the default pkg database from
+	/var/db/pkg to ${PREFIX/pkgdb.
+	[wiz, ticket #1626]



CVS commit: [netbsd-8] src/doc

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:49:33 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1626


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/external/bsd/pkg_install

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:48:59 UTC 2020

Modified Files:
src/external/bsd/pkg_install [netbsd-8]: Makefile.inc
src/external/bsd/pkg_install/dist/add [netbsd-8]: perform.c
src/external/bsd/pkg_install/dist/admin [netbsd-8]: check.c main.c
pkg_admin.1
src/external/bsd/pkg_install/dist/create [netbsd-8]: perform.c pl.c
src/external/bsd/pkg_install/dist/info [netbsd-8]: perform.c
src/external/bsd/pkg_install/dist/lib [netbsd-8]: iterate.c lib.h
license.c pkgdb.c plist.c version.h vulnerabilities-file.c
src/external/bsd/pkg_install/lib [netbsd-8]: Makefile config.h

Log Message:
Sync external/bsd/pkg_install with -current, requested by wiz in ticket #1626:

external/bsd/pkg_install/Makefile.inc   up to 1.7
external/bsd/pkg_install/dist/add/perform.c up to 1.7
external/bsd/pkg_install/dist/admin/check.c up to 1.4
external/bsd/pkg_install/dist/admin/main.c  up to 1.6
external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
external/bsd/pkg_install/dist/create/perform.c  up to 1.3
external/bsd/pkg_install/dist/create/pl.c   up to 1.4
external/bsd/pkg_install/dist/info/perform.cup to 1.3
external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
external/bsd/pkg_install/dist/lib/lib.h up to 1.10
external/bsd/pkg_install/dist/lib/license.c up to 1.10
external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
external/bsd/pkg_install/dist/lib/version.h up to 1.17
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
external/bsd/pkg_install/lib/Makefile   up to 1.11
external/bsd/pkg_install/lib/config.h   up to 1.3

Import pkg_info 20201205, move the default pkg database from /var/db/pkg
to ${PREFIX/pkgdb.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.34.1 src/external/bsd/pkg_install/Makefile.inc
cvs rdiff -u -r1.5.4.1 -r1.5.4.2 \
src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/admin/check.c
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/external/bsd/pkg_install/dist/admin/main.c \
src/external/bsd/pkg_install/dist/admin/pkg_admin.1
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/external/bsd/pkg_install/dist/create/perform.c \
src/external/bsd/pkg_install/dist/create/pl.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/info/perform.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/lib/iterate.c \
src/external/bsd/pkg_install/dist/lib/pkgdb.c \
src/external/bsd/pkg_install/dist/lib/plist.c
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/external/bsd/pkg_install/dist/lib/lib.h
cvs rdiff -u -r1.5.4.1 -r1.5.4.2 \
src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.11.4.1 -r1.11.4.2 \
src/external/bsd/pkg_install/dist/lib/version.h
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
cvs rdiff -u -r1.9 -r1.9.38.1 src/external/bsd/pkg_install/lib/Makefile
cvs rdiff -u -r1.2 -r1.2.38.1 src/external/bsd/pkg_install/lib/config.h

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

Modified files:

Index: src/external/bsd/pkg_install/Makefile.inc
diff -u src/external/bsd/pkg_install/Makefile.inc:1.4 src/external/bsd/pkg_install/Makefile.inc:1.4.34.1
--- src/external/bsd/pkg_install/Makefile.inc:1.4	Fri Sep 16 16:41:20 2011
+++ src/external/bsd/pkg_install/Makefile.inc	Tue Dec  8 18:48:58 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2011/09/16 16:41:20 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.4.34.1 2020/12/08 18:48:58 martin Exp $
 
 DIST=	${NETBSDSRCDIR}/external/bsd/pkg_install/dist
 
@@ -11,3 +11,11 @@ CPPFLAGS+=-DSYSCONFDIR='"/etc"'
 
 WARNS=	4
 CWARNFLAGS+=	-Wno-missing-noreturn
+
+.include 
+
+# show_version() does not return
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
+COPTS.main.c+=		-Wno-error=implicit-fallthrough
+COPTS.pkg_delete.c+=	-Wno-error=implicit-fallthrough
+.endif

Index: src/external/bsd/pkg_install/dist/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.5.4.1 src/external/bsd/pkg_install/dist/add/perform.c:1.5.4.2
--- src/external/bsd/pkg_install/dist/add/perform.c:1.5.4.1	Mon Oct 21 16:57:40 2019
+++ src/external/bsd/pkg_install/dist/add/perform.c	Tue Dec  8 18:48:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: perform.c,v 1.5.4.1 2019/10/21 16:57:40 martin Exp $	*/
+/*	$NetBSD: perform.c,v 1.5.4.2 2020/12/08 18:48:58 martin Exp $	*/
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: perform.c,v 1.5.4.1 2019/10/21 16:57:40 martin Exp $");
+__RCSID("$NetBSD: perform.c,v 

CVS commit: [netbsd-8] src/external/bsd/pkg_install

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:48:59 UTC 2020

Modified Files:
src/external/bsd/pkg_install [netbsd-8]: Makefile.inc
src/external/bsd/pkg_install/dist/add [netbsd-8]: perform.c
src/external/bsd/pkg_install/dist/admin [netbsd-8]: check.c main.c
pkg_admin.1
src/external/bsd/pkg_install/dist/create [netbsd-8]: perform.c pl.c
src/external/bsd/pkg_install/dist/info [netbsd-8]: perform.c
src/external/bsd/pkg_install/dist/lib [netbsd-8]: iterate.c lib.h
license.c pkgdb.c plist.c version.h vulnerabilities-file.c
src/external/bsd/pkg_install/lib [netbsd-8]: Makefile config.h

Log Message:
Sync external/bsd/pkg_install with -current, requested by wiz in ticket #1626:

external/bsd/pkg_install/Makefile.inc   up to 1.7
external/bsd/pkg_install/dist/add/perform.c up to 1.7
external/bsd/pkg_install/dist/admin/check.c up to 1.4
external/bsd/pkg_install/dist/admin/main.c  up to 1.6
external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
external/bsd/pkg_install/dist/create/perform.c  up to 1.3
external/bsd/pkg_install/dist/create/pl.c   up to 1.4
external/bsd/pkg_install/dist/info/perform.cup to 1.3
external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
external/bsd/pkg_install/dist/lib/lib.h up to 1.10
external/bsd/pkg_install/dist/lib/license.c up to 1.10
external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
external/bsd/pkg_install/dist/lib/version.h up to 1.17
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
external/bsd/pkg_install/lib/Makefile   up to 1.11
external/bsd/pkg_install/lib/config.h   up to 1.3

Import pkg_info 20201205, move the default pkg database from /var/db/pkg
to ${PREFIX/pkgdb.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.34.1 src/external/bsd/pkg_install/Makefile.inc
cvs rdiff -u -r1.5.4.1 -r1.5.4.2 \
src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/admin/check.c
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/external/bsd/pkg_install/dist/admin/main.c \
src/external/bsd/pkg_install/dist/admin/pkg_admin.1
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/external/bsd/pkg_install/dist/create/perform.c \
src/external/bsd/pkg_install/dist/create/pl.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/info/perform.c
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/bsd/pkg_install/dist/lib/iterate.c \
src/external/bsd/pkg_install/dist/lib/pkgdb.c \
src/external/bsd/pkg_install/dist/lib/plist.c
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/external/bsd/pkg_install/dist/lib/lib.h
cvs rdiff -u -r1.5.4.1 -r1.5.4.2 \
src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.11.4.1 -r1.11.4.2 \
src/external/bsd/pkg_install/dist/lib/version.h
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
cvs rdiff -u -r1.9 -r1.9.38.1 src/external/bsd/pkg_install/lib/Makefile
cvs rdiff -u -r1.2 -r1.2.38.1 src/external/bsd/pkg_install/lib/config.h

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



CVS commit: [netbsd-9] src/doc

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:47:21 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.2

Log Message:
Ticket #1140


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-9.2

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-9.2
diff -u src/doc/CHANGES-9.2:1.1.2.18 src/doc/CHANGES-9.2:1.1.2.19
--- src/doc/CHANGES-9.2:1.1.2.18	Mon Dec  7 20:22:12 2020
+++ src/doc/CHANGES-9.2	Tue Dec  8 18:47:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.2,v 1.1.2.18 2020/12/07 20:22:12 martin Exp $
+# $NetBSD: CHANGES-9.2,v 1.1.2.19 2020/12/08 18:47:20 martin Exp $
 
 A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2
 release:
@@ -1166,3 +1166,25 @@ xsrc/external/mit/libX11/dist/modules/im
 
 	PR 55640: fix off by one in X Input Method.
 	[maya, ticket #1145]
+
+external/bsd/pkg_install/Makefile.inc   up to 1.7
+external/bsd/pkg_install/dist/add/perform.c up to 1.7
+external/bsd/pkg_install/dist/admin/check.c up to 1.4
+external/bsd/pkg_install/dist/admin/main.c  up to 1.6
+external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
+external/bsd/pkg_install/dist/create/perform.c  up to 1.3
+external/bsd/pkg_install/dist/create/pl.c   up to 1.4
+external/bsd/pkg_install/dist/info/perform.cup to 1.3
+external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
+external/bsd/pkg_install/dist/lib/lib.h up to 1.10
+external/bsd/pkg_install/dist/lib/license.c up to 1.10
+external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
+external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
+external/bsd/pkg_install/dist/lib/version.h up to 1.17
+external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
+external/bsd/pkg_install/lib/Makefile   up to 1.11
+external/bsd/pkg_install/lib/config.h   up to 1.3
+
+	Import pkg_info 20201205, move the default pkg database from
+	/var/db/pkg to ${PREFIX/pkgdb.
+	[wiz, ticket #1140]



CVS commit: [netbsd-9] src/doc

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:47:21 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.2

Log Message:
Ticket #1140


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-9.2

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



CVS commit: [netbsd-9] src/external/bsd/pkg_install

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:45:59 UTC 2020

Modified Files:
src/external/bsd/pkg_install [netbsd-9]: Makefile.inc
src/external/bsd/pkg_install/dist/add [netbsd-9]: perform.c
src/external/bsd/pkg_install/dist/admin [netbsd-9]: check.c main.c
pkg_admin.1
src/external/bsd/pkg_install/dist/create [netbsd-9]: perform.c pl.c
src/external/bsd/pkg_install/dist/info [netbsd-9]: perform.c
src/external/bsd/pkg_install/dist/lib [netbsd-9]: iterate.c lib.h
license.c pkgdb.c plist.c version.h vulnerabilities-file.c
src/external/bsd/pkg_install/lib [netbsd-9]: Makefile config.h

Log Message:
Sync external/bsd/pkg_install with -current, requested by wiz in ticket #1140:

external/bsd/pkg_install/Makefile.inc   up to 1.7
external/bsd/pkg_install/dist/add/perform.c up to 1.7
external/bsd/pkg_install/dist/admin/check.c up to 1.4
external/bsd/pkg_install/dist/admin/main.c  up to 1.6
external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
external/bsd/pkg_install/dist/create/perform.c  up to 1.3
external/bsd/pkg_install/dist/create/pl.c   up to 1.4
external/bsd/pkg_install/dist/info/perform.cup to 1.3
external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
external/bsd/pkg_install/dist/lib/lib.h up to 1.10
external/bsd/pkg_install/dist/lib/license.c up to 1.10
external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
external/bsd/pkg_install/dist/lib/version.h up to 1.17
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
external/bsd/pkg_install/lib/Makefile   up to 1.11
external/bsd/pkg_install/lib/config.h   up to 1.3

Import pkg_info 20201205, move the default pkg database from /var/db/pkg
to ${PREFIX/pkgdb.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/external/bsd/pkg_install/Makefile.inc
cvs rdiff -u -r1.6 -r1.6.4.1 src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/external/bsd/pkg_install/dist/admin/check.c
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 \
src/external/bsd/pkg_install/dist/admin/main.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \
src/external/bsd/pkg_install/dist/admin/pkg_admin.1
cvs rdiff -u -r1.2 -r1.2.14.1 \
src/external/bsd/pkg_install/dist/create/perform.c \
src/external/bsd/pkg_install/dist/create/pl.c
cvs rdiff -u -r1.2 -r1.2.14.1 \
src/external/bsd/pkg_install/dist/info/perform.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/external/bsd/pkg_install/dist/lib/iterate.c \
src/external/bsd/pkg_install/dist/lib/pkgdb.c \
src/external/bsd/pkg_install/dist/lib/plist.c
cvs rdiff -u -r1.9 -r1.9.4.1 src/external/bsd/pkg_install/dist/lib/lib.h
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 \
src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 \
src/external/bsd/pkg_install/dist/lib/version.h
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
cvs rdiff -u -r1.9 -r1.9.48.1 src/external/bsd/pkg_install/lib/Makefile
cvs rdiff -u -r1.2 -r1.2.48.1 src/external/bsd/pkg_install/lib/config.h

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

Modified files:

Index: src/external/bsd/pkg_install/Makefile.inc
diff -u src/external/bsd/pkg_install/Makefile.inc:1.6 src/external/bsd/pkg_install/Makefile.inc:1.6.2.1
--- src/external/bsd/pkg_install/Makefile.inc:1.6	Thu Feb  7 23:53:20 2019
+++ src/external/bsd/pkg_install/Makefile.inc	Tue Dec  8 18:45:58 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2019/02/07 23:53:20 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.6.2.1 2020/12/08 18:45:58 martin Exp $
 
 DIST=	${NETBSDSRCDIR}/external/bsd/pkg_install/dist
 
@@ -15,7 +15,7 @@ CWARNFLAGS+=	-Wno-missing-noreturn
 .include 
 
 # show_version() does not return
-.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
 COPTS.main.c+=		-Wno-error=implicit-fallthrough
 COPTS.pkg_delete.c+=	-Wno-error=implicit-fallthrough
 .endif

Index: src/external/bsd/pkg_install/dist/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.6 src/external/bsd/pkg_install/dist/add/perform.c:1.6.4.1
--- src/external/bsd/pkg_install/dist/add/perform.c:1.6	Sun Mar 25 04:04:36 2018
+++ src/external/bsd/pkg_install/dist/add/perform.c	Tue Dec  8 18:45:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: perform.c,v 1.6 2018/03/25 04:04:36 sevan Exp $	*/
+/*	$NetBSD: perform.c,v 1.6.4.1 2020/12/08 18:45:58 martin Exp $	*/
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: perform.c,v 1.6 2018/03/25 04:04:36 sevan Exp $");

CVS commit: [netbsd-9] src/external/bsd/pkg_install

2020-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  8 18:45:59 UTC 2020

Modified Files:
src/external/bsd/pkg_install [netbsd-9]: Makefile.inc
src/external/bsd/pkg_install/dist/add [netbsd-9]: perform.c
src/external/bsd/pkg_install/dist/admin [netbsd-9]: check.c main.c
pkg_admin.1
src/external/bsd/pkg_install/dist/create [netbsd-9]: perform.c pl.c
src/external/bsd/pkg_install/dist/info [netbsd-9]: perform.c
src/external/bsd/pkg_install/dist/lib [netbsd-9]: iterate.c lib.h
license.c pkgdb.c plist.c version.h vulnerabilities-file.c
src/external/bsd/pkg_install/lib [netbsd-9]: Makefile config.h

Log Message:
Sync external/bsd/pkg_install with -current, requested by wiz in ticket #1140:

external/bsd/pkg_install/Makefile.inc   up to 1.7
external/bsd/pkg_install/dist/add/perform.c up to 1.7
external/bsd/pkg_install/dist/admin/check.c up to 1.4
external/bsd/pkg_install/dist/admin/main.c  up to 1.6
external/bsd/pkg_install/dist/admin/pkg_admin.1 up to 1.6
external/bsd/pkg_install/dist/create/perform.c  up to 1.3
external/bsd/pkg_install/dist/create/pl.c   up to 1.4
external/bsd/pkg_install/dist/info/perform.cup to 1.3
external/bsd/pkg_install/dist/lib/iterate.c up to 1.3
external/bsd/pkg_install/dist/lib/lib.h up to 1.10
external/bsd/pkg_install/dist/lib/license.c up to 1.10
external/bsd/pkg_install/dist/lib/pkgdb.c   up to 1.4
external/bsd/pkg_install/dist/lib/plist.c   up to 1.4
external/bsd/pkg_install/dist/lib/version.h up to 1.17
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c up to 1.4
external/bsd/pkg_install/lib/Makefile   up to 1.11
external/bsd/pkg_install/lib/config.h   up to 1.3

Import pkg_info 20201205, move the default pkg database from /var/db/pkg
to ${PREFIX/pkgdb.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/external/bsd/pkg_install/Makefile.inc
cvs rdiff -u -r1.6 -r1.6.4.1 src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/external/bsd/pkg_install/dist/admin/check.c
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 \
src/external/bsd/pkg_install/dist/admin/main.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \
src/external/bsd/pkg_install/dist/admin/pkg_admin.1
cvs rdiff -u -r1.2 -r1.2.14.1 \
src/external/bsd/pkg_install/dist/create/perform.c \
src/external/bsd/pkg_install/dist/create/pl.c
cvs rdiff -u -r1.2 -r1.2.14.1 \
src/external/bsd/pkg_install/dist/info/perform.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/external/bsd/pkg_install/dist/lib/iterate.c \
src/external/bsd/pkg_install/dist/lib/pkgdb.c \
src/external/bsd/pkg_install/dist/lib/plist.c
cvs rdiff -u -r1.9 -r1.9.4.1 src/external/bsd/pkg_install/dist/lib/lib.h
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 \
src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 \
src/external/bsd/pkg_install/dist/lib/version.h
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
cvs rdiff -u -r1.9 -r1.9.48.1 src/external/bsd/pkg_install/lib/Makefile
cvs rdiff -u -r1.2 -r1.2.48.1 src/external/bsd/pkg_install/lib/config.h

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



CVS commit: src/tests/rump/rumpkern

2020-12-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Dec  8 17:52:11 UTC 2020

Modified Files:
src/tests/rump/rumpkern: t_vm.c

Log Message:
the busypage test is buggy, expect it to fail.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpkern/t_vm.c

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

Modified files:

Index: src/tests/rump/rumpkern/t_vm.c
diff -u src/tests/rump/rumpkern/t_vm.c:1.4 src/tests/rump/rumpkern/t_vm.c:1.5
--- src/tests/rump/rumpkern/t_vm.c:1.4	Fri Jan 13 21:30:43 2017
+++ src/tests/rump/rumpkern/t_vm.c	Tue Dec  8 17:52:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vm.c,v 1.4 2017/01/13 21:30:43 christos Exp $	*/
+/*	$NetBSD: t_vm.c,v 1.5 2020/12/08 17:52:11 chs Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -50,6 +50,7 @@ ATF_TC_HEAD(busypage, tc)
 ATF_TC_BODY(busypage, tc)
 {
 
+	atf_tc_expect_fail("test bug: unbusies an uninitialized page");
 	rump_init();
 
 	rump_schedule();



CVS commit: src/tests/rump/rumpkern

2020-12-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Dec  8 17:52:11 UTC 2020

Modified Files:
src/tests/rump/rumpkern: t_vm.c

Log Message:
the busypage test is buggy, expect it to fail.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpkern/t_vm.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec  8 13:56:38 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64-nbsd-nat.c

Log Message:
include gdbarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.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/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c	Tue Dec  8 08:56:38 2020
@@ -18,6 +18,7 @@
along with this program.  If not, see .  */
 
 #include "defs.h"
+#include "gdbarch.h"
 #include "gdbcore.h"
 #include "regcache.h"
 #include "inferior.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec  8 13:56:38 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64-nbsd-nat.c

Log Message:
include gdbarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c

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



CVS commit: xsrc/external/mit/xorg-server/dist/hw

2020-12-08 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Dec  8 10:33:47 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kInit.c
xsrc/external/mit/xorg-server/dist/hw/sun: sunIo.c

Log Message:
add dummy ddxInputThreadInit() if INPUTTHREAD is defined.
fixes sun3 build and should fix x68k build too.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.9 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.10
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.9	Sun Nov  1 11:40:53 2020
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c	Tue Dec  8 10:33:47 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kInit.c,v 1.9 2020/11/01 11:40:53 tsutsui Exp $ */
+/* $NetBSD: x68kInit.c,v 1.10 2020/12/08 10:33:47 mrg Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -261,4 +261,13 @@ OsVendorFatalError(const char *f, va_lis
 {
 }
 
+#if INPUTTHREAD
+/** This function is called in Xserver/os/inputthread.c when starting
+the input thread. */
+void
+ddxInputThreadInit(void)
+{
+}
+#endif
+
 /* EOF x68kInit.c */

Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c
diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.6
--- xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.5	Thu Aug 13 05:12:35 2020
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c	Tue Dec  8 10:33:47 2020
@@ -190,6 +190,15 @@ AbortDDX(enum ExitCode error)
 LogClose(error);
 }
 
+#if INPUTTHREAD
+/** This function is called in Xserver/os/inputthread.c when starting
+the input thread. */
+void
+ddxInputThreadInit(void)
+{
+}
+#endif
+
 /* Called by GiveUp(). */
 void
 ddxGiveUp(enum ExitCode error)



CVS commit: xsrc/external/mit/xorg-server/dist/hw

2020-12-08 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Dec  8 10:33:47 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kInit.c
xsrc/external/mit/xorg-server/dist/hw/sun: sunIo.c

Log Message:
add dummy ddxInputThreadInit() if INPUTTHREAD is defined.
fixes sun3 build and should fix x68k build too.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c

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