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

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 22:29:39 UTC 2023

Modified Files:
src/sys/arch/sparc/dev: fd.c

Log Message:
Surround fdc declaration and definition with FD_DEBUG blocks.

FD_DEBUG is defined by default, thus build passes, however would fail otherwise
since it is only used in debug block.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc/dev/fd.c

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

Modified files:

Index: src/sys/arch/sparc/dev/fd.c
diff -u src/sys/arch/sparc/dev/fd.c:1.163 src/sys/arch/sparc/dev/fd.c:1.164
--- src/sys/arch/sparc/dev/fd.c:1.163	Sat Aug  7 16:19:05 2021
+++ src/sys/arch/sparc/dev/fd.c	Mon Dec 11 22:29:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.163 2021/08/07 16:19:05 thorpej Exp $	*/
+/*	$NetBSD: fd.c,v 1.164 2023/12/11 22:29:39 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.163 2021/08/07 16:19:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.164 2023/12/11 22:29:39 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -1948,7 +1948,9 @@ int
 fdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {
 	struct fd_softc *fd;
+#ifdef FD_DEBUG
 	struct fdc_softc *fdc;
+#endif
 	struct fdformat_parms *form_parms;
 	struct fdformat_cmd *form_cmd;
 	struct ne7_fd_formb *fd_formb;
@@ -1962,7 +1964,9 @@ fdioctl(dev_t dev, u_long cmd, void *add
 		return (ENXIO);
 
 	fd = device_lookup_private(_cd, FDUNIT(dev));
+#ifdef FD_DEBUG
 	fdc = device_private(device_parent(fd->sc_dv));
+#endif
 
 	switch (cmd) {
 	case DIOCGDINFO:



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

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 22:29:39 UTC 2023

Modified Files:
src/sys/arch/sparc/dev: fd.c

Log Message:
Surround fdc declaration and definition with FD_DEBUG blocks.

FD_DEBUG is defined by default, thus build passes, however would fail otherwise
since it is only used in debug block.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc/dev/fd.c

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



CVS commit: src/distrib/notes/common

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 21:57:41 UTC 2023

Modified Files:
src/distrib/notes/common: contents

Log Message:
s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs.
Also apply uwe change from sparc/contents s/GENERIC-KRUPS/KRUPS/.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/distrib/notes/common/contents

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

Modified files:

Index: src/distrib/notes/common/contents
diff -u src/distrib/notes/common/contents:1.185 src/distrib/notes/common/contents:1.186
--- src/distrib/notes/common/contents:1.185	Fri Apr  2 07:09:11 2021
+++ src/distrib/notes/common/contents	Mon Dec 11 21:57:41 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: contents,v 1.185 2021/04/02 07:09:11 rin Exp $
+.\"	$NetBSD: contents,v 1.186 2023/12/11 21:57:41 andvar Exp $
 .\"
 .\" Copyright (c) 1999-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -707,21 +707,21 @@ kernel, which supports only UltraSPARC s
 This set contains a
 .Nx*M
 \*V
-.Li GENERIC-KRUPS
+.Li KRUPS
 kernel, which supports the JavaStation-NC, named
 .Pa /netbsd .
 .It Sy kern-MRCOFFEE
 This set contains a
 .Nx*M
 \*V
-.Li MRCOFFE
+.Li MRCOFFEE
 kernel, which which supports the OpenBOOT PROM 2 JavaStation-1, named
 .Pa /netbsd .
 .It Sy kern-MRCOFFEE_OFW
 This set contains a
 .Nx*M
 \*V
-.Li MRCOFFE_OFW
+.Li MRCOFFEE_OFW
 kernel, which which supports the OpenFirmware JavaStation-1, named
 .Pa /netbsd .
 .\}



CVS commit: src/distrib/notes/common

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 21:57:41 UTC 2023

Modified Files:
src/distrib/notes/common: contents

Log Message:
s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs.
Also apply uwe change from sparc/contents s/GENERIC-KRUPS/KRUPS/.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/distrib/notes/common/contents

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



CVS commit: src/distrib/notes/sparc

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 21:43:33 UTC 2023

Modified Files:
src/distrib/notes/sparc: contents

Log Message:
s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/distrib/notes/sparc/contents

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

Modified files:

Index: src/distrib/notes/sparc/contents
diff -u src/distrib/notes/sparc/contents:1.28 src/distrib/notes/sparc/contents:1.29
--- src/distrib/notes/sparc/contents:1.28	Fri Apr  1 21:53:35 2022
+++ src/distrib/notes/sparc/contents	Mon Dec 11 21:43:33 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: contents,v 1.28 2022/04/01 21:53:35 andvar Exp $
+.\"	$NetBSD: contents,v 1.29 2023/12/11 21:43:33 andvar Exp $
 .\"
 .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -243,14 +243,14 @@ kernel, which supports the JavaStation-N
 This set contains a
 .Nx*M
 \*V
-.Li MRCOFFE
+.Li MRCOFFEE
 kernel, which which supports the OpenBOOT PROM 2 JavaStation-1, named
 .Pa /netbsd .
 .It Sy kern-MRCOFFEE_OFW
 This set contains a
 .Nx*M
 \*V
-.Li MRCOFFE_OFW
+.Li MRCOFFEE_OFW
 kernel, which which supports the OpenFirmware JavaStation-1, named
 .Pa /netbsd .
 .



CVS commit: src/distrib/notes/sparc

2023-12-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Dec 11 21:43:33 UTC 2023

Modified Files:
src/distrib/notes/sparc: contents

Log Message:
s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/distrib/notes/sparc/contents

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



CVS commit: src/usr.sbin/crash

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 14:00:47 UTC 2023

Modified Files:
src/usr.sbin/crash: crash.c

Log Message:
Implement cngetc, don't abort.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/crash/crash.c

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

Modified files:

Index: src/usr.sbin/crash/crash.c
diff -u src/usr.sbin/crash/crash.c:1.15 src/usr.sbin/crash/crash.c:1.16
--- src/usr.sbin/crash/crash.c:1.15	Wed Apr 12 17:53:32 2023
+++ src/usr.sbin/crash/crash.c	Mon Dec 11 14:00:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: crash.c,v 1.15 2023/04/12 17:53:32 riastradh Exp $	*/
+/*	$NetBSD: crash.c,v 1.16 2023/12/11 14:00:47 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: crash.c,v 1.15 2023/04/12 17:53:32 riastradh Exp $");
+__RCSID("$NetBSD: crash.c,v 1.16 2023/12/11 14:00:47 mlelstv Exp $");
 #endif /* not lint */
 
 #include 
