Re: CVS commit: src/tests/fs/vfs

2022-02-01 Thread David Holland
On Wed, Feb 02, 2022 at 05:43:45AM +0700, Robert Elz wrote:
 >   | Test mkdir(2) with one or more trailing slashes - this currently fails
 >   | for v7fs.
 > 
 > As it should I think, trailing slashes are not simply deleted in v7fs.
 >
 > [...]
 > 
 > If this was ever changed, it would not truly be a v7fs any more.

v7fs isn't a compat interface for old users, it's a compat interface
for old disk images :-)

-- 
David A. Holland
dholl...@netbsd.org


CVS commit: src/sys/external/bsd/ipf/netinet

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 05:40:59 UTC 2022

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_nat.c

Log Message:
s/Incluse/Include/


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/ipf/netinet/ip_nat.c

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



CVS commit: src/sys/external/bsd/ipf/netinet

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 05:40:59 UTC 2022

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_nat.c

Log Message:
s/Incluse/Include/


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/ipf/netinet/ip_nat.c

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

Modified files:

Index: src/sys/external/bsd/ipf/netinet/ip_nat.c
diff -u src/sys/external/bsd/ipf/netinet/ip_nat.c:1.25 src/sys/external/bsd/ipf/netinet/ip_nat.c:1.26
--- src/sys/external/bsd/ipf/netinet/ip_nat.c:1.25	Tue Sep 21 14:50:53 2021
+++ src/sys/external/bsd/ipf/netinet/ip_nat.c	Wed Feb  2 05:40:58 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_nat.c,v 1.25 2021/09/21 14:50:53 christos Exp $	*/
+/*	$NetBSD: ip_nat.c,v 1.26 2022/02/02 05:40:58 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -112,7 +112,7 @@ extern struct ifnet vpnif;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.25 2021/09/21 14:50:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.26 2022/02/02 05:40:58 msaitoh Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c	1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -1734,7 +1734,7 @@ ipf_nat_getsz(ipf_main_softc_t *softc, v
 	}
 
 	/*
-	 * Incluse any space required for proxy data structures.
+	 * Include any space required for proxy data structures.
 	 */
 	ng.ng_sz = sizeof(nat_save_t);
 	aps = nat->nat_aps;



CVS commit: [netbsd-9] src/doc

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 04:26:39 UTC 2022

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

