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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan  9 07:45:05 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: ad.arm ad.mipseb ad.mipsel

Log Message:
Use comp-sysutil-debug (not sysutils)


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/distrib/sets/lists/debug/ad.arm
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/debug/ad.mipseb \
src/distrib/sets/lists/debug/ad.mipsel

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

Modified files:

Index: src/distrib/sets/lists/debug/ad.arm
diff -u src/distrib/sets/lists/debug/ad.arm:1.79 src/distrib/sets/lists/debug/ad.arm:1.80
--- src/distrib/sets/lists/debug/ad.arm:1.79	Mon Jan  3 16:43:32 2022
+++ src/distrib/sets/lists/debug/ad.arm	Sun Jan  9 07:45:05 2022
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.79 2022/01/03 16:43:32 christos Exp $
+# $NetBSD: ad.arm,v 1.80 2022/01/09 07:45:05 skrll Exp $
 ./usr/lib/libarm_g.acomp-c-debuglib		debuglib,compatfile
 ./usr/lib/libc_vfp_g.acomp-c-debuglib		debuglib,softfloat
 ./usr/lib/libpmc_g.acomp-obsolete		obsolete
@@ -27,30 +27,30 @@
 ./usr/libdata/debug/usr/sbin/sbkeygen.debug	comp-util-debug		debug,endian=1234
 ./usr/libdata/debug/usr/sbin/sbtool.debug	comp-util-debug		debug,endian=1234
 ./usr/libdata/debug/usr/sbin/tpctl.debug	comp-sysutil-debug	debug
-./usr/libdata/debug/netbsd-fxp0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-fxp0-IQ80310.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-mvgbe0-MV2120.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-ne0-TWINTAIL.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sd0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sd0-CP3100.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sd0-IQ80310.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sd0-IQ80321.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sd0-TEAMASA_NPWR.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-sm0-GUMSTIX.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-smsh0-GUMSTIX.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0-CP3100.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0-IQ80310.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0-IQ80321.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0-KUROBOX_PRO.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0e-MV2120.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0f-MV2120.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0g-MV2120.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wd0h-MV2120.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wm0-CP3100.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wm0-IQ80321.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-wm0-TEAMASA_NPWR.debug	comp-sysutils-debug	debug,machine_arch=earmv5
-./usr/libdata/debug/netbsd-fxp0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5eb
-./usr/libdata/debug/netbsd-sd0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5eb
-./usr/libdata/debug/netbsd-wd0-ADI_BRH.debug	comp-sysutils-debug	debug,machine_arch=earmv5eb
-./usr/libdata/debug/netbsd-wd0-KUROBOX_PRO.debug	comp-sysutils-debug	debug,machine_arch=earmv5eb
+./usr/libdata/debug/netbsd-fxp0-ADI_BRH.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-fxp0-IQ80310.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-mvgbe0-MV2120.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-ne0-TWINTAIL.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sd0-ADI_BRH.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sd0-CP3100.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sd0-IQ80310.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sd0-IQ80321.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sd0-TEAMASA_NPWR.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-sm0-GUMSTIX.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-smsh0-GUMSTIX.debug	comp-sysutil-debug	debug,machine_arch=earmv5
+./usr/libdata/debug/netbsd-wd0-ADI_BRH.debug	comp-sysutil-debug	

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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan  9 07:45:05 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: ad.arm ad.mipseb ad.mipsel

Log Message:
Use comp-sysutil-debug (not sysutils)


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/distrib/sets/lists/debug/ad.arm
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/debug/ad.mipseb \
src/distrib/sets/lists/debug/ad.mipsel

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



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan  9 07:40:12 UTC 2022

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

Log Message:
Match verb forms.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/etcupdate/etcupdate.8

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



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan  9 07:40:12 UTC 2022

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

Log Message:
Match verb forms.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/etcupdate/etcupdate.8

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate.8
diff -u src/usr.sbin/etcupdate/etcupdate.8:1.25 src/usr.sbin/etcupdate/etcupdate.8:1.26
--- src/usr.sbin/etcupdate/etcupdate.8:1.25	Sun Jan  9 03:33:26 2022
+++ src/usr.sbin/etcupdate/etcupdate.8	Sun Jan  9 07:40:11 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: etcupdate.8,v 1.25 2022/01/09 03:33:26 lukem Exp $
+.\"	$NetBSD: etcupdate.8,v 1.26 2022/01/09 07:40:11 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2022 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -150,7 +150,7 @@ For example,
 will be used instead of
 .Pa /etc .
 .It Fl h
-Prints a help text, and exit.
+Print a help text and exit.
 .It Fl l
 Automatically skip files with unchanged RCS IDs.
 This has the effect of leaving alone files that have been altered



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan  9 07:38:33 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: ad.mipseb

Log Message:
Remove unnecessary machine=emips item - it was added to
distrib/sets/lists/debug/md.emips


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/debug/ad.mipseb

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

Modified files:

Index: src/distrib/sets/lists/debug/ad.mipseb
diff -u src/distrib/sets/lists/debug/ad.mipseb:1.3 src/distrib/sets/lists/debug/ad.mipseb:1.4
--- src/distrib/sets/lists/debug/ad.mipseb:1.3	Sat Jan  8 14:28:14 2022
+++ src/distrib/sets/lists/debug/ad.mipseb	Sun Jan  9 07:38:33 2022
@@ -1,6 +1,5 @@
-# $NetBSD: ad.mipseb,v 1.3 2022/01/08 14:28:14 christos Exp $
+# $NetBSD: ad.mipseb,v 1.4 2022/01/09 07:38:33 skrll Exp $
 ./usr/libdata/debug/usr/bin/elf2ecoff.debug	comp-sysutils-debug	debug
 ./usr/libdata/debug/netbsd-aumac0-ALCHEMY.debug	comp-sysutils-debug	debug
 ./usr/libdata/debug/netbsd-aumac0-DBAU1500.debug	comp-sysutils-debug	debug
 ./usr/libdata/debug/netbsd-aumac0-DBAU1550.debug	comp-sysutils-debug	debug
-./usr/libdata/debug/nfsnetbsd-RAMDISK.debug	comp-sysutils-debug	debug,machine=emips



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan  9 07:38:33 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: ad.mipseb

Log Message:
Remove unnecessary machine=emips item - it was added to
distrib/sets/lists/debug/md.emips


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/debug/ad.mipseb

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



CVS commit: src/usr.bin/audio/record

2022-01-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jan  9 06:33:13 UTC 2022

Modified Files:
src/usr.bin/audio/record: record.c

Log Message:
Let user gracefully abort recording with SIGINT.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/audio/record/record.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/audio/record

2022-01-08 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jan  9 06:33:13 UTC 2022

Modified Files:
src/usr.bin/audio/record: record.c

Log Message:
Let user gracefully abort recording with SIGINT.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/audio/record/record.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/audio/record/record.c
diff -u src/usr.bin/audio/record/record.c:1.55 src/usr.bin/audio/record/record.c:1.56
--- src/usr.bin/audio/record/record.c:1.55	Tue Jun  1 21:08:48 2021
+++ src/usr.bin/audio/record/record.c	Sun Jan  9 06:33:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: record.c,v 1.55 2021/06/01 21:08:48 riastradh Exp $	*/
+/*	$NetBSD: record.c,v 1.56 2022/01/09 06:33:13 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1999, 2002, 2003, 2005, 2010 Matthew R. Green
@@ -32,7 +32,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: record.c,v 1.55 2021/06/01 21:08:48 riastradh Exp $");
+__RCSID("$NetBSD: record.c,v 1.56 2022/01/09 06:33:13 mlelstv Exp $");
 #endif
 
 
@@ -68,6 +68,7 @@ static char	*encoding_str;
 static struct track_info ti;
 static struct timeval record_time;
 static struct timeval start_time;
+static int no_time_limit = 1;
 
 static void (*conv_func) (u_char *, int);
 
@@ -75,6 +76,13 @@ static void usage (void) __dead;
 static int timeleft (struct timeval *, struct timeval *);
 static void cleanup (int) __dead;
 static void rewrite_header (void);
+static void stop (int);
+
+static void stop (int sig)
+{
+	no_time_limit = 0;
+	timerclear(_time);
+}
 
 int
 main(int argc, char *argv[])
@@ -82,7 +90,7 @@ main(int argc, char *argv[])
 	u_char	*buffer;
 	size_t	len, bufsize = 0;
 	ssize_t	nread;
-	int	ch, no_time_limit = 1;
+	int	ch;
 	const char *defdevice = _PATH_SOUND;
 
 	/*
@@ -284,7 +292,7 @@ main(int argc, char *argv[])
 	if (ioctl(audiofd, AUDIO_SETINFO, ) < 0)
 		err(1, "failed to set audio info");
 
-	signal(SIGINT, cleanup);
+	signal(SIGINT, stop);
 
 	ti.total_size = 0;
 
@@ -341,14 +349,12 @@ main(int argc, char *argv[])
 		if ((nread = read(audiofd, buffer, bufsize)) == -1)
 			err(1, "read failed");
 		if (nread == 0)
-			errx(1, "read eof");
-		if ((size_t)nread != bufsize)
-			errx(1, "invalid read");
+			break;
 		if (conv_func)
-			(*conv_func)(buffer, bufsize);
-		if ((size_t)write(ti.outfd, buffer, bufsize) != bufsize)
+			(*conv_func)(buffer, nread);
+		if (write(ti.outfd, buffer, nread) != nread)
 			err(1, "write failed");
-		ti.total_size += bufsize;
+		ti.total_size += nread;
 	}
 	cleanup(0);
 }
@@ -391,7 +397,6 @@ rewrite_header(void)
 	/* can't do this here! */
 	if (ti.outfd == STDOUT_FILENO)
 		return;
-
 	if (lseek(ti.outfd, (off_t)0, SEEK_SET) == (off_t)-1)
 		err(1, "could not seek to start of file for header rewrite");
 	write_header();



CVS import: xsrc/external/mit/xorgproto/dist

2022-01-08 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Jan  9 06:20:03 UTC 2022

Update of /cvsroot/xsrc/external/mit/xorgproto/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv28820

Log Message:
initial import of xorgproto-2021.5

Status:

Vendor Tag: xorg
Release Tags:   xorgproto-2021-5

U xsrc/external/mit/xorgproto/dist/damageproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xcmiscproto
U xsrc/external/mit/xorgproto/dist/COPYING-xf86driproto
U xsrc/external/mit/xorgproto/dist/xf86dgaproto.pc.in
U xsrc/external/mit/xorgproto/dist/config.guess
U xsrc/external/mit/xorgproto/dist/xextproto.pc.in
U xsrc/external/mit/xorgproto/dist/resproto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-damageproto
U xsrc/external/mit/xorgproto/dist/recordproto.pc.in
U xsrc/external/mit/xorgproto/dist/autogen.sh
U xsrc/external/mit/xorgproto/dist/COPYING-resourceproto
U xsrc/external/mit/xorgproto/dist/COPYING-x11proto
U xsrc/external/mit/xorgproto/dist/COPYING-recordproto
U xsrc/external/mit/xorgproto/dist/scrnsaverproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xf86dgaproto
U xsrc/external/mit/xorgproto/dist/xproxymngproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xextproto
U xsrc/external/mit/xorgproto/dist/renderproto.txt
U xsrc/external/mit/xorgproto/dist/xf86vidmodeproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-compositeproto
U xsrc/external/mit/xorgproto/dist/COPYING-trapproto
U xsrc/external/mit/xorgproto/dist/evieproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri3proto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-presentproto
U xsrc/external/mit/xorgproto/dist/COPYING-scrnsaverproto
U xsrc/external/mit/xorgproto/dist/COPYING-xf86bigfontproto
U xsrc/external/mit/xorgproto/dist/COPYING-kbproto
U xsrc/external/mit/xorgproto/dist/kbproto.pc.in
U xsrc/external/mit/xorgproto/dist/config.sub
U xsrc/external/mit/xorgproto/dist/COPYING-fontsproto
U xsrc/external/mit/xorgproto/dist/xcmiscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86bigfontproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-lg3dproto
U xsrc/external/mit/xorgproto/dist/COPYING-printproto
U xsrc/external/mit/xorgproto/dist/compositeproto.txt
U xsrc/external/mit/xorgproto/dist/xineramaproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.txt
U xsrc/external/mit/xorgproto/dist/renderproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.txt
U xsrc/external/mit/xorgproto/dist/README.md
U xsrc/external/mit/xorgproto/dist/COPYING-xineramaproto
U xsrc/external/mit/xorgproto/dist/dri3proto.pc.in
U xsrc/external/mit/xorgproto/dist/INSTALL
U xsrc/external/mit/xorgproto/dist/compositeproto.pc.in
U xsrc/external/mit/xorgproto/dist/PM_spec
U xsrc/external/mit/xorgproto/dist/fontcacheproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-applewmproto
U xsrc/external/mit/xorgproto/dist/configure
U xsrc/external/mit/xorgproto/dist/trapproto.pc.in
U xsrc/external/mit/xorgproto/dist/docbook.am
U xsrc/external/mit/xorgproto/dist/dpmsproto.pc.in
U xsrc/external/mit/xorgproto/dist/bigreqsproto.pc.in
U xsrc/external/mit/xorgproto/dist/resourceproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.pc.in
U xsrc/external/mit/xorgproto/dist/test-driver
U xsrc/external/mit/xorgproto/dist/inputproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86miscproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-fontcacheproto
U xsrc/external/mit/xorgproto/dist/randrproto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-xf86rushproto
U xsrc/external/mit/xorgproto/dist/meson_options.txt
U xsrc/external/mit/xorgproto/dist/windowswmproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86rushproto.pc.in
U xsrc/external/mit/xorgproto/dist/fixesproto.pc.in
U xsrc/external/mit/xorgproto/dist/missing
U xsrc/external/mit/xorgproto/dist/xcalibrateproto.pc.in
U xsrc/external/mit/xorgproto/dist/lg3dproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-evieproto
U xsrc/external/mit/xorgproto/dist/printproto.pc.in
U xsrc/external/mit/xorgproto/dist/applewmproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-videoproto
U xsrc/external/mit/xorgproto/dist/randrproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-dmxproto
U xsrc/external/mit/xorgproto/dist/COPYING-dri2proto
U xsrc/external/mit/xorgproto/dist/fixesproto.txt
U xsrc/external/mit/xorgproto/dist/Makefile.am
U xsrc/external/mit/xorgproto/dist/COPYING-xf86miscproto
U xsrc/external/mit/xorgproto/dist/fontsproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-glproto
U xsrc/external/mit/xorgproto/dist/videoproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-bigreqsproto
U xsrc/external/mit/xorgproto/dist/xproto.pc.in
U xsrc/external/mit/xorgproto/dist/meson.build
U xsrc/external/mit/xorgproto/dist/glproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-dri3proto
U xsrc/external/mit/xorgproto/dist/dmxproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-pmproto
U xsrc/external/mit/xorgproto/dist/xf86driproto.pc.in
U 