@@ -94,7 +94,6 @@ void lockdebug_lock_print(void) {
 }
 #endif
 
-
 static void
 cleanup(void)
 {
@@ -309,9 +308,11 @@ db_check_interrupt(void)
 int
 cngetc(void)
 {
+	char ch;
 
-	fprintf(stderr, "cngetc\n");
-	abort();
+	if (el_getc(elptr, ) <= 0)
+		return 0;
+	return (unsigned char)ch;
 }
 
 void



CVS commit: src/usr.sbin/crash

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 14:00:47 UTC 2023

Modified Files:
src/usr.sbin/crash: crash.c

Log Message:
Implement cngetc, don't abort.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/crash/crash.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/rpcinfo

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:56:48 UTC 2023

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

Log Message:
Use IANA registerd service name "sunrpc" instead of "rpcbind".


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/rpcinfo/rpcinfo.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/rpcinfo/rpcinfo.c
diff -u src/usr.bin/rpcinfo/rpcinfo.c:1.37 src/usr.bin/rpcinfo/rpcinfo.c:1.38
--- src/usr.bin/rpcinfo/rpcinfo.c:1.37	Fri May 24 23:09:45 2013
+++ src/usr.bin/rpcinfo/rpcinfo.c	Mon Dec 11 13:56:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcinfo.c,v 1.37 2013/05/24 23:09:45 christos Exp $	*/
+/*	$NetBSD: rpcinfo.c,v 1.38 2023/12/11 13:56:47 mlelstv Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -569,7 +569,7 @@ get_inet_address(struct sockaddr_in *add
 		} else {
 			(void)memset(, 0, sizeof hints);
 			hints.ai_family = AF_INET;
-			if ((error = getaddrinfo(host, "rpcbind", , ))
+			if ((error = getaddrinfo(host, "sunrpc", , ))
 			!= 0) {
 errx(1, "%s: %s", host, gai_strerror(error));
 			} else {
@@ -1628,7 +1628,7 @@ getclnthandle(const char *host, const st
 
 	/* Get the address of the rpcbind */
 	(void)memset(, 0, sizeof hints);
-	if (getaddrinfo(host, "rpcbind", , ) != 0) {
+	if (getaddrinfo(host, "sunrpc", , ) != 0) {
 		rpc_createerr.cf_stat = RPC_N2AXLATEFAILURE;
 		return NULL;
 	}



CVS commit: src/usr.bin/rpcinfo

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:56:48 UTC 2023

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

Log Message:
Use IANA registerd service name "sunrpc" instead of "rpcbind".


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/rpcinfo/rpcinfo.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/wscons

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:38:13 UTC 2023

Modified Files:
src/sys/dev/wscons: wsksymdef.h

Log Message:
Adjust next key value (it's not used anywhere).


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/wscons/wsksymdef.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/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.77 src/sys/dev/wscons/wsksymdef.h:1.78
--- src/sys/dev/wscons/wsksymdef.h:1.77	Wed Sep 22 17:37:32 2021
+++ src/sys/dev/wscons/wsksymdef.h	Mon Dec 11 13:38:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.77 2021/09/22 17:37:32 nia Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.78 2023/12/11 13:38:13 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -687,7 +687,7 @@ action(KB_UA,	0,	0x1200,	"ua",	,	"Ukrain
 
 /* Define all the KB_xx numeric values using above table */
 #define KBF_ENUM(tag, tagf, value, cc, ccf, country) tag=value,
-enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1d00 };
+enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x2200 };
 
 /* Define list of KB_xxx and country codes for array initialisation */
 #define KBF_ENCTAB(tag, tagf, value, cc, ccf, country) { tag, cc },



CVS commit: src/sys/dev/wscons

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:38:13 UTC 2023

Modified Files:
src/sys/dev/wscons: wsksymdef.h

Log Message:
Adjust next key value (it's not used anywhere).


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/wscons/wsksymdef.h

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



CVS commit: src/sys/dev/usb

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:35:40 UTC 2023

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.801 -r1.802 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.801 src/sys/dev/usb/usbdevs.h:1.802
--- src/sys/dev/usb/usbdevs.h:1.801	Thu Sep  7 20:04:18 2023
+++ src/sys/dev/usb/usbdevs.h	Mon Dec 11 13:35:40 2023
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.801 2023/09/07 20:04:18 ad Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.802 2023/12/11 13:35:40 mlelstv Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.808 2023/05/14 22:30:13 pgoyette Exp
+ *	NetBSD: usbdevs,v 1.810 2023/12/11 13:33:35 mlelstv Exp
  */
 
 /*-
@@ -2902,6 +2902,7 @@
 #define	USB_PRODUCT_REALTEK_RTL8151	0x8151		/* RTL8151 PNA */
 #define	USB_PRODUCT_REALTEK_RTL8152	0x8152		/* RTL8152 */
 #define	USB_PRODUCT_REALTEK_RTL8153	0x8153		/* RTL8153 */
+#define	USB_PRODUCT_REALTEK_RTL8156	0x8156		/* RTL8156 */
 #define	USB_PRODUCT_REALTEK_RTL8188CE_0	0x8170		/* RTL8188CE */
 #define	USB_PRODUCT_REALTEK_RTL8171	0x8171		/* RTL8171 */
 #define	USB_PRODUCT_REALTEK_RTL8172	0x8172		/* RTL8172 */
Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.801 src/sys/dev/usb/usbdevs_data.h:1.802
--- src/sys/dev/usb/usbdevs_data.h:1.801	Thu Sep  7 20:04:18 2023
+++ src/sys/dev/usb/usbdevs_data.h	Mon Dec 11 13:35:40 2023
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.801 2023/09/07 20:04:18 ad Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.802 2023/12/11 13:35:40 mlelstv Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.808 2023/05/14 22:30:13 pgoyette Exp
+ *	NetBSD: usbdevs,v 1.810 2023/12/11 13:33:35 mlelstv Exp
  */
 
 /*-
@@ -3914,20 +3914,22 @@ static const uint32_t usb_products[] = {
 	17221, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8153, 
 	17229, 0,
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8156, 
+	17237, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CE_0, 
 	7357, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8171, 
-	17237, 0,
-	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8172, 
 	17245, 0,
-	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8173, 
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8172, 
 	17253, 0,
-	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8174, 
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8173, 
 	17261, 0,
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8174, 
+	17269, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CU_0, 
 	5293, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8191CU, 
-	17269, 0,
+	17277, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8192CU, 
 	5273, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188EU, 
@@ -3937,7 +3939,7 @@ static const uint32_t usb_products[] = {
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CU_2, 
 	5293, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8192CE, 
-	17279, 0,
+	17287, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188RU, 
 	17177, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CE_1, 
@@ -3947,181 +3949,181 @@ static const uint32_t usb_products[] = {
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8187, 
 	8936, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8187B_0, 
-	17289, 0,
+	17297, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CUS, 
 	7504, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8192EU, 
-	17298, 0,
+	17306, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CU_3, 
 	5293, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8187B_1, 
-	17289, 0,
+	17297, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8187B_2, 
-	17289, 0,
+	17297, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8712, 
-	17308, 0,
-	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8713, 
 	17316, 0,
+	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8713, 
+	17324, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8188CU_COMBO, 
 	5293, 0,
 	USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8192SU, 
 	5431, 0,
 	USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY, 
-	17324, 0,
+	17332, 0,
 	USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY_PEARL_DUAL, 
-	17324, 17335, 13673, 0,
+	17332, 17343, 13673, 0,
 	USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY_PEARL, 
-	17324, 17335, 0,
+	17332, 17343, 0,
 	USB_VENDOR_ROCKFIRE, USB_PRODUCT_ROCKFIRE_GAMEPAD, 
-	12974, 17341, 0,
+	12974, 17349, 0,
 	USB_VENDOR_ROLAND, 

CVS commit: src/sys/dev/usb

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:35:40 UTC 2023

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.801 -r1.802 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:33:35 UTC 2023

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add RTL8156


To generate a diff of this commit:
cvs rdiff -u -r1.809 -r1.810 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.809 src/sys/dev/usb/usbdevs:1.810
--- src/sys/dev/usb/usbdevs:1.809	Thu Sep  7 20:04:18 2023
+++ src/sys/dev/usb/usbdevs	Mon Dec 11 13:33:35 2023
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.809 2023/09/07 20:04:18 ad Exp $
+$NetBSD: usbdevs,v 1.810 2023/12/11 13:33:35 mlelstv Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2895,6 +2895,7 @@ product REALTEK RTL8150L	0x8150	RTL8150L
 product REALTEK RTL8151		0x8151	RTL8151 PNA
 product REALTEK RTL8152		0x8152	RTL8152
 product REALTEK RTL8153		0x8153	RTL8153
+product REALTEK RTL8156		0x8156	RTL8156
 product REALTEK RTL8188CE_0	0x8170	RTL8188CE
 product REALTEK RTL8171		0x8171	RTL8171
 product REALTEK RTL8172		0x8172	RTL8172



CVS commit: src/sys/dev/usb

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:33:35 UTC 2023

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add RTL8156


To generate a diff of this commit:
cvs rdiff -u -r1.809 -r1.810 src/sys/dev/usb/usbdevs

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



CVS commit: src/sys/dev/onewire

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:30:33 UTC 2023

Modified Files:
src/sys/dev/onewire: owtemp.c

Log Message:
Don't unregister envsys when not registered.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/onewire/owtemp.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/onewire/owtemp.c
diff -u src/sys/dev/onewire/owtemp.c:1.21 src/sys/dev/onewire/owtemp.c:1.22
--- src/sys/dev/onewire/owtemp.c:1.21	Tue Oct 10 19:21:38 2023
+++ src/sys/dev/onewire/owtemp.c	Mon Dec 11 13:30:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: owtemp.c,v 1.21 2023/10/10 19:21:38 kardel Exp $	*/
+/*	$NetBSD: owtemp.c,v 1.22 2023/12/11 13:30:33 mlelstv Exp $	*/
 /*	$OpenBSD: owtemp.c,v 1.1 2006/03/04 16:27:03 grange Exp $	*/
 
 /*-
@@ -51,7 +51,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.21 2023/10/10 19:21:38 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.22 2023/12/11 13:30:33 mlelstv Exp $");
 
 #include 
 #include 
@@ -161,6 +161,7 @@ owtemp_attach(device_t parent, device_t 
 	"%s S/N %012" PRIx64, sc->sc_chipname, ONEWIRE_ROM_SN(sc->sc_rom));
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, >sc_sensor)) {
 		sysmon_envsys_destroy(sc->sc_sme);
+		sc->sc_sme = NULL;
 		return;
 	}
 
@@ -172,6 +173,7 @@ owtemp_attach(device_t parent, device_t 
 	if (sysmon_envsys_register(sc->sc_sme)) {
 		aprint_error_dev(self, "unable to register with sysmon\n");
 		sysmon_envsys_destroy(sc->sc_sme);
+		sc->sc_sme = NULL;
 		return;
 	}
 
@@ -183,7 +185,8 @@ owtemp_detach(device_t self, int flags)
 {
 	struct owtemp_softc *sc = device_private(self);
 
-	sysmon_envsys_unregister(sc->sc_sme);
+	if (sc->sc_sme != NULL)
+		sysmon_envsys_unregister(sc->sc_sme);
 	evcnt_detach(>sc_ev_rsterr);
 	evcnt_detach(>sc_ev_update);
 	evcnt_detach(>sc_ev_crcerr);



CVS commit: src/sys/dev/onewire

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:30:33 UTC 2023

Modified Files:
src/sys/dev/onewire: owtemp.c

Log Message:
Don't unregister envsys when not registered.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/onewire/owtemp.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

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:29:03 UTC 2023

Modified Files:
src/sys/dev/ic: dw_hdmi.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/dw_hdmi.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/ic/dw_hdmi.c
diff -u src/sys/dev/ic/dw_hdmi.c:1.10 src/sys/dev/ic/dw_hdmi.c:1.11
--- src/sys/dev/ic/dw_hdmi.c:1.10	Fri Mar 25 23:16:04 2022
+++ src/sys/dev/ic/dw_hdmi.c	Mon Dec 11 13:29:03 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: dw_hdmi.c,v 1.10 2022/03/25 23:16:04 tnn Exp $ */
+/* $NetBSD: dw_hdmi.c,v 1.11 2023/12/11 13:29:03 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.10 2022/03/25 23:16:04 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.11 2023/12/11 13:29:03 mlelstv Exp $");
 
 #include 
 #include 
@@ -729,7 +729,7 @@ dwhdmi_audio_swvol_codec(audio_filter_ar
 {
 	struct dwhdmi_softc * const sc = arg->context;
 	const aint_t *src;
-	aint_t *dst;
+	int16_t *dst;
 	u_int sample_count;
 	u_int i;
 



CVS commit: src/sys/dev/ic

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:29:03 UTC 2023

Modified Files:
src/sys/dev/ic: dw_hdmi.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/dw_hdmi.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

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:28:15 UTC 2023

Modified Files:
src/sys/dev/ic: anx_dp.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/anx_dp.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/ic/anx_dp.c
diff -u src/sys/dev/ic/anx_dp.c:1.5 src/sys/dev/ic/anx_dp.c:1.6
--- src/sys/dev/ic/anx_dp.c:1.5	Sun Dec 19 12:43:37 2021
+++ src/sys/dev/ic/anx_dp.c	Mon Dec 11 13:28:15 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: anx_dp.c,v 1.5 2021/12/19 12:43:37 riastradh Exp $ */
+/* $NetBSD: anx_dp.c,v 1.6 2023/12/11 13:28:15 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2019 Jonathan A. Kollasch 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: anx_dp.c,v 1.5 2021/12/19 12:43:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: anx_dp.c,v 1.6 2023/12/11 13:28:15 mlelstv Exp $");
 
 #include 
 #include 
@@ -791,7 +791,7 @@ anxdp_audio_swvol_codec(audio_filter_arg
 {
 	struct anxdp_softc * const sc = arg->context;
 	const aint_t *src;
-	aint_t *dst;
+	int16_t *dst;
 	u_int sample_count;
 	u_int i;
 



CVS commit: src/sys/dev/ic

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:28:15 UTC 2023

Modified Files:
src/sys/dev/ic: anx_dp.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/anx_dp.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/i2c

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:27:24 UTC 2023

Modified Files:
src/sys/dev/i2c: es8316ac.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/es8316ac.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/i2c/es8316ac.c
diff -u src/sys/dev/i2c/es8316ac.c:1.5 src/sys/dev/i2c/es8316ac.c:1.6
--- src/sys/dev/i2c/es8316ac.c:1.5	Wed Jan 27 02:29:48 2021
+++ src/sys/dev/i2c/es8316ac.c	Mon Dec 11 13:27:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: es8316ac.c,v 1.5 2021/01/27 02:29:48 thorpej Exp $ */
+/* $NetBSD: es8316ac.c,v 1.6 2023/12/11 13:27:24 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: es8316ac.c,v 1.5 2021/01/27 02:29:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: es8316ac.c,v 1.6 2023/12/11 13:27:24 mlelstv Exp $");
 
 #include 
 #include 
@@ -298,7 +298,7 @@ escodec_swvol_codec(audio_filter_arg_t *
 {
 	struct escodec_softc * const sc = arg->context;
 	const aint_t *src;
-	aint_t *dst;
+	int16_t *dst;
 	u_int sample_count;
 	u_int i;
 



CVS commit: src/sys/dev/i2c

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:27:24 UTC 2023

Modified Files:
src/sys/dev/i2c: es8316ac.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/es8316ac.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/macppc/dev

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:06:06 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: snapper.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c
diff -u src/sys/arch/macppc/dev/snapper.c:1.65 src/sys/arch/macppc/dev/snapper.c:1.66
--- src/sys/arch/macppc/dev/snapper.c:1.65	Thu Jun  2 16:22:27 2022
+++ src/sys/arch/macppc/dev/snapper.c	Mon Dec 11 13:06:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapper.c,v 1.65 2022/06/02 16:22:27 macallan Exp $	*/
+/*	$NetBSD: snapper.c,v 1.66 2023/12/11 13:06:06 mlelstv Exp $	*/
 /*	Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp	*/
 /*	Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp		*/
 
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.65 2022/06/02 16:22:27 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.66 2023/12/11 13:06:06 mlelstv Exp $");
 
 #include 
 #include 
@@ -187,7 +187,7 @@ snapper_volume(audio_filter_arg_t *arg)
 {
 	struct snapper_softc *sc;
 	const aint_t *src;
-	aint_t *dst;
+	int16_t *dst;
 	u_int sample_count;
 	u_int i;
 



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

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 13:06:06 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: snapper.c

Log Message:
Output is always 16bit, the internal audio data type may differ.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/macppc/dev/snapper.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/broadcom

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:53:08 UTC 2023

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_com.c

Log Message:
Report UART clock.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/bcm2835_com.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/broadcom/bcm2835_com.c
diff -u src/sys/arch/arm/broadcom/bcm2835_com.c:1.8 src/sys/arch/arm/broadcom/bcm2835_com.c:1.9
--- src/sys/arch/arm/broadcom/bcm2835_com.c:1.8	Fri Jan 29 14:11:14 2021
+++ src/sys/arch/arm/broadcom/bcm2835_com.c	Mon Dec 11 12:53:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_com.c,v 1.8 2021/01/29 14:11:14 skrll Exp $ */
+/* $NetBSD: bcm2835_com.c,v 1.9 2023/12/11 12:53:08 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_com.c,v 1.8 2021/01/29 14:11:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_com.c,v 1.9 2023/12/11 12:53:08 mlelstv Exp $");
 
 #include 
 #include 
@@ -123,7 +123,8 @@ bcm_com_attach(device_t parent, device_t
 		intrstr);
 		return;
 	}
-	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
+	aprint_normal_dev(self, "interrupting on %s, clock %u Hz\n",
+	   intrstr, sc->sc_frequency);
 }
 
 static int



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

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:53:08 UTC 2023

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_com.c

Log Message:
Report UART clock.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/bcm2835_com.c

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



CVS commit: src/sbin/swapctl

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:47:24 UTC 2023

Modified Files:
src/sbin/swapctl: swaplist.c

Log Message:
Avoid overflow of totals.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/swapctl/swaplist.c

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

Modified files:

Index: src/sbin/swapctl/swaplist.c
diff -u src/sbin/swapctl/swaplist.c:1.18 src/sbin/swapctl/swaplist.c:1.19
--- src/sbin/swapctl/swaplist.c:1.18	Tue May 31 09:34:25 2016
+++ src/sbin/swapctl/swaplist.c	Mon Dec 11 12:47:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: swaplist.c,v 1.18 2016/05/31 09:34:25 pgoyette Exp $	*/
+/*	$NetBSD: swaplist.c,v 1.19 2023/12/11 12:47:24 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1997 Matthew R. Green
@@ -28,7 +28,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: swaplist.c,v 1.18 2016/05/31 09:34:25 pgoyette Exp $");
+__RCSID("$NetBSD: swaplist.c,v 1.19 2023/12/11 12:47:24 mlelstv Exp $");
 #endif
 
 
@@ -61,8 +61,9 @@ list_swap(int pri, int kflag, int pflag,
 	char	szbuf[5], usbuf[5], avbuf[5]; /* size, used, avail */
 	const	char *header, *suff;
 	size_t	l;
-	int	hlen, totalsize, size, totalinuse, inuse, ncounted, pathmax;
+	int	hlen, size, inuse, ncounted, pathmax;
 	int	rnswap, nswap = swapctl(SWAP_NSWAP, 0, 0), i;
+	int64_t	totalsize, totalinuse;
 
 	if (nswap < 1) {
 		puts("no swap devices configured");



CVS commit: src/sbin/swapctl

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:47:24 UTC 2023

Modified Files:
src/sbin/swapctl: swaplist.c

Log Message:
Avoid overflow of totals.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/swapctl/swaplist.c

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



CVS commit: src/sbin/gpt

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:45:22 UTC 2023

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

Log Message:
Be verbose about errors.


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

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



CVS commit: src/sbin/gpt

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:45:22 UTC 2023

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

Log Message:
Be verbose about errors.


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

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

Modified files:

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.85 src/sbin/gpt/gpt.c:1.86
--- src/sbin/gpt/gpt.c:1.85	Tue Sep 26 15:55:46 2023
+++ src/sbin/gpt/gpt.c	Mon Dec 11 12:45:22 2023
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.85 2023/09/26 15:55:46 kre Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.86 2023/12/11 12:45:22 mlelstv Exp $");
 #endif
 
 #include 
@@ -386,8 +386,10 @@ gpt_gpt(gpt_t gpt, off_t lba, int found)
 	uint32_t crc;
 
 	hdr = gpt_read(gpt, lba, 1);
-	if (hdr == NULL)
+	if (hdr == NULL) {
+		gpt_warn(gpt, "Read failed");
 		return -1;
+	}
 
 	if (memcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)))
 		goto fail_hdr;
@@ -540,6 +542,7 @@ gpt_open(const char *dev, int flags, int
 			gpt->secsz = 512;	/* Fixed size for files. */
 		if (gpt->mediasz == 0) {
 			if (gpt->sb.st_size % gpt->secsz) {
+gpt_warn(gpt, "Media size not a multiple of sector size (%u)\n", gpt->secsz);
 errno = EINVAL;
 goto close;
 			}
@@ -602,6 +605,8 @@ gpt_open(const char *dev, int flags, int
 	if (gpt->fd != -1)
 		close(gpt->fd);
 	free(gpt);
+	if (!(flags & GPT_QUIET))
+		gpt_warn(gpt, "No GPT found");
 	return NULL;
 }
 



CVS commit: src/lib/libpuffs

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:42:18 UTC 2023

Modified Files:
src/lib/libpuffs: dispatcher.c

Log Message:
pathconf needs to return EINVAL when the variable is invalid
or cannot be associated with a file. This also needs to be true
when the node doesn't implement the pathconf function at all.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/libpuffs/dispatcher.c

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



CVS commit: src/lib/libpuffs

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 12:42:18 UTC 2023

Modified Files:
src/lib/libpuffs: dispatcher.c

Log Message:
pathconf needs to return EINVAL when the variable is invalid
or cannot be associated with a file. This also needs to be true
when the node doesn't implement the pathconf function at all.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/libpuffs/dispatcher.c

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

Modified files:

Index: src/lib/libpuffs/dispatcher.c
diff -u src/lib/libpuffs/dispatcher.c:1.49 src/lib/libpuffs/dispatcher.c:1.50
--- src/lib/libpuffs/dispatcher.c:1.49	Mon Mar  8 17:34:10 2021
+++ src/lib/libpuffs/dispatcher.c	Mon Dec 11 12:42:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatcher.c,v 1.49 2021/03/08 17:34:10 christos Exp $	*/
+/*	$NetBSD: dispatcher.c,v 1.50 2023/12/11 12:42:18 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: dispatcher.c,v 1.49 2021/03/08 17:34:10 christos Exp $");
+__RCSID("$NetBSD: dispatcher.c,v 1.50 2023/12/11 12:42:18 mlelstv Exp $");
 #endif /* !lint */
 
 #include 
@@ -893,7 +893,7 @@ dispatch(struct puffs_cc *pcc)
 		{
 			struct puffs_vnmsg_pathconf *auxt = auxbuf;
 			if (pops->puffs_node_pathconf == NULL) {
-error = 0;
+error = EINVAL;
 break;
 			}
 



CVS commit: [netbsd-9] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:35:51 UTC 2023

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

Log Message:
Tickets #1777 and #1778


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.120 -r1.1.2.121 src/doc/CHANGES-9.4

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.4
diff -u src/doc/CHANGES-9.4:1.1.2.120 src/doc/CHANGES-9.4:1.1.2.121
--- src/doc/CHANGES-9.4:1.1.2.120	Sun Dec 10 13:10:25 2023
+++ src/doc/CHANGES-9.4	Mon Dec 11 12:35:51 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.120 2023/12/10 13:10:25 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.121 2023/12/11 12:35:51 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -2486,3 +2486,14 @@ lib/libc/net/sethostent.c			1.21
 	sethostent(3): fix a couple of (not very likely) memory leaks.
 	[kre, ticket #1776]
 
+usr.bin/systat/vmstat.c1.92
+
+	systat(1): PR 56014: fix redraw handling.
+	[kre, ticket #1777]
+
+sys/nfs/nfs_vnops.c1.325
+
+	NFS client: PR 57691: fix RFC 1813 compliance for
+	READDIR and READDIRPLUS cookie verifiers.
+	[schmonz, ticket #1778]
+



CVS commit: [netbsd-9] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:35:51 UTC 2023

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

Log Message:
Tickets #1777 and #1778


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.120 -r1.1.2.121 src/doc/CHANGES-9.4

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/nfs

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:34:43 UTC 2023

Modified Files:
src/sys/nfs [netbsd-9]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by schmonz in ticket #1778):

sys/nfs/nfs_vnops.c: revision 1.325

NFS client: fix interop with macOS 14 servers.

Symptom: a bunch of "Cannot open `.' (Invalid argument)".
thorpej@ analysis and fix: on the first request to read a given
directory, make sure READDIR and READDIRPLUS cookie verifiers are
being set to 0. This is in RFC1813 and macOS must have gotten
stricter about it.

Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as
well as the original use case in which I met the bug: pkg_rr once again
runs to completion.


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.311.4.1 src/sys/nfs/nfs_vnops.c

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

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.311 src/sys/nfs/nfs_vnops.c:1.311.4.1
--- src/sys/nfs/nfs_vnops.c:1.311	Mon Sep  3 16:29:36 2018
+++ src/sys/nfs/nfs_vnops.c	Mon Dec 11 12:34:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.311 2018/09/03 16:29:36 riastradh Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.311.4.1 2023/12/11 12:34:43 martin Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.311 2018/09/03 16:29:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.311.4.1 2023/12/11 12:34:43 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -2466,8 +2466,13 @@ nfs_readdirrpc(struct vnode *vp, struct 
 txdr_cookie3(uiop->uio_offset, tl);
 			}
 			tl += 2;
-			*tl++ = dnp->n_cookieverf.nfsuquad[0];
-			*tl++ = dnp->n_cookieverf.nfsuquad[1];
+			if (uiop->uio_offset == 0) {
+*tl++ = 0;
+*tl++ = 0;
+			} else {
+*tl++ = dnp->n_cookieverf.nfsuquad[0];
+*tl++ = dnp->n_cookieverf.nfsuquad[1];
+			}
 		} else
 #endif
 		{
@@ -2676,8 +2681,13 @@ nfs_readdirplusrpc(struct vnode *vp, str
 			txdr_cookie3(uiop->uio_offset, tl);
 		}
 		tl += 2;
-		*tl++ = dnp->n_cookieverf.nfsuquad[0];
-		*tl++ = dnp->n_cookieverf.nfsuquad[1];
+		if (uiop->uio_offset == 0) {
+			*tl++ = 0;
+			*tl++ = 0;
+		} else {
+			*tl++ = dnp->n_cookieverf.nfsuquad[0];
+			*tl++ = dnp->n_cookieverf.nfsuquad[1];
+		}
 		*tl++ = txdr_unsigned(nmp->nm_readdirsize);
 		*tl = txdr_unsigned(nmp->nm_rsize);
 		nfsm_request(dnp, NFSPROC_READDIRPLUS, curlwp, cred);



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

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:34:43 UTC 2023

Modified Files:
src/sys/nfs [netbsd-9]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by schmonz in ticket #1778):

sys/nfs/nfs_vnops.c: revision 1.325

NFS client: fix interop with macOS 14 servers.

Symptom: a bunch of "Cannot open `.' (Invalid argument)".
thorpej@ analysis and fix: on the first request to read a given
directory, make sure READDIR and READDIRPLUS cookie verifiers are
being set to 0. This is in RFC1813 and macOS must have gotten
stricter about it.

Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as
well as the original use case in which I met the bug: pkg_rr once again
runs to completion.


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.311.4.1 src/sys/nfs/nfs_vnops.c

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



CVS commit: [netbsd-10] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:33:55 UTC 2023

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

Log Message:
Tickets #489 and #490


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

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

Modified files:

Index: src/doc/CHANGES-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.169 src/doc/CHANGES-10.0:1.1.2.170
--- src/doc/CHANGES-10.0:1.1.2.169	Sun Dec 10 17:26:18 2023
+++ src/doc/CHANGES-10.0	Mon Dec 11 12:33:54 2023
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-10.0,v 1.1.2.169 2023/12/10 17:26:18 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.170 2023/12/11 12:33:54 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -14289,3 +14289,9 @@ usr.bin/systat/vmstat.c1.92
 	systat(1): PR 56014: fix redraw handling.
 	[kre, ticket #489]
 
+sys/nfs/nfs_vnops.c1.325
+
+	NFS client: PR 57691: fix RFC 1813 compliance for
+	READDIR and READDIRPLUS cookie verifiers.
+	[schmonz, ticket #490]
+



CVS commit: [netbsd-10] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:33:55 UTC 2023

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

Log Message:
Tickets #489 and #490


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

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



CVS commit: [netbsd-10] src/sys/nfs

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:32:40 UTC 2023

Modified Files:
src/sys/nfs [netbsd-10]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by schmonz in ticket #490):

sys/nfs/nfs_vnops.c: revision 1.325

NFS client: fix interop with macOS 14 servers.

Symptom: a bunch of "Cannot open `.' (Invalid argument)".
thorpej@ analysis and fix: on the first request to read a given
directory, make sure READDIR and READDIRPLUS cookie verifiers are
being set to 0. This is in RFC1813 and macOS must have gotten
stricter about it.

Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as
well as the original use case in which I met the bug: pkg_rr once again
runs to completion.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.324.4.1 src/sys/nfs/nfs_vnops.c

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

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.324 src/sys/nfs/nfs_vnops.c:1.324.4.1
--- src/sys/nfs/nfs_vnops.c:1.324	Tue May 24 06:28:02 2022
+++ src/sys/nfs/nfs_vnops.c	Mon Dec 11 12:32:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.324 2022/05/24 06:28:02 andvar Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.324.4.1 2023/12/11 12:32:40 martin Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.324 2022/05/24 06:28:02 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.324.4.1 2023/12/11 12:32:40 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -2422,8 +2422,13 @@ nfs_readdirrpc(struct vnode *vp, struct 
 txdr_cookie3(uiop->uio_offset, tl);
 			}
 			tl += 2;
-			*tl++ = dnp->n_cookieverf.nfsuquad[0];
-			*tl++ = dnp->n_cookieverf.nfsuquad[1];
+			if (uiop->uio_offset == 0) {
+*tl++ = 0;
+*tl++ = 0;
+			} else {
+*tl++ = dnp->n_cookieverf.nfsuquad[0];
+*tl++ = dnp->n_cookieverf.nfsuquad[1];
+			}
 		} else
 #endif
 		{
@@ -2632,8 +2637,13 @@ nfs_readdirplusrpc(struct vnode *vp, str
 			txdr_cookie3(uiop->uio_offset, tl);
 		}
 		tl += 2;
-		*tl++ = dnp->n_cookieverf.nfsuquad[0];
-		*tl++ = dnp->n_cookieverf.nfsuquad[1];
+		if (uiop->uio_offset == 0) {
+			*tl++ = 0;
+			*tl++ = 0;
+		} else {
+			*tl++ = dnp->n_cookieverf.nfsuquad[0];
+			*tl++ = dnp->n_cookieverf.nfsuquad[1];
+		}
 		*tl++ = txdr_unsigned(nmp->nm_readdirsize);
 		*tl = txdr_unsigned(nmp->nm_rsize);
 		nfsm_request(dnp, NFSPROC_READDIRPLUS, curlwp, cred);



CVS commit: [netbsd-10] src/sys/nfs

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:32:40 UTC 2023

Modified Files:
src/sys/nfs [netbsd-10]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by schmonz in ticket #490):

sys/nfs/nfs_vnops.c: revision 1.325

NFS client: fix interop with macOS 14 servers.

Symptom: a bunch of "Cannot open `.' (Invalid argument)".
thorpej@ analysis and fix: on the first request to read a given
directory, make sure READDIR and READDIRPLUS cookie verifiers are
being set to 0. This is in RFC1813 and macOS must have gotten
stricter about it.

Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as
well as the original use case in which I met the bug: pkg_rr once again
runs to completion.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.324.4.1 src/sys/nfs/nfs_vnops.c

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



CVS commit: [netbsd-8] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:30:23 UTC 2023

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

Log Message:
Ticket #1926


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.212 -r1.1.2.213 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.212 src/doc/CHANGES-8.3:1.1.2.213
--- src/doc/CHANGES-8.3:1.1.2.212	Sun Dec 10 13:11:59 2023
+++ src/doc/CHANGES-8.3	Mon Dec 11 12:30:22 2023
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.212 2023/12/10 13:11:59 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.213 2023/12/11 12:30:22 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -4136,3 +4136,8 @@ lib/libc/net/sethostent.c			1.21
 	sethostent(3): fix a couple of (not very likely) memory leaks.
 	[kre, ticket #1925]
 
+usr.bin/systat/vmstat.c1.92
+
+	systat(1): PR 56014: fix redraw handling.
+	[kre, ticket #1926]
+



CVS commit: [netbsd-8] src/doc

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:30:23 UTC 2023

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

Log Message:
Ticket #1926


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.212 -r1.1.2.213 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/usr.bin/systat

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:29:30 UTC 2023

Modified Files:
src/usr.bin/systat [netbsd-8]: vmstat.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1926):

usr.bin/systat/vmstat.c: revision 1.92

PR bin/56014 from Kouichi Hashikawa

Don't try to optimise away placing the "s" or " " after "N user"
(" " where N==1, "s" otherwise) when it seems unnecessary, as that
fails when the number of users hasn't changed, but the screen is
being redrawn from nothing (as in after being resumed from a ^Z,
as in the PR, but just doing a ^L would make the same thing happen).


To generate a diff of this commit:
cvs rdiff -u -r1.81.8.2 -r1.81.8.3 src/usr.bin/systat/vmstat.c

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



CVS commit: [netbsd-8] src/usr.bin/systat

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:29:30 UTC 2023

Modified Files:
src/usr.bin/systat [netbsd-8]: vmstat.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1926):

usr.bin/systat/vmstat.c: revision 1.92

PR bin/56014 from Kouichi Hashikawa

Don't try to optimise away placing the "s" or " " after "N user"
(" " where N==1, "s" otherwise) when it seems unnecessary, as that
fails when the number of users hasn't changed, but the screen is
being redrawn from nothing (as in after being resumed from a ^Z,
as in the PR, but just doing a ^L would make the same thing happen).


To generate a diff of this commit:
cvs rdiff -u -r1.81.8.2 -r1.81.8.3 src/usr.bin/systat/vmstat.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/systat/vmstat.c
diff -u src/usr.bin/systat/vmstat.c:1.81.8.2 src/usr.bin/systat/vmstat.c:1.81.8.3
--- src/usr.bin/systat/vmstat.c:1.81.8.2	Wed Jan 30 13:46:25 2019
+++ src/usr.bin/systat/vmstat.c	Mon Dec 11 12:29:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmstat.c,v 1.81.8.2 2019/01/30 13:46:25 martin Exp $	*/
+/*	$NetBSD: vmstat.c,v 1.81.8.3 2023/12/11 12:29:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 1/12/94";
 #endif
-__RCSID("$NetBSD: vmstat.c,v 1.81.8.2 2019/01/30 13:46:25 martin Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.81.8.3 2023/12/11 12:29:30 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -654,19 +654,16 @@ vmstat_zero(char *args)
 static int
 ucount(void)
 {
-	static int onusers = -1;
 	int nusers = 0;
 	struct utmpentry *ehead;
 
 	nusers = getutentries(NULL, );
 
-	if (nusers != onusers) {
-		if (nusers == 1)
-			mvprintw(STATROW, STATCOL + 8, " ");
-		else
-			mvprintw(STATROW, STATCOL + 8, "s");
-	}
-	onusers = nusers;
+	if (nusers == 1)
+		mvprintw(STATROW, STATCOL + 8, " ");
+	else
+		mvprintw(STATROW, STATCOL + 8, "s");
+
 	return (nusers);
 }
 



CVS commit: [netbsd-9] src/usr.bin/systat

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:28:06 UTC 2023

Modified Files:
src/usr.bin/systat [netbsd-9]: vmstat.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1777):

usr.bin/systat/vmstat.c: revision 1.92

PR bin/56014 from Kouichi Hashikawa

Don't try to optimise away placing the "s" or " " after "N user"
(" " where N==1, "s" otherwise) when it seems unnecessary, as that
fails when the number of users hasn't changed, but the screen is
being redrawn from nothing (as in after being resumed from a ^Z,
as in the PR, but just doing a ^L would make the same thing happen).


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.87.2.1 src/usr.bin/systat/vmstat.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/systat/vmstat.c
diff -u src/usr.bin/systat/vmstat.c:1.87 src/usr.bin/systat/vmstat.c:1.87.2.1
--- src/usr.bin/systat/vmstat.c:1.87	Sun Jun 30 19:57:23 2019
+++ src/usr.bin/systat/vmstat.c	Mon Dec 11 12:28:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmstat.c,v 1.87 2019/06/30 19:57:23 he Exp $	*/
+/*	$NetBSD: vmstat.c,v 1.87.2.1 2023/12/11 12:28:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 1/12/94";
 #endif
-__RCSID("$NetBSD: vmstat.c,v 1.87 2019/06/30 19:57:23 he Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.87.2.1 2023/12/11 12:28:06 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -725,19 +725,16 @@ vmstat_zero(char *args)
 static int
 ucount(void)
 {
-	static int onusers = -1;
 	int nusers = 0;
 	struct utmpentry *ehead;
 
 	nusers = getutentries(NULL, );
 
-	if (nusers != onusers) {
-		if (nusers == 1)
-			mvprintw(STATROW, STATCOL + 8, " ");
-		else
-			mvprintw(STATROW, STATCOL + 8, "s");
-	}
-	onusers = nusers;
+	if (nusers == 1)
+		mvprintw(STATROW, STATCOL + 8, " ");
+	else
+		mvprintw(STATROW, STATCOL + 8, "s");
+
 	return (nusers);
 }
 



CVS commit: [netbsd-9] src/usr.bin/systat

2023-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 11 12:28:06 UTC 2023

Modified Files:
src/usr.bin/systat [netbsd-9]: vmstat.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1777):

usr.bin/systat/vmstat.c: revision 1.92

PR bin/56014 from Kouichi Hashikawa

Don't try to optimise away placing the "s" or " " after "N user"
(" " where N==1, "s" otherwise) when it seems unnecessary, as that
fails when the number of users hasn't changed, but the screen is
being redrawn from nothing (as in after being resumed from a ^Z,
as in the PR, but just doing a ^L would make the same thing happen).


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.87.2.1 src/usr.bin/systat/vmstat.c

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



CVS commit: src/tests/dev/audio

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 09:26:08 UTC 2023

Modified Files:
src/tests/dev/audio: audiotest.c

Log Message:
mmap() fails for size == 0 with EINVAL unless the mapping is anonymous.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tests/dev/audio/audiotest.c

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

Modified files:

Index: src/tests/dev/audio/audiotest.c
diff -u src/tests/dev/audio/audiotest.c:1.31 src/tests/dev/audio/audiotest.c:1.32
--- src/tests/dev/audio/audiotest.c:1.31	Thu Aug  3 08:36:38 2023
+++ src/tests/dev/audio/audiotest.c	Mon Dec 11 09:26:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiotest.c,v 1.31 2023/08/03 08:36:38 rin Exp $	*/
+/*	$NetBSD: audiotest.c,v 1.32 2023/12/11 09:26:08 mlelstv Exp $	*/
 
 /*
  * Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: audiotest.c,v 1.31 2023/08/03 08:36:38 rin Exp $");
+__RCSID("$NetBSD: audiotest.c,v 1.32 2023/12/11 09:26:08 mlelstv Exp $");
 
 #include 
 #include 
@@ -2773,13 +2773,13 @@ test_mmap_len(size_t len, off_t offset, 
 	reset_after_mmap();
 }
 #define f(l, o, e)	test_mmap_len(l, o, e)
-DEF(mmap_len_0)	{ f(0,   0,   0); }		/* len is 0 */
+DEF(mmap_len_0)	{ f(0,   0,   EINVAL); }	/* len is 0 */
 DEF(mmap_len_1)	{ f(1,   0,   0); }		/* len is smaller than lsize */
 DEF(mmap_len_2)	{ f(LS,  0,   0); }		/* len is the same as lsize */
 DEF(mmap_len_3)	{ f(LS1, 0,   EOVERFLOW); }	/* len is larger */
 DEF(mmap_len_4)	{ f(0,   -1,  EINVAL); }	/* offset is negative */
-DEF(mmap_len_5)	{ f(0,   LS,  0); }		/* pointless param but ok */
-DEF(mmap_len_6)	{ f(0,   LS1, EOVERFLOW); }	/* exceed */
+DEF(mmap_len_5)	{ f(0,   LS,  EINVAL); }	/* len is 0 */
+DEF(mmap_len_6)	{ f(0,   LS1, EINVAL); }	/* len is 0 */
 DEF(mmap_len_7)	{ f(1,   LS,  EOVERFLOW); }	/* exceed */
 /*
  * When you treat the offset as 32bit, offset will be 0 and thus it



CVS commit: src/tests/dev/audio

2023-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Dec 11 09:26:08 UTC 2023

Modified Files:
src/tests/dev/audio: audiotest.c

Log Message:
mmap() fails for size == 0 with EINVAL unless the mapping is anonymous.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tests/dev/audio/audiotest.c

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