CVS commit: src/usr.bin/vmstat

2022-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb  9 07:51:45 UTC 2022

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

Log Message:
Fix typo in usage.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/usr.bin/vmstat/vmstat.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/vmstat

2022-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb  9 07:51:45 UTC 2022

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

Log Message:
Fix typo in usage.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/usr.bin/vmstat/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/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.250 src/usr.bin/vmstat/vmstat.c:1.251
--- src/usr.bin/vmstat/vmstat.c:1.250	Wed Feb  9 07:34:18 2022
+++ src/usr.bin/vmstat/vmstat.c	Wed Feb  9 07:51:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.250 2022/02/09 07:34:18 mrg Exp $ */
+/* $NetBSD: vmstat.c,v 1.251 2022/02/09 07:51:45 wiz Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007, 2019, 2020
@@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.250 2022/02/09 07:34:18 mrg Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.251 2022/02/09 07:51:45 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -2442,7 +2442,7 @@ usage(void)
 
 	(void)fprintf(stderr,
 	"usage: %s [-CefHiLlmstUvW] [-c count] [-h hashname]\n"
-	"\t\t[-M core] [-N system] [-d diskcount] [-u histname]\n"
+	"\t\t[-M core] [-N system] [-n diskcount] [-u histname]\n"
 	"[-w wait] [disks]\n",
 	getprogname());
 	exit(1);



CVS commit: src/usr.bin/vmstat

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:34:18 UTC 2022

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

Log Message:
allow the number of disks displayed in the default output
to be controlled.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/usr.bin/vmstat/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/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.249 src/usr.bin/vmstat/vmstat.c:1.250
--- src/usr.bin/vmstat/vmstat.c:1.249	Tue Feb  1 09:18:07 2022
+++ src/usr.bin/vmstat/vmstat.c	Wed Feb  9 07:34:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.249 2022/02/01 09:18:07 mrg Exp $ */
+/* $NetBSD: vmstat.c,v 1.250 2022/02/09 07:34:18 mrg Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007, 2019, 2020
@@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.249 2022/02/01 09:18:07 mrg Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.250 2022/02/09 07:34:18 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -329,6 +329,8 @@ static const int vmmeter_mib[] = { CTL_V
 static const int uvmexp2_mib[] = { CTL_VM, VM_UVMEXP2 };
 static const int boottime_mib[] = { CTL_KERN, KERN_BOOTTIME };
 
+int numdisks = 2;
+
 int
 main(int argc, char *argv[])
 {
@@ -343,7 +345,7 @@ main(int argc, char *argv[])
 	reps = todo = verbose = wide = 0;
 	interval.tv_sec = 0;
 	interval.tv_nsec = 0;
-	while ((c = getopt(argc, argv, "Cc:efh:HilLM:mN:stu:UvWw:")) != -1) {
+	while ((c = getopt(argc, argv, "Cc:efh:HilLM:mN:n:stu:UvWw:")) != -1) {
 		switch (c) {
 		case 'c':
 			reps = atoi(optarg);
@@ -381,6 +383,9 @@ main(int argc, char *argv[])
 		case 'N':
 			nlistf = optarg;
 			break;
+		case 'n':
+			numdisks = atoi(optarg);
+			break;
 		case 's':
 			todo |= SUMSTAT;
 			break;
@@ -595,10 +600,10 @@ choosedrives(char **argv)
 	/*
 	 * Pick the most active drives.  Must read the stats once before
 	 * sorting so that there is current IO data, before selecting
-	 * just the first two drives.
+	 * just the first 'numdisks' (default 2) drives.
 	 */
 	drvreadstats();