CVS import: xsrc/external/mit/xorgproto/dist

2022-01-08 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Jan  9 06:20:03 UTC 2022

Update of /cvsroot/xsrc/external/mit/xorgproto/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv28820

Log Message:
initial import of xorgproto-2021.5

Status:

Vendor Tag: xorg
Release Tags:   xorgproto-2021-5

U xsrc/external/mit/xorgproto/dist/damageproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xcmiscproto
U xsrc/external/mit/xorgproto/dist/COPYING-xf86driproto
U xsrc/external/mit/xorgproto/dist/xf86dgaproto.pc.in
U xsrc/external/mit/xorgproto/dist/config.guess
U xsrc/external/mit/xorgproto/dist/xextproto.pc.in
U xsrc/external/mit/xorgproto/dist/resproto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-damageproto
U xsrc/external/mit/xorgproto/dist/recordproto.pc.in
U xsrc/external/mit/xorgproto/dist/autogen.sh
U xsrc/external/mit/xorgproto/dist/COPYING-resourceproto
U xsrc/external/mit/xorgproto/dist/COPYING-x11proto
U xsrc/external/mit/xorgproto/dist/COPYING-recordproto
U xsrc/external/mit/xorgproto/dist/scrnsaverproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xf86dgaproto
U xsrc/external/mit/xorgproto/dist/xproxymngproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-xextproto
U xsrc/external/mit/xorgproto/dist/renderproto.txt
U xsrc/external/mit/xorgproto/dist/xf86vidmodeproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-compositeproto
U xsrc/external/mit/xorgproto/dist/COPYING-trapproto
U xsrc/external/mit/xorgproto/dist/evieproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri3proto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-presentproto
U xsrc/external/mit/xorgproto/dist/COPYING-scrnsaverproto
U xsrc/external/mit/xorgproto/dist/COPYING-xf86bigfontproto
U xsrc/external/mit/xorgproto/dist/COPYING-kbproto
U xsrc/external/mit/xorgproto/dist/kbproto.pc.in
U xsrc/external/mit/xorgproto/dist/config.sub
U xsrc/external/mit/xorgproto/dist/COPYING-fontsproto
U xsrc/external/mit/xorgproto/dist/xcmiscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86bigfontproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-lg3dproto
U xsrc/external/mit/xorgproto/dist/COPYING-printproto
U xsrc/external/mit/xorgproto/dist/compositeproto.txt
U xsrc/external/mit/xorgproto/dist/xineramaproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.txt
U xsrc/external/mit/xorgproto/dist/renderproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.txt
U xsrc/external/mit/xorgproto/dist/README.md
U xsrc/external/mit/xorgproto/dist/COPYING-xineramaproto
U xsrc/external/mit/xorgproto/dist/dri3proto.pc.in
U xsrc/external/mit/xorgproto/dist/INSTALL
U xsrc/external/mit/xorgproto/dist/compositeproto.pc.in
U xsrc/external/mit/xorgproto/dist/PM_spec
U xsrc/external/mit/xorgproto/dist/fontcacheproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-applewmproto
U xsrc/external/mit/xorgproto/dist/configure
U xsrc/external/mit/xorgproto/dist/trapproto.pc.in
U xsrc/external/mit/xorgproto/dist/docbook.am
U xsrc/external/mit/xorgproto/dist/dpmsproto.pc.in
U xsrc/external/mit/xorgproto/dist/bigreqsproto.pc.in
U xsrc/external/mit/xorgproto/dist/resourceproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.pc.in
U xsrc/external/mit/xorgproto/dist/test-driver
U xsrc/external/mit/xorgproto/dist/inputproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86miscproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-fontcacheproto
U xsrc/external/mit/xorgproto/dist/randrproto.txt
U xsrc/external/mit/xorgproto/dist/COPYING-xf86rushproto
U xsrc/external/mit/xorgproto/dist/meson_options.txt
U xsrc/external/mit/xorgproto/dist/windowswmproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86rushproto.pc.in
U xsrc/external/mit/xorgproto/dist/fixesproto.pc.in
U xsrc/external/mit/xorgproto/dist/missing
U xsrc/external/mit/xorgproto/dist/xcalibrateproto.pc.in
U xsrc/external/mit/xorgproto/dist/lg3dproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-evieproto
U xsrc/external/mit/xorgproto/dist/printproto.pc.in
U xsrc/external/mit/xorgproto/dist/applewmproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-videoproto
U xsrc/external/mit/xorgproto/dist/randrproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-dmxproto
U xsrc/external/mit/xorgproto/dist/COPYING-dri2proto
U xsrc/external/mit/xorgproto/dist/fixesproto.txt
U xsrc/external/mit/xorgproto/dist/Makefile.am
U xsrc/external/mit/xorgproto/dist/COPYING-xf86miscproto
U xsrc/external/mit/xorgproto/dist/fontsproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-glproto
U xsrc/external/mit/xorgproto/dist/videoproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-bigreqsproto
U xsrc/external/mit/xorgproto/dist/xproto.pc.in
U xsrc/external/mit/xorgproto/dist/meson.build
U xsrc/external/mit/xorgproto/dist/glproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-dri3proto
U xsrc/external/mit/xorgproto/dist/dmxproto.pc.in
U xsrc/external/mit/xorgproto/dist/COPYING-pmproto
U xsrc/external/mit/xorgproto/dist/xf86driproto.pc.in
U 

CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:33:26 UTC 2022

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

Log Message:
etcupdate: add -? for help. improve option errors

Support -? to show help.
Implemented using getopts "leading colon optstring" feature.
Improve error messages for unknown options and missing arguments.
Change usage-related errors from stdout to stderr.
Keep all other errors to stdout for now.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/etcupdate/etcupdate.8

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.63 src/usr.sbin/etcupdate/etcupdate:1.64
--- src/usr.sbin/etcupdate/etcupdate:1.63	Sun Jan  9 03:31:23 2022
+++ src/usr.sbin/etcupdate/etcupdate	Sun Jan  9 03:33:26 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.63 2022/01/09 03:31:23 lukem Exp $
+# $NetBSD: etcupdate,v 1.64 2022/01/09 03:33:26 lukem Exp $
 #
 # Copyright (c) 2001-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -85,7 +85,7 @@ help()
 	cat << EOF
 
 Usage: ${PROG} [-alv] [-d DESTDIR] [-p PAGER] [-s SRC_ARG] [-t TEMPROOT] [-w WIDTH]
-   ${PROG} -h
+   ${PROG} ( -h | -? )
 
 Options:
 
@@ -103,10 +103,10 @@ Options:
   "etc.tgz" and "xetc.tgz" have been extracted.
  -s TGZ_FILE  A distribution set file such as "etc.tgz" or
   "xetc.tgz".  May be specified multiple times.
-
   -t TEMPROOT  Where to store temporary files. [/tmp/temproot]
   -w WIDTH Screen width.   [80]
   -v   Be more verbose.
+  -?   Display this help, and exit.
 
 EOF
 }
@@ -477,7 +477,7 @@ USERRC="${HOME}/.{PROG}rc"
 [ -r ${USERRC} ] && . ${USERRC}
 
 # Read command line arguments
-while getopts ad:hlp:s:t:vw: i
+while getopts :ad:hlp:s:t:vw: i
 do
 	case "${i}" in
 	a)
@@ -539,13 +539,31 @@ do
 	w)
 		WIDTH="${OPTARG}"
 		;;
-	*)
-		# getopts should already have printed an error message
+	"?")
+		if [ "${OPTARG}" = "?" ]; then
+			help
+			exit 0
+		fi
+		echo 1>&2 "${PROG}: Unknown option -${OPTARG}"
+		usage
+		;;
+
+	:)
+		echo 1>&2 "${PROG}: Missing argument for option -${OPTARG}"
 		usage
-		break
+		;;
+
+	*)
+		echo 1>&2 "${PROG}: Unimplemented option -${ch}"
+		exit 3
 		;;
 	esac
 done
+shift $((${OPTIND} - 1))
+if [ $# -ne 0 ] ; then
+	echo 1>&2 "${PROG}: Unknown extra arguments"
+	usage
+fi
 
 # Last minute sanity checks
 if [ "$(id -u)" -ne 0 ]; then
@@ -555,7 +573,7 @@ fi
 DESTDIR="${DESTDIR%/}" # remove trailing slash, if any.  result might be "".
 DESTDIR_BRE="$(bre_quote "${DESTDIR}")"
 if [ "${N_SRC_ARGS}" -gt 1 ] && ( ${SOURCEMODE} || ${BINARYDIRMODE} ); then
-	echo "*** ERROR: Multiple -s args are allowed only with tgz files"
+	echo 1>&2 "${PROG}: Multiple -s args are allowed only with tgz files"
 	usage
 fi
 case "${TEMPROOT}" in

Index: src/usr.sbin/etcupdate/etcupdate.8
diff -u src/usr.sbin/etcupdate/etcupdate.8:1.24 src/usr.sbin/etcupdate/etcupdate.8:1.25
--- src/usr.sbin/etcupdate/etcupdate.8:1.24	Sun Jan  9 03:31:23 2022
+++ src/usr.sbin/etcupdate/etcupdate.8	Sun Jan  9 03:33:26 2022
@@ -1,6 +1,6 @@
-.\"	$NetBSD: etcupdate.8,v 1.24 2022/01/09 03:31:23 lukem Exp $
+.\"	$NetBSD: etcupdate.8,v 1.25 2022/01/09 03:33:26 lukem Exp $
 .\"
-.\" Copyright (c) 2001-2020 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2001-2022 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -43,7 +43,7 @@
 .Op Fl t Ar temproot
 .Op Fl w Ar width
 .Nm
-.Fl h
+.Pq Fl h | Fl \&?
 .Sh DESCRIPTION
 .Nm
 is a tool that lets the administrator update the configuration and
@@ -280,6 +280,8 @@ variable.
 This is useful for
 .Xr xterm 1
 users with wider shell windows.
+.It Fl \&?
+Prints a help text, and exit.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width IGNOREFILESXX



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:33:26 UTC 2022

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

Log Message:
etcupdate: add -? for help. improve option errors

Support -? to show help.
Implemented using getopts "leading colon optstring" feature.
Improve error messages for unknown options and missing arguments.
Change usage-related errors from stdout to stderr.
Keep all other errors to stdout for now.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/etcupdate/etcupdate.8

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



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:31:23 UTC 2022

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

Log Message:
etcupdate: -h to stdout. improve help

Send -h help to stdout not stderr, and exit 0 not 1.
Show options alphabetically.
Use UPPER_CASE instead of lowercase as the convention for argument names.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/etcupdate/etcupdate.8

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.62 src/usr.sbin/etcupdate/etcupdate:1.63
--- src/usr.sbin/etcupdate/etcupdate:1.62	Sun Jan  9 03:25:38 2022
+++ src/usr.sbin/etcupdate/etcupdate	Sun Jan  9 03:31:23 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.62 2022/01/09 03:25:38 lukem Exp $
+# $NetBSD: etcupdate,v 1.63 2022/01/09 03:31:23 lukem Exp $
 #
 # Copyright (c) 2001-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -80,34 +80,40 @@ NEED_PWD_MKDB=false
 NEED_SERVICES_MKDB=false
 
 
-usage()
+help()
 {
-	cat << EOF >&2
+	cat << EOF
 
-Usage: ${PROG} [options]
+Usage: ${PROG} [-alv] [-d DESTDIR] [-p PAGER] [-s SRC_ARG] [-t TEMPROOT] [-w WIDTH]
+   ${PROG} -h
 
 Options:
 
-  -p pager Which pager to use  (default: /usr/bin/more)
-  -s {srcdir|tgzfile|tempdir}  (default: /usr/src)
-   Location of the source files.  This may be any of the
-   following:
-   * A directory that contains a NetBSD source tree;
-   * A distribution set file such as "etc.tgz" or
- "xetc.tgz".  Pass multiple -s options to specify
- multiple such files;
-   * A temporary directory in which one or both of
- "etc.tgz" and "xetc.tgz" have been extracted.
-  -t temproot  Where to store temporary files  (default: /tmp/temproot)
-  -d destdir   Destination directory to check. (default: /)
-  -w width Screen width(default: 80)
-  -a   Automatically update unmodified files
+  -a   Automatically update unmodified files.
+  -d DESTDIR   Destination directory to check. [/]
+  -h   Display this help, and exit.
   -l   Automatically skip files with strictly local changes
-   (this option has no effect on files lacking RCS Ids)
-  -h   This help text
-  -v   Be more verbose
+   (this option has no effect on files lacking RCS Ids).
+  -p PAGER Which pager to use  [/usr/bin/more]
+  -s SRC_ARG   Location of the source files.   [/usr/src]
+   This may be any of the following:
+ -s SRC_DIR   A directory that contains a NetBSD
+  source tree.
+ -s TGZ_DIR   A directory in which one or both of
+  "etc.tgz" and "xetc.tgz" have been extracted.
+ -s TGZ_FILE  A distribution set file such as "etc.tgz" or
+  "xetc.tgz".  May be specified multiple times.
+
+  -t TEMPROOT  Where to store temporary files. [/tmp/temproot]
+  -w WIDTH Screen width.   [80]
+  -v   Be more verbose.
 
 EOF
+}
+
+usage()
+{
+	help 1>&2
 	exit 1
 }
 
@@ -481,7 +487,8 @@ do
 		DESTDIR="${OPTARG}"
 		;;
 	h)
-		usage
+		help
+		exit 0
 		;;
 	l)
 		LOCALSKIP=true

Index: src/usr.sbin/etcupdate/etcupdate.8
diff -u src/usr.sbin/etcupdate/etcupdate.8:1.23 src/usr.sbin/etcupdate/etcupdate.8:1.24
--- src/usr.sbin/etcupdate/etcupdate.8:1.23	Wed Nov 21 20:18:11 2018
+++ src/usr.sbin/etcupdate/etcupdate.8	Sun Jan  9 03:31:23 2022
@@ -1,6 +1,6 @@
-.\"	$NetBSD: etcupdate.8,v 1.23 2018/11/21 20:18:11 martin Exp $
+.\"	$NetBSD: etcupdate.8,v 1.24 2022/01/09 03:31:23 lukem Exp $
 .\"
-.\" Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2001-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 20, 2018
+.Dd January 9, 2022
 .Dt ETCUPDATE 8
 .Os
 .Sh NAME
@@ -36,12 +36,14 @@
 .Pa /etc
 .Sh SYNOPSIS
 .Nm
-.Op Fl ahlv
+.Op Fl alv
 .Op Fl d Ar destdir
 .Op Fl p Ar pager
-.Op Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
+.Op Fl s Pq Ar srcdir | Ar tgzdir | Ar tgzfile
 .Op Fl t Ar temproot
 .Op Fl w Ar width
+.Nm
+.Fl h
 .Sh DESCRIPTION
 .Nm
 is a tool that lets the administrator update the configuration and
@@ -148,7 +150,7 @@ For example,
 will be used instead of
 .Pa /etc .
 .It Fl h
-Prints a help text.
+Prints a help text, and exit.
 .It Fl l
 Automatically skip files with unchanged RCS IDs.
 This has the effect of 

CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:31:23 UTC 2022

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

Log Message:
etcupdate: -h to stdout. improve help