Log Message:
ticket #1422


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.71 -r1.1.2.72 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.71 src/doc/CHANGES-9.3:1.1.2.72
--- src/doc/CHANGES-9.3:1.1.2.71	Tue Feb  1 11:42:18 2022
+++ src/doc/CHANGES-9.3	Wed Feb  2 04:26:39 2022
@@ -1,4 +1,4 @@
-29~# $NetBSD: CHANGES-9.3,v 1.1.2.71 2022/02/01 11:42:18 martin Exp $
+29~# $NetBSD: CHANGES-9.3,v 1.1.2.72 2022/02/02 04:26:39 msaitoh Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1399,3 +1399,57 @@ sys/dev/scsipi/cd.c1.351
 	PR 56109: limit the buffer size for a device capabilities requests.
 	[reinoud, ticket #1421]
 
+usr.sbin/sysinst/arch/acorn32/md.c		1.8
+usr.sbin/sysinst/arch/alpha/md.c		1.10
+usr.sbin/sysinst/arch/amiga/md.c		1.7
+usr.sbin/sysinst/arch/arc/md.c			1.14
+usr.sbin/sysinst/arch/atari/md.c		1.8
+usr.sbin/sysinst/arch/bebox/md.c		1.10
+usr.sbin/sysinst/arch/cats/md.c			1.6
+usr.sbin/sysinst/arch/cobalt/md.c		1.15
+usr.sbin/sysinst/arch/dummy/md.c		1.7
+usr.sbin/sysinst/arch/emips/md.c		1.10
+usr.sbin/sysinst/arch/evbarm/md.c		1.22
+usr.sbin/sysinst/arch/evbmips/md.c		1.10
+usr.sbin/sysinst/arch/evbppc/md.c		1.10
+usr.sbin/sysinst/arch/evbsh3/md.c		1.7
+usr.sbin/sysinst/arch/ews4800mips/md.c		1.8
+usr.sbin/sysinst/arch/hp300/md.c		1.12
+usr.sbin/sysinst/arch/hpcarm/md.c		1.11
+usr.sbin/sysinst/arch/hpcmips/md.c		1.10
+usr.sbin/sysinst/arch/hpcsh/md.c		1.11
+usr.sbin/sysinst/arch/hppa/md.c			1.9
+usr.sbin/sysinst/arch/i386/md.c			1.34
+usr.sbin/sysinst/arch/landisk/md.c		1.15
+usr.sbin/sysinst/arch/luna68k/md.c		1.10
+usr.sbin/sysinst/arch/mac68k/md.c		1.11
+usr.sbin/sysinst/arch/macppc/md.c		1.7
+usr.sbin/sysinst/arch/mipsco/md.c		1.9
+usr.sbin/sysinst/arch/mvme68k/md.c		1.12
+usr.sbin/sysinst/arch/news68k/md.c		1.8
+usr.sbin/sysinst/arch/newsmips/md.c		1.7
+usr.sbin/sysinst/arch/ofppc/md.c		1.13
+usr.sbin/sysinst/arch/playstation2/md.c		1.10
+usr.sbin/sysinst/arch/pmax/md.c			1.9
+usr.sbin/sysinst/arch/prep/md.c			1.14
+usr.sbin/sysinst/arch/sandpoint/md.c		1.10
+usr.sbin/sysinst/arch/sgimips/md.c		1.10
+usr.sbin/sysinst/arch/shark/md.c		1.7
+usr.sbin/sysinst/arch/sparc/md.c		1.7
+usr.sbin/sysinst/arch/sparc64/md.c		1.7
+usr.sbin/sysinst/arch/vax/md.c			1.8
+usr.sbin/sysinst/arch/x68k/md.c			1.12
+usr.sbin/sysinst/arch/zaurus/md.c		1.12
+usr.sbin/sysinst/defs.h1.77-1.79
+usr.sbin/sysinst/gpt.c1.27-1.28
+usr.sbin/sysinst/install.c			1.22
+usr.sbin/sysinst/main.c1.28
+usr.sbin/sysinst/target.c			1.16-1.17
+usr.sbin/sysinst/upgrade.c			1.19
+usr.sbin/sysinst/util.c1.64
+
+	sysinst: on x86 make sure to update the bootloader when upgrading
+	existing installations.
+	Clean up temporary wedges used during extraction/installation.
+	[martin, ticket #1422]
+



CVS commit: [netbsd-9] src/doc

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 04:26:39 UTC 2022

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

Log Message:
ticket #1422


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.71 -r1.1.2.72 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/usr.sbin/sysinst

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 04:25:41 UTC 2022

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: defs.h gpt.c install.c main.c target.c
upgrade.c util.c
src/usr.sbin/sysinst/arch/acorn32 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/alpha [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/amiga [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/atari [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cats [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/dummy [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/emips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbsh3 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hppa [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/luna68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mac68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/macppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mipsco [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/news68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/newsmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/pmax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sgimips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/shark [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sparc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sparc64 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/vax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/x68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1422):
usr.sbin/sysinst/util.c: revision 1.64
usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.11
usr.sbin/sysinst/arch/alpha/md.c: revision 1.10
usr.sbin/sysinst/arch/sparc64/md.c: revision 1.7
usr.sbin/sysinst/arch/emips/md.c: revision 1.10
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.15
usr.sbin/sysinst/arch/x68k/md.c: revision 1.12
usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.10
usr.sbin/sysinst/arch/luna68k/md.c: revision 1.10
usr.sbin/sysinst/arch/hp300/md.c: revision 1.12
usr.sbin/sysinst/arch/vax/md.c: revision 1.8
usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.10
usr.sbin/sysinst/target.c: revision 1.16
usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.12
usr.sbin/sysinst/arch/arc/md.c: revision 1.14
usr.sbin/sysinst/target.c: revision 1.17
usr.sbin/sysinst/arch/i386/md.c: revision 1.34
usr.sbin/sysinst/arch/mac68k/md.c: revision 1.11
usr.sbin/sysinst/arch/atari/md.c: revision 1.8
usr.sbin/sysinst/arch/sgimips/md.c: revision 1.10
usr.sbin/sysinst/arch/acorn32/md.c: revision 1.8
usr.sbin/sysinst/install.c: revision 1.22
usr.sbin/sysinst/arch/amiga/md.c: revision 1.7
usr.sbin/sysinst/arch/cats/md.c: revision 1.6
usr.sbin/sysinst/arch/dummy/md.c: revision 1.7
usr.sbin/sysinst/arch/shark/md.c: revision 1.7
usr.sbin/sysinst/arch/pmax/md.c: revision 1.9
usr.sbin/sysinst/arch/newsmips/md.c: revision 1.7
usr.sbin/sysinst/arch/mipsco/md.c: revision 1.9
usr.sbin/sysinst/arch/landisk/md.c: revision 1.15
usr.sbin/sysinst/arch/hppa/md.c: revision 1.9
usr.sbin/sysinst/arch/prep/md.c: revision 1.14
usr.sbin/sysinst/defs.h: revision 1.77
usr.sbin/sysinst/arch/ofppc/md.c: revision 1.13
usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.8
usr.sbin/sysinst/defs.h: revision 1.78
usr.sbin/sysinst/arch/macppc/md.c: revision 1.7
usr.sbin/sysinst/arch/evbppc/md.c: revision 1.10
usr.sbin/sysinst/defs.h: revision 1.79
usr.sbin/sysinst/gpt.c: revision 1.27
usr.sbin/sysinst/arch/bebox/md.c: revision 1.10
usr.sbin/sysinst/gpt.c: revision 1.28
usr.sbin/sysinst/arch/sparc/md.c: r

CVS commit: [netbsd-9] src/usr.sbin/sysinst

2022-02-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  2 04:25:41 UTC 2022

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: defs.h gpt.c install.c main.c target.c
upgrade.c util.c
src/usr.sbin/sysinst/arch/acorn32 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/alpha [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/amiga [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/atari [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cats [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/dummy [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/emips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbsh3 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hppa [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/luna68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mac68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/macppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mipsco [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/news68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/newsmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/pmax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sgimips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/shark [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sparc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sparc64 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/vax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/x68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1422):
usr.sbin/sysinst/util.c: revision 1.64
usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.11
usr.sbin/sysinst/arch/alpha/md.c: revision 1.10
usr.sbin/sysinst/arch/sparc64/md.c: revision 1.7
usr.sbin/sysinst/arch/emips/md.c: revision 1.10
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.15
usr.sbin/sysinst/arch/x68k/md.c: revision 1.12
usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.10
usr.sbin/sysinst/arch/luna68k/md.c: revision 1.10
usr.sbin/sysinst/arch/hp300/md.c: revision 1.12
usr.sbin/sysinst/arch/vax/md.c: revision 1.8
usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.10
usr.sbin/sysinst/target.c: revision 1.16
usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.12
usr.sbin/sysinst/arch/arc/md.c: revision 1.14
usr.sbin/sysinst/target.c: revision 1.17
usr.sbin/sysinst/arch/i386/md.c: revision 1.34
usr.sbin/sysinst/arch/mac68k/md.c: revision 1.11
usr.sbin/sysinst/arch/atari/md.c: revision 1.8
usr.sbin/sysinst/arch/sgimips/md.c: revision 1.10
usr.sbin/sysinst/arch/acorn32/md.c: revision 1.8
usr.sbin/sysinst/install.c: revision 1.22
usr.sbin/sysinst/arch/amiga/md.c: revision 1.7
usr.sbin/sysinst/arch/cats/md.c: revision 1.6
usr.sbin/sysinst/arch/dummy/md.c: revision 1.7
usr.sbin/sysinst/arch/shark/md.c: revision 1.7
usr.sbin/sysinst/arch/pmax/md.c: revision 1.9
usr.sbin/sysinst/arch/newsmips/md.c: revision 1.7
usr.sbin/sysinst/arch/mipsco/md.c: revision 1.9
usr.sbin/sysinst/arch/landisk/md.c: revision 1.15
usr.sbin/sysinst/arch/hppa/md.c: revision 1.9
usr.sbin/sysinst/arch/prep/md.c: revision 1.14
usr.sbin/sysinst/defs.h: revision 1.77
usr.sbin/sysinst/arch/ofppc/md.c: revision 1.13
usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.8
usr.sbin/sysinst/defs.h: revision 1.78
usr.sbin/sysinst/arch/macppc/md.c: revision 1.7
usr.sbin/sysinst/arch/evbppc/md.c: revision 1.10
usr.sbin/sysinst/defs.h: revision 1.79
usr.sbin/sysinst/gpt.c: revision 1.27
usr.sbin/sysinst/arch/bebox/md.c: revision 1.10
usr.sbin/sysinst/gpt.c: revision 1.28
usr.sbin/sysinst/arch/sparc/md.c: r

CVS commit: src/bin/sh

2022-02-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Feb  2 01:21:34 UTC 2022

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

Log Message:
After (a few days short of) 21 years, revert 1.25, which did nothing except
make the -e option to "fc" fail to work (the commit message was about some
other changes entirely, so I an only assume this was committed by mistake).

It says a lot about the use of the fc command that no-one noticed that
this did not work properly for all this time.

Internally in sh, it is possible for built in commands to use either
getopt(3) (from libc) or the much simpler internal shell nextopt() routine
for option (flag) parsing.However it makes no sense to use getopt()
and then access a global variable set only by nextopt() instead of the
one getopt() sets (which is what the code had used previously, forever).

Use the correct variable again.

XXX pullup -9 -8  (-7 -6 -5 ...)


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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.59 src/bin/sh/histedit.c:1.60
--- src/bin/sh/histedit.c:1.59	Mon Jan 31 18:15:45 2022
+++ src/bin/sh/histedit.c	Wed Feb  2 01:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.c,v 1.59 2022/01/31 18:15:45 kre Exp $	*/
+/*	$NetBSD: histedit.c,v 1.60 2022/02/02 01:21:34 kre 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.59 2022/01/31 18:15:45 kre Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.60 2022/02/02 01:21:34 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -318,7 +318,7 @@ histcmd(volatile int argc, char ** volat
 	  (ch = getopt(argc, argv, ":e:lnrs")) != -1)
 		switch ((char)ch) {
 		case 'e':
-			editor = optionarg;
+			editor = optarg;
 			break;
 		case 'l':
 			lflg = 1;



CVS commit: src/bin/sh

2022-02-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Feb  2 01:21:34 UTC 2022

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

Log Message:
After (a few days short of) 21 years, revert 1.25, which did nothing except
make the -e option to "fc" fail to work (the commit message was about some
other changes entirely, so I an only assume this was committed by mistake).

It says a lot about the use of the fc command that no-one noticed that
this did not work properly for all this time.

Internally in sh, it is possible for built in commands to use either
getopt(3) (from libc) or the much simpler internal shell nextopt() routine
for option (flag) parsing.However it makes no sense to use getopt()
and then access a global variable set only by nextopt() instead of the
one getopt() sets (which is what the code had used previously, forever).

Use the correct variable again.

XXX pullup -9 -8  (-7 -6 -5 ...)


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

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



Re: CVS commit: src/tests/fs/vfs

2022-02-01 Thread Robert Elz
Date:Tue, 1 Feb 2022 18:27:24 +
From:"Martin Husemann" 
Message-ID:  <20220201182724.90f82f...@cvs.netbsd.org>

  | Test mkdir(2) with one or more trailing slashes - this currently fails
  | for v7fs.

As it should I think, trailing slashes are not simply deleted in v7fs.

If you do

mkdir /path/to/dir/

in a v7 fs, then you're guaranteed (unless some other error happens earlier)
either ENOENT if /path/to/dir doesn't already exist, ENOTDIR if it it does
but isn't a directory, or EEXIST if it exists and is a directory.   The thing
to be created always follows the final slash, everything prior to that is
path to look up, and must all exist and be directories (with appropriate
permissions, etc).In this case the "thing" is "" which is (kind of) an
alias for "." (without ever actually looking up ".").   It can never not
exist if the preceding path all exists.

If this was ever changed, it would not truly be a v7fs any more.

kre

ps: I never understood the fascination with always writing directory names
with a trailing / - it seems to come largely from filename completion
where the '/' is added if the name found is a directory, so you can just
go on typing anything that is to follow in the path (but could easily be
removed again if no more components are added - just isn't) but it makes
no sense for this to have happened with mkdir, filename completion can
only find files that exist, not ones to be created, so it couldn't be that
which adds the '/' after the directory name - some human must be doing
that, but why?  It seems to be to be just meaningless extra unneeded typing.




CVS commit: src/tests/fs/vfs

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 18:27:24 UTC 2022

Modified Files:
src/tests/fs/vfs: t_vnops.c

Log Message:
Test mkdir(2) with one or more trailing slashes - this currently fails
for v7fs.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/tests/fs/vfs/t_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/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.61 src/tests/fs/vfs/t_vnops.c:1.62
--- src/tests/fs/vfs/t_vnops.c:1.61	Thu Sep 16 21:29:42 2021
+++ src/tests/fs/vfs/t_vnops.c	Tue Feb  1 18:27:24 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.61 2021/09/16 21:29:42 andvar Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.62 2022/02/01 18:27:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -175,6 +175,45 @@ dir_simple(const atf_tc_t *tc, const cha
 }
 
 static void
+do_dir_slash(const atf_tc_t *tc, const char *mountpath, const char *addend)
+{
+	char plain[MAXPATHLEN], with_slash[MAXPATHLEN];
+	struct stat sb;
+
+	USES_DIRS;
+
+	/* check we can create directories with one or more / appended */
+	snprintf(plain, sizeof(plain), "%s/dir%s", mountpath, addend);
+	snprintf(with_slash, sizeof(with_slash), "%s/dir/", mountpath);
+	if (rump_sys_mkdir(with_slash, 0777) == -1)
+		atf_tc_fail_errno("mkdir");
+	if (rump_sys_stat(plain, &sb) == -1)
+		atf_tc_fail_errno("stat new directory");
+	if (rump_sys_rmdir(plain) == -1)
+		atf_tc_fail_errno("rmdir");
+	if (rump_sys_stat(with_slash, &sb) != -1 || errno != ENOENT)
+		atf_tc_fail("ENOENT expected from stat");
+}
+
+static void
+dir_slash(const atf_tc_t *tc, const char *mountpath)
+{
+	do_dir_slash(tc, mountpath, "/");
+}
+
+static void
+dir_2slash(const atf_tc_t *tc, const char *mountpath)
+{
+	do_dir_slash(tc, mountpath, "//");
+}
+
+static void
+dir_3slash(const atf_tc_t *tc, const char *mountpath)
+{
+	do_dir_slash(tc, mountpath, "///");
+}
+
+static void
 dir_notempty(const atf_tc_t *tc, const char *mountpath)
 {
 	char pb[MAXPATHLEN], pb2[MAXPATHLEN];
@@ -1026,6 +1065,9 @@ lstat_symlink(const atf_tc_t *tc, const 
 ATF_TC_FSAPPLY(lookup_simple, "simple lookup (./.. on root)");
 ATF_TC_FSAPPLY(lookup_complex, "lookup of non-dot entries");
 ATF_TC_FSAPPLY(dir_simple, "mkdir/rmdir");
+ATF_TC_FSAPPLY(dir_slash, "mkdir with appended slash");
+ATF_TC_FSAPPLY(dir_2slash, "mkdir with two slashes appended");
+ATF_TC_FSAPPLY(dir_3slash, "mkdir with three slashes appended");
 ATF_TC_FSAPPLY(dir_notempty, "non-empty directories cannot be removed");
 ATF_TC_FSAPPLY(dir_rmdirdotdot, "remove .. and try to cd out (PR kern/44657)");
 ATF_TC_FSAPPLY(rename_dir, "exercise various directory renaming ops "
@@ -1058,6 +1100,9 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(dir_simple);
 	ATF_TP_FSAPPLY(dir_notempty);
 	ATF_TP_FSAPPLY(dir_rmdirdotdot);
+	ATF_TP_FSAPPLY(dir_slash);
+	ATF_TP_FSAPPLY(dir_2slash);
+	ATF_TP_FSAPPLY(dir_3slash);
 	ATF_TP_FSAPPLY(rename_dir);
 	ATF_TP_FSAPPLY(rename_dotdot);
 	ATF_TP_FSAPPLY(rename_reg_nodir);



CVS commit: src/tests/fs/vfs

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 18:27:24 UTC 2022

Modified Files:
src/tests/fs/vfs: t_vnops.c

Log Message:
Test mkdir(2) with one or more trailing slashes - this currently fails
for v7fs.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/tests/fs/vfs/t_vnops.c

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



CVS commit: src/sys/fs/v7fs

2022-02-01 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Feb  1 17:12:24 UTC 2022

Modified Files:
src/sys/fs/v7fs: v7fs_vnops.c

Log Message:
fix spelling of "regular" in comment


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/v7fs/v7fs_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/fs/v7fs/v7fs_vnops.c
diff -u src/sys/fs/v7fs/v7fs_vnops.c:1.32 src/sys/fs/v7fs/v7fs_vnops.c:1.33
--- src/sys/fs/v7fs/v7fs_vnops.c:1.32	Wed Oct 20 03:08:18 2021
+++ src/sys/fs/v7fs/v7fs_vnops.c	Tue Feb  1 17:12:24 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: v7fs_vnops.c,v 1.32 2021/10/20 03:08:18 thorpej Exp $	*/
+/*	$NetBSD: v7fs_vnops.c,v 1.33 2022/02/01 17:12:24 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.32 2021/10/20 03:08:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.33 2022/02/01 17:12:24 jakllsch Exp $");
 #if defined _KERNEL_OPT
 #include "opt_v7fs.h"
 #endif
@@ -144,7 +144,7 @@ v7fs_lookup(void *v)
 		return 0;
 	}
 
-	/* ".." and reguler file. */
+	/* ".." and regular file. */
 	if ((error = v7fs_file_lookup_by_name(fs, parent, name, &ino))) {
 		/* Not found. Tell this entry be able to allocate. */
 		if (((nameiop == CREATE) || (nameiop == RENAME)) && islastcn) {



CVS commit: src/sys/fs/v7fs

2022-02-01 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Feb  1 17:12:24 UTC 2022

Modified Files:
src/sys/fs/v7fs: v7fs_vnops.c

Log Message:
fix spelling of "regular" in comment


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/v7fs/v7fs_vnops.c

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



CVS commit: src/doc

2022-02-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  1 12:10:04 UTC 2022

Modified Files:
src/doc: 3RDPARTY

Log Message:
expat 2.4.4 out (security fix release)


To generate a diff of this commit:
cvs rdiff -u -r1.1833 -r1.1834 src/doc/3RDPARTY

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



CVS commit: src/doc

2022-02-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  1 12:10:04 UTC 2022

Modified Files:
src/doc: 3RDPARTY

Log Message:
expat 2.4.4 out (security fix release)


To generate a diff of this commit:
cvs rdiff -u -r1.1833 -r1.1834 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1833 src/doc/3RDPARTY:1.1834
--- src/doc/3RDPARTY:1.1833	Wed Jan 26 19:19:13 2022
+++ src/doc/3RDPARTY	Tue Feb  1 12:10:04 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1833 2022/01/26 19:19:13 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1834 2022/02/01 12:10:04 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -409,7 +409,7 @@ Notes:
 
 Package:	expat
 Version:	2.2.8
-Current Vers:	2.4.3
+Current Vers:	2.4.4
 Maintainer:	Expat Project
 Archive Site:	https://github.com/libexpat/libexpat/releases
 Home Page:	http://www.libexpat.org/



CVS commit: [netbsd-9] src/doc

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:42:19 UTC 2022

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

Log Message:
Tickets #1420 and #1421


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.70 -r1.1.2.71 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.70 src/doc/CHANGES-9.3:1.1.2.71
--- src/doc/CHANGES-9.3:1.1.2.70	Mon Jan 31 17:56:28 2022
+++ src/doc/CHANGES-9.3	Tue Feb  1 11:42:18 2022
@@ -1,4 +1,4 @@
-29~# $NetBSD: CHANGES-9.3,v 1.1.2.70 2022/01/31 17:56:28 martin Exp $
+29~# $NetBSD: CHANGES-9.3,v 1.1.2.71 2022/02/01 11:42:18 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1382,3 +1382,20 @@ sys/arch/x86/x86/procfs_machdep.c		1.43-
 	- Modify linux mapping. Not used on NetBSD.
 	[msaitoh, ticket #1419]
 
+sys/dev/pci/ixgbe/ixgbe.c			1.264,1.269,1.272,
+		1.306 via patch
+
+	Four INTx related fixes:
+	- Fix a bug that the all interrupt sources are enabled when the
+	  interface is UP and the INTx line is shared with other devices.
+	- Fix a bug that it might incorrectly enable interrupt when
+	  IFF_RUNNING is not set.
+	- Don't process TX/RX if a queue interrupt isn't occurred.
+	- Increment legacy interrupt counter after checking INTx sharing.
+	[msaitoh, ticket #1420]
+
+sys/dev/scsipi/cd.c1.351
+
+	PR 56109: limit the buffer size for a device capabilities requests.
+	[reinoud, ticket #1421]
+



CVS commit: [netbsd-9] src/doc

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:42:19 UTC 2022

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

Log Message:
Tickets #1420 and #1421


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.70 -r1.1.2.71 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/scsipi

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:41:29 UTC 2022

Modified Files:
src/sys/dev/scsipi [netbsd-9]: cd.c

Log Message:
Pull up following revision(s) (requested by reinoud in ticket #1421):

sys/dev/scsipi/cd.c: revision 1.351

Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.


To generate a diff of this commit:
cvs rdiff -u -r1.342.4.2 -r1.342.4.3 src/sys/dev/scsipi/cd.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/scsipi/cd.c
diff -u src/sys/dev/scsipi/cd.c:1.342.4.2 src/sys/dev/scsipi/cd.c:1.342.4.3
--- src/sys/dev/scsipi/cd.c:1.342.4.2	Thu Feb 11 12:53:28 2021
+++ src/sys/dev/scsipi/cd.c	Tue Feb  1 11:41:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd.c,v 1.342.4.2 2021/02/11 12:53:28 martin Exp $	*/
+/*	$NetBSD: cd.c,v 1.342.4.3 2022/02/01 11:41:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.342.4.2 2021/02/11 12:53:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.342.4.3 2022/02/01 11:41:29 martin Exp $");
 
 #include 
 #include 
@@ -2695,15 +2695,13 @@ mmc_getdiscinfo(struct scsipi_periph *pe
 	struct scsipi_get_conf_feature   *gcf;
 	struct scsipi_read_discinfo   di_cmd;
 	struct scsipi_read_discinfo_data  di __aligned(2);
-	const uint32_t buffer_size = 1024;
-	uint32_t feat_tbl_len, pos;
+	const uint32_t buffer_size = 0x200; /* XXX RPZ USB3 SCSI size issue */
+	uint32_t pos;
 	u_long   last_lba = 0;
 	uint8_t  *buffer, *fpos;
 	int feature, last_feature, features_len, feature_cur, feature_len;
 	int lsb, msb, error, flags;
 
-	feat_tbl_len = buffer_size;
-
 	buffer = malloc(buffer_size, M_TEMP, M_WAITOK);
 
 	/* initialise structure */
@@ -2748,12 +2746,12 @@ mmc_getdiscinfo(struct scsipi_periph *pe
 		memset(&gc_cmd, 0, sizeof(gc_cmd));
 		gc_cmd.opcode = GET_CONFIGURATION;
 		_lto2b(last_feature, gc_cmd.start_at_feature);
-		_lto2b(feat_tbl_len, gc_cmd.data_len);
-		memset(gc, 0, feat_tbl_len);
+		_lto2b(buffer_size, gc_cmd.data_len);
+		memset(gc, 0, buffer_size);
 
 		error = scsipi_command(periph,
 			(void *)&gc_cmd, sizeof(gc_cmd),
-			(void *) gc, feat_tbl_len,
+			(void *) gc, buffer_size,
 			CDRETRIES, 3, NULL, flags);
 		if (error) {
 			/* ieeek... break out of loop... i dunno what to do */
@@ -2761,7 +2759,7 @@ mmc_getdiscinfo(struct scsipi_periph *pe
 		}
 
 		features_len = _4btol(gc->data_len);
-		if (features_len < 4 || features_len > feat_tbl_len)
+		if (features_len < 4 || features_len > buffer_size)
 			break;
 
 		pos  = 0;



CVS commit: [netbsd-9] src/sys/dev/scsipi

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:41:29 UTC 2022

Modified Files:
src/sys/dev/scsipi [netbsd-9]: cd.c

Log Message:
Pull up following revision(s) (requested by reinoud in ticket #1421):

sys/dev/scsipi/cd.c: revision 1.351

Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.


To generate a diff of this commit:
cvs rdiff -u -r1.342.4.2 -r1.342.4.3 src/sys/dev/scsipi/cd.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

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:40:02 UTC 2022

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

Log Message:
Ticket #1734


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 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.119 src/doc/CHANGES-8.3:1.1.2.120
--- src/doc/CHANGES-8.3:1.1.2.119	Mon Jan 31 17:59:40 2022
+++ src/doc/CHANGES-8.3	Tue Feb  1 11:40:02 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.119 2022/01/31 17:59:40 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.120 2022/02/01 11:40:02 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2526,3 +2526,15 @@ sys/arch/x86/x86/procfs_machdep.c		1.43-
 	- Modify linux mapping. Not used on NetBSD.
 	[msaitoh, ticket #1733]
 
+sys/dev/pci/ixgbe/ixgbe.c			1.264,1.269,1.272,
+		1.306 via patch
+
+	Four INTx related fixes:
+	- Fix a bug that the all interrupt sources are enabled when the
+	  interface is UP and the INTx line is shared with other devices.
+	- Fix a bug that it might incorrectly enable interrupt when
+	  IFF_RUNNING is not set.
+	- Don't process TX/RX if a queue interrupt isn't occurred.
+	- Increment legacy interrupt counter after checking INTx sharing.
+	[msaitoh, ticket #1734]
+



CVS commit: [netbsd-8] src/doc

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:40:02 UTC 2022

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

Log Message:
Ticket #1734


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 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/sys/dev/pci/ixgbe

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:38:29 UTC 2022

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1734:

sys/dev/pci/ixgbe/ixgbe.c   1.264,1.269,1.272,
1.306 via patch

Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
  interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
  IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.48 -r1.88.2.49 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.48 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.49
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.48	Mon Jan 31 17:38:36 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Tue Feb  1 11:38:29 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.48 2022/01/31 17:38:36 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.49 2022/02/01 11:38:29 martin Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.48 2022/01/31 17:38:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.49 2022/02/01 11:38:29 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -5074,28 +5074,34 @@ ixgbe_legacy_irq(void *arg)
 	struct ix_queue *que = arg;
 	struct adapter	*adapter = que->adapter;
 	struct ixgbe_hw	*hw = &adapter->hw;
-	struct ifnet	*ifp = adapter->ifp;
 	struct		tx_ring *txr = adapter->tx_rings;
 	bool		more = false;
 	u32		eicr, eicr_mask;
+	u32		eims_orig;
 
-	/* Silicon errata #26 on 82598 */
+	eims_orig = IXGBE_READ_REG(hw, IXGBE_EIMS);
+	/*
+	 * Silicon errata #26 on 82598. Disable all interrupts before reading
+	 * EICR.
+	 */
 	IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK);
 
 	eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
 
-	adapter->stats.pf.legint.ev_count++;
-	++que->irqs.ev_count;
 	if (eicr == 0) {
 		adapter->stats.pf.intzero.ev_count++;
-		if ((ifp->if_flags & IFF_UP) != 0)
-			ixgbe_enable_intr(adapter);
+		IXGBE_WRITE_REG(hw, IXGBE_EIMS, eims_orig);
 		return 0;
 	}
+	adapter->stats.pf.legint.ev_count++;
+
+	/* Queue (0) intr */
+	if ((eicr & IXGBE_EIMC_RTX_QUEUE) != 0) {
+		++que->irqs.ev_count;
 
-	if ((ifp->if_flags & IFF_RUNNING) != 0) {
 		/*
-		 * The same as ixgbe_msix_que() about "que->txrx_use_workqueue".
+		 * The same as ixgbe_msix_que() about
+		 * "que->txrx_use_workqueue".
 		 */
 		que->txrx_use_workqueue = adapter->txrx_use_workqueue;
 



CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:38:29 UTC 2022

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1734:

sys/dev/pci/ixgbe/ixgbe.c   1.264,1.269,1.272,
1.306 via patch

Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
  interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
  IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.


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

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:35:46 UTC 2022

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1420:

sys/dev/pci/ixgbe/ixgbe.c   1.264,1.269,1.272,
1.306 via patch

Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
  interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
  IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.18 -r1.199.2.19 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.18 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.19
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.18	Mon Jan 31 17:36:25 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Tue Feb  1 11:35:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.18 2022/01/31 17:36:25 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.19 2022/02/01 11:35:45 martin Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.18 2022/01/31 17:36:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.19 2022/02/01 11:35:45 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -5115,28 +5115,34 @@ ixgbe_legacy_irq(void *arg)
 	struct ix_queue *que = arg;
 	struct adapter	*adapter = que->adapter;
 	struct ixgbe_hw	*hw = &adapter->hw;
-	struct ifnet	*ifp = adapter->ifp;
 	struct		tx_ring *txr = adapter->tx_rings;
 	bool		more = false;
 	u32		eicr, eicr_mask;
+	u32		eims_orig;
 
-	/* Silicon errata #26 on 82598 */
+	eims_orig = IXGBE_READ_REG(hw, IXGBE_EIMS);
+	/*
+	 * Silicon errata #26 on 82598. Disable all interrupts before reading
+	 * EICR.
+	 */
 	IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK);
 
 	eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
 
-	adapter->stats.pf.legint.ev_count++;
-	++que->irqs.ev_count;
 	if (eicr == 0) {
 		adapter->stats.pf.intzero.ev_count++;
-		if ((ifp->if_flags & IFF_UP) != 0)
-			ixgbe_enable_intr(adapter);
+		IXGBE_WRITE_REG(hw, IXGBE_EIMS, eims_orig);
 		return 0;
 	}
+	adapter->stats.pf.legint.ev_count++;
+
+	/* Queue (0) intr */
+	if ((eicr & IXGBE_EIMC_RTX_QUEUE) != 0) {
+		++que->irqs.ev_count;
 
-	if ((ifp->if_flags & IFF_RUNNING) != 0) {
 		/*
-		 * The same as ixgbe_msix_que() about "que->txrx_use_workqueue".
+		 * The same as ixgbe_msix_que() about
+		 * "que->txrx_use_workqueue".
 		 */
 		que->txrx_use_workqueue = adapter->txrx_use_workqueue;
 



CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe

2022-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb  1 11:35:46 UTC 2022

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1420:

sys/dev/pci/ixgbe/ixgbe.c   1.264,1.269,1.272,
1.306 via patch

Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
  interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
  IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.18 -r1.199.2.19 src/sys/dev/pci/ixgbe/ixgbe.c

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



CVS commit: src/usr.sbin/cpuctl

2022-02-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  1 10:45:02 UTC 2022

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

Log Message:
allow "cpuN" as well as "N" to specific a CPU.

update usage to include a change i made from 2015 to allow multiple
CPUs to be operated on at the same time for most commands.


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

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

Modified files:

Index: src/usr.sbin/cpuctl/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.31 src/usr.sbin/cpuctl/cpuctl.c:1.32
--- src/usr.sbin/cpuctl/cpuctl.c:1.31	Tue Apr 21 02:56:37 2020
+++ src/usr.sbin/cpuctl/cpuctl.c	Tue Feb  1 10:45:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuctl.c,v 1.31 2020/04/21 02:56:37 msaitoh Exp $	*/
+/*	$NetBSD: cpuctl.c,v 1.32 2022/02/01 10:45:02 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2012, 2015 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include 
-__RCSID("$NetBSD: cpuctl.c,v 1.31 2020/04/21 02:56:37 msaitoh Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.32 2022/02/01 10:45:02 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -132,12 +132,12 @@ usage(void)
 {
 	const char *progname = getprogname();
 
-	fprintf(stderr, "usage: %s identify cpuno\n", progname);
+	fprintf(stderr, "usage: %s identify cpuno [cpuno ..]\n", progname);
 	fprintf(stderr, "   %s list\n", progname);
-	fprintf(stderr, "   %s offline cpuno\n", progname);
-	fprintf(stderr, "   %s online cpuno\n", progname);
-	fprintf(stderr, "   %s intr cpuno\n", progname);
-	fprintf(stderr, "   %s nointr cpuno\n", progname);
+	fprintf(stderr, "   %s offline cpuno [cpuno ..]\n", progname);
+	fprintf(stderr, "   %s online cpuno [cpuno ..]\n", progname);
+	fprintf(stderr, "   %s intr cpuno [cpuno ..]\n", progname);
+	fprintf(stderr, "   %s nointr cpuno [cpuno ..]\n", progname);
 	fprintf(stderr, "   %s ucode [cpuno] [file]\n", progname);
 	exit(EXIT_FAILURE);
 	/* NOTREACHED */
@@ -296,6 +296,9 @@ getcpuid(char *arg)
 	u_int id;
 	long np;
 
+	if (strncmp(arg, "cpu", 3) == 0)
+		arg += 3;
+
 	id = (u_int)strtoul(arg, &argp, 0);
 	if (*argp != '\0')
 		usage();



CVS commit: src/usr.sbin/cpuctl

2022-02-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  1 10:45:02 UTC 2022

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

Log Message:
allow "cpuN" as well as "N" to specific a CPU.

update usage to include a change i made from 2015 to allow multiple
CPUs to be operated on at the same time for most commands.


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

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



CVS commit: src/usr.bin/vmstat

2022-02-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  1 09:18:07 UTC 2022

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

Log Message:
when picking which 2 disks to show in the 'vmstat' default output
and they haven't been specified on the command line, pick the two
devices that have had the largest read+write IO bytes count.


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 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.248 src/usr.bin/vmstat/vmstat.c:1.249
--- src/usr.bin/vmstat/vmstat.c:1.248	Sat Nov 27 22:16:42 2021
+++ src/usr.bin/vmstat/vmstat.c	Tue Feb  1 09:18:07 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.248 2021/11/27 22:16:42 rillig Exp $ */
+/* $NetBSD: vmstat.c,v 1.249 2022/02/01 09:18:07 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.248 2021/11/27 22:16:42 rillig Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.249 2022/02/01 09:18:07 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -569,7 +569,7 @@ getnlist(int todo)
 char **
 choosedrives(char **argv)
 {
-	size_t i;
+	size_t i, j, k;
 
 	/*
 	 * Choose drives to be displayed.  Priority goes to (in order) drives
@@ -591,11 +591,30 @@ choosedrives(char **argv)
 			break;
 		}
 	}
+
+	/*
+	 * 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.
+	 */
+	drvreadstats();
 	for (i = 0; i < ndrive && ndrives < 2; i++) {
-		if (drv_select[i])
-			continue;
-		drv_select[i] = 1;
-		++ndrives;
+		uint64_t high_bytes = 0, bytes;
+
+		k = ndrive;
+		for (j = 0; j < ndrive; j++) {
+			if (drv_select[j])
+continue;
+			bytes = cur.rbytes[j] + cur.wbytes[j];
+			if (bytes > high_bytes) {
+high_bytes = bytes;
+k = j;
+			}
+		}
+		if (k != ndrive) {
+			drv_select[k] = 1;
+			++ndrives;
+		}
 	}
 
 	return (argv);



CVS commit: src/usr.bin/vmstat

2022-02-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  1 09:18:07 UTC 2022

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

Log Message:
when picking which 2 disks to show in the 'vmstat' default output
and they haven't been specified on the command line, pick the two
devices that have had the largest read+write IO bytes count.


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 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/sys/arch/arm/sociox

2022-02-01 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  1 09:08:33 UTC 2022

Modified Files:
src/sys/arch/arm/sociox: files.sociox

Log Message:
retire SocioNext AVE 32/64 GbE driver


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/sociox/files.sociox

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/sociox/files.sociox
diff -u src/sys/arch/arm/sociox/files.sociox:1.10 src/sys/arch/arm/sociox/files.sociox:1.11
--- src/sys/arch/arm/sociox/files.sociox:1.10	Fri Dec  3 05:21:52 2021
+++ src/sys/arch/arm/sociox/files.sociox	Tue Feb  1 09:08:33 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sociox,v 1.10 2021/12/03 05:21:52 nisimura Exp $
+#	$NetBSD: files.sociox,v 1.11 2022/02/01 09:08:33 nisimura Exp $
 #
 # Configuration info for Socionext SC2A11
 #
@@ -10,11 +10,6 @@ attach	scx at acpinodebus with scx_acpi
 attach	scx at fdt with scx_fdt
 file	arch/arm/sociox/if_scx.c		scx
 
-# Unifier AVE GbE
-device	ave: ether, ifnet, arp, mii, bus_dma_generic
-attach	ave at fdt with ave_fdt
-file	arch/arm/sociox/if_ave.c		ave
-
 # Socionext eMMC
 device	sniemmc: sdmmcbus
 attach	sniemmc at acpinodebus with sniemmc_acpi



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

2022-02-01 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  1 09:08:33 UTC 2022

Modified Files:
src/sys/arch/arm/sociox: files.sociox

Log Message:
retire SocioNext AVE 32/64 GbE driver


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/sociox/files.sociox

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

2022-02-01 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  1 08:58:25 UTC 2022

Removed Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
retire SocioNext AVE 32/64 GbE driver


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r0 src/sys/arch/arm/sociox/if_ave.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/sociox

2022-02-01 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  1 08:58:25 UTC 2022

Removed Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
retire SocioNext AVE 32/64 GbE driver


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r0 src/sys/arch/arm/sociox/if_ave.c

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