-	for (i = 0; i < ndrive && ndrives < 2; i++) {
+	for (i = 0; i < ndrive && ndrives < numdisks; i++) {
 		uint64_t high_bytes = 0, bytes;
 
 		k = ndrive;
@@ -2436,7 +2441,9 @@ usage(void)
 {
 
 	(void)fprintf(stderr,
-	"usage: %s [-CefHiLlmstUvW] [-c count] [-h hashname] [-M core] [-N system]\n"
-	"\t\t[-u histname] [-w wait] [disks]\n", getprogname());
+	"usage: %s [-CefHiLlmstUvW] [-c count] [-h hashname]\n"
+	"\t\t[-M core] [-N system] [-d diskcount] [-u histname]\n"
+	"[-w wait] [disks]\n",
+	getprogname());
 	exit(1);
 }



CVS commit: src/usr.bin/vmstat

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:34:18 UTC 2022

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

Log Message:
allow the number of disks displayed in the default output
to be controlled.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/usr.bin/vmstat/vmstat.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/vmstat

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:34:08 UTC 2022

Modified Files:
src/usr.bin/vmstat: vmstat.1

Log Message:
allow the number of disks displayed in the default output
to be controlled.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/vmstat/vmstat.1

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/vmstat/vmstat.1
diff -u src/usr.bin/vmstat/vmstat.1:1.25 src/usr.bin/vmstat/vmstat.1:1.26
--- src/usr.bin/vmstat/vmstat.1:1.25	Mon Dec 13 08:19:12 2021
+++ src/usr.bin/vmstat/vmstat.1	Wed Feb  9 07:34:08 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vmstat.1,v 1.25 2021/12/13 08:19:12 simonb Exp $
+.\"	$NetBSD: vmstat.1,v 1.26 2022/02/09 07:34:08 mrg Exp $
 .\"
 .\" Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,7 +53,7 @@
 .\"
 .\"	@(#)vmstat.8	8.1 (Berkeley) 6/6/93
 .\"
-.Dd December 13, 2021
+.Dd February 1, 2022
 .Dt VMSTAT 1
 .Os
 .Sh NAME
@@ -66,6 +66,7 @@
 .Op Fl h Ar hashname
 .Op Fl M Ar core
 .Op Fl N Ar system
+.Op Fl n Ar diskcount
 .Op Fl u Ar histname
 .Op Fl w Ar wait
 .Op Ar disks
@@ -123,6 +124,10 @@ Report on the list of the kernel memory 
 .It Fl N Ar system
 Extract the name list from the specified system instead of the default
 .Pa /netbsd .
+.It Fl n Ar diskcount
+Display up to
+.Ar diskcount
+disks in the standard output, instead of the default 2.
 .It Fl s
 Display the contents of the
 .Dv uvmexp
@@ -300,7 +305,8 @@ apparent which are recomputed every seco
 .Xr kernhist 9
 .Sh BUGS
 The
-.Fl c
+.Fl c ,
+.Fl n ,
 and
 .Fl w
 options are only available with the default output.



CVS commit: src/usr.bin/vmstat

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:34:08 UTC 2022

Modified Files:
src/usr.bin/vmstat: vmstat.1

Log Message:
allow the number of disks displayed in the default output
to be controlled.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/vmstat/vmstat.1

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



CVS commit: src/sys/dev/usb

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:32:33 UTC 2022

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

Log Message:
if the interrupt pipe can't be opened, also print the error.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/umcs.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/umcs.c
diff -u src/sys/dev/usb/umcs.c:1.17 src/sys/dev/usb/umcs.c:1.18
--- src/sys/dev/usb/umcs.c:1.17	Sat Aug  7 16:19:17 2021
+++ src/sys/dev/usb/umcs.c	Wed Feb  9 07:32:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: umcs.c,v 1.17 2021/08/07 16:19:17 thorpej Exp $ */
+/* $NetBSD: umcs.c,v 1.18 2022/02/09 07:32:33 mrg Exp $ */
 /* $FreeBSD: head/sys/dev/usb/serial/umcs.c 260559 2014-01-12 11:44:28Z hselasky $ */
 
 /*-
@@ -41,7 +41,7 @@
  *
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.17 2021/08/07 16:19:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.18 2022/02/09 07:32:33 mrg Exp $");
 
 #include 
 #include 
@@ -283,7 +283,7 @@ umcs7840_attach(device_t parent, device_
 		sc->sc_intr_buflen, umcs7840_intr, 100);
 	if (error) {
 		aprint_error_dev(self, "cannot open interrupt pipe "
-		"(addr %d)\n", intr_addr);
+		"(addr %d): error %d\n", intr_addr, error);
 		sc->sc_dying = true;
 		return;
 	}



CVS commit: src/sys/dev/usb

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:32:33 UTC 2022

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

Log Message:
if the interrupt pipe can't be opened, also print the error.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/umcs.c

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



CVS commit: src/external/mit/xorg/bin/xsetwallpaper

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:30:35 UTC 2022

Modified Files:
src/external/mit/xorg/bin/xsetwallpaper: Makefile

Log Message:
fix the build of xsetwallpaper.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/xsetwallpaper/Makefile

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



CVS commit: src/external/mit/xorg/bin/xsetwallpaper

2022-02-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb  9 07:30:35 UTC 2022

Modified Files:
src/external/mit/xorg/bin/xsetwallpaper: Makefile

Log Message:
fix the build of xsetwallpaper.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/xsetwallpaper/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/xsetwallpaper/Makefile
diff -u src/external/mit/xorg/bin/xsetwallpaper/Makefile:1.2 src/external/mit/xorg/bin/xsetwallpaper/Makefile:1.3
--- src/external/mit/xorg/bin/xsetwallpaper/Makefile:1.2	Thu Mar 22 23:46:26 2012
+++ src/external/mit/xorg/bin/xsetwallpaper/Makefile	Wed Feb  9 07:30:35 2022
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2012/03/22 23:46:26 joerg Exp $
-
-NOMAN=		# defined
+#	$NetBSD: Makefile,v 1.3 2022/02/09 07:30:35 mrg Exp $
 
 .include 
 
@@ -12,7 +10,7 @@ CPPFLAGS+=	-I${NETBSDSRCDIR}/sys -I${NET
 
 SRCPATH=${X11SRCDIR.local}/programs/xsetwallpaper
 
-LDADD+=		-lm -lX11
+LDADD+=		-lm -lX11 -lXpm
 DPADD+=		${LIBM} ${LIBX11}
 
 .PATH:		${X11SRCDIR.local}/programs/xsetwallpaper



CVS commit: src/usr.bin/make

2022-02-08 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Feb  8 22:36:02 UTC 2022

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

Log Message:
Use a variable to store command line to be filtered.

This avoids any nasty side effects from content of command line.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/meta.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/meta.c
diff -u src/usr.bin/make/meta.c:1.196 src/usr.bin/make/meta.c:1.197
--- src/usr.bin/make/meta.c:1.196	Fri Feb  4 23:22:19 2022
+++ src/usr.bin/make/meta.c	Tue Feb  8 22:36:02 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.196 2022/02/04 23:22:19 rillig Exp $ */
+/*  $NetBSD: meta.c,v 1.197 2022/02/08 22:36:02 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1048,36 +1048,31 @@ append_if_new(StringList *list, const ch
 Lst_Append(list, bmake_strdup(str));
 }
 
+/* A "reserved" variable to store the command to be filtered */
+#define META_CMD_FILTER_VAR ".MAKE.cmd_filtered"
+
 static char *
-meta_filter_cmd(Buffer *buf, GNode *gn, char *s)
+meta_filter_cmd(GNode *gn, char *s)
 {
-Buf_Clear(buf);
-Buf_AddStr(buf, "${");
-Buf_AddStr(buf, s);
-Buf_AddStr(buf, ":L:${" MAKE_META_CMP_FILTER ":ts:}}");
-Var_Subst(buf->data, gn, VARE_WANTRES, );
+Var_Set(gn, META_CMD_FILTER_VAR, s);
+Var_Subst("${" META_CMD_FILTER_VAR ":${" MAKE_META_CMP_FILTER ":ts:}}", gn, VARE_WANTRES, );
 return s;
 }
 
 static int
 meta_cmd_cmp(GNode *gn, char *a, char *b, bool filter)
 {
-static bool once = false;
-static Buffer buf;
 int rc;
 
 rc = strcmp(a, b);
 if (rc == 0 || !filter)
 	return rc;
-if (!once) {
-	once = true;
-	Buf_Init();
-}
-a = meta_filter_cmd(, gn, a);
-b = meta_filter_cmd(, gn, b);
+a = meta_filter_cmd(gn, a);
+b = meta_filter_cmd(gn, b);
 rc = strcmp(a, b);
 free(a);
 free(b);
+Var_Delete(gn, META_CMD_FILTER_VAR);
 return rc;
 }
 



CVS commit: src/usr.bin/make

2022-02-08 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Feb  8 22:36:02 UTC 2022

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

Log Message:
Use a variable to store command line to be filtered.

This avoids any nasty side effects from content of command line.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/meta.c

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



CVS commit: src/lib/libedit

2022-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  8 21:13:22 UTC 2022

Modified Files:
src/lib/libedit: chared.c histedit.h

Log Message:
libedit: fix typos, apply KNF to newly imported code (PR/56693)

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/lib/libedit/chared.c
cvs rdiff -u -r1.60 -r1.61 src/lib/libedit/histedit.h

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



CVS commit: src/lib/libedit

2022-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  8 21:13:22 UTC 2022

Modified Files:
src/lib/libedit: chared.c histedit.h

Log Message:
libedit: fix typos, apply KNF to newly imported code (PR/56693)

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/lib/libedit/chared.c
cvs rdiff -u -r1.60 -r1.61 src/lib/libedit/histedit.h

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

Modified files:

Index: src/lib/libedit/chared.c
diff -u src/lib/libedit/chared.c:1.61 src/lib/libedit/chared.c:1.62
--- src/lib/libedit/chared.c:1.61	Tue Feb  8 15:05:10 2022
+++ src/lib/libedit/chared.c	Tue Feb  8 21:13:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.c,v 1.61 2022/02/08 15:05:10 christos Exp $	*/
+/*	$NetBSD: chared.c,v 1.62 2022/02/08 21:13:22 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)chared.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: chared.c,v 1.61 2022/02/08 15:05:10 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.62 2022/02/08 21:13:22 rillig Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -625,29 +625,29 @@ el_deletestr(EditLine *el, int n)
 }
 
 /* el_deletestr1():
- *	Delete characters between starn and end
+ *	Delete characters between start and end
  */
 int
 el_deletestr1(EditLine *el, int start, int end)
 {
-	size_t line_lenght, len;
-	wchar_t * p1, * p2;
+	size_t line_length, len;
+	wchar_t *p1, *p2;
 
 	if (end <= start)
 		return 0;
 
-	line_lenght = (size_t) (el->el_line.lastchar - el->el_line.buffer);
+	line_length = (size_t)(el->el_line.lastchar - el->el_line.buffer);
 
-	if (start >= (int) line_lenght || end >= (int) line_lenght)
+	if (start >= (int)line_length || end >= (int)line_length)
 		return 0;
 
-	len = (size_t) (end - start);
-	if (len > line_lenght - (size_t) end)
-		len = line_lenght - (size_t) end;
+	len = (size_t)(end - start);
+	if (len > line_length - (size_t)end)
+		len = line_length - (size_t)end;
 
 	p1 = el->el_line.buffer + start;
 	p2 = el->el_line.buffer + end;
-	for (size_t i = 0; i < len; i++){
+	for (size_t i = 0; i < len; i++) {
 		*p1++ = *p2++;
 		el->el_line.lastchar--;
 	}

Index: src/lib/libedit/histedit.h
diff -u src/lib/libedit/histedit.h:1.60 src/lib/libedit/histedit.h:1.61
--- src/lib/libedit/histedit.h:1.60	Tue Feb  8 15:05:10 2022
+++ src/lib/libedit/histedit.h	Tue Feb  8 21:13:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.h,v 1.60 2022/02/08 15:05:10 christos Exp $	*/
+/*	$NetBSD: histedit.h,v 1.61 2022/02/08 21:13:22 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -179,8 +179,8 @@ void		 el_resize(EditLine *);
 const LineInfo	*el_line(EditLine *);
 int		 el_insertstr(EditLine *, const char *);
 void		 el_deletestr(EditLine *, int);
-int		 el_replacestr(EditLine *el, const char *str);
-int		 el_deletestr1(EditLine *el, int start, int end);
+int		 el_replacestr(EditLine *, const char *);
+int		 el_deletestr1(EditLine *, int, int);
 
 /*
  *  History 



CVS commit: src/bin/sh

2022-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  8 20:39:59 UTC 2022

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

Log Message:
sh: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/bin/sh/histedit.c

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

Modified files:

Index: src/bin/sh/histedit.c
diff -u src/bin/sh/histedit.c:1.60 src/bin/sh/histedit.c:1.61
--- src/bin/sh/histedit.c:1.60	Wed Feb  2 01:21:34 2022
+++ src/bin/sh/histedit.c	Tue Feb  8 20:39:59 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.c,v 1.60 2022/02/02 01:21:34 kre Exp $	*/
+/*	$NetBSD: histedit.c,v 1.61 2022/02/08 20:39:59 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)histedit.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: histedit.c,v 1.60 2022/02/02 01:21:34 kre Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.61 2022/02/08 20:39:59 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -133,7 +133,7 @@ histedit(void)
 			 * This odd piece of code doesn't affect the shell
 			 * at all, the environment modified here is the
 			 * stuff accessed via "environ" (the incoming
-			 * envoironment to the shell) which is only ever
+			 * environment to the shell) which is only ever
 			 * touched at sh startup time (long before we get
 			 * here) and ignored thereafter.
 			 *



CVS commit: src/bin/sh

2022-02-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Feb  8 20:39:59 UTC 2022

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

Log Message:
sh: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/bin/sh/histedit.c

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



CVS commit: src/lib/libedit

2022-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  8 15:05:10 UTC 2022

Modified Files:
src/lib/libedit: chared.c histedit.h readline.c
src/lib/libedit/readline: readline.h

Log Message:
PR/56693: Walter Lozano: Add support for rl_delete_text and rl_set_key


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/lib/libedit/chared.c
cvs rdiff -u -r1.59 -r1.60 src/lib/libedit/histedit.h
cvs rdiff -u -r1.171 -r1.172 src/lib/libedit/readline.c
cvs rdiff -u -r1.51 -r1.52 src/lib/libedit/readline/readline.h

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

Modified files:

Index: src/lib/libedit/chared.c
diff -u src/lib/libedit/chared.c:1.60 src/lib/libedit/chared.c:1.61
--- src/lib/libedit/chared.c:1.60	Tue Jan 11 13:30:15 2022
+++ src/lib/libedit/chared.c	Tue Feb  8 10:05:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.c,v 1.60 2022/01/11 18:30:15 christos Exp $	*/
+/*	$NetBSD: chared.c,v 1.61 2022/02/08 15:05:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)chared.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: chared.c,v 1.60 2022/01/11 18:30:15 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.61 2022/02/08 15:05:10 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -624,6 +624,40 @@ el_deletestr(EditLine *el, int n)
 		el->el_line.cursor = el->el_line.buffer;
 }
 
+/* el_deletestr1():
+ *	Delete characters between starn and end
+ */
+int
+el_deletestr1(EditLine *el, int start, int end)
+{
+	size_t line_lenght, len;
+	wchar_t * p1, * p2;
+
+	if (end <= start)
+		return 0;
+
+	line_lenght = (size_t) (el->el_line.lastchar - el->el_line.buffer);
+
+	if (start >= (int) line_lenght || end >= (int) line_lenght)
+		return 0;
+
+	len = (size_t) (end - start);
+	if (len > line_lenght - (size_t) end)
+		len = line_lenght - (size_t) end;
+
+	p1 = el->el_line.buffer + start;
+	p2 = el->el_line.buffer + end;
+	for (size_t i = 0; i < len; i++){
+		*p1++ = *p2++;
+		el->el_line.lastchar--;
+	}
+
+	if (el->el_line.cursor < el->el_line.buffer)
+		el->el_line.cursor = el->el_line.buffer;
+
+	return end - start;
+}
+
 /* el_wreplacestr():
  *	Replace the contents of the line with the provided string
  */

Index: src/lib/libedit/histedit.h
diff -u src/lib/libedit/histedit.h:1.59 src/lib/libedit/histedit.h:1.60
--- src/lib/libedit/histedit.h:1.59	Tue Jan 11 13:30:15 2022
+++ src/lib/libedit/histedit.h	Tue Feb  8 10:05:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.h,v 1.59 2022/01/11 18:30:15 christos Exp $	*/
+/*	$NetBSD: histedit.h,v 1.60 2022/02/08 15:05:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -180,7 +180,7 @@ const LineInfo	*el_line(EditLine *);
 int		 el_insertstr(EditLine *, const char *);
 void		 el_deletestr(EditLine *, int);
 int		 el_replacestr(EditLine *el, const char *str);
-
+int		 el_deletestr1(EditLine *el, int start, int end);
 
 /*
  *  History 

Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.171 src/lib/libedit/readline.c:1.172
--- src/lib/libedit/readline.c:1.171	Mon Jan 31 09:44:49 2022
+++ src/lib/libedit/readline.c	Tue Feb  8 10:05:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.171 2022/01/31 14:44:49 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.172 2022/02/08 15:05:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.171 2022/01/31 14:44:49 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.172 2022/02/08 15:05:10 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 
@@ -2339,6 +2339,16 @@ rl_replace_line(const char * text, int c
 	el_replacestr(e, text);
 }
 
+int
+rl_delete_text(int start, int end)
+{
+
+	if (h == NULL || e == NULL)
+		rl_initialize();
+
+	return el_deletestr1(e, start, end);
+}
+
 void
 rl_get_screen_size(int *rows, int *cols)
 {
@@ -2510,6 +2520,14 @@ rl_bind_key_in_map(int key __attribute__
 	return 0;
 }
 
+int
+rl_set_key(const char *keyseq  __attribute__((__unused__)),
+	rl_command_func_t *function __attribute__((__unused__)),
+	Keymap k __attribute__((__unused__)))
+{
+	return 0;
+}
+
 /* unsupported, but needed by python */
 void
 rl_cleanup_after_signal(void)

Index: src/lib/libedit/readline/readline.h
diff -u src/lib/libedit/readline/readline.h:1.51 src/lib/libedit/readline/readline.h:1.52
--- src/lib/libedit/readline/readline.h:1.51	Mon Jan 31 09:44:49 2022
+++ src/lib/libedit/readline/readline.h	Tue Feb  8 10:05:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.h,v 1.51 2022/01/31 14:44:49 christos Exp $	*/
+/*	$NetBSD: readline.h,v 1.52 2022/02/08 15:05:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -236,6 +236,7 @@ int		 rl_crlf(void);
 int		 rl_ding(void);
 char 		*rl_copy_text(int, int);
 void		 rl_replace_line(const char *, int);
+int		 

CVS commit: src/lib/libedit

2022-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  8 15:05:10 UTC 2022

Modified Files:
src/lib/libedit: chared.c histedit.h readline.c
src/lib/libedit/readline: readline.h

Log Message:
PR/56693: Walter Lozano: Add support for rl_delete_text and rl_set_key


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/lib/libedit/chared.c
cvs rdiff -u -r1.59 -r1.60 src/lib/libedit/histedit.h
cvs rdiff -u -r1.171 -r1.172 src/lib/libedit/readline.c
cvs rdiff -u -r1.51 -r1.52 src/lib/libedit/readline/readline.h

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



CVS commit: [netbsd-9] src/doc

2022-02-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  8 14:45:58 UTC 2022

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

Log Message:
Ticket #1426


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.74 -r1.1.2.75 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.74 src/doc/CHANGES-9.3:1.1.2.75
--- src/doc/CHANGES-9.3:1.1.2.74	Thu Feb  3 14:20:20 2022
+++ src/doc/CHANGES-9.3	Tue Feb  8 14:45:57 2022
@@ -1,4 +1,4 @@
-29~# $NetBSD: CHANGES-9.3,v 1.1.2.74 2022/02/03 14:20:20 martin Exp $
+29~# $NetBSD: CHANGES-9.3,v 1.1.2.75 2022/02/08 14:45:57 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1472,3 +1472,10 @@ xsrc/external/mit/xterm/dist/graphics_si
 	Apply upstream fix for CVE-2022-24130.
 	[mrg, ticket #1425]
 
+sys/dev/ata/ata_recovery.c			1.3
+sys/dev/ata/ata_subr.c1.9
+
+	PR 54790: stop xfer timeouts during recovery, all xfers will be
+	requeued anyway.
+	[jdolecek, ticket #1426]
+



CVS commit: [netbsd-9] src/doc

2022-02-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  8 14:45:58 UTC 2022

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

Log Message:
Ticket #1426


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.74 -r1.1.2.75 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/dev/ata

2022-02-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  8 14:45:00 UTC 2022

Modified Files:
src/sys/dev/ata [netbsd-9]: ata_recovery.c ata_subr.c

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #1426):

sys/dev/ata/ata_recovery.c: revision 1.3
sys/dev/ata/ata_subr.c: revision 1.9

stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing

should fix PR kern/54790 by Izumi Tsutsui


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/sys/dev/ata/ata_recovery.c
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/ata/ata_subr.c

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/dev/ata

2022-02-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  8 14:45:00 UTC 2022

Modified Files:
src/sys/dev/ata [netbsd-9]: ata_recovery.c ata_subr.c

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #1426):

sys/dev/ata/ata_recovery.c: revision 1.3
sys/dev/ata/ata_subr.c: revision 1.9

stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing

should fix PR kern/54790 by Izumi Tsutsui


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/sys/dev/ata/ata_recovery.c
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/ata/ata_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/ata/ata_recovery.c
diff -u src/sys/dev/ata/ata_recovery.c:1.2 src/sys/dev/ata/ata_recovery.c:1.2.8.1
--- src/sys/dev/ata/ata_recovery.c:1.2	Mon Oct 22 20:13:47 2018
+++ src/sys/dev/ata/ata_recovery.c	Tue Feb  8 14:45:00 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_recovery.c,v 1.2 2018/10/22 20:13:47 jdolecek Exp $	*/
+/*	$NetBSD: ata_recovery.c,v 1.2.8.1 2022/02/08 14:45:00 martin Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata_recovery.c,v 1.2 2018/10/22 20:13:47 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_recovery.c,v 1.2.8.1 2022/02/08 14:45:00 martin Exp $");
 
 #include "opt_ata.h"
 
@@ -171,6 +171,9 @@ ata_recovery_resume(struct ata_channel *
 
 	ata_queue_hold(chp);
 
+	/* Stop the timeout callout, recovery will requeue once done */
+	callout_stop(>c_timo_callout);
+
 	KASSERT(drive < chp->ch_ndrives);
 	drvp = >ch_drive[drive];
 

Index: src/sys/dev/ata/ata_subr.c
diff -u src/sys/dev/ata/ata_subr.c:1.8 src/sys/dev/ata/ata_subr.c:1.8.4.1
--- src/sys/dev/ata/ata_subr.c:1.8	Wed Nov  7 17:05:54 2018
+++ src/sys/dev/ata/ata_subr.c	Tue Feb  8 14:45:00 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $	*/
+/*	$NetBSD: ata_subr.c,v 1.8.4.1 2022/02/08 14:45:00 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.8.4.1 2022/02/08 14:45:00 martin Exp $");
 
 #include "opt_ata.h"
 
@@ -235,6 +235,11 @@ ata_timeout(void *v)
 
 	callout_ack(>c_timo_callout);
 
+	if (chp->ch_flags & ATACH_RECOVERING) {
+		/* Do nothing, recovery will requeue the xfers */
+		return;
+	}
+
 	/*
 	 * If there is a timeout, means the last enqueued command
 	 * timed out, and thus all commands timed out.



CVS commit: src/sys/kern

2022-02-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Feb  8 12:59:17 UTC 2022

Modified Files:
src/sys/kern: subr_pcu.c subr_psref.c subr_thmap.c

Log Message:
kern: Mark some functions __diagused to pacify clang.

These functions are called only in KASSERT.  This shouldn't be a
problem since the recent change to make KASSERT compile (but not run)
the expression, via sizeof, so the functions are referenced -- which
I did in order to avoid having #ifdefs and regular build breakage
because someone forgot to build with or without DIAGNOSTIC.  But
apparently clang decided to make it a problem.

Maybe we should just set -Wno-unneeded-internal-declaration -- not
clear it flags any real problems, but it takes effort to research
because apparently clang has no documentation about what else it does
or why anyone decided this is objectionable enough to turn it on by
default.  (The only documentation it seems to have, two example
warning messages with no elaboration at
,
seems to indicate it is mixed up with warning about static non-inline
functions in header files.)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_pcu.c
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_psref.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_thmap.c

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

Modified files:

Index: src/sys/kern/subr_pcu.c
diff -u src/sys/kern/subr_pcu.c:1.25 src/sys/kern/subr_pcu.c:1.26
--- src/sys/kern/subr_pcu.c:1.25	Sat Jan  1 15:10:53 2022
+++ src/sys/kern/subr_pcu.c	Tue Feb  8 12:59:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pcu.c,v 1.25 2022/01/01 15:10:53 christos Exp $	*/
+/*	$NetBSD: subr_pcu.c,v 1.26 2022/02/08 12:59:16 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011, 2014 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.25 2022/01/01 15:10:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.26 2022/02/08 12:59:16 riastradh Exp $");
 
 #include 
 #include 
@@ -91,7 +91,7 @@ extern const pcu_ops_t * const pcu_ops_m
 /*
  * pcu_available_p: true if lwp is allowed to use PCU state.
  */
-static inline bool
+static inline bool __diagused
 pcu_available_p(struct lwp *l)
 {
 

Index: src/sys/kern/subr_psref.c
diff -u src/sys/kern/subr_psref.c:1.16 src/sys/kern/subr_psref.c:1.17
--- src/sys/kern/subr_psref.c:1.16	Fri Dec 31 14:19:57 2021
+++ src/sys/kern/subr_psref.c	Tue Feb  8 12:59:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_psref.c,v 1.16 2021/12/31 14:19:57 riastradh Exp $	*/
+/*	$NetBSD: subr_psref.c,v 1.17 2022/02/08 12:59:16 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_psref.c,v 1.16 2021/12/31 14:19:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_psref.c,v 1.17 2022/02/08 12:59:16 riastradh Exp $");
 
 #include 
 #include 
@@ -170,7 +170,7 @@ psref_class_create(const char *name, int
 	return class;
 }
 
-static void
+static void __diagused
 psref_cpu_drained_p(void *p, void *cookie, struct cpu_info *ci __unused)
 {
 	const struct psref_cpu *pcpu = p;

Index: src/sys/kern/subr_thmap.c
diff -u src/sys/kern/subr_thmap.c:1.8 src/sys/kern/subr_thmap.c:1.9
--- src/sys/kern/subr_thmap.c:1.8	Fri Dec 31 14:19:57 2021
+++ src/sys/kern/subr_thmap.c	Tue Feb  8 12:59:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_thmap.c,v 1.8 2021/12/31 14:19:57 riastradh Exp $	*/
+/*	$NetBSD: subr_thmap.c,v 1.9 2022/02/08 12:59:16 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 Mindaugas Rasiukevicius 
@@ -112,7 +112,7 @@
 #include "utils.h"
 #endif
 
-THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.8 2021/12/31 14:19:57 riastradh Exp $");
+THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.9 2022/02/08 12:59:16 riastradh Exp $");
 
 #include 
 
@@ -256,7 +256,7 @@ static const thmap_ops_t thmap_default_o
  * NODE LOCKING.
  */
 
-static inline bool
+static inline bool __diagused
 node_locked_p(thmap_inode_t *node)
 {
 	return (atomic_load_relaxed(>state) & NODE_LOCKED) != 0;



CVS commit: src/sys/kern

2022-02-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Feb  8 12:59:17 UTC 2022

Modified Files:
src/sys/kern: subr_pcu.c subr_psref.c subr_thmap.c

Log Message:
kern: Mark some functions __diagused to pacify clang.

These functions are called only in KASSERT.  This shouldn't be a
problem since the recent change to make KASSERT compile (but not run)
the expression, via sizeof, so the functions are referenced -- which
I did in order to avoid having #ifdefs and regular build breakage
because someone forgot to build with or without DIAGNOSTIC.  But
apparently clang decided to make it a problem.

Maybe we should just set -Wno-unneeded-internal-declaration -- not
clear it flags any real problems, but it takes effort to research
because apparently clang has no documentation about what else it does
or why anyone decided this is objectionable enough to turn it on by
default.  (The only documentation it seems to have, two example
warning messages with no elaboration at
,
seems to indicate it is mixed up with warning about static non-inline
functions in header files.)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_pcu.c
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_psref.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_thmap.c

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



CVS commit: src/sys/kern

2022-02-08 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Feb  8 08:57:11 UTC 2022

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

Log Message:
Operation vfs_suspend() returns ENOENT if the mount is gone (IMNT_GONE).

Adjust the KASSERT() appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/kern/vfs_vnode.c

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



CVS commit: src/sys/kern

2022-02-08 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Feb  8 08:57:11 UTC 2022

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

Log Message:
Operation vfs_suspend() returns ENOENT if the mount is gone (IMNT_GONE).

Adjust the KASSERT() appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/kern/vfs_vnode.c

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

Modified files:

Index: src/sys/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.128 src/sys/kern/vfs_vnode.c:1.129
--- src/sys/kern/vfs_vnode.c:1.128	Wed Oct 20 03:08:18 2021
+++ src/sys/kern/vfs_vnode.c	Tue Feb  8 08:57:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.128 2021/10/20 03:08:18 thorpej Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.129 2022/02/08 08:57:11 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.128 2021/10/20 03:08:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.129 2022/02/08 08:57:11 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -1117,7 +1117,7 @@ vrevoke_suspend_next(struct mount *lastm
 	if (error == 0)
 		return thismp;
 
-	KASSERT(error == EOPNOTSUPP);
+	KASSERT(error == EOPNOTSUPP || error == ENOENT);
 	return NULL;
 }