Send -h help to stdout not stderr, and exit 0 not 1.
Show options alphabetically.
Use UPPER_CASE instead of lowercase as the convention for argument names.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/etcupdate/etcupdate.8

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



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:25:38 UTC 2022

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
etcupdate: style change: function { on new line


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/etcupdate/etcupdate

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.61 src/usr.sbin/etcupdate/etcupdate:1.62
--- src/usr.sbin/etcupdate/etcupdate:1.61	Wed Dec  2 14:20:20 2020
+++ src/usr.sbin/etcupdate/etcupdate	Sun Jan  9 03:25:38 2022
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.61 2020/12/02 14:20:20 wiz Exp $
+# $NetBSD: etcupdate,v 1.62 2022/01/09 03:25:38 lukem Exp $
 #
-# Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2001-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # This code is derived from software contributed to The NetBSD Foundation
@@ -80,7 +80,8 @@ NEED_PWD_MKDB=false
 NEED_SERVICES_MKDB=false
 
 
-usage() {
+usage()
+{
 	cat << EOF >&2
 
 Usage: ${PROG} [options]
@@ -110,13 +111,15 @@ EOF
 	exit 1
 }
 
-verbose() {
+verbose()
+{
 	# $* = message to display if in verbose mode
 
 	${VERBOSE} && echo "${@}"
 }
 
-yesno() {
+yesno()
+{
 	# $* = message to display
 
 	echo -n "${@}? (y/[n]) "
@@ -191,7 +194,8 @@ bre_quote()
 	printf "%s\n" "${arg}" | sed -e 's/[][^$.*\\'"${extra}"']/\\&/g'
 }
 
-install_dir() {
+install_dir()
+{
 	# $1 = target directory (relative to ${DESTDIR})
 
 	NEED_ANYTHING=true
@@ -202,7 +206,8 @@ install_dir() {
 	fi
 }
 
-install_file() {
+install_file()
+{
 	# $1 = target file (relative to ${DESTDIR})
 
 	NEED_ANYTHING=true
@@ -230,7 +235,8 @@ install_file() {
 	esac
 }
 
-install_checksum() {
+install_checksum()
+{
 	# $1 = target file (relative to ${DESTDIR})
 
 	${AUTOMATIC} || return
@@ -248,7 +254,8 @@ install_checksum() {
 }
 
 # Initialise the DIFF_EXTRA_OPTIONS variable.
-init_diff_extra_options() {
+init_diff_extra_options()
+{
 	#
 	# Start with a few options that are always available.
 	#
@@ -274,7 +281,8 @@ init_diff_extra_options() {
   scommand Show differences using the specified diff-like command"
 }
 
-diff_and_merge_file() {
+diff_and_merge_file()
+{
 	# $1 = target file (relative to ${DESTDIR})
 
 	if cmp -s "${TEMPROOT}${1}" "${DESTDIR}${1}"; then
@@ -432,7 +440,8 @@ EOF
 }
 
 # Set the environment for make.
-set_makeenv() {
+set_makeenv()
+{
 	#
 	# INSTALL_DONE=1 prevents installation of unwanted
 	# files (things that are not part of the etc set).



CVS commit: src/usr.sbin/etcupdate

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jan  9 03:25:38 UTC 2022

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
etcupdate: style change: function { on new line


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/etcupdate/etcupdate

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



CVS commit: src/sys/dev/ic

2022-01-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan  9 00:36:28 UTC 2022

Modified Files:
src/sys/dev/ic: dwc_eqos.c dwc_eqos_reg.h dwc_eqos_var.h

Log Message:
eqos: handle the GMAC_MTL_INTERRUPT_STATUS register having something

drain a couple of registers that want either a read or a write-1-to-
clear bit, and keep track of how many happen via evcnt.

i had this trigger one time, but not since adding instrumentation to
see exactly it was saying (the GMAC_MTL_INTERRUPT_STATUS_Q0IS bit was
set, and it requires some handling now implemented.)

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/dwc_eqos.c \
src/sys/dev/ic/dwc_eqos_reg.h src/sys/dev/ic/dwc_eqos_var.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/ic/dwc_eqos.c
diff -u src/sys/dev/ic/dwc_eqos.c:1.2 src/sys/dev/ic/dwc_eqos.c:1.3
--- src/sys/dev/ic/dwc_eqos.c:1.2	Sat Jan  8 22:24:53 2022
+++ src/sys/dev/ic/dwc_eqos.c	Sun Jan  9 00:36:28 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos.c,v 1.2 2022/01/08 22:24:53 mrg Exp $ */
+/* $NetBSD: dwc_eqos.c,v 1.3 2022/01/09 00:36:28 mrg Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -33,7 +33,7 @@
 #include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.2 2022/01/08 22:24:53 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.3 2022/01/09 00:36:28 mrg Exp $");
 
 #include 
 #include 
@@ -870,6 +870,49 @@ eqos_start(struct ifnet *ifp)
 	EQOS_TXUNLOCK(sc);
 }
 
+static void
+eqos_intr_mtl(struct eqos_softc *sc, uint32_t mtl_status)
+{
+	uint32_t debug_data __unused = 0, ictrl = 0;
+
+	if (mtl_status == 0)
+		return;
+
+	/* Drain the errors reported by MTL_INTERRUPT_STATUS */
+	sc->sc_ev_mtl.ev_count++;
+
+	if ((mtl_status & GMAC_MTL_INTERRUPT_STATUS_DBGIS) != 0) {
+		debug_data = RD4(sc, GMAC_MTL_FIFO_DEBUG_DATA);
+		sc->sc_ev_mtl_debugdata.ev_count++;
+	}
+	if ((mtl_status & GMAC_MTL_INTERRUPT_STATUS_Q0IS) != 0) {
+		uint32_t new_status = 0;
+
+		ictrl = RD4(sc, GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS);
+		if ((ictrl & GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_RXOVFIS) != 0) {
+			new_status |= GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_RXOVFIS;
+			sc->sc_ev_mtl_rxovfis.ev_count++;
+		}
+		if ((ictrl & GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_TXUNFIS) != 0) {
+			new_status |= GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_TXUNFIS;
+			sc->sc_ev_mtl_txovfis.ev_count++;
+		}
+		if (new_status) {
+			new_status |= (ictrl &
+			(GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_RXOIE|
+			 GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS_TXUIE));
+			WR4(sc, GMAC_MTL_Q0_INTERRUPT_CTRL_STATUS, new_status);
+		}
+	}
+#ifdef DEBUG_LOUD
+	device_printf(sc->sc_dev,
+	"GMAC_MTL_INTERRUPT_STATUS = 0x%08X, "
+	"GMAC_MTL_FIFO_DEBUG_DATA = 0x%08X, "
+	"GMAC_MTL_INTERRUPT_STATUS_Q0IS = 0x%08X\n",
+	mtl_status, debug_data, ictrl);
+#endif
+}
+
 int
 eqos_intr(void *arg)
 {
@@ -891,13 +934,7 @@ eqos_intr(void *arg)
 	}
 
 	mtl_status = RD4(sc, GMAC_MTL_INTERRUPT_STATUS);
-	if (mtl_status) {
-		sc->sc_ev_mtl.ev_count++;
-#ifdef DEBUG_LOUD
-		device_printf(sc->sc_dev,
-		"GMAC_MTL_INTERRUPT_STATUS = 0x%08X\n", mtl_status);
-#endif
-	}
+	eqos_intr_mtl(sc, mtl_status);
 
 	dma_status = RD4(sc, GMAC_DMA_CHAN0_STATUS);
 	dma_status &= RD4(sc, GMAC_DMA_CHAN0_INTR_ENABLE);
@@ -1305,6 +1342,14 @@ eqos_attach(struct eqos_softc *sc)
 	evcnt_attach_dynamic(>sc_ev_status, EVCNT_TYPE_INTR,
 	>sc_ev_intr, device_xname(sc->sc_dev), "rxtxstatus");
 
+	/* MAC Status specific type, using macstatus interrupt */
+	evcnt_attach_dynamic(>sc_ev_mtl_debugdata, EVCNT_TYPE_INTR,
+	>sc_ev_mtl, device_xname(sc->sc_dev), "debugdata");
+	evcnt_attach_dynamic(>sc_ev_mtl_rxovfis, EVCNT_TYPE_INTR,
+	>sc_ev_mtl, device_xname(sc->sc_dev), "rxovfis");
+	evcnt_attach_dynamic(>sc_ev_mtl_txovfis, EVCNT_TYPE_INTR,
+	>sc_ev_mtl, device_xname(sc->sc_dev), "txovfis");
+
 	/* RX/TX Status specific type, using rxtxstatus interrupt */
 	evcnt_attach_dynamic(>sc_ev_rwt, EVCNT_TYPE_INTR,
 	>sc_ev_status, device_xname(sc->sc_dev), "rwt");
Index: src/sys/dev/ic/dwc_eqos_reg.h
diff -u src/sys/dev/ic/dwc_eqos_reg.h:1.2 src/sys/dev/ic/dwc_eqos_reg.h:1.3
--- src/sys/dev/ic/dwc_eqos_reg.h:1.2	Sat Jan  8 22:24:53 2022
+++ src/sys/dev/ic/dwc_eqos_reg.h	Sun Jan  9 00:36:28 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos_reg.h,v 1.2 2022/01/08 22:24:53 mrg Exp $ */
+/* $NetBSD: dwc_eqos_reg.h,v 1.3 2022/01/09 00:36:28 mrg Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -171,6 +171,8 @@
 #define	GMAC_MTL_DBG_STS			0x0C0C
 #define	GMAC_MTL_FIFO_DEBUG_DATA		0x0C10
 #define	GMAC_MTL_INTERRUPT_STATUS		0x0C20
+#define	 GMAC_MTL_INTERRUPT_STATUS_DBGIS	(1U << 17)
+#define	 GMAC_MTL_INTERRUPT_STATUS_Q0IS		(1U << 0)
 #define	GMAC_MTL_TXQ0_OPERATION_MODE		0x0D00
 #define	 GMAC_MTL_TXQ0_OPERATION_MODE_TXQEN_SHIFT	2
 #define	 GMAC_MTL_TXQ0_OPERATION_MODE_TXQEN_MASK	(0x3U << 

CVS commit: src/sys/dev/ic

2022-01-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan  9 00:36:28 UTC 2022

Modified Files:
src/sys/dev/ic: dwc_eqos.c dwc_eqos_reg.h dwc_eqos_var.h

Log Message:
eqos: handle the GMAC_MTL_INTERRUPT_STATUS register having something

drain a couple of registers that want either a read or a write-1-to-
clear bit, and keep track of how many happen via evcnt.

i had this trigger one time, but not since adding instrumentation to
see exactly it was saying (the GMAC_MTL_INTERRUPT_STATUS_Q0IS bit was
set, and it requires some handling now implemented.)

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/dwc_eqos.c \
src/sys/dev/ic/dwc_eqos_reg.h src/sys/dev/ic/dwc_eqos_var.h

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



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan  9 00:33:57 UTC 2022

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

Log Message:
make: remove redundant parameter from ForLoop_SubstVarLong

The buffer of a .for loop is always either empty or ends with '\n'.  A
variable name consists of arbitrary non-whitespace characters.
Therefore a variable name can never reach the end of the buffer.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/for.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/for.c
diff -u src/usr.bin/make/for.c:1.161 src/usr.bin/make/for.c:1.162
--- src/usr.bin/make/for.c:1.161	Sat Jan  8 23:52:26 2022
+++ src/usr.bin/make/for.c	Sun Jan  9 00:33:57 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.161 2022/01/08 23:52:26 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.162 2022/01/09 00:33:57 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.161 2022/01/08 23:52:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.162 2022/01/09 00:33:57 rillig Exp $");
 
 
 typedef struct ForLoop {
@@ -363,7 +363,7 @@ AddEscaped(Buffer *cmds, Substring item,
  */
 static void
 ForLoop_SubstVarLong(ForLoop *f, Buffer *body, const char **pp,
-		 const char *end, char endc, const char **inout_mark)
+		 char endc, const char **inout_mark)
 {
 	size_t i;
 	const char *start = *pp;
@@ -373,7 +373,7 @@ ForLoop_SubstVarLong(ForLoop *f, Buffer 
 		const char *p = start;
 		const char *varname = vars[i];
 
-		while (p < end && *varname != '\0' && *p == *varname)
+		while (*varname != '\0' && *p == *varname)
 			p++, varname++;
 		if (*varname != '\0')
 			continue;
@@ -456,7 +456,7 @@ ForLoop_SubstBody(ForLoop *f, Buffer *bo
 		if (p[1] == '{' || p[1] == '(') {
 			char endc = p[1] == '{' ? '}' : ')';
 			p += 2;
-			ForLoop_SubstVarLong(f, body, , end, endc, );
+			ForLoop_SubstVarLong(f, body, , endc, );
 		} else if (p[1] != '\0') {
 			ForLoop_SubstVarShort(f, body, p + 1, );
 			p += 2;



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan  9 00:33:57 UTC 2022

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

Log Message:
make: remove redundant parameter from ForLoop_SubstVarLong

The buffer of a .for loop is always either empty or ends with '\n'.  A
variable name consists of arbitrary non-whitespace characters.
Therefore a variable name can never reach the end of the buffer.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/for.c

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



Re: CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig

Am 08.01.2022 um 23:54 schrieb nia:

On Fri, Jan 07, 2022 at 08:04:49PM +, Roland Illig wrote:

Using memcmp for comparing the variable name was probably overkill since
the variable names are usually very short, so rather compare them byte
by byte.


I don't see the point of this change - it makes the code harder to
read. We should trust the optimizing compiler, or alternatively trust
that comparing short byte strings isn't particularly expensive.


My idea was that it is usually enough to compare the first byte of the
variable name to see the mismatch, and that the variable names from .for
loops are usually shorter than 8 bytes.  Therefore I wanted to save the
function call to memcmp, as well as the extra comparison for length > 7
that is in x86_64's libc.a(memcmp.o).

I didn't measure whether the speed improvement is noticeable though.
Throwing away 12 lines of code plus a struct looked good to me though,
therefore I went this way.

If I were to extract the newly added code into a function call
cpp_skip_string(, varname), would that help?  That function could be
used in var.c as well, for example in ModMatch and ModMatchEq.


CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:57:32 UTC 2022

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

Log Message:
postinstall(8); add -?. expand operation usage


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

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.8
diff -u src/usr.sbin/postinstall/postinstall.8:1.20 src/usr.sbin/postinstall/postinstall.8:1.21
--- src/usr.sbin/postinstall/postinstall.8:1.20	Wed Nov 21 20:13:09 2018
+++ src/usr.sbin/postinstall/postinstall.8	Sat Jan  8 23:57:32 2022
@@ -1,6 +1,6 @@
-.\"	$NetBSD: postinstall.8,v 1.20 2018/11/21 20:13:09 martin Exp $
+.\"	$NetBSD: postinstall.8,v 1.21 2022/01/08 23:57:32 lukem Exp $
 .\"
-.\" Copyright (c) 2005-2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2005-2022 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 20, 2018
+.Dd January 9, 2022
 .Dt POSTINSTALL 8
 .Os
 .Sh NAME
@@ -38,10 +38,12 @@
 .Op Fl a Ar arch
 .Op Fl d Ar destdir
 .Op Fl m Ar machine
-.Op Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
+.Op Fl s Pq Ar srcdir | Ar tgzdir | Ar tgzfile
 .Op Fl x Ar xsrcdir
 .Ar operation
-.Op Ar item Op ...
+.Ar \&...
+.Nm postinstall
+.Fl \&?
 .Sh DESCRIPTION
 The
 .Nm
@@ -73,7 +75,7 @@ Defaults to
 .It Fl m Ar machine
 MACHINE.
 Defaults to machine of the host operating system.
-.It Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
+.It Fl s Pq Ar srcdir | Ar tgzdir | Ar tgzfile
 The location of the reference files, or the
 .Nx
 source files used to create the reference files.
@@ -130,19 +132,21 @@ Location of the X11 source files.
 This must be a directory that contains a
 .Nx
 xsrc tree.
+.It Fl \&?
+Display help to stdout, and exit.
 .El
 .Pp
 The
 .Ar operation
 argument may be one of:
 .Bl -tag -width usageXX -offset indent
-.It Cm check
+.It Cm check Ar item Ar \&...
 Perform post-installation checks on items.
-.It Cm diff Op Xr diff 1 Li options
+.It Cm diff Oo Fl Ar bcenpuw Oc Ar item Ar \&...
 Similar to
 .Cm check ,
 but also show the differences between the files.
-.It Cm fix
+.It Cm fix Ar item Ar \&...
 Apply fixes that
 .Cm check
 determines need to be applied.
@@ -160,14 +164,13 @@ See
 .Xr etcupdate 8
 for an alternative update method that is able to merge files.
 .It Cm help
-Display a short help.
+Display help to stdout, and exit.
 .It Cm list
 List available
 .Ar items ,
 showing if they are enabled or disabled by default.
 .It Cm usage
-Same as
-.Cm help .
+Display help to stdout, and exit.
 .El
 .Sh EXIT STATUS
 The



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:57:32 UTC 2022

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

Log Message:
postinstall(8); add -?. expand operation usage


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

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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 23:52:26 UTC 2022

Modified Files:
src/usr.bin/make: for.c nonints.h parse.c
src/usr.bin/make/unit-tests: include-main.exp opt-debug-parse.exp
opt-debug-parse.mk

Log Message:
make: add details about .for loop variables to stack traces

The stack traces are enabled with the debug logging option '-dp'.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/usr.bin/make/for.c
cvs rdiff -u -r1.234 -r1.235 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.643 -r1.644 src/usr.bin/make/parse.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/include-main.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/opt-debug-parse.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/for.c
diff -u src/usr.bin/make/for.c:1.160 src/usr.bin/make/for.c:1.161
--- src/usr.bin/make/for.c:1.160	Sat Jan  8 20:21:34 2022
+++ src/usr.bin/make/for.c	Sat Jan  8 23:52:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.160 2022/01/08 20:21:34 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.161 2022/01/08 23:52:26 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.160 2022/01/08 20:21:34 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.161 2022/01/08 23:52:26 rillig Exp $");
 
 
 typedef struct ForLoop {
@@ -98,6 +98,25 @@ ForLoop_Free(ForLoop *f)
 	free(f);
 }
 
+char *
+ForLoop_Details(ForLoop *f)
+{
+	size_t i, n = f->vars.len;
+	const char **vars = f->vars.items;
+	const Substring *items = f->items.words + f->nextItem - n;
+	Buffer buf;
+
+	Buf_Init();
+	for (i = 0; i < n; i++) {
+		if (i > 0)
+			Buf_AddStr(, ", ");
+		Buf_AddStr(, vars[i]);
+		Buf_AddStr(, " = ");
+		Buf_AddBytesBetween(, items[i].start, items[i].end);
+	}
+	return Buf_DoneData();
+}
+
 static bool
 ForLoop_ParseVarnames(ForLoop *f, const char **pp)
 {

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.234 src/usr.bin/make/nonints.h:1.235
--- src/usr.bin/make/nonints.h:1.234	Sat Jan  8 20:21:34 2022
+++ src/usr.bin/make/nonints.h	Sat Jan  8 23:52:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.234 2022/01/08 20:21:34 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.235 2022/01/08 23:52:26 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -121,6 +121,7 @@ int For_Eval(const char *) MAKE_ATTR_USE
 bool For_Accum(const char *, int *) MAKE_ATTR_USE;
 void For_Run(int, int);
 bool For_NextIteration(struct ForLoop *, Buffer *);
+char *ForLoop_Details(struct ForLoop *);
 
 /* job.c */
 void JobReapChild(pid_t, int, bool);

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.643 src/usr.bin/make/parse.c:1.644
--- src/usr.bin/make/parse.c:1.643	Sat Jan  8 23:41:43 2022
+++ src/usr.bin/make/parse.c	Sat Jan  8 23:52:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.644 2022/01/08 23:52:26 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.644 2022/01/08 23:52:26 rillig Exp $");
 
 /*
  * A file being read.
@@ -353,8 +353,10 @@ PrintStackTrace(void)
 			fname = realpath(fname, dirbuf);
 
 		if (entry->forLoop != NULL) {
-			debug_printf("\tin .for loop from %s:%d\n",
-			fname, entry->forHeadLineno);
+			char *details = ForLoop_Details(entry->forLoop);
+			debug_printf("\tin .for loop from %s:%d with %s\n",
+			fname, entry->forHeadLineno, details);
+			free(details);
 		} else {
 			int lineno =
 			i + 1 < n && entries[i + 1].forLoop != NULL

Index: src/usr.bin/make/unit-tests/include-main.exp
diff -u src/usr.bin/make/unit-tests/include-main.exp:1.9 src/usr.bin/make/unit-tests/include-main.exp:1.10
--- src/usr.bin/make/unit-tests/include-main.exp:1.9	Sat Jan  8 23:41:43 2022
+++ src/usr.bin/make/unit-tests/include-main.exp	Sat Jan  8 23:52:26 2022
@@ -4,9 +4,9 @@ make: "include-sub.mk" line 4: sub-befor
 make: "include-sub.mk" line 14: sub-before-for-ok
 Parsing line 5: .  info subsub-ok
 make: "include-subsub.mk" line 5: subsub-ok
-	in .for loop from include-sub.mk:31
-	in .for loop from include-sub.mk:30
-	in .for loop from include-sub.mk:29
+	in .for loop from include-sub.mk:31 with i = include
+	in .for loop from include-sub.mk:30 with i = nested
+	in .for loop from include-sub.mk:29 with i = deeply
 	in include-sub.mk:29
 	in include-main.mk:27
 Parsing line 6: .MAKEFLAGS: -d0

Index: src/usr.bin/make/unit-tests/opt-debug-parse.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-parse.exp:1.6 

CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 23:52:26 UTC 2022

Modified Files:
src/usr.bin/make: for.c nonints.h parse.c
src/usr.bin/make/unit-tests: include-main.exp opt-debug-parse.exp
opt-debug-parse.mk

Log Message:
make: add details about .for loop variables to stack traces

The stack traces are enabled with the debug logging option '-dp'.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/usr.bin/make/for.c
cvs rdiff -u -r1.234 -r1.235 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.643 -r1.644 src/usr.bin/make/parse.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/include-main.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/opt-debug-parse.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 23:41:43 UTC 2022

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk opt-debug-parse.exp opt-debug-parse.mk

Log Message:
make: fix stack traces in -dp mode (since 2021-01-26)

Previously, the stack traces omitted some lines that seemed to be
redundant.  As a result, the stack traces contained confusing line
numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.642 -r1.643 src/usr.bin/make/parse.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/include-main.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-debug-parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.642 src/usr.bin/make/parse.c:1.643
--- src/usr.bin/make/parse.c:1.642	Sat Jan  8 22:42:27 2022
+++ src/usr.bin/make/parse.c	Sat Jan  8 23:41:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.642 2022/01/08 22:42:27 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.642 2022/01/08 22:42:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $");
 
 /*
  * A file being read.
@@ -340,7 +340,9 @@ PrintStackTrace(void)
 	n = includes.len;
 	if (n == 0)
 		return;
-	n--;			/* This entry is already in the diagnostic. */
+
+	if (entries[n - 1].forLoop == NULL)
+		n--;		/* already in the diagnostic */
 
 	for (i = n; i-- > 0;) {
 		const IncludedFile *entry = entries + i;
@@ -350,12 +352,16 @@ PrintStackTrace(void)
 		if (fname[0] != '/' && strcmp(fname, "(stdin)") != 0)
 			fname = realpath(fname, dirbuf);
 
-		if (entries[i + 1 < n ? i + 1 : i].forLoop == NULL)
-			debug_printf("\tin .include from %s:%d\n",
-			fname, entry->lineno);
-		if (entry->forLoop != NULL)
+		if (entry->forLoop != NULL) {
 			debug_printf("\tin .for loop from %s:%d\n",
 			fname, entry->forHeadLineno);
+		} else {
+			int lineno =
+			i + 1 < n && entries[i + 1].forLoop != NULL
+? entries[i + 1].forHeadLineno
+: entry->lineno;
+			debug_printf("\tin %s:%d\n", fname, lineno);
+		}
 	}
 }
 

Index: src/usr.bin/make/unit-tests/include-main.exp
diff -u src/usr.bin/make/unit-tests/include-main.exp:1.8 src/usr.bin/make/unit-tests/include-main.exp:1.9
--- src/usr.bin/make/unit-tests/include-main.exp:1.8	Tue Dec 28 15:49:00 2021
+++ src/usr.bin/make/unit-tests/include-main.exp	Sat Jan  8 23:41:43 2022
@@ -7,7 +7,8 @@ make: "include-subsub.mk" line 5: subsub
 	in .for loop from include-sub.mk:31
 	in .for loop from include-sub.mk:30
 	in .for loop from include-sub.mk:29
-	in .include from include-main.mk:27
+	in include-sub.mk:29
+	in include-main.mk:27
 Parsing line 6: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
 make: "include-sub.mk" line 38: sub-after-ok
Index: src/usr.bin/make/unit-tests/include-sub.mk
diff -u src/usr.bin/make/unit-tests/include-sub.mk:1.8 src/usr.bin/make/unit-tests/include-sub.mk:1.9
--- src/usr.bin/make/unit-tests/include-sub.mk:1.8	Fri Jan  7 13:56:09 2022
+++ src/usr.bin/make/unit-tests/include-sub.mk	Sat Jan  8 23:41:43 2022
@@ -1,4 +1,4 @@
-# $NetBSD: include-sub.mk,v 1.8 2022/01/07 13:56:09 rillig Exp $
+# $NetBSD: include-sub.mk,v 1.9 2022/01/08 23:41:43 rillig Exp $
 
 .if ${.INCLUDEDFROMFILE} == "include-main.mk"
 .  info sub-before-ok
@@ -20,7 +20,7 @@
 # To see the variable 'includes' in action:
 #
 # Breakpoints:
-#	Parse_File		at "Vector_Push()"
+#	Parse_PushInput		at "Vector_Push()"
 #	HandleMessage		at entry
 # Watches:
 #	((const IncludedFile *[10])(*includes.items))

Index: src/usr.bin/make/unit-tests/include-main.mk
diff -u src/usr.bin/make/unit-tests/include-main.mk:1.6 src/usr.bin/make/unit-tests/include-main.mk:1.7
--- src/usr.bin/make/unit-tests/include-main.mk:1.6	Fri Jan 22 00:44:55 2021
+++ src/usr.bin/make/unit-tests/include-main.mk	Sat Jan  8 23:41:43 2022
@@ -1,11 +1,11 @@
-# $NetBSD: include-main.mk,v 1.6 2021/01/22 00:44:55 rillig Exp $
+# $NetBSD: include-main.mk,v 1.7 2022/01/08 23:41:43 rillig Exp $
 #
 # Until 2020-09-05, the .INCLUDEDFROMFILE magic variable did not behave
 # as described in the manual page.
 #
 # The manual page says that it is the "filename of the file this Makefile
 # was included from", while before 2020-09-05 it was the "filename in which
-# the latest .include happened". See parse.c, function ParseSetIncludeFile.
+# the latest .include happened". See parse.c, function SetParseFile.
 #
 # Since 2020-09-05, the .INCLUDEDFROMDIR 

CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 23:41:43 UTC 2022

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk opt-debug-parse.exp opt-debug-parse.mk

Log Message:
make: fix stack traces in -dp mode (since 2021-01-26)

Previously, the stack traces omitted some lines that seemed to be
redundant.  As a result, the stack traces contained confusing line
numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.642 -r1.643 src/usr.bin/make/parse.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/include-main.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-debug-parse.mk

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



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:30:42 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: improve -s usage

Reword -s SRC_ARG to be a bit clearer as to the variations, and sync
more with postinstall(8).


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/postinstall/postinstall.in

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.49 src/usr.sbin/postinstall/postinstall.in:1.50
--- src/usr.sbin/postinstall/postinstall.in:1.49	Sat Jan  8 23:07:17 2022
+++ src/usr.sbin/postinstall/postinstall.in	Sat Jan  8 23:30:41 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.49 2022/01/08 23:07:17 lukem Exp $
+# $NetBSD: postinstall.in,v 1.50 2022/01/08 23:30:41 lukem Exp $
 #
 # Copyright (c) 2002-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2541,7 +2541,7 @@ do_obsolete()
 help()
 {
 	cat << _USAGE_
-Usage: ${PROGNAME} [-a ARCH] [-d DEST_DIR] [-m MACHINE] [-s SRC_DIR] [-x XSRC_DIR] OPERATION ...
+Usage: ${PROGNAME} [-a ARCH] [-d DEST_DIR] [-m MACHINE] [-s SRC_ARG] [-x XSRC_DIR] OPERATION ...
${PROGNAME} -?
 
 	Perform post-installation checks and/or fixes on a system's
@@ -2553,14 +2553,16 @@ Usage: ${PROGNAME} [-a ARCH] [-d DEST_DI
 	-a ARCH		Set \$MACHINE_ARCH to ARCH.	[${MACHINE_ARCH}]
 	-d DEST_DIR	Destination directory to check. [${DEST_DIR:-/}]
 	-m MACHINE	Set \$MACHINE to MACHINE.	[${MACHINE}]
-	-s SRC_DIR	Location of the source files.  This may be any of
+	-s SRC_ARG	Location of the source files.  This may be any of
 			the following:
-			* A directory that contains a NetBSD source tree;
-			* A distribution set file such as "etc.tgz" or
-			  "xetc.tgz".  Pass multiple -s options to specify
-			  multiple such files;
-			* A temporary directory in which one or both of
-			  "etc.tgz" and "xetc.tgz" have been extracted.
+			-s SRC_DIR	A directory that contains a NetBSD
+	source tree.
+			-s TGZ_DIR	A directory in which one or both of
+	"etc.tgz" and "xetc.tgz" have been
+	extracted.
+			-s TGZ_FILE	A distribution set file such as
+	"etc.tgz" or "xetc.tgz".
+	May be specified multipled times.
 			[${SRC_DIR:-/usr/src}]
 	-x XSRC_DIR	Location of the X11 source files.  This must be
 			a directory that contains a NetBSD xsrc tree.



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:30:42 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: improve -s usage

Reword -s SRC_ARG to be a bit clearer as to the variations, and sync
more with postinstall(8).


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/postinstall/postinstall.in

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



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:07:17 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: tweak -a and -m usage


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/postinstall/postinstall.in

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



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:07:17 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: tweak -a and -m usage


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/postinstall/postinstall.in

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.48 src/usr.sbin/postinstall/postinstall.in:1.49
--- src/usr.sbin/postinstall/postinstall.in:1.48	Sat Jan  8 23:04:11 2022
+++ src/usr.sbin/postinstall/postinstall.in	Sat Jan  8 23:07:17 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.48 2022/01/08 23:04:11 lukem Exp $
+# $NetBSD: postinstall.in,v 1.49 2022/01/08 23:07:17 lukem Exp $
 #
 # Copyright (c) 2002-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2550,9 +2550,9 @@ Usage: ${PROGNAME} [-a ARCH] [-d DEST_DI
 
 	Options:
 	-?		Display this help, and exit.
-	-a ARCH		\$MACHINE_ARCH.			[${MACHINE_ARCH}]
+	-a ARCH		Set \$MACHINE_ARCH to ARCH.	[${MACHINE_ARCH}]
 	-d DEST_DIR	Destination directory to check. [${DEST_DIR:-/}]
-	-m MACHINE	\$MACHINE.			[${MACHINE}]
+	-m MACHINE	Set \$MACHINE to MACHINE.	[${MACHINE}]
 	-s SRC_DIR	Location of the source files.  This may be any of
 			the following:
 			* A directory that contains a NetBSD source tree;



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:04:11 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: add -? to usage


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/postinstall/postinstall.in

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.47 src/usr.sbin/postinstall/postinstall.in:1.48
--- src/usr.sbin/postinstall/postinstall.in:1.47	Sat Jan  8 06:58:40 2022
+++ src/usr.sbin/postinstall/postinstall.in	Sat Jan  8 23:04:11 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.47 2022/01/08 06:58:40 lukem Exp $
+# $NetBSD: postinstall.in,v 1.48 2022/01/08 23:04:11 lukem Exp $
 #
 # Copyright (c) 2002-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2549,6 +2549,7 @@ Usage: ${PROGNAME} [-a ARCH] [-d DEST_DI
 	If no items are provided, a default set of checks or fixes is applied.
 
 	Options:
+	-?		Display this help, and exit.
 	-a ARCH		\$MACHINE_ARCH.			[${MACHINE_ARCH}]
 	-d DEST_DIR	Destination directory to check. [${DEST_DIR:-/}]
 	-m MACHINE	\$MACHINE.			[${MACHINE}]
@@ -2566,14 +2567,14 @@ Usage: ${PROGNAME} [-a ARCH] [-d DEST_DI
 			[${XSRC_DIR:-/usr/src/../xsrc}]
 
 	Supported values for OPERATION:
-	help		Display this help.
+	help		Display this help, and exit.
 	list		List available items.
 	check ITEM ...	Perform post-installation checks on ITEMs.
 	diff [-bcenpuw] ITEM ...
 			Similar to 'check' but also output difference of files,
 			using diff with the provided options.
 	fix ITEM ...	Apply fixes that 'check' determines need to be applied.
-	usage		Display this usage.
+	usage		Display this help, and exit.
 _USAGE_
 }
 



CVS commit: src/usr.sbin/postinstall

2022-01-08 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jan  8 23:04:11 UTC 2022

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
postinstall: add -? to usage


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/postinstall/postinstall.in

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



Re: CVS commit: src/usr.bin/make

2022-01-08 Thread nia
On Fri, Jan 07, 2022 at 08:04:49PM +, Roland Illig wrote:
> Using memcmp for comparing the variable name was probably overkill since
> the variable names are usually very short, so rather compare them byte
> by byte.

I don't see the point of this change - it makes the code harder to
read. We should trust the optimizing compiler, or alternatively trust
that comparing short byte strings isn't particularly expensive.


CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 22:42:28 UTC 2022

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

Log Message:
make: reduce confusing code in ParseForLoop

The previous version of the code gave the wrong impression that For_Eval
would modify CurFile.  That happens only later, in For_Run.

No functional change.


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

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



CVS commit: src/sys/dev/ic

2022-01-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jan  8 22:24:53 UTC 2022

Modified Files:
src/sys/dev/ic: dwc_eqos.c dwc_eqos_reg.h dwc_eqos_var.h

Log Message:
eqos: interrupt evcnt and minor fix

there's basic interrupt evcnt, which is the parent for the rx and
tx interrupts, and 3 status interrupts, one of which has 7 more
subtypes (watchdog timeout, carrier missing/lost, etc.)  as these
cases are evcnt counted now, make some debugging default off.

avoid removing bits from dma_status when rx/tx is handled, so that
later check of dma_status for non-zero does not trip.  the two bits
in dma_status removed are never checked again besides the test that
may have failed (but probably doesn't as at least one other bit in
two other variables will be set.)

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/dwc_eqos.c \
src/sys/dev/ic/dwc_eqos_reg.h src/sys/dev/ic/dwc_eqos_var.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/ic/dwc_eqos.c
diff -u src/sys/dev/ic/dwc_eqos.c:1.1 src/sys/dev/ic/dwc_eqos.c:1.2
--- src/sys/dev/ic/dwc_eqos.c:1.1	Mon Jan  3 17:19:41 2022
+++ src/sys/dev/ic/dwc_eqos.c	Sat Jan  8 22:24:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos.c,v 1.1 2022/01/03 17:19:41 jmcneill Exp $ */
+/* $NetBSD: dwc_eqos.c,v 1.2 2022/01/08 22:24:53 mrg Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -33,7 +33,7 @@
 #include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.1 2022/01/03 17:19:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.2 2022/01/08 22:24:53 mrg Exp $");
 
 #include 
 #include 
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -299,7 +300,7 @@ eqos_setup_txbuf(struct eqos_softc *sc, 
 		return -1;
 	}
 
-	bus_dmamap_sync(sc->sc_dmat, sc->sc_tx.buf_map[index].map,  
+	bus_dmamap_sync(sc->sc_dmat, sc->sc_tx.buf_map[index].map,
 	0, sc->sc_tx.buf_map[index].map->dm_mapsize, BUS_DMASYNC_PREWRITE);
 
 	/* stored in same index as loaded map */
@@ -876,18 +877,26 @@ eqos_intr(void *arg)
 	struct ifnet *ifp = >sc_ec.ec_if;
 	uint32_t mac_status, mtl_status, dma_status, rx_tx_status;
 
+	sc->sc_ev_intr.ev_count++;
+
 	mac_status = RD4(sc, GMAC_MAC_INTERRUPT_STATUS);
 	mac_status &= RD4(sc, GMAC_MAC_INTERRUPT_ENABLE);
 
 	if (mac_status) {
+		sc->sc_ev_mac.ev_count++;
+#ifdef DEBUG_LOUD
 		device_printf(sc->sc_dev,
 		"GMAC_MAC_INTERRUPT_STATUS = 0x%08X\n", mac_status);
+#endif
 	}
 
 	mtl_status = RD4(sc, GMAC_MTL_INTERRUPT_STATUS);
 	if (mtl_status) {
+		sc->sc_ev_mtl.ev_count++;
+#ifdef DEBUG_LOUD
 		device_printf(sc->sc_dev,
 		"GMAC_MTL_INTERRUPT_STATUS = 0x%08X\n", mtl_status);
+#endif
 	}
 
 	dma_status = RD4(sc, GMAC_DMA_CHAN0_STATUS);
@@ -899,24 +908,43 @@ eqos_intr(void *arg)
 	EQOS_LOCK(sc);
 	if ((dma_status & GMAC_DMA_CHAN0_STATUS_RI) != 0) {
 		eqos_rxintr(sc, 0);
-		dma_status &= ~GMAC_DMA_CHAN0_STATUS_RI;
+		sc->sc_ev_rxintr.ev_count++;
 	}
 
 	if ((dma_status & GMAC_DMA_CHAN0_STATUS_TI) != 0) {
 		eqos_txintr(sc, 0);
-		dma_status &= ~GMAC_DMA_CHAN0_STATUS_TI;
 		if_schedule_deferred_start(ifp);
+		sc->sc_ev_txintr.ev_count++;
 	}
 	EQOS_UNLOCK(sc);
 
+#ifdef DEBUG_LOUD
 	if ((mac_status | mtl_status | dma_status) == 0) {
 		device_printf(sc->sc_dev, "spurious interrupt?!\n");
 	}
+#endif
 
 	rx_tx_status = RD4(sc, GMAC_MAC_RX_TX_STATUS);
 	if (rx_tx_status) {
+		sc->sc_ev_status.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_RWT) != 0)
+			sc->sc_ev_rwt.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_EXCOL) != 0)
+			sc->sc_ev_excol.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_LCOL) != 0)
+			sc->sc_ev_lcol.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_EXDEF) != 0)
+			sc->sc_ev_exdef.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_LCARR) != 0)
+			sc->sc_ev_lcarr.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_NCARR) != 0)
+			sc->sc_ev_ncarr.ev_count++;
+		if ((rx_tx_status & GMAC_MAC_RX_TX_STATUS_TJT) != 0)
+			sc->sc_ev_tjt.ev_count++;
+#ifdef DEBUG_LOUD
 		device_printf(sc->sc_dev, "GMAC_MAC_RX_TX_STATUS = 0x%08x\n",
 		rx_tx_status);
+#endif
 	}
 
 	return 1;
@@ -1261,6 +1289,38 @@ eqos_attach(struct eqos_softc *sc)
 	}
 	ifmedia_set(>mii_media, IFM_ETHER | IFM_AUTO);
 
+	/* Master interrupt evcnt */
+	evcnt_attach_dynamic(>sc_ev_intr, EVCNT_TYPE_INTR,
+	NULL, device_xname(sc->sc_dev), "interrupts");
+
+	/* Per-interrupt type, using main interrupt */
+	evcnt_attach_dynamic(>sc_ev_rxintr, EVCNT_TYPE_INTR,
+	>sc_ev_intr, device_xname(sc->sc_dev), "rxintr");
+	evcnt_attach_dynamic(>sc_ev_txintr, EVCNT_TYPE_INTR,
+	>sc_ev_intr, device_xname(sc->sc_dev), "txintr");
+	evcnt_attach_dynamic(>sc_ev_mac, EVCNT_TYPE_INTR,
+	>sc_ev_intr, device_xname(sc->sc_dev), "macstatus");
+	

CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 22:24:20 UTC 2022

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: opt-debug-parse.exp opt-debug-parse.mk

Log Message:
make: fix line number in debug log after returning from a file

The parser returns to the next line, not to the current line.


To generate a diff of this commit:
cvs rdiff -u -r1.640 -r1.641 src/usr.bin/make/parse.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/opt-debug-parse.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 22:13:44 UTC 2022

Modified Files:
src/usr.bin/make/unit-tests: hanoi-include.mk opt-debug-parse.exp
opt-debug-parse.mk

Log Message:
tests/make: test line numbers in debug output for parsing files


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/hanoi-include.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-debug-parse.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/hanoi-include.mk
diff -u src/usr.bin/make/unit-tests/hanoi-include.mk:1.1 src/usr.bin/make/unit-tests/hanoi-include.mk:1.2
--- src/usr.bin/make/unit-tests/hanoi-include.mk:1.1	Sat Oct  3 17:30:54 2020
+++ src/usr.bin/make/unit-tests/hanoi-include.mk	Sat Jan  8 22:13:43 2022
@@ -1,10 +1,10 @@
-# $NetBSD: hanoi-include.mk,v 1.1 2020/10/03 17:30:54 rillig Exp $
+# $NetBSD: hanoi-include.mk,v 1.2 2022/01/08 22:13:43 rillig Exp $
 #
 # Implements the Towers of Hanoi puzzle, thereby demonstrating a bunch of
-# useful programming techniques:
+# more or less useful programming techniques:
 #
 # * default assignment using the ?= assignment operator
-# * including the same file recursively
+# * including the same file recursively (rather unusual)
 # * extracting the current value of a variable using the .for loop
 # * using shell commands for calculations since make is a text processor
 # * using the :: dependency operator for adding commands to a target

Index: src/usr.bin/make/unit-tests/opt-debug-parse.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-parse.exp:1.3 src/usr.bin/make/unit-tests/opt-debug-parse.exp:1.4
--- src/usr.bin/make/unit-tests/opt-debug-parse.exp:1.3	Sat Jan  8 20:21:34 2022
+++ src/usr.bin/make/unit-tests/opt-debug-parse.exp	Sat Jan  8 22:13:43 2022
@@ -5,6 +5,12 @@ make: "opt-debug-parse.mk" line 17: trac
 	in .include from opt-debug-parse.mk:18
 ParseEOF: returning to file opt-debug-parse.mk, line 18
 SetFilenameVars: ${.PARSEDIR} = `' ${.PARSEFILE} = `opt-debug-parse.mk'
-Parsing line 22: .MAKEFLAGS: -d0
+Parsing line 23: .include "/dev/null"
+Parse_PushInput: file /dev/null, line 1
+SetFilenameVars: ${.PARSEDIR} = `/dev' ${.PARSEFILE} = `null'
+SetFilenameVars: ${.INCLUDEDFROMDIR} = `' ${.INCLUDEDFROMFILE} = `opt-debug-parse.mk'
+ParseEOF: returning to file opt-debug-parse.mk, line 23
+SetFilenameVars: ${.PARSEDIR} = `' ${.PARSEFILE} = `opt-debug-parse.mk'
+Parsing line 25: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
 exit status 0

Index: src/usr.bin/make/unit-tests/opt-debug-parse.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.2 src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.3
--- src/usr.bin/make/unit-tests/opt-debug-parse.mk:1.2	Sun Jan  2 03:23:55 2022
+++ src/usr.bin/make/unit-tests/opt-debug-parse.mk	Sat Jan  8 22:13:43 2022
@@ -1,4 +1,4 @@
-# $NetBSD: opt-debug-parse.mk,v 1.2 2022/01/02 03:23:55 rillig Exp $
+# $NetBSD: opt-debug-parse.mk,v 1.3 2022/01/08 22:13:43 rillig Exp $
 #
 # Tests for the -dp command line option, which adds debug logging about
 # makefile parsing.
@@ -16,9 +16,12 @@
 value
 .info trace with multi-line .for loop head
 .endfor
-# FIXME: The .exp file says 'in .include from opt-debug-parse.mk:18', which is
+# FIXME: The .exp file says 'in .include from opt-debug-parse.mk:19', which is
 # completely wrong.  It should rather say 'in .for loop from :13'.
 
+# XXX: The debug log should return to "line 24" instead of "line 23".
+.include "/dev/null"
+
 .MAKEFLAGS: -d0
 
 all: .PHONY



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 21:28:59 UTC 2022

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

Log Message:
make: return early from SkipIrrelevantBranches

No functional change.


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

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.639 src/usr.bin/make/parse.c:1.640
--- src/usr.bin/make/parse.c:1.639	Sat Jan  8 20:21:34 2022
+++ src/usr.bin/make/parse.c	Sat Jan  8 21:28:59 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.639 2022/01/08 20:21:34 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.640 2022/01/08 21:28:59 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.639 2022/01/08 20:21:34 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.640 2022/01/08 21:28:59 rillig Exp $");
 
 /*
  * A file being read.
@@ -2428,7 +2428,10 @@ typedef enum LineKind {
 	LK_DOT
 } LineKind;
 
-/* Return the next "interesting" logical line from the current file. */
+/*
+ * Return the next "interesting" logical line from the current file.  The
+ * returned string will be freed at the end of including the file.
+ */
 static char *
 ReadLowLevelLine(LineKind kind)
 {
@@ -2475,27 +2478,26 @@ ReadLowLevelLine(LineKind kind)
 static bool
 SkipIrrelevantBranches(void)
 {
-	char *line;
+	const char *line;
 
 	while ((line = ReadLowLevelLine(LK_DOT)) != NULL) {
 		if (Cond_EvalLine(line) == CR_TRUE)
-			break;
+			return true;
 		/*
-		 * TODO: Check for typos in .elif directives
-		 * such as .elsif or .elseif.
+		 * TODO: Check for typos in .elif directives such as .elsif
+		 * or .elseif.
 		 *
-		 * This check will probably duplicate some of
-		 * the code in ParseLine.  Most of the code
-		 * there cannot apply, only ParseVarassign and
-		 * ParseDependencyLine can, and to prevent code
-		 * duplication, these would need to be called
-		 * with a flag called onlyCheckSyntax.
+		 * This check will probably duplicate some of the code in
+		 * ParseLine.  Most of the code there cannot apply, only
+		 * ParseVarassign and ParseDependencyLine can, and to prevent
+		 * code duplication, these would need to be called with a
+		 * flag called onlyCheckSyntax.
 		 *
 		 * See directive-elif.mk for details.
 		 */
 	}
 
-	return line != NULL;
+	return false;
 }
 
 static bool



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 20:21:34 UTC 2022

Modified Files:
src/usr.bin/make: for.c nonints.h parse.c
src/usr.bin/make/unit-tests: cond-token-plain.exp cond-token-string.exp
directive-for.exp directive-info.exp directive-info.mk
directive-undef.exp opt-debug-parse.exp varmod-indirect.exp
varmod-indirect.mk

Log Message:
make: fix reported line numbers of continuation lines (since 2002)

Previously, multi-line directives like '.info' or '.error' reported the
line number of their last line instead of their first line, which is
more usual.  This also affected the debug log from '-dp'.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/make/for.c
cvs rdiff -u -r1.233 -r1.234 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.638 -r1.639 src/usr.bin/make/parse.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/cond-token-plain.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-token-string.exp \
src/usr.bin/make/unit-tests/directive-info.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-for.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-info.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive-undef.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-indirect.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 20:21:34 UTC 2022

Modified Files:
src/usr.bin/make: for.c nonints.h parse.c
src/usr.bin/make/unit-tests: cond-token-plain.exp cond-token-string.exp
directive-for.exp directive-info.exp directive-info.mk
directive-undef.exp opt-debug-parse.exp varmod-indirect.exp
varmod-indirect.mk

Log Message:
make: fix reported line numbers of continuation lines (since 2002)

Previously, multi-line directives like '.info' or '.error' reported the
line number of their last line instead of their first line, which is
more usual.  This also affected the debug log from '-dp'.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/make/for.c
cvs rdiff -u -r1.233 -r1.234 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.638 -r1.639 src/usr.bin/make/parse.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/cond-token-plain.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-token-string.exp \
src/usr.bin/make/unit-tests/directive-info.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-for.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-info.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive-undef.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-debug-parse.exp
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-indirect.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/for.c
diff -u src/usr.bin/make/for.c:1.159 src/usr.bin/make/for.c:1.160
--- src/usr.bin/make/for.c:1.159	Sat Jan  8 17:25:19 2022
+++ src/usr.bin/make/for.c	Sat Jan  8 20:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.159 2022/01/08 17:25:19 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.160 2022/01/08 20:21:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.159 2022/01/08 17:25:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.160 2022/01/08 20:21:34 rillig Exp $");
 
 
 typedef struct ForLoop {
@@ -469,7 +469,7 @@ For_NextIteration(ForLoop *f, Buffer *bo
 
 /* Run the .for loop, imitating the actions of an include file. */
 void
-For_Run(int lineno)
+For_Run(int headLineno, int bodyReadLines)
 {
 	Buffer buf;
 	ForLoop *f = accumFor;
@@ -477,7 +477,7 @@ For_Run(int lineno)
 
 	if (f->items.len > 0) {
 		Buf_Init();
-		Parse_PushInput(NULL, lineno, buf, f);
+		Parse_PushInput(NULL, headLineno, bodyReadLines, buf, f);
 	} else
 		ForLoop_Free(f);
 }

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.233 src/usr.bin/make/nonints.h:1.234
--- src/usr.bin/make/nonints.h:1.233	Fri Jan  7 20:54:45 2022
+++ src/usr.bin/make/nonints.h	Sat Jan  8 20:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.233 2022/01/07 20:54:45 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.234 2022/01/08 20:21:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -119,7 +119,7 @@ void SearchPath_Free(SearchPath *);
 struct ForLoop;
 int For_Eval(const char *) MAKE_ATTR_USE;
 bool For_Accum(const char *, int *) MAKE_ATTR_USE;
-void For_Run(int);
+void For_Run(int, int);
 bool For_NextIteration(struct ForLoop *, Buffer *);
 
 /* job.c */
@@ -147,7 +147,7 @@ void Parse_Error(ParseErrorLevel, const 
 bool Parse_VarAssign(const char *, bool, GNode *) MAKE_ATTR_USE;
 void Parse_AddIncludeDir(const char *);
 void Parse_File(const char *, int);
-void Parse_PushInput(const char *, int, Buffer, struct ForLoop *);
+void Parse_PushInput(const char *, int, int, Buffer, struct ForLoop *);
 void Parse_MainName(GNodeList *);
 int Parse_NumErrors(void) MAKE_ATTR_USE;
 

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.638 src/usr.bin/make/parse.c:1.639
--- src/usr.bin/make/parse.c:1.638	Sat Jan  8 09:55:32 2022
+++ src/usr.bin/make/parse.c	Sat Jan  8 20:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.639 2022/01/08 20:21:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,26 +106,20 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.639 2022/01/08 20:21:34 rillig Exp $");
 
 /*
  * A file being read.
  */
 typedef struct IncludedFile {
 	FStr name;		/* absolute or relative to the cwd */
-	/* TODO: add lineno for accurate line number information */
+	int lineno;		/* 1-based */
 	int readLines;		/* the number of physical lines that have
- * been read from the file; for lines without
- * backslash continuation, it coincidentally
- * equals the 1-based human-readable line
- 

CVS commit: src/sys/dev/mii

2022-01-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan  8 17:35:05 UTC 2022

Modified Files:
src/sys/dev/mii: urlphy.c

Log Message:
urlphy(4): Fix missing mii locking in urlphy_attach.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/mii/urlphy.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/mii/urlphy.c
diff -u src/sys/dev/mii/urlphy.c:1.38 src/sys/dev/mii/urlphy.c:1.39
--- src/sys/dev/mii/urlphy.c:1.38	Mon Aug 24 04:49:05 2020
+++ src/sys/dev/mii/urlphy.c	Sat Jan  8 17:35:05 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: urlphy.c,v 1.38 2020/08/24 04:49:05 msaitoh Exp $	*/
+/*	$NetBSD: urlphy.c,v 1.39 2022/01/08 17:35:05 riastradh Exp $	*/
 /*
  * Copyright (c) 2001, 2002
  * Shingo WATANABE .  All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.38 2020/08/24 04:49:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.39 2022/01/08 17:35:05 riastradh Exp $");
 
 #include 
 #include 
@@ -118,11 +118,16 @@ urlphy_attach(device_t parent, device_t 
 		"ignoring this PHY, non-zero instance\n");
 		return;
 	}
+
+	mii_lock(mii);
+
 	PHY_RESET(sc);
 
 	PHY_READ(sc, MII_BMSR, >mii_capabilities);
 	sc->mii_capabilities &= ma->mii_capmask;
 
+	mii_unlock(mii);
+
 	mii_phy_add_media(sc);
 }
 



CVS commit: src/sys/dev/mii

2022-01-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan  8 17:35:05 UTC 2022

Modified Files:
src/sys/dev/mii: urlphy.c

Log Message:
urlphy(4): Fix missing mii locking in urlphy_attach.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/mii/urlphy.c

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



CVS commit: src/sys/dev/usb

2022-01-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan  8 17:34:14 UTC 2022

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

Log Message:
ukbd(4): Fix previous change to initial LED flashing.

Without this change the LEDs would get stuck on until the first
keypress.  (This also seemed to trigger a crash in heavy load on
bringing aue(4) up and down over and over again while unplugging, but
I'm not sure why and I hope it's not actually related...)


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/dev/usb/ukbd.c

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

Modified files:

Index: src/sys/dev/usb/ukbd.c
diff -u src/sys/dev/usb/ukbd.c:1.156 src/sys/dev/usb/ukbd.c:1.157
--- src/sys/dev/usb/ukbd.c:1.156	Fri Dec 31 14:24:06 2021
+++ src/sys/dev/usb/ukbd.c	Sat Jan  8 17:34:14 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: ukbd.c,v 1.156 2021/12/31 14:24:06 riastradh Exp $*/
+/*  $NetBSD: ukbd.c,v 1.157 2022/01/08 17:34:14 riastradh Exp $*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.156 2021/12/31 14:24:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.157 2022/01/08 17:34:14 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -490,6 +490,7 @@ ukbd_attach(device_t parent, device_t se
 	/* Flash the leds; no real purpose, just shows we're alive. */
 	ukbd_set_leds(sc, WSKBD_LED_SCROLL | WSKBD_LED_NUM | WSKBD_LED_CAPS
 			| WSKBD_LED_COMPOSE);
+	sc->sc_leds_set = 0;	/* not explicitly set by wskbd yet */
 	callout_reset(>sc_ledreset, mstohz(400), ukbd_delayed_leds_off,
 	sc);
 



CVS commit: src/sys/dev/usb

2022-01-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan  8 17:34:14 UTC 2022

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

Log Message:
ukbd(4): Fix previous change to initial LED flashing.

Without this change the LEDs would get stuck on until the first
keypress.  (This also seemed to trigger a crash in heavy load on
bringing aue(4) up and down over and over again while unplugging, but
I'm not sure why and I hope it's not actually related...)


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/dev/usb/ukbd.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 17:25:19 UTC 2022

Modified Files:
src/usr.bin/make: buf.c buf.h for.c var.c

Log Message:
make: inline Buf_Clear

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/usr.bin/make/buf.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/buf.h
cvs rdiff -u -r1.158 -r1.159 src/usr.bin/make/for.c
cvs rdiff -u -r1.997 -r1.998 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 17:25:19 UTC 2022

Modified Files:
src/usr.bin/make: buf.c buf.h for.c var.c

Log Message:
make: inline Buf_Clear

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/usr.bin/make/buf.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/buf.h
cvs rdiff -u -r1.158 -r1.159 src/usr.bin/make/for.c
cvs rdiff -u -r1.997 -r1.998 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/buf.c
diff -u src/usr.bin/make/buf.c:1.54 src/usr.bin/make/buf.c:1.55
--- src/usr.bin/make/buf.c:1.54	Wed Dec 15 09:29:55 2021
+++ src/usr.bin/make/buf.c	Sat Jan  8 17:25:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.54 2021/12/15 09:29:55 rillig Exp $	*/
+/*	$NetBSD: buf.c,v 1.55 2022/01/08 17:25:19 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -75,7 +75,7 @@
 #include "make.h"
 
 /*	"@(#)buf.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: buf.c,v 1.54 2021/12/15 09:29:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: buf.c,v 1.55 2022/01/08 17:25:19 rillig Exp $");
 
 /* Make space in the buffer for adding at least 16 more bytes. */
 void
@@ -138,14 +138,6 @@ Buf_AddFlag(Buffer *buf, bool flag, cons
 	}
 }
 
-/* Mark the buffer as empty, so it can be filled with data again. */
-void
-Buf_Empty(Buffer *buf)
-{
-	buf->len = 0;
-	buf->data[0] = '\0';
-}
-
 /* Initialize a buffer. */
 void
 Buf_InitSize(Buffer *buf, size_t cap)

Index: src/usr.bin/make/buf.h
diff -u src/usr.bin/make/buf.h:1.46 src/usr.bin/make/buf.h:1.47
--- src/usr.bin/make/buf.h:1.46	Wed Dec 15 12:08:25 2021
+++ src/usr.bin/make/buf.h	Sat Jan  8 17:25:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.h,v 1.46 2021/12/15 12:08:25 rillig Exp $	*/
+/*	$NetBSD: buf.h,v 1.47 2022/01/08 17:25:19 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -88,6 +88,14 @@ typedef struct Buffer {
 
 void Buf_Expand(Buffer *);
 
+/* Mark the buffer as empty, so it can be filled with data again. */
+MAKE_INLINE void
+Buf_Clear(Buffer *buf)
+{
+	buf->len = 0;
+	buf->data[0] = '\0';
+}
+
 /* Buf_AddByte adds a single byte to a buffer. */
 MAKE_INLINE void
 Buf_AddByte(Buffer *buf, char byte)
@@ -112,7 +120,6 @@ void Buf_AddBytesBetween(Buffer *, const
 void Buf_AddStr(Buffer *, const char *);
 void Buf_AddInt(Buffer *, int);
 void Buf_AddFlag(Buffer *, bool, const char *);
-void Buf_Empty(Buffer *);
 void Buf_Init(Buffer *);
 void Buf_InitSize(Buffer *, size_t);
 void Buf_Done(Buffer *);

Index: src/usr.bin/make/for.c
diff -u src/usr.bin/make/for.c:1.158 src/usr.bin/make/for.c:1.159
--- src/usr.bin/make/for.c:1.158	Fri Jan  7 23:13:50 2022
+++ src/usr.bin/make/for.c	Sat Jan  8 17:25:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.158 2022/01/07 23:13:50 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.159 2022/01/08 17:25:19 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.158 2022/01/07 23:13:50 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.159 2022/01/08 17:25:19 rillig Exp $");
 
 
 typedef struct ForLoop {
@@ -429,7 +429,7 @@ ForLoop_SubstBody(ForLoop *f, Buffer *bo
 	const char *p, *end;
 	const char *mark;	/* where the last substitution left off */
 
-	Buf_Empty(body);
+	Buf_Clear(body);
 
 	mark = f->body.data;
 	end = f->body.data + f->body.len;

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.997 src/usr.bin/make/var.c:1.998
--- src/usr.bin/make/var.c:1.997	Sat Jan  8 11:04:13 2022
+++ src/usr.bin/make/var.c	Sat Jan  8 17:25:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.998 2022/01/08 17:25:19 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.998 2022/01/08 17:25:19 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -999,7 +999,7 @@ Var_SetWithFlags(GNode *scope, const cha
 			scope->name, name, val);
 			return;
 		}
-		Buf_Empty(>val);
+		Buf_Clear(>val);
 		Buf_AddStr(>val, val);
 
 		DEBUG3(VAR, "%s: %s = %s\n", scope->name, name, val);



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

2022-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  8 14:28:14 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: ad.mipseb

Log Message:
fix emips


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/debug/ad.mipseb

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

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:27:31 UTC 2022

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

Log Message:
Ticket #1723


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.115 -r1.1.2.116 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/doc

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:27:31 UTC 2022

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

Log Message:
Ticket #1723


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.115 -r1.1.2.116 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.115 src/doc/CHANGES-8.3:1.1.2.116
--- src/doc/CHANGES-8.3:1.1.2.115	Thu Dec 30 12:41:43 2021
+++ src/doc/CHANGES-8.3	Sat Jan  8 13:27:31 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.115 2021/12/30 12:41:43 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.116 2022/01/08 13:27:31 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2366,3 +2366,8 @@ sys/dev/cgd.c	1.142
 	cgd(4): fix detach when still in use by wedges.
 	[riastradh, ticket #1722]
 
+sys/conf/copyright1.20
+
+	Welcome to 2022!
+	[jnemeth, ticket #1723]
+



CVS commit: [netbsd-8] src/sys/conf

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:26:30 UTC 2022

Modified Files:
src/sys/conf [netbsd-8]: copyright

Log Message:
Pull up following revision(s) (requested by jnemeth in ticket #1723):

sys/conf/copyright: revision 1.20

Welcome to 2022!


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.3 -r1.15.8.4 src/sys/conf/copyright

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

Modified files:

Index: src/sys/conf/copyright
diff -u src/sys/conf/copyright:1.15.8.3 src/sys/conf/copyright:1.15.8.4
--- src/sys/conf/copyright:1.15.8.3	Thu Jan  2 09:53:33 2020
+++ src/sys/conf/copyright	Sat Jan  8 13:26:30 2022
@@ -1,5 +1,6 @@
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
-2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
+2018, 2019, 2020, 2021, 2022
+The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.



CVS commit: [netbsd-8] src/sys/conf

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:26:30 UTC 2022

Modified Files:
src/sys/conf [netbsd-8]: copyright

Log Message:
Pull up following revision(s) (requested by jnemeth in ticket #1723):

sys/conf/copyright: revision 1.20

Welcome to 2022!


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.3 -r1.15.8.4 src/sys/conf/copyright

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

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:24:36 UTC 2022

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

Log Message:
Ticket #1401


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.63 -r1.1.2.64 src/doc/CHANGES-9.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-9.3
diff -u src/doc/CHANGES-9.3:1.1.2.63 src/doc/CHANGES-9.3:1.1.2.64
--- src/doc/CHANGES-9.3:1.1.2.63	Thu Jan  6 16:12:09 2022
+++ src/doc/CHANGES-9.3	Sat Jan  8 13:24:36 2022
@@ -1,4 +1,4 @@
-29~# $NetBSD: CHANGES-9.3,v 1.1.2.63 2022/01/06 16:12:09 martin Exp $
+29~# $NetBSD: CHANGES-9.3,v 1.1.2.64 2022/01/08 13:24:36 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1155,3 +1155,8 @@ external/cddl/osnet/dist/uts/common/fs/z
 	Default files to BSD group ownership in line with ffs.
 	[hauke, ticket #1400]
 
+sys/conf/copyright1.20
+
+	Welcome to 2022!
+	[jnemeth, ticket #1401]
+



CVS commit: [netbsd-9] src/doc

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:24:36 UTC 2022

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

Log Message:
Ticket #1401


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.63 -r1.1.2.64 src/doc/CHANGES-9.3

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



CVS commit: [netbsd-9] src/sys/conf

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:23:47 UTC 2022

Modified Files:
src/sys/conf [netbsd-9]: copyright

Log Message:
Pull up following revision(s) (requested by jnemeth in ticket #1401):

sys/conf/copyright: revision 1.20

Welcome to 2022!


To generate a diff of this commit:
cvs rdiff -u -r1.17.4.1 -r1.17.4.2 src/sys/conf/copyright

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

Modified files:

Index: src/sys/conf/copyright
diff -u src/sys/conf/copyright:1.17.4.1 src/sys/conf/copyright:1.17.4.2
--- src/sys/conf/copyright:1.17.4.1	Thu Jan  2 09:52:22 2020
+++ src/sys/conf/copyright	Sat Jan  8 13:23:46 2022
@@ -1,5 +1,6 @@
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
-2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
+2018, 2019, 2020, 2021, 2022
+The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.



CVS commit: [netbsd-9] src/sys/conf

2022-01-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  8 13:23:47 UTC 2022

Modified Files:
src/sys/conf [netbsd-9]: copyright

Log Message:
Pull up following revision(s) (requested by jnemeth in ticket #1401):

sys/conf/copyright: revision 1.20

Welcome to 2022!


To generate a diff of this commit:
cvs rdiff -u -r1.17.4.1 -r1.17.4.2 src/sys/conf/copyright

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



CVS commit: src/sys/dev/pci

2022-01-08 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Jan  8 12:59:34 UTC 2022

Modified Files:
src/sys/dev/pci: pci_subr.c

Log Message:
place additional parens around multiline string constant to appease clang


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/dev/pci/pci_subr.c

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.238 src/sys/dev/pci/pci_subr.c:1.239
--- src/sys/dev/pci/pci_subr.c:1.238	Fri Jan  7 06:57:57 2022
+++ src/sys/dev/pci/pci_subr.c	Sat Jan  8 12:59:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.238 2022/01/07 06:57:57 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.239 2022/01/08 12:59:34 tnn Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.238 2022/01/07 06:57:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.239 2022/01/08 12:59:34 tnn Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -4369,8 +4369,8 @@ pci_conf_print_pl16g_cap(const pcireg_t 
 }
 
 static const char * const pcie_receive_number_dp[] = {
-	[0] = "Broadcast "
-	"(Downstream Port Receiver and all Retimer Pseudo Port Receiver)",
+	[0] = ("Broadcast "
+	"(Downstream Port Receiver and all Retimer Pseudo Port Receiver)"),
 	[1] =  "Rx(A) (Downstream Port Receiver)",
 	[2] = "Rx(B) (Retimer X or Z Upstream Pseudo Port Receiver)",
 	[3] = "Rx(C) (Retimer X or Z Downstream Pseudo Port Receiver)",



CVS commit: src/sys/dev/pci

2022-01-08 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Jan  8 12:59:34 UTC 2022

Modified Files:
src/sys/dev/pci: pci_subr.c

Log Message:
place additional parens around multiline string constant to appease clang


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/dev/pci/pci_subr.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 11:04:13 UTC 2022

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

Log Message:
make: rename is_shell_metachar, fix character conversion warning

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/metachar.h
cvs rdiff -u -r1.996 -r1.997 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 11:04:13 UTC 2022

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

Log Message:
make: rename is_shell_metachar, fix character conversion warning

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/metachar.h
cvs rdiff -u -r1.996 -r1.997 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/metachar.h
diff -u src/usr.bin/make/metachar.h:1.19 src/usr.bin/make/metachar.h:1.20
--- src/usr.bin/make/metachar.h:1.19	Wed Dec 15 12:08:25 2021
+++ src/usr.bin/make/metachar.h	Sat Jan  8 11:04:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: metachar.h,v 1.19 2021/12/15 12:08:25 rillig Exp $	*/
+/*	$NetBSD: metachar.h,v 1.20 2022/01/08 11:04:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 extern const unsigned char _metachar[];
 
 MAKE_INLINE bool MAKE_ATTR_USE
-is_shell_metachar(char c)
+ch_is_shell_meta(char c)
 {
 	return _metachar[c & 0x7f] != 0;
 }
@@ -44,7 +44,7 @@ is_shell_metachar(char c)
 MAKE_INLINE bool MAKE_ATTR_USE
 needshell(const char *cmd)
 {
-	while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=')
+	while (!ch_is_shell_meta(*cmd) && *cmd != ':' && *cmd != '=')
 		cmd++;
 	return *cmd != '\0';
 }

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.996 src/usr.bin/make/var.c:1.997
--- src/usr.bin/make/var.c:1.996	Fri Jan  7 20:37:25 2022
+++ src/usr.bin/make/var.c	Sat Jan  8 11:04:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.996 2022/01/07 20:37:25 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.996 2022/01/07 20:37:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.997 2022/01/08 11:04:13 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1870,7 +1870,7 @@ VarQuote(const char *str, bool quoteDoll
 			LazyBuf_AddStr(buf, newline);
 			continue;
 		}
-		if (ch_isspace(*p) || is_shell_metachar((unsigned char)*p))
+		if (ch_isspace(*p) || ch_is_shell_meta(*p))
 			LazyBuf_Add(buf, '\\');
 		LazyBuf_Add(buf, *p);
 		if (quoteDollar && *p == '$')



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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 10:22:03 UTC 2022

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

Log Message:
tests/make: demonstrate edge case in parsing .for loops


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-for.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-for.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/directive-for.exp
diff -u src/usr.bin/make/unit-tests/directive-for.exp:1.10 src/usr.bin/make/unit-tests/directive-for.exp:1.11
--- src/usr.bin/make/unit-tests/directive-for.exp:1.10	Sun Jan  2 01:35:31 2022
+++ src/usr.bin/make/unit-tests/directive-for.exp	Sat Jan  8 10:22:03 2022
@@ -26,6 +26,17 @@ make: "directive-for.mk" line 187: 1 ope
 make: "directive-for.mk" line 203: for-less endfor
 make: "directive-for.mk" line 204: if-less endif
 make: "directive-for.mk" line 212: if-less endif
+For: end for 1
+For: loop body:
+.\
+   for inner in i
+.\
+   endfor
+make: "directive-for.mk" line 229: Unexpected end of file in .for loop
+For: loop body:
+.\
+   endfor
+make: "directive-for.mk" line 228: for-less endfor
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directive-for.mk
diff -u src/usr.bin/make/unit-tests/directive-for.mk:1.11 src/usr.bin/make/unit-tests/directive-for.mk:1.12
--- src/usr.bin/make/unit-tests/directive-for.mk:1.11	Sun Jan  2 01:35:31 2022
+++ src/usr.bin/make/unit-tests/directive-for.mk	Sat Jan  8 10:22:03 2022
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.11 2022/01/02 01:35:31 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.12 2022/01/08 10:22:03 rillig Exp $
 #
 # Tests for the .for directive.
 #
@@ -212,3 +212,19 @@ var=	outer
 .endif			# expect: if-less endif
 .  endfor			# no 'for-less endfor'
 .endif# no 'if-less endif'
+
+
+# When make parses a .for loop, it assumes that there is no line break between
+# the '.' and the 'for' or 'endfor', as there is no practical reason to break
+# the line at this point.  When make scans the outer .for loop, it does not
+# recognize the inner directives as such.  When make scans the inner .for
+# loop, it recognizes the '.\n for' but does not recognize the '.\n endfor',
+# as LK_FOR_BODY preserves the backslash-newline sequences.
+.MAKEFLAGS: -df
+.for outer in o
+.\
+   for inner in i
+.\
+   endfor
+.endfor
+.MAKEFLAGS: -d0



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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 10:22:03 UTC 2022

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

Log Message:
tests/make: demonstrate edge case in parsing .for loops


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-for.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-for.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

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 09:55:33 UTC 2022

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

Log Message:
make: constify UnescapeBackslash, fix typo in comment

No binary change.


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

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.637 src/usr.bin/make/parse.c:1.638
--- src/usr.bin/make/parse.c:1.637	Fri Jan  7 22:08:09 2022
+++ src/usr.bin/make/parse.c	Sat Jan  8 09:55:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.637 2022/01/07 22:08:09 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.637 2022/01/07 22:08:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $");
 
 /*
  * A file being read.
@@ -2376,7 +2376,7 @@ ParseRawLine(IncludedFile *curFile, char
 static void
 UnescapeBackslash(char *line, char *start)
 {
-	char *src = start;
+	const char *src = start;
 	char *dst = start;
 	char *spaceStart = line;
 
@@ -2400,7 +2400,7 @@ UnescapeBackslash(char *line, char *star
 		if (ch == '#' && line[0] != '\t')
 			*dst++ = ch;
 		else if (ch == '\n') {
-			pp_skip_hspace();
+			cpp_skip_hspace();
 			*dst++ = ' ';
 		} else {
 			/* Leave '\\' in the buffer for later. */
@@ -2551,8 +2551,8 @@ ParseForLoop(const char *line)
  * leaving only variable assignments, other directives, dependency lines
  * and shell commands to the caller.
  *
- * Return a line without without trailing whitespace, or NULL for EOF.  The
- * caller must not free the returned line.
+ * Return a line without trailing whitespace, or NULL for EOF.  The returned
+ * string will be freed at the end of including the file.
  */
 static char *
 ReadHighLevelLine(void)



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 09:55:33 UTC 2022

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

Log Message:
make: constify UnescapeBackslash, fix typo in comment

No binary change.


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

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



CVS commit: src/usr.bin/make

2022-01-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  8 09:53:44 UTC 2022

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

Log Message:
make: remove redundant braces

No binary change, except for assertion line numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/usr.bin/make/compat.c
cvs rdiff -u -r1.447 -r1.448 src/usr.bin/make/job.c
cvs rdiff -u -r1.250 -r1.251 src/usr.bin/make/make.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/cats

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:02:47 UTC 2022

Modified Files:
src/sys/arch/cats/cats: cats_machdep.c
src/sys/arch/cats/conf: files.cats

Log Message:
defflag FCOM_INIT_ARM


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/cats/cats/cats_machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/cats/conf/files.cats

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



CVS commit: src/sys/arch/cats

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:02:47 UTC 2022

Modified Files:
src/sys/arch/cats/cats: cats_machdep.c
src/sys/arch/cats/conf: files.cats

Log Message:
defflag FCOM_INIT_ARM


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/cats/cats/cats_machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/cats/conf/files.cats

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/cats/cats/cats_machdep.c
diff -u src/sys/arch/cats/cats/cats_machdep.c:1.92 src/sys/arch/cats/cats/cats_machdep.c:1.93
--- src/sys/arch/cats/cats/cats_machdep.c:1.92	Fri Aug 27 09:29:05 2021
+++ src/sys/arch/cats/cats/cats_machdep.c	Sat Jan  8 09:02:47 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cats_machdep.c,v 1.92 2021/08/27 09:29:05 skrll Exp $	*/
+/*	$NetBSD: cats_machdep.c,v 1.93 2022/01/08 09:02:47 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -40,9 +40,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.92 2021/08/27 09:29:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.93 2022/01/08 09:02:47 skrll Exp $");
 
 #include "opt_arm_debug.h"
+#include "opt_cats.h"
 #include "opt_ddb.h"
 #include "opt_modular.h"
 

Index: src/sys/arch/cats/conf/files.cats
diff -u src/sys/arch/cats/conf/files.cats:1.38 src/sys/arch/cats/conf/files.cats:1.39
--- src/sys/arch/cats/conf/files.cats:1.38	Fri Apr  4 07:33:53 2014
+++ src/sys/arch/cats/conf/files.cats	Sat Jan  8 09:02:47 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.cats,v 1.38 2014/04/04 07:33:53 skrll Exp $
+#	$NetBSD: files.cats,v 1.39 2022/01/08 09:02:47 skrll Exp $
 #
 # CATS-specific configuration info
 #
@@ -19,6 +19,7 @@ defflag	XSERVER
 # ABLE booting ELF kernels
 defflag ABLEELF
 
+defflag opt_cats.h	FCOM_INIT_ARM
 #
 # ISA and mixed ISA+EISA or ISA+PCI drivers
 #



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:01:00 UTC 2022

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/arm/arm/undefined.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/arm/arm/undefined.c
diff -u src/sys/arch/arm/arm/undefined.c:1.73 src/sys/arch/arm/arm/undefined.c:1.74
--- src/sys/arch/arm/arm/undefined.c:1.73	Sat Jan  8 09:00:23 2022
+++ src/sys/arch/arm/arm/undefined.c	Sat Jan  8 09:01:00 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: undefined.c,v 1.73 2022/01/08 09:00:23 skrll Exp $	*/
+/*	$NetBSD: undefined.c,v 1.74 2022/01/08 09:01:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -50,14 +50,14 @@
 #include "opt_kgdb.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.73 2022/01/08 09:00:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.74 2022/01/08 09:01:00 skrll Exp $");
 
 #include 
 #include 
-#include 
 #ifdef KGDB
 #include 
 #endif
+#include 
 #include 
 #include 
 #include 



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:01:00 UTC 2022

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/arm/arm/undefined.c

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



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:00:23 UTC 2022

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
Make VERBOSE_ARM32 compile again and reduce #ifdefs while I'm here


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arm/arm/undefined.c

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



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 09:00:23 UTC 2022

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
Make VERBOSE_ARM32 compile again and reduce #ifdefs while I'm here


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arm/arm/undefined.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/arm/arm/undefined.c
diff -u src/sys/arch/arm/arm/undefined.c:1.72 src/sys/arch/arm/arm/undefined.c:1.73
--- src/sys/arch/arm/arm/undefined.c:1.72	Sun Oct 31 16:23:47 2021
+++ src/sys/arch/arm/arm/undefined.c	Sat Jan  8 09:00:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: undefined.c,v 1.72 2021/10/31 16:23:47 skrll Exp $	*/
+/*	$NetBSD: undefined.c,v 1.73 2022/01/08 09:00:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -50,7 +50,7 @@
 #include "opt_kgdb.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.72 2021/10/31 16:23:47 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.73 2022/01/08 09:00:23 skrll Exp $");
 
 #include 
 #include 
@@ -71,7 +71,9 @@ __KERNEL_RCSID(0, "$NetBSD: undefined.c,
 #include 
 #include 
 
+#ifdef VERBOSE_ARM32
 #include 
+#endif
 
 #ifdef DDB
 #include 
@@ -307,9 +309,6 @@ undefinedinstruction(trapframe_t *tf)
 	int coprocessor;
 	int user;
 	struct undefined_handler *uh;
-#ifdef VERBOSE_ARM32
-	int s;
-#endif
 
 	curcpu()->ci_und_ev.ev_count++;
 
@@ -441,7 +440,7 @@ undefinedinstruction(trapframe_t *tf)
 		ksiginfo_t ksi;
 
 #ifdef VERBOSE_ARM32
-		s = spltty();
+		int s = spltty();
 
 		if ((fault_instruction & 0x0f10) == 0x0e00) {
 			printf("CDP\n");



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 08:40:20 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: md.emips

Log Message:
Attempt to fix emips build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/md.emips

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

Modified files:

Index: src/distrib/sets/lists/debug/md.emips
diff -u src/distrib/sets/lists/debug/md.emips:1.1 src/distrib/sets/lists/debug/md.emips:1.2
--- src/distrib/sets/lists/debug/md.emips:1.1	Fri Dec 31 16:15:58 2021
+++ src/distrib/sets/lists/debug/md.emips	Sat Jan  8 08:40:19 2022
@@ -1,3 +1,4 @@
-# $NetBSD: md.emips,v 1.1 2021/12/31 16:15:58 christos Exp $
+# $NetBSD: md.emips,v 1.2 2022/01/08 08:40:19 skrll Exp $
 ./usr/libdata/debug/nfsnetbsd-GENERIC.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/nfsnetbsd-INSTALL.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/nfsnetbsd-RAMDISK.debug	comp-sysutil-debug	debug



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

2022-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  8 08:40:20 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: md.emips

Log Message:
Attempt to fix emips build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/md.emips

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