CVS commit: src/sys/netinet

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 03:02:30 UTC 2023

Modified Files:
src/sys/netinet: in.h

Log Message:
White space fixes. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/netinet/in.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/netinet/in.h
diff -u src/sys/netinet/in.h:1.114 src/sys/netinet/in.h:1.115
--- src/sys/netinet/in.h:1.114	Wed Feb  3 18:13:13 2021
+++ src/sys/netinet/in.h	Fri Jun 16 03:02:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.h,v 1.114 2021/02/03 18:13:13 roy Exp $	*/
+/*	$NetBSD: in.h,v 1.115 2023/06/16 03:02:30 rin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -107,7 +107,7 @@ typedef __sa_family_t	sa_family_t;
 #define	IPPROTO_CARP		112		/* Common Address Resolution Protocol */
 #define	IPPROTO_L2TP		115		/* L2TPv3 */
 #define	IPPROTO_SCTP		132		/* SCTP */
-#define IPPROTO_PFSYNC  240 /* PFSYNC */
+#define IPPROTO_PFSYNC		240		/* PFSYNC */
 #define	IPPROTO_RAW		255		/* raw IP packet */
 #define	IPPROTO_MAX		256
 
@@ -353,22 +353,22 @@ struct ip_mreq {
 #define	IPCTL_ALLOWSRCRT	7	/* allow/drop all source-routed pkts */
 #define	IPCTL_SUBNETSARELOCAL	8	/* treat subnets as local addresses */
 #define	IPCTL_MTUDISC		9	/* allow path MTU discovery */
-#define	IPCTL_ANONPORTMIN  10	/* minimum ephemeral port */
-#define	IPCTL_ANONPORTMAX  11	/* maximum ephemeral port */
-#define	IPCTL_MTUDISCTIMEOUT   12	/* allow path MTU discovery */
-#define	IPCTL_MAXFLOWS 13	/* maximum ip flows allowed */
-#define	IPCTL_HOSTZEROBROADCAST 14	/* is host zero a broadcast addr? */
-#define	IPCTL_GIF_TTL 	   15	/* default TTL for gif encap packet */
-#define	IPCTL_LOWPORTMIN   16	/* minimum reserved port */
-#define	IPCTL_LOWPORTMAX   17	/* maximum reserved port */
-#define	IPCTL_MAXFRAGPACKETS   18	/* max packets reassembly queue */
-#define	IPCTL_GRE_TTL  19	/* default TTL for gre encap packet */
-#define	IPCTL_CHECKINTERFACE   20	/* drop pkts in from 'wrong' iface */
-#define	IPCTL_IFQ	   21	/* IP packet input queue */
-#define	IPCTL_RANDOMID	   22	/* use random IP ids (if configured) */
-#define	IPCTL_LOOPBACKCKSUM23	/* do IP checksum on loopback */
+#define	IPCTL_ANONPORTMIN	10	/* minimum ephemeral port */
+#define	IPCTL_ANONPORTMAX	11	/* maximum ephemeral port */
+#define	IPCTL_MTUDISCTIMEOUT	12	/* allow path MTU discovery */
+#define	IPCTL_MAXFLOWS		13	/* maximum ip flows allowed */
+#define	IPCTL_HOSTZEROBROADCAST	14	/* is host zero a broadcast addr? */
+#define	IPCTL_GIF_TTL		15	/* default TTL for gif encap packet */
+#define	IPCTL_LOWPORTMIN	16	/* minimum reserved port */
+#define	IPCTL_LOWPORTMAX	17	/* maximum reserved port */
+#define	IPCTL_MAXFRAGPACKETS	18	/* max packets reassembly queue */
+#define	IPCTL_GRE_TTL		19	/* default TTL for gre encap packet */
+#define	IPCTL_CHECKINTERFACE	20	/* drop pkts in from 'wrong' iface */
+#define	IPCTL_IFQ		21	/* IP packet input queue */
+#define	IPCTL_RANDOMID		22	/* use random IP ids (if configured) */
+#define	IPCTL_LOOPBACKCKSUM	23	/* do IP checksum on loopback */
 #define	IPCTL_STATS		24	/* IP statistics */
-#define	IPCTL_DAD_COUNT25	/* DAD packets to send */
+#define	IPCTL_DAD_COUNT		25	/* DAD packets to send */
 
 #endif /* _NETBSD_SOURCE */
 



CVS commit: src/sys/netinet

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 03:02:30 UTC 2023

Modified Files:
src/sys/netinet: in.h

Log Message:
White space fixes. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/netinet/in.h

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



CVS commit: src/sys/net

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 02:48:07 UTC 2023

Modified Files:
src/sys/net: route.h

Log Message:
Align function name in its declaration consistently.
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/net/route.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/net/route.h
diff -u src/sys/net/route.h:1.133 src/sys/net/route.h:1.134
--- src/sys/net/route.h:1.133	Fri Jun 16 02:46:23 2023
+++ src/sys/net/route.h	Fri Jun 16 02:48:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.h,v 1.133 2023/06/16 02:46:23 rin Exp $	*/
+/*	$NetBSD: route.h,v 1.134 2023/06/16 02:48:07 rin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -579,7 +579,7 @@ struct rtentry *
 	int (*)(struct rtentry *, void *), void *);
 void	rtbl_init(void);
 
-void sysctl_net_route_setup(struct sysctllog **, int, const char *);
+void	sysctl_net_route_setup(struct sysctllog **, int, const char *);
 
 #endif /* _KERNEL */
 



CVS commit: src/sys/net

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 02:48:07 UTC 2023

Modified Files:
src/sys/net: route.h

Log Message:
Align function name in its declaration consistently.
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/net/route.h

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



CVS commit: src/sys/net

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 02:46:23 UTC 2023

Modified Files:
src/sys/net: route.h

Log Message:
Consistently use __inline instead of inline, as done for rev. 1.119:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/route.h#rev1.119


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/net/route.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/net/route.h
diff -u src/sys/net/route.h:1.132 src/sys/net/route.h:1.133
--- src/sys/net/route.h:1.132	Tue Sep 20 02:23:37 2022
+++ src/sys/net/route.h	Fri Jun 16 02:46:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.h,v 1.132 2022/09/20 02:23:37 knakahara Exp $	*/
+/*	$NetBSD: route.h,v 1.133 2023/06/16 02:46:23 rin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -525,14 +525,14 @@ void	rtcache_unref(struct rtentry *, str
 percpu_t *
 	rtcache_percpu_alloc(void);
 
-static inline struct route *
+static __inline struct route *
 rtcache_percpu_getref(percpu_t *pc)
 {
 
 	return *(struct route **)percpu_getref(pc);
 }
 
-static inline void
+static __inline void
 rtcache_percpu_putref(percpu_t *pc)
 {
 



CVS commit: src/sys/net

2023-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun 16 02:46:23 UTC 2023

Modified Files:
src/sys/net: route.h

Log Message:
Consistently use __inline instead of inline, as done for rev. 1.119:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/route.h#rev1.119


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/net/route.h

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



CVS commit: src/share/misc

2023-06-15 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Jun 15 13:11:20 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+CNA (CVE Numbering Authority)


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2023-06-15 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Jun 15 13:11:20 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+CNA (CVE Numbering Authority)


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.355 src/share/misc/acronyms.comp:1.356
--- src/share/misc/acronyms.comp:1.355	Mon Jun 12 21:00:38 2023
+++ src/share/misc/acronyms.comp	Thu Jun 15 13:11:20 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.355 2023/06/12 21:00:38 alnsn Exp $
+$NetBSD: acronyms.comp,v 1.356 2023/06/15 13:11:20 jschauma Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -280,6 +280,7 @@ CMP	chip multi-processing
 CMS	content management system
 CMYK	cyan magenta yellow black
 CN	{common,canonical} name
+CNA	CVE Numbering Authority
 CNC	computer numerical control
 CNR	carrier-to-noise ratio
 COA	change of authority



CVS commit: src/usr.bin/indent

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 11:27:37 UTC 2023

Modified Files:
src/usr.bin/indent: indent.c io.c

Log Message:
indent: consolidate handling of statement continuations


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.224 -r1.225 src/usr.bin/indent/io.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/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.371 src/usr.bin/indent/indent.c:1.372
--- src/usr.bin/indent/indent.c:1.371	Thu Jun 15 10:59:06 2023
+++ src/usr.bin/indent/indent.c	Thu Jun 15 11:27:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.371 2023/06/15 10:59:06 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.372 2023/06/15 11:27:36 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: indent.c,v 1.371 2023/06/15 10:59:06 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.372 2023/06/15 11:27:36 rillig Exp $");
 
 #include 
 #include 
@@ -562,12 +562,6 @@ process_newline(void)
 
 	output_line();
 
-	if (ps.psyms.len >= 2
-	&& ps.psyms.sym[ps.psyms.len - 2] == psym_lbrace_enum
-	&& ps.paren.len == 0
-	&& ps.prev_lsym == lsym_comma)
-		ps.line_is_stmt_cont = false;
-
 stay_in_line:
 	++line_no;
 }

Index: src/usr.bin/indent/io.c
diff -u src/usr.bin/indent/io.c:1.224 src/usr.bin/indent/io.c:1.225
--- src/usr.bin/indent/io.c:1.224	Thu Jun 15 10:59:06 2023
+++ src/usr.bin/indent/io.c	Thu Jun 15 11:27:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.224 2023/06/15 10:59:06 rillig Exp $	*/
+/*	$NetBSD: io.c,v 1.225 2023/06/15 11:27:36 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: io.c,v 1.224 2023/06/15 10:59:06 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.225 2023/06/15 11:27:36 rillig Exp $");
 
 #include 
 
@@ -55,7 +55,7 @@ static unsigned newlines = 2;	/* the tot
  * finished line, anything > 1 are trailing
  * blank lines */
 static unsigned buffered_newlines;	/* not yet written */
-static int paren_indent;
+static int paren_indent;	/* total indentation when parenthesized */
 
 
 static void
@@ -368,6 +368,19 @@ output_indented_line(void)
 	out.prev_line_kind = out.line_kind;
 }
 
+static bool
+is_stmt_cont(void)
+{
+	if (ps.psyms.len >= 2
+	&& ps.psyms.sym[ps.psyms.len - 2] == psym_lbrace_enum
+	&& ps.prev_lsym == lsym_comma
+	&& ps.paren.len == 0)
+		return false;
+	return ps.in_stmt_or_decl
+	&& (!ps.in_decl || ps.in_init)
+	&& ps.init_level == 0;
+}
+
 /*
  * Write a line of formatted source to the output file. The line consists of
  * the label, the code and the comment.
@@ -393,9 +406,7 @@ output_line(void)
 
 	ps.line_has_decl = ps.in_decl;
 	ps.line_has_func_def = false;
-	ps.line_is_stmt_cont = ps.in_stmt_or_decl
-	&& (!ps.in_decl || ps.in_init)
-	&& ps.init_level == 0;
+	ps.line_is_stmt_cont = is_stmt_cont();
 	ps.decl_indent_done = false;
 	if (ps.extra_expr_indent == eei_last)
 		ps.extra_expr_indent = eei_no;



CVS commit: src/usr.bin/indent

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 11:27:37 UTC 2023

Modified Files:
src/usr.bin/indent: indent.c io.c

Log Message:
indent: consolidate handling of statement continuations


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.224 -r1.225 src/usr.bin/indent/io.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/indent

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 10:59:06 UTC 2023

Modified Files:
src/usr.bin/indent: debug.c indent.c indent.h io.c

Log Message:
indent: rename state variable to be more accurate

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/indent/debug.c
cvs rdiff -u -r1.370 -r1.371 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.223 -r1.224 src/usr.bin/indent/io.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/indent/debug.c
diff -u src/usr.bin/indent/debug.c:1.61 src/usr.bin/indent/debug.c:1.62
--- src/usr.bin/indent/debug.c:1.61	Wed Jun 14 20:46:08 2023
+++ src/usr.bin/indent/debug.c	Thu Jun 15 10:59:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: debug.c,v 1.61 2023/06/14 20:46:08 rillig Exp $	*/
+/*	$NetBSD: debug.c,v 1.62 2023/06/15 10:59:06 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: debug.c,v 1.61 2023/06/14 20:46:08 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.62 2023/06/15 10:59:06 rillig Exp $");
 
 #include 
 #include 
@@ -344,7 +344,7 @@ debug_parser_state(void)
 	state.heading = "indentation of statements and declarations";
 	debug_ps_int(ind_level);
 	debug_ps_int(ind_level_follow);
-	debug_ps_bool(in_stmt_cont);
+	debug_ps_bool(line_is_stmt_cont);
 	debug_ps_int(decl_level);
 	debug_ps_di_stack();
 	debug_ps_bool(decl_indent_done);

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.370 src/usr.bin/indent/indent.c:1.371
--- src/usr.bin/indent/indent.c:1.370	Thu Jun 15 10:34:12 2023
+++ src/usr.bin/indent/indent.c	Thu Jun 15 10:59:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.370 2023/06/15 10:34:12 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.371 2023/06/15 10:59:06 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: indent.c,v 1.370 2023/06/15 10:34:12 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.371 2023/06/15 10:59:06 rillig Exp $");
 
 #include 
 #include 
@@ -566,7 +566,7 @@ process_newline(void)
 	&& ps.psyms.sym[ps.psyms.len - 2] == psym_lbrace_enum
 	&& ps.paren.len == 0
 	&& ps.prev_lsym == lsym_comma)
-		ps.in_stmt_cont = false;
+		ps.line_is_stmt_cont = false;
 
 stay_in_line:
 	++line_no;
@@ -724,8 +724,7 @@ process_lbrace(void)
 	}
 
 	if (code.len == 0)
-		ps.in_stmt_cont = false;	/* don't indent the '{' itself
-		 */
+		ps.line_is_stmt_cont = false;
 	if (ps.in_decl && ps.in_var_decl) {
 		ps.di_stack[ps.decl_level] = ps.decl_ind;
 		if (++ps.decl_level == (int)array_length(ps.di_stack)) {
@@ -768,7 +767,7 @@ process_rbrace(void)
 	buf_add_char(, '}');
 	ps.want_blank = true;
 	ps.in_stmt_or_decl = false;	// XXX: Initializers don't end a stmt
-	ps.in_stmt_cont = false;
+	ps.line_is_stmt_cont = false;
 
 	if (ps.decl_level > 0) {	/* multi-level structure declaration */
 		ps.decl_ind = ps.di_stack[--ps.decl_level];
@@ -925,7 +924,7 @@ process_type_outside_parentheses(void)
 	if (ps.in_func_def_params && opt.indent_parameters &&
 	ps.decl_level == 0) {
 		ps.ind_level = ps.ind_level_follow = 1;
-		ps.in_stmt_cont = false;
+		ps.line_is_stmt_cont = false;
 	}
 
 	ps.in_var_decl = /* maybe */ true;

Index: src/usr.bin/indent/indent.h
diff -u src/usr.bin/indent/indent.h:1.197 src/usr.bin/indent/indent.h:1.198
--- src/usr.bin/indent/indent.h:1.197	Wed Jun 14 20:46:08 2023
+++ src/usr.bin/indent/indent.h	Thu Jun 15 10:59:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.h,v 1.197 2023/06/14 20:46:08 rillig Exp $	*/
+/*	$NetBSD: indent.h,v 1.198 2023/06/15 10:59:06 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -342,7 +342,7 @@ extern struct parser_state {
  * currently prepared for output */
 	int ind_level_follow;	/* the level to which ind_level should be set
  * after the current line is printed */
-	bool in_stmt_cont;	/* whether the current line should have an
+	bool line_is_stmt_cont;	/* whether the current line should have an
  * extra indentation level because we are in
  * the middle of a statement */
 	int decl_level;		/* current nesting level for a structure

Index: src/usr.bin/indent/io.c
diff -u src/usr.bin/indent/io.c:1.223 src/usr.bin/indent/io.c:1.224
--- src/usr.bin/indent/io.c:1.223	Thu Jun 15 10:34:12 2023
+++ src/usr.bin/indent/io.c	Thu Jun 15 10:59:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.223 2023/06/15 10:34:12 rillig Exp $	*/
+/*	$NetBSD: io.c,v 1.224 2023/06/15 10:59:06 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: io.c,v 1.223 2023/06/15 10:34:12 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.224 2023/06/15 10:59:06 rillig Exp $");
 
 #include 
 
@@ -254,7 +254,7 @@ compute_code_indent(void)
 	int base_ind = ps.ind_level * 

CVS commit: src/usr.bin/indent

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 10:59:06 UTC 2023

Modified Files:
src/usr.bin/indent: debug.c indent.c indent.h io.c

Log Message:
indent: rename state variable to be more accurate

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/indent/debug.c
cvs rdiff -u -r1.370 -r1.371 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.223 -r1.224 src/usr.bin/indent/io.c

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



CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 10:34:12 UTC 2023

Modified Files:
src/tests/usr.bin/indent: lsym_tag.c
src/usr.bin/indent: indent.c io.c

Log Message:
indent: fix indentation of multi-line enum constant initializers


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/lsym_tag.c
cvs rdiff -u -r1.369 -r1.370 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/indent/io.c

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



CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 10:34:12 UTC 2023

Modified Files:
src/tests/usr.bin/indent: lsym_tag.c
src/usr.bin/indent: indent.c io.c

Log Message:
indent: fix indentation of multi-line enum constant initializers


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/lsym_tag.c
cvs rdiff -u -r1.369 -r1.370 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/indent/io.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/usr.bin/indent/lsym_tag.c
diff -u src/tests/usr.bin/indent/lsym_tag.c:1.8 src/tests/usr.bin/indent/lsym_tag.c:1.9
--- src/tests/usr.bin/indent/lsym_tag.c:1.8	Thu Jun 15 09:19:07 2023
+++ src/tests/usr.bin/indent/lsym_tag.c	Thu Jun 15 10:34:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_tag.c,v 1.8 2023/06/15 09:19:07 rillig Exp $ */
+/* $NetBSD: lsym_tag.c,v 1.9 2023/06/15 10:34:12 rillig Exp $ */
 
 /*
  * Tests for the token lsym_tag, which represents one of the keywords
@@ -142,12 +142,17 @@ struct outer {
  */
 //indent input
 enum multi_line {
-	constant = 1
-// $ TODO: Indent the continuation line.
-	+ 2
-// $ TODO: Indent the continuation line.
-	+ 3,
+	ml1 = 1
+	+ 2
+	+ offsetof(struct s, member)
+	+ 3,
+	ml2 = 1
+	+ 2
+	+ offsetof(struct s, member)
+	+ 3,
 };
 //indent end
 
-//indent run-equals-input
+//indent run-equals-input -ci4
+
+//indent run-equals-input -ci4 -nlp

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.369 src/usr.bin/indent/indent.c:1.370
--- src/usr.bin/indent/indent.c:1.369	Thu Jun 15 09:19:06 2023
+++ src/usr.bin/indent/indent.c	Thu Jun 15 10:34:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.369 2023/06/15 09:19:06 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.370 2023/06/15 10:34:12 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: indent.c,v 1.369 2023/06/15 09:19:06 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.370 2023/06/15 10:34:12 rillig Exp $");
 
 #include 
 #include 
@@ -562,6 +562,12 @@ process_newline(void)
 
 	output_line();
 
+	if (ps.psyms.len >= 2
+	&& ps.psyms.sym[ps.psyms.len - 2] == psym_lbrace_enum
+	&& ps.paren.len == 0
+	&& ps.prev_lsym == lsym_comma)
+		ps.in_stmt_cont = false;
+
 stay_in_line:
 	++line_no;
 }

Index: src/usr.bin/indent/io.c
diff -u src/usr.bin/indent/io.c:1.222 src/usr.bin/indent/io.c:1.223
--- src/usr.bin/indent/io.c:1.222	Thu Jun 15 09:19:06 2023
+++ src/usr.bin/indent/io.c	Thu Jun 15 10:34:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.222 2023/06/15 09:19:06 rillig Exp $	*/
+/*	$NetBSD: io.c,v 1.223 2023/06/15 10:34:12 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: io.c,v 1.222 2023/06/15 09:19:06 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.223 2023/06/15 10:34:12 rillig Exp $");
 
 #include 
 
@@ -254,9 +254,6 @@ compute_code_indent(void)
 	int base_ind = ps.ind_level * opt.indent_size;
 
 	if (ps.ind_paren_level == 0) {
-		if (ps.psyms.len >= 2
-		&& ps.psyms.sym[ps.psyms.len - 2] == psym_lbrace_enum)
-			return base_ind;
 		if (ps.in_stmt_cont)
 			return base_ind + opt.continuation_indent;
 		return base_ind;



CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 09:19:07 UTC 2023

Modified Files:
src/tests/usr.bin/indent: fmt_decl.c lsym_case_label.c lsym_funcname.c
lsym_lbrace.c lsym_rparen_or_rbracket.c lsym_semicolon.c lsym_tag.c
lsym_type_outside_parentheses.c opt_bacc.c opt_eei.c ps_ind_level.c
src/usr.bin/indent: args.c indent.c io.c

Log Message:
indent: miscellaneous cleanups, more tests for edge cases


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/tests/usr.bin/indent/fmt_decl.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/indent/lsym_case_label.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_funcname.c
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/lsym_lbrace.c \
src/tests/usr.bin/indent/ps_ind_level.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/lsym_rparen_or_rbracket.c \
src/tests/usr.bin/indent/lsym_semicolon.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/lsym_tag.c
cvs rdiff -u -r1.6 -r1.7 \
src/tests/usr.bin/indent/lsym_type_outside_parentheses.c
cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/indent/opt_bacc.c
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/indent/opt_eei.c
cvs rdiff -u -r1.84 -r1.85 src/usr.bin/indent/args.c
cvs rdiff -u -r1.368 -r1.369 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.221 -r1.222 src/usr.bin/indent/io.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/usr.bin/indent/fmt_decl.c
diff -u src/tests/usr.bin/indent/fmt_decl.c:1.56 src/tests/usr.bin/indent/fmt_decl.c:1.57
--- src/tests/usr.bin/indent/fmt_decl.c:1.56	Thu Jun 15 08:40:20 2023
+++ src/tests/usr.bin/indent/fmt_decl.c	Thu Jun 15 09:19:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fmt_decl.c,v 1.56 2023/06/15 08:40:20 rillig Exp $	*/
+/*	$NetBSD: fmt_decl.c,v 1.57 2023/06/15 09:19:07 rillig Exp $	*/
 
 /*
  * Tests for declarations of global variables, external functions, and local
@@ -1183,3 +1183,20 @@ multi_line = (int[]){
 	};
 }
 //indent end
+
+
+/*
+ *
+ */
+//indent input
+int
+old_style(a)
+	struct {
+		int		member;
+	}		a;
+{
+	stmt;
+}
+//indent end
+
+//indent run-equals-input

Index: src/tests/usr.bin/indent/lsym_case_label.c
diff -u src/tests/usr.bin/indent/lsym_case_label.c:1.10 src/tests/usr.bin/indent/lsym_case_label.c:1.11
--- src/tests/usr.bin/indent/lsym_case_label.c:1.10	Sat Jun 10 07:05:18 2023
+++ src/tests/usr.bin/indent/lsym_case_label.c	Thu Jun 15 09:19:07 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_case_label.c,v 1.10 2023/06/10 07:05:18 rillig Exp $ */
+/* $NetBSD: lsym_case_label.c,v 1.11 2023/06/15 09:19:07 rillig Exp $ */
 
 /*
  * Tests for the tokens lsym_case and lsym_default, which represent the
@@ -103,3 +103,23 @@ const char *type_name = _Generic(
 //indent end
 
 //indent run-equals-input -di0 -nlp
+
+
+/*
+ * Multi-line case expressions are rare but still should be processed in a
+ * sensible way.
+ */
+//indent input
+{
+	switch (expr) {
+// $ FIXME: The line containing the 'case' must be indented like a 'case'.
+		case 1
+		+ 2
+// $ FIXME: This continuation line must be indented by 4 columns.
+	+ 3:
+		stmt;
+	}
+}
+//indent end
+
+//indent run-equals-input -ci4

Index: src/tests/usr.bin/indent/lsym_funcname.c
diff -u src/tests/usr.bin/indent/lsym_funcname.c:1.5 src/tests/usr.bin/indent/lsym_funcname.c:1.6
--- src/tests/usr.bin/indent/lsym_funcname.c:1.5	Mon May 22 23:01:27 2023
+++ src/tests/usr.bin/indent/lsym_funcname.c	Thu Jun 15 09:19:07 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_funcname.c,v 1.5 2023/05/22 23:01:27 rillig Exp $ */
+/* $NetBSD: lsym_funcname.c,v 1.6 2023/06/15 09:19:07 rillig Exp $ */
 
 /*
  * Tests for the token lsym_funcname, which is the name of a function, but only
@@ -19,3 +19,17 @@ function(void)
 //indent end
 
 //indent run-equals-input
+
+
+/*
+ * The comment after the return type of a function definition is a code
+ * comment, not a declaration comment.
+ */
+//indent input
+void// comment
+function_with_comment(void)
+{
+}
+//indent end
+
+//indent run-equals-input

Index: src/tests/usr.bin/indent/lsym_lbrace.c
diff -u src/tests/usr.bin/indent/lsym_lbrace.c:1.8 src/tests/usr.bin/indent/lsym_lbrace.c:1.9
--- src/tests/usr.bin/indent/lsym_lbrace.c:1.8	Sun Jun  4 13:49:00 2023
+++ src/tests/usr.bin/indent/lsym_lbrace.c	Thu Jun 15 09:19:07 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_lbrace.c,v 1.8 2023/06/04 13:49:00 rillig Exp $ */
+/* $NetBSD: lsym_lbrace.c,v 1.9 2023/06/15 09:19:07 rillig Exp $ */
 
 /*
  * Tests for the token lsym_lbrace, which represents a '{' in these contexts:
@@ -58,8 +58,88 @@ origin(void)
 	return (struct point){
 		.x = 0,
 		.y = 0,
-	};
+	}, actual_return_value;
 }
 //indent end
 
 //indent run-equals-input
+
+/* Ensure that the comma is not interpreted as separator for declarators. */
+//indent run-equals-input -bc
+
+
+//indent input
+{
+	const char *hello = (const char[]){
+		'h', 'e', 'l', 'l', 'o',
+	}, *world = (const 

CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 09:19:07 UTC 2023

Modified Files:
src/tests/usr.bin/indent: fmt_decl.c lsym_case_label.c lsym_funcname.c
lsym_lbrace.c lsym_rparen_or_rbracket.c lsym_semicolon.c lsym_tag.c
lsym_type_outside_parentheses.c opt_bacc.c opt_eei.c ps_ind_level.c
src/usr.bin/indent: args.c indent.c io.c

Log Message:
indent: miscellaneous cleanups, more tests for edge cases


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/tests/usr.bin/indent/fmt_decl.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/indent/lsym_case_label.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_funcname.c
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/lsym_lbrace.c \
src/tests/usr.bin/indent/ps_ind_level.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/lsym_rparen_or_rbracket.c \
src/tests/usr.bin/indent/lsym_semicolon.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/lsym_tag.c
cvs rdiff -u -r1.6 -r1.7 \
src/tests/usr.bin/indent/lsym_type_outside_parentheses.c
cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/indent/opt_bacc.c
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/indent/opt_eei.c
cvs rdiff -u -r1.84 -r1.85 src/usr.bin/indent/args.c
cvs rdiff -u -r1.368 -r1.369 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.221 -r1.222 src/usr.bin/indent/io.c

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



CVS commit: src/sys

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:15:54 UTC 2023

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Undo unlock/relock for VOP_IOCTL().

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)


To generate a diff of this commit:
cvs rdiff -u -r1.411 -r1.412 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.380 -r1.381 src/sys/ufs/ffs/ffs_vfsops.c

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



CVS commit: src/sys

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:15:54 UTC 2023

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Undo unlock/relock for VOP_IOCTL().

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)


To generate a diff of this commit:
cvs rdiff -u -r1.411 -r1.412 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.380 -r1.381 src/sys/ufs/ffs/ffs_vfsops.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.411 src/sys/dev/raidframe/rf_netbsdkintf.c:1.412
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.411	Thu Mar 30 11:02:15 2023
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Thu Jun 15 09:15:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.411 2023/03/30 11:02:15 riastradh Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.411 2023/03/30 11:02:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -2956,7 +2956,6 @@ rf_find_raid_components(void)
 continue;
 			}
 
-			VOP_UNLOCK(vp);
 			error = getdisksize(vp, , );
 			if (error) {
 /*
@@ -2968,7 +2967,6 @@ rf_find_raid_components(void)
 	printf("RAIDframe: can't get disk size"
 	" for dev %s (%d)\n",
 	device_xname(dv), error);
-vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 VOP_CLOSE(vp, FREAD | FWRITE, NOCRED);
 vput(vp);
 continue;
@@ -2980,19 +2978,18 @@ rf_find_raid_components(void)
 if (error) {
 	printf("RAIDframe: can't get wedge info for "
 	"dev %s (%d)\n", device_xname(dv), error);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	VOP_CLOSE(vp, FREAD | FWRITE, NOCRED);
 	vput(vp);
 	continue;
 }
 
 if (strcmp(dkw.dkw_ptype, DKW_PTYPE_RAIDFRAME) != 0) {
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	VOP_CLOSE(vp, FREAD | FWRITE, NOCRED);
 	vput(vp);
 	continue;
 }
 
+VOP_UNLOCK(vp);
 ac_list = rf_get_component(ac_list, dev, vp,
 device_xname(dv), dkw.dkw_size, numsecs, secsize);
 rf_part_found = 1; /*There is a raid component on this disk*/
@@ -3013,7 +3010,6 @@ rf_find_raid_components(void)
 
 			/* don't need this any more.  We'll allocate it again
 			   a little later if we really do... */
-			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 			VOP_CLOSE(vp, FREAD | FWRITE, NOCRED);
 			vput(vp);
 

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.380 src/sys/ufs/ffs/ffs_vfsops.c:1.381
--- src/sys/ufs/ffs/ffs_vfsops.c:1.380	Mon Jun  5 04:59:46 2023
+++ src/sys/ufs/ffs/ffs_vfsops.c	Thu Jun 15 09:15:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.380 2023/06/05 04:59:46 rin Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.381 2023/06/15 09:15:54 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.380 2023/06/05 04:59:46 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.381 2023/06/15 09:15:54 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -2523,9 +2523,7 @@ ffs_vfs_fsync(vnode_t *vp, int flags)
 		 * contains no dirty buffers that could be in the log.
 		 */
 		if (!LIST_EMPTY(>v_dirtyblkhd)) {
-			VOP_UNLOCK(vp);
 			error = wapbl_flush(mp->mnt_wapbl, 0);
-			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 			if (error)
 return error;
 		}
@@ -2544,10 +2542,8 @@ ffs_vfs_fsync(vnode_t *vp, int flags)
 	error = vflushbuf(vp, flags);
 	if (error == 0 && (flags & FSYNC_CACHE) != 0) {
 		i = 1;
-		VOP_UNLOCK(vp);
 		(void)VOP_IOCTL(vp, DIOCCACHESYNC, , FWRITE,
 		kauth_cred_get());
-		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	}
 
 	return error;



CVS commit: src/sys

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:15:13 UTC 2023

Modified Files:
src/sys/kern: vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: vnode_if.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.111 -r1.112 src/sys/sys/vnode_if.h

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



CVS commit: src/sys

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:15:13 UTC 2023

Modified Files:
src/sys/kern: vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: vnode_if.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.111 -r1.112 src/sys/sys/vnode_if.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/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.118 src/sys/kern/vnode_if.c:1.119
--- src/sys/kern/vnode_if.c:1.118	Mon Jul 18 04:32:35 2022
+++ src/sys/kern/vnode_if.c	Thu Jun 15 09:15:13 2023
@@ -1,13 +1,13 @@
-/*	$NetBSD: vnode_if.c,v 1.118 2022/07/18 04:32:35 thorpej Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.119 2023/06/15 09:15:13 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
  * (Modifications made here may easily be lost!)
  *
  * Created from the file:
- *	NetBSD: vnode_if.src,v 1.84 2022/05/03 08:33:59 hannken Exp
+ *	NetBSD: vnode_if.src,v 1.85 2023/06/15 09:13:36 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.76 2022/07/18 04:30:30 thorpej Exp
+ *	NetBSD: vnode_if.sh,v 1.77 2022/10/26 23:39:43 riastradh Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.118 2022/07/18 04:32:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.119 2023/06/15 09:15:13 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_vnode_lockdebug.h"
@@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v
 #include 
 #include 
 
+#include 
+
 enum fst_op { FST_NO, FST_YES, FST_LAZY, FST_TRY };
 
 static inline int
@@ -236,8 +238,6 @@ do {	\
 
 #define	vop_close_post(ap, e)		\
 do {	\
-	extern int (**dead_vnodeop_p)(void *);\
-	\
 	/* See the definition of VN_KNOTE() in . */	\
 	if (__predict_false(VN_KEVENT_INTEREST((ap)->a_vp,		\
 	NOTE_CLOSE_WRITE | NOTE_CLOSE) && (e) == 0)) {		\
@@ -927,7 +927,6 @@ VOP_IOCTL(struct vnode *vp,
 	a.a_data = data;
 	a.a_fflag = fflag;
 	a.a_cred = cred;
-	assert_vop_unlocked(vp, "vop_ioctl: vp");
 	error = vop_pre(vp, , , FST_NO);
 	if (error)
 		return error;

Index: src/sys/rump/include/rump/rumpvnode_if.h
diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.40 src/sys/rump/include/rump/rumpvnode_if.h:1.41
--- src/sys/rump/include/rump/rumpvnode_if.h:1.40	Mon Jul 18 04:32:35 2022
+++ src/sys/rump/include/rump/rumpvnode_if.h	Thu Jun 15 09:15:13 2023
@@ -1,13 +1,13 @@
-/*	$NetBSD: rumpvnode_if.h,v 1.40 2022/07/18 04:32:35 thorpej Exp $	*/
+/*	$NetBSD: rumpvnode_if.h,v 1.41 2023/06/15 09:15:13 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
  * (Modifications made here may easily be lost!)
  *
  * Created from the file:
- *	NetBSD: vnode_if.src,v 1.84 2022/05/03 08:33:59 hannken Exp
+ *	NetBSD: vnode_if.src,v 1.85 2023/06/15 09:13:36 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.76 2022/07/18 04:30:30 thorpej Exp
+ *	NetBSD: vnode_if.sh,v 1.77 2022/10/26 23:39:43 riastradh Exp
  */
 
 /*

Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c
diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.40 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.41
--- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.40	Mon Jul 18 04:32:35 2022
+++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c	Thu Jun 15 09:15:13 2023
@@ -1,13 +1,13 @@
-/*	$NetBSD: rumpvnode_if.c,v 1.40 2022/07/18 04:32:35 thorpej Exp $	*/
+/*	$NetBSD: rumpvnode_if.c,v 1.41 2023/06/15 09:15:13 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
  * (Modifications made here may easily be lost!)
  *
  * Created from the file:
- *	NetBSD: vnode_if.src,v 1.84 2022/05/03 08:33:59 hannken Exp
+ *	NetBSD: vnode_if.src,v 1.85 2023/06/15 09:13:36 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.76 2022/07/18 04:30:30 thorpej Exp
+ *	NetBSD: vnode_if.sh,v 1.77 2022/10/26 23:39:43 riastradh Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.40 2022/07/18 04:32:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.41 2023/06/15 09:15:13 hannken Exp $");
 
 #include 
 #include 

Index: src/sys/sys/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.111 src/sys/sys/vnode_if.h:1.112
--- src/sys/sys/vnode_if.h:1.111	Mon Jul 18 04:32:35 2022
+++ src/sys/sys/vnode_if.h	Thu Jun 15 09:15:13 2023
@@ -1,13 +1,13 @@
-/*	$NetBSD: vnode_if.h,v 1.111 2022/07/18 04:32:35 thorpej Exp $	*/
+/*	$NetBSD: vnode_if.h,v 1.112 2023/06/15 09:15:13 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
  * (Modifications made here may easily be lost!)
  *
  * 

CVS commit: src

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:13:36 UTC 2023

Modified Files:
src/share/man/man9: vnodeops.9
src/sys/kern: vnode_if.src

Log Message:
VOP_IOCTL() is a wrapper around spec_ioctl() aka Xdev_ioctl() and
protected with spec_io_enter()/spec_io_exit() so there is no need
to force specific vnode locking.

Set locking requirement to '= = =' (unchanged, locked or unlocked).

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/share/man/man9/vnodeops.9
cvs rdiff -u -r1.84 -r1.85 src/sys/kern/vnode_if.src

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



CVS commit: src

2023-06-15 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun 15 09:13:36 UTC 2023

Modified Files:
src/share/man/man9: vnodeops.9
src/sys/kern: vnode_if.src

Log Message:
VOP_IOCTL() is a wrapper around spec_ioctl() aka Xdev_ioctl() and
protected with spec_io_enter()/spec_io_exit() so there is no need
to force specific vnode locking.

Set locking requirement to '= = =' (unchanged, locked or unlocked).

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/share/man/man9/vnodeops.9
cvs rdiff -u -r1.84 -r1.85 src/sys/kern/vnode_if.src

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

Modified files:

Index: src/share/man/man9/vnodeops.9
diff -u src/share/man/man9/vnodeops.9:1.100 src/share/man/man9/vnodeops.9:1.101
--- src/share/man/man9/vnodeops.9:1.100	Sun Nov 19 21:06:10 2017
+++ src/share/man/man9/vnodeops.9	Thu Jun 15 09:13:36 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnodeops.9,v 1.100 2017/11/19 21:06:10 christos Exp $
+.\" $NetBSD: vnodeops.9,v 1.101 2023/06/15 09:13:36 hannken Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 19, 2017
+.Dd June 15, 2023
 .Dt VNODEOPS 9
 .Os
 .Sh NAME
@@ -709,7 +709,7 @@ existing data, or some other data, or tr
 Perform device-specific I/O.
 The argument
 .Fa vp
-is the locked vnode of the file, normally representing a device.
+is the vnode of the file, normally representing a device.
 The argument
 .Fa command
 specifies the device-specific operation to perform and

Index: src/sys/kern/vnode_if.src
diff -u src/sys/kern/vnode_if.src:1.84 src/sys/kern/vnode_if.src:1.85
--- src/sys/kern/vnode_if.src:1.84	Tue May  3 08:33:59 2022
+++ src/sys/kern/vnode_if.src	Thu Jun 15 09:13:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: vnode_if.src,v 1.84 2022/05/03 08:33:59 hannken Exp $
+#	$NetBSD: vnode_if.src,v 1.85 2023/06/15 09:13:36 hannken Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -217,11 +217,11 @@ vop_fdiscard {
 };
 
 #
-#% ioctl  vp  U U U
+#% ioctl  vp  = = =
 #
 vop_ioctl {
 	FSTRANS=NO
-	IN LOCKED=NO struct vnode *vp;
+	IN struct vnode *vp;
 	IN u_long command;
 	IN void *data;
 	IN int fflag;



CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 08:40:20 UTC 2023

Modified Files:
src/tests/usr.bin/indent: fmt_decl.c
src/usr.bin/indent: indent.c

Log Message:
indent: fix alignment of multi-line declarations


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/tests/usr.bin/indent/fmt_decl.c
cvs rdiff -u -r1.367 -r1.368 src/usr.bin/indent/indent.c

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



CVS commit: src

2023-06-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 15 08:40:20 UTC 2023

Modified Files:
src/tests/usr.bin/indent: fmt_decl.c
src/usr.bin/indent: indent.c

Log Message:
indent: fix alignment of multi-line declarations


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/tests/usr.bin/indent/fmt_decl.c
cvs rdiff -u -r1.367 -r1.368 src/usr.bin/indent/indent.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/usr.bin/indent/fmt_decl.c
diff -u src/tests/usr.bin/indent/fmt_decl.c:1.55 src/tests/usr.bin/indent/fmt_decl.c:1.56
--- src/tests/usr.bin/indent/fmt_decl.c:1.55	Wed Jun 14 20:46:08 2023
+++ src/tests/usr.bin/indent/fmt_decl.c	Thu Jun 15 08:40:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fmt_decl.c,v 1.55 2023/06/14 20:46:08 rillig Exp $	*/
+/*	$NetBSD: fmt_decl.c,v 1.56 2023/06/15 08:40:20 rillig Exp $	*/
 
 /*
  * Tests for declarations of global variables, external functions, and local
@@ -295,36 +295,33 @@ struct s01234567890123 a,b;
 struct s a, b;
 /* $ XXX: See process_comma, varname_len for why this line is broken. */
 struct s0 a,
-   b;
-/* $ XXX: The indentation of the second line is wrong. The variable names */
-/* $ XXX: 'a' and 'b' should be in the same column; the word 'struct' is */
-/* $ XXX: missing in the calculation for the indentation. */
+  b;
 struct s01 a,
-b;
+   b;
 struct s012 a,
- b;
+b;
 struct s0123 a,
-  b;
+ b;
 struct s01234 a,
-   b;
+  b;
 struct s012345 a,
-b;
+   b;
 struct s0123456 a,
- b;
+b;
 struct s01234567 a,
-  b;
+ b;
 struct s012345678 a,
-   b;
+  b;
 struct s0123456789 a,
-b;
+   b;
 struct s01234567890 a,
- b;
+b;
 struct s012345678901 a,
-  b;
+ b;
 struct s0123456789012 a,
-   b;
+  b;
 struct s01234567890123 a,
-b;
+   b;
 //indent end
 
 

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.367 src/usr.bin/indent/indent.c:1.368
--- src/usr.bin/indent/indent.c:1.367	Wed Jun 14 20:46:08 2023
+++ src/usr.bin/indent/indent.c	Thu Jun 15 08:40:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.367 2023/06/14 20:46:08 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.368 2023/06/15 08:40:20 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: indent.c,v 1.367 2023/06/14 20:46:08 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.368 2023/06/15 08:40:20 rillig Exp $");
 
 #include 
 #include 
@@ -933,7 +933,8 @@ process_type_outside_parentheses(void)
 	if (ps.decl_level <= 0)
 		ps.declaration = decl_begin;
 
-	int len = (int)token.len + 1;
+	int len = (code.len > 0 ? ind_add(0, code.s, code.len) + 1 : 0)
+	+ (int)token.len + 1;
 	int ind = ps.ind_level > 0 && ps.decl_level == 0
 	? opt.local_decl_indent	/* local variable */
 	: opt.decl_indent;	/* global variable, or member */



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

2023-06-15 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Jun 15 07:21:45 UTC 2023

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
if_scx.c


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/sociox/if_scx.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/sociox/if_scx.c
diff -u src/sys/arch/arm/sociox/if_scx.c:1.42 src/sys/arch/arm/sociox/if_scx.c:1.43
--- src/sys/arch/arm/sociox/if_scx.c:1.42	Wed Jun 14 00:07:22 2023
+++ src/sys/arch/arm/sociox/if_scx.c	Thu Jun 15 07:21:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_scx.c,v 1.42 2023/06/14 00:07:22 nisimura Exp $	*/
+/*	$NetBSD: if_scx.c,v 1.43 2023/06/15 07:21:45 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.42 2023/06/14 00:07:22 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.43 2023/06/15 07:21:45 nisimura Exp $");
 
 #include 
 #include 
@@ -120,13 +120,6 @@ struct rdes {
 #define COMINIT		0x120
 #define  INIT_DB	(1U<<2)		/* ???; self clear when done */
 #define  INIT_CLS	(1U<<1)		/* ???; self clear when done */
-#define PKTCTRL		0x140		/* pkt engine control */
-#define  MODENRM	(1U<<28)	/* set operational mode to 'normal' */
-#define  ENJUMBO	(1U<<27)	/* allow jumbo frame */
-#define  RPTCSUMERR	(1U<<3)		/* log Rx checksum error */
-#define  RPTHDCOMP	(1U<<2)		/* log header incomplete condition */
-#define  RPTHDERR	(1U<<1)		/* log header error */
-#define  DROPNOMATCH	(1U<<0)		/* drop no match frames */
 #define xINTSR		0x200		/* aggregated interrupt status */
 #define  IRQ_UCODE	(1U<<20)	/* ucode load completed; W1C */
 #define  IRQ_MAC	(1U<<19)	/* ??? */
@@ -146,14 +139,14 @@ struct rdes {
 #define TXIE_SET	0x428		/* bit to set */
 #define TXIE_CLR	0x42c		/* bit to clr */
 #define  TXI_NTOWNR	(1U<<17)	/* ??? desc array got empty */
-#define  TXI_TR_ERR	(1U<<16)	/* xmit error */
+#define  TXI_TR_ERR	(1U<<16)	/* xmit error detected */
 #define  TXI_TXDONE	(1U<<15)	/* xmit completed */
 #define  TXI_TMREXP	(1U<<14)	/* coalesce guard timer expired */
 #define RXISR		0x440		/* receive status; W1C */
 #define RXIEN		0x444		/* rx interrupt enable */
 #define RXIE_SET	0x468		/* bit to set */
 #define RXIE_CLR	0x46c		/* bit to clr */
-#define  RXI_RC_ERR	(1U<<16)	/* recv error */
+#define  RXI_RC_ERR	(1U<<16)	/* recv error detected */
 #define  RXI_PKTCNT	(1U<<15)	/* recv counter has new value */
 #define  RXI_TMREXP	(1U<<14)	/* coalesce guard timer expired */
 #define TDBA_LO		0x408		/* tdes array base addr 31:0 */
@@ -164,16 +157,24 @@ struct rdes {
 #define RXCONF		0x470		/* rdes config */
 #define  DESCNF_UP	(1U<<31)	/* 'up-and-running' */
 #define  DESCNF_CHRST	(1U<<30)	/* channel reset */
-#define  DESCNF_TMR	(1U<<4)		/* coalesce timer mode select */
+#define  DESCNF_TMR	(1U<<4)		/* coalesce timer unit select */
 #define  DESCNF_LE	(1)		/* little endian desc format */
 #define TXSUBMIT	0x410		/* submit frame(s) to transmit */
 #define TXCOALESC	0x418		/* tx intr coalesce upper bound */
 #define RXCOALESC	0x458		/* rx intr coalesce upper bound */
-#define TCLSCTIME	0x420		/* tintr guard time usec, MSB to on */
-#define RCLSCTIME	0x460		/* rintr guard time usec, MSB to on */
+#define TCLSCTIME	0x420		/* tintr guard time usec */
+#define RCLSCTIME	0x460		/* rintr guard time usec */
 #define TXDONECNT	0x414		/* tx completed count, auto-zero */
 #define RXAVAILCNT	0x454		/* rx available count, auto-zero */
-#define DMACTL_TMR	0x20c		/* engine DMA timer value */
+#define DMACTL_TMR	0x20c		/* DMA cycle tick value */
+#define PKTCTRL		0x140		/* pkt engine control */
+#define  MODENRM	(1U<<28)	/* set operational mode to 'normal' */
+#define  ENJUMBO	(1U<<27)	/* allow jumbo frame */
+#define  RPTCSUMERR	(1U<<3)		/* log Rx checksum error */
+#define  RPTHDCOMP	(1U<<2)		/* log header incomplete condition */
+#define  RPTHDERR	(1U<<1)		/* log header error */
+#define  DROPNOMATCH	(1U<<0)		/* drop no match frames */
+#define UCODE_PKT	0x0d0		/* packet engine ucode port */
 #define UCODE_H2M	0x210		/* host2media engine ucode port */
 #define UCODE_M2H	0x21c		/* media2host engine ucode port */
 #define CORESTAT	0x218		/* engine run state */
@@ -184,11 +185,15 @@ struct rdes {
 #define DMACTL_M2H	0x220		/* media2host engine control */
 #define  DMACTL_STOP	(1U<<0)		/* instruct stop; self-clear */
 #define  M2H_MODE_TRANS	(1U<<20)	/* initiate M2H mode change */
-#define UCODE_PKT	0x0d0		/* packet engine ucode port */
+#define MODE_TRANS	0x500		/* mode change completion status */
+#define  N2T_DONE	(1U<<20)	/* normal->taiki change completed */
+#define  T2N_DONE	(1U<<19)	/* taiki->normal change completed */
 #define CLKEN		0x100		/* clock distribution enable */
 #define  CLK_G		(1U<<5)		/* feed clk domain G */
 #define  CLK_C		(1U<<1)		/* feed clk domain C */
 #define  CLK_D		(1U<<0)		/* 

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

2023-06-15 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Jun 15 07:21:45 UTC 2023

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
if_scx.c


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/sociox/if_scx.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/riscv/fdt

2023-06-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 15 06:28:32 UTC 2023

Removed Files:
src/sys/arch/riscv/fdt: fdt_cpus_machdep.c

Log Message:
G/C file was renamed in recent commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/arch/riscv/fdt/fdt_cpus_machdep.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/riscv/fdt

2023-06-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 15 06:28:32 UTC 2023

Removed Files:
src/sys/arch/riscv/fdt: fdt_cpus_machdep.c

Log Message:
G/C file was renamed in recent commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/arch/riscv/fdt/fdt_cpus_machdep.c

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