CVS commit: src/usr.sbin/inetd

2021-10-16 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sun Oct 17 04:14:49 UTC 2021

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

Log Message:
To an alias address, or in a multihoming environment, the internal dgram
server may respond from a different address than the destination address
sent by the client.
To solve this problem, I introduce sendfromto() and recvfromto() so that
the server can reply from the correct address, i.e., the destination address
used in the request.

This change also has the aspect of a reference implementation using the
RECVDSTADDR and PKTINFO socket options.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/usr.sbin/inetd/inetd.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/inetd/inetd.c
diff -u src/usr.sbin/inetd/inetd.c:1.138 src/usr.sbin/inetd/inetd.c:1.139
--- src/usr.sbin/inetd/inetd.c:1.138	Tue Oct 12 22:51:28 2021
+++ src/usr.sbin/inetd/inetd.c	Sun Oct 17 04:14:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: inetd.c,v 1.138 2021/10/12 22:51:28 rillig Exp $	*/
+/*	$NetBSD: inetd.c,v 1.139 2021/10/17 04:14:49 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)inetd.c	8.4 (Berkeley) 4/13/94";
 #else
-__RCSID("$NetBSD: inetd.c,v 1.138 2021/10/12 22:51:28 rillig Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.139 2021/10/17 04:14:49 ryo Exp $");
 #endif
 #endif /* not lint */
 
@@ -269,6 +269,11 @@ size_t		changes;
 
 struct servtab *servtab;
 
+static ssize_t	recvfromto(int, void * restrict, size_t, int,
+struct sockaddr * restrict, socklen_t * restrict,
+struct sockaddr * restrict, socklen_t * restrict);
+static ssize_t	sendfromto(int, const void *, size_t, int,
+const struct sockaddr *, socklen_t, const struct sockaddr *, socklen_t);
 static void	chargen_dg(int, struct servtab *);
 static void	chargen_stream(int, struct servtab *);
 static void	daytime_dg(int, struct servtab *);
@@ -809,6 +814,26 @@ setsockopt(fd, SOL_SOCKET, opt, &on, (so
 	if (sep->se_socktype == SOCK_STREAM)
 		listen(sep->se_fd, 10);
 
+	/* for internal dgram, setsockopt() is required for recvfromto() */
+	if (sep->se_socktype == SOCK_DGRAM && sep->se_bi != NULL) {
+		switch (sep->se_family) {
+		case AF_INET:
+			if (setsockopt(sep->se_fd, IPPROTO_IP,
+			IP_RECVDSTADDR, &on, sizeof(on)) < 0)
+syslog(LOG_ERR,
+"setsockopt (IP_RECVDSTADDR): %m");
+			break;
+#ifdef INET6
+		case AF_INET6:
+			if (setsockopt(sep->se_fd, IPPROTO_IPV6,
+			IPV6_RECVPKTINFO, &on, sizeof(on)) < 0)
+syslog(LOG_ERR,
+"setsockopt (IPV6_RECVPKTINFO): %m");
+			break;
+#endif
+		}
+	}
+
 	/* Set the accept filter, if specified. To be done after listen.*/
 	if (sep->se_accf.af_name[0] != 0 && setsockopt(sep->se_fd, SOL_SOCKET,
 	SO_ACCEPTFILTER, &sep->se_accf,
@@ -955,6 +980,189 @@ bump_nofile(void)
 }
 
 /*
+ * In order to get the destination address (`to') with recvfromto(),
+ * IP_RECVDSTADDR or IP_RECVPKTINFO for AF_INET, or IPV6_RECVPKTINFO
+ * for AF_INET6, must be enabled with setsockopt(2).
+ *
+ * .sin_port and .sin6_port in 'to' are always stored as zero.
+ * If necessary, extract them using getsockname(2).
+ */
+static ssize_t
+recvfromto(int s, void * restrict buf, size_t len, int flags,
+struct sockaddr * restrict from, socklen_t * restrict fromlen,
+struct sockaddr * restrict to, socklen_t * restrict tolen)
+{
+	struct msghdr msg;
+	struct iovec vec;
+	struct cmsghdr *cmsg;
+	struct sockaddr_storage ss;
+	char cmsgbuf[1024];
+	ssize_t rc;
+
+	if (to == NULL)
+		return recvfrom(s, buf, len, flags, from, fromlen);
+
+	if (tolen == NULL || fromlen == NULL) {
+		errno = EFAULT;
+		return -1;
+	}
+
+	vec.iov_base = buf;
+	vec.iov_len = len;
+	msg.msg_name = from;
+	msg.msg_namelen = *fromlen;
+	msg.msg_iov = &vec;
+	msg.msg_iovlen = 1;
+	msg.msg_control = cmsgbuf;
+	msg.msg_controllen = sizeof(cmsgbuf);
+
+	rc = recvmsg(s, &msg, flags);
+	if (rc < 0)
+		return rc;
+	*fromlen = msg.msg_namelen;
+
+	memset(&ss, 0, sizeof(ss));
+	for (cmsg = (struct cmsghdr *)CMSG_FIRSTHDR(&msg); cmsg != NULL;
+	cmsg = (struct cmsghdr *)CMSG_NXTHDR(&msg, cmsg)) {
+		if (cmsg->cmsg_level == IPPROTO_IP &&
+		cmsg->cmsg_type == IP_RECVDSTADDR) {
+			struct in_addr *dst = (struct in_addr *)CMSG_DATA(cmsg);
+			struct sockaddr_in *sin = (struct sockaddr_in *)&ss;
+
+			sin->sin_len = sizeof(*sin);
+			sin->sin_family = AF_INET;
+			sin->sin_addr = *dst;
+			break;
+		}
+		if (cmsg->cmsg_level == IPPROTO_IP &&
+		cmsg->cmsg_type == IP_PKTINFO) {
+			struct in_pktinfo *pi =
+			(struct in_pktinfo *)CMSG_DATA(cmsg);
+			struct sockaddr_in *sin = (struct sockaddr_in *)&ss;
+
+			sin->sin_len = sizeof(*sin);
+			sin->sin_family = AF_INET;
+			sin->sin_addr = pi->ipi_addr;
+			break;
+		}
+#ifdef INET6
+		if (cmsg->cmsg_level == IPPROTO_IPV6 &&
+		  

CVS commit: src/usr.sbin/inetd

2021-10-16 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sun Oct 17 04:14:49 UTC 2021

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

Log Message:
To an alias address, or in a multihoming environment, the internal dgram
server may respond from a different address than the destination address
sent by the client.
To solve this problem, I introduce sendfromto() and recvfromto() so that
the server can reply from the correct address, i.e., the destination address
used in the request.

This change also has the aspect of a reference implementation using the
RECVDSTADDR and PKTINFO socket options.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/usr.sbin/inetd/inetd.c

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



CVS commit: src/tests/usr.bin/indent

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 21:32:10 UTC 2021

Modified Files:
src/tests/usr.bin/indent: opt_bap.c opt_bbb.c opt_bc.c opt_bs.c
opt_cdb.c opt_ce.c opt_cs.c opt_dj.c opt_eei.c opt_ei.c opt_fbs.c
opt_fc1.c opt_fcb.c opt_ip.c opt_lp.c opt_lpl.c opt_pcs.c opt_psl.c
opt_sc.c opt_sob.c opt_ut.c opt_v.c

Log Message:
tests/lint: document and extend the tests for options


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/opt_bap.c \
src/tests/usr.bin/indent/opt_dj.c src/tests/usr.bin/indent/opt_ut.c \
src/tests/usr.bin/indent/opt_v.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/opt_bbb.c \
src/tests/usr.bin/indent/opt_bc.c src/tests/usr.bin/indent/opt_bs.c \
src/tests/usr.bin/indent/opt_cdb.c src/tests/usr.bin/indent/opt_ce.c \
src/tests/usr.bin/indent/opt_cs.c src/tests/usr.bin/indent/opt_eei.c \
src/tests/usr.bin/indent/opt_ei.c src/tests/usr.bin/indent/opt_fbs.c \
src/tests/usr.bin/indent/opt_fc1.c src/tests/usr.bin/indent/opt_fcb.c \
src/tests/usr.bin/indent/opt_ip.c src/tests/usr.bin/indent/opt_lp.c \
src/tests/usr.bin/indent/opt_lpl.c src/tests/usr.bin/indent/opt_pcs.c \
src/tests/usr.bin/indent/opt_psl.c src/tests/usr.bin/indent/opt_sc.c \
src/tests/usr.bin/indent/opt_sob.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/opt_bap.c
diff -u src/tests/usr.bin/indent/opt_bap.c:1.1 src/tests/usr.bin/indent/opt_bap.c:1.2
--- src/tests/usr.bin/indent/opt_bap.c:1.1	Sat Oct 16 03:20:13 2021
+++ src/tests/usr.bin/indent/opt_bap.c	Sat Oct 16 21:32:10 2021
@@ -1,13 +1,21 @@
-/* $NetBSD: opt_bap.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_bap.c,v 1.2 2021/10/16 21:32:10 rillig Exp $ */
 /* $FreeBSD$ */
 
+/*
+ * Tests for the options '-bap' and '-nbap'.
+ *
+ * The option '-bap' forces a blank line after every function body.
+ *
+ * The option '-nbap' keeps everything as is.
+ */
+
 #indent input
-static void one_liner(void) { /* FIXME: needs empty line below */ }
-static void several_lines(void) {
+static void one_liner(void){}
+static void several_lines(void)
+{
 	action();
-	/* FIXME: needs empty line below */
 }
-int main(void){/* FIXME: needs empty line below */}
+int main(void){}
 int global_variable;
 
 void already_has_blank_line_below(void)
@@ -26,18 +34,20 @@ int		the_end;
 #indent run -bap
 static void
 one_liner(void)
-{/* FIXME: needs empty line below */
+{
 }
+/* $ FIXME: needs a blank line here */
 static void
 several_lines(void)
 {
 	action();
-	/* FIXME: needs empty line below */
 }
+/* $ FIXME: needs a blank line here */
 int
 main(void)
-{/* FIXME: needs empty line below */
+{
 }
+/* $ FIXME: needs a blank line here */
 int		global_variable;
 
 void
@@ -55,27 +65,6 @@ has_several_blank_lines_below(void)
 int		the_end;
 #indent end
 
-#indent input
-static void one_liner(void) {}
-static void several_lines(void) {
-	action();
-}
-int main(void){}
-int global_variable;
-
-void already_has_blank_line_below(void)
-{
-}
-
-void has_several_blank_lines_below(void)
-{
-}
-
-
-
-int		the_end;
-#indent end
-
 #indent run -nbap
 static void
 one_liner(void)
Index: src/tests/usr.bin/indent/opt_dj.c
diff -u src/tests/usr.bin/indent/opt_dj.c:1.1 src/tests/usr.bin/indent/opt_dj.c:1.2
--- src/tests/usr.bin/indent/opt_dj.c:1.1	Sat Oct 16 03:20:13 2021
+++ src/tests/usr.bin/indent/opt_dj.c	Sat Oct 16 21:32:10 2021
@@ -1,6 +1,15 @@
-/* $NetBSD: opt_dj.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_dj.c,v 1.2 2021/10/16 21:32:10 rillig Exp $ */
 /* $FreeBSD$ */
 
+/*
+ * Tests for the options '-dj' and '-ndj'.
+ *
+ * The option '-dj' left-justifies declarations.
+ *
+ * The option '-ndj' indents declarations the same as code.
+ */
+
+/* For top-level declarations, '-dj' and '-ndj' produce the same output. */
 #indent input
 int i;
 int *ip;
@@ -19,20 +28,7 @@ const void **vpp;
 const void v;
 #indent end
 
-#indent input
-/* FIXME: The options -dj and -ndj produce the same output. */
-
-int i;
-int *ip;
-const char *ccp;
-const void *vp;
-const void **vpp;
-const void v;
-#indent end
-
 #indent run -ndj
-/* FIXME: The options -dj and -ndj produce the same output. */
-
 int		i;
 int	   *ip;
 const char *ccp;
@@ -40,3 +36,28 @@ const void *vp;
 const void **vpp;
 const void v;
 #indent end
+
+#indent input
+void example(void) {
+	int decl;
+	code();
+}
+#indent end
+
+#indent run -dj
+void
+example(void)
+{
+int		decl;
+	code();
+}
+#indent end
+
+#indent run -ndj
+void
+example(void)
+{
+	int		decl;
+	code();
+}
+#indent end
Index: src/tests/usr.bin/indent/opt_ut.c
diff -u src/tests/usr.bin/indent/opt_ut.c:1.1 src/tests/usr.bin/indent/opt_ut.c:1.2
--- src/tests/usr.bin/indent/opt_ut.c:1.1	Sat Oct 16 03:20:13

CVS commit: src/tests/usr.bin/indent

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 21:32:10 UTC 2021

Modified Files:
src/tests/usr.bin/indent: opt_bap.c opt_bbb.c opt_bc.c opt_bs.c
opt_cdb.c opt_ce.c opt_cs.c opt_dj.c opt_eei.c opt_ei.c opt_fbs.c
opt_fc1.c opt_fcb.c opt_ip.c opt_lp.c opt_lpl.c opt_pcs.c opt_psl.c
opt_sc.c opt_sob.c opt_ut.c opt_v.c

Log Message:
tests/lint: document and extend the tests for options


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/opt_bap.c \
src/tests/usr.bin/indent/opt_dj.c src/tests/usr.bin/indent/opt_ut.c \
src/tests/usr.bin/indent/opt_v.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/opt_bbb.c \
src/tests/usr.bin/indent/opt_bc.c src/tests/usr.bin/indent/opt_bs.c \
src/tests/usr.bin/indent/opt_cdb.c src/tests/usr.bin/indent/opt_ce.c \
src/tests/usr.bin/indent/opt_cs.c src/tests/usr.bin/indent/opt_eei.c \
src/tests/usr.bin/indent/opt_ei.c src/tests/usr.bin/indent/opt_fbs.c \
src/tests/usr.bin/indent/opt_fc1.c src/tests/usr.bin/indent/opt_fcb.c \
src/tests/usr.bin/indent/opt_ip.c src/tests/usr.bin/indent/opt_lp.c \
src/tests/usr.bin/indent/opt_lpl.c src/tests/usr.bin/indent/opt_pcs.c \
src/tests/usr.bin/indent/opt_psl.c src/tests/usr.bin/indent/opt_sc.c \
src/tests/usr.bin/indent/opt_sob.c

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



CVS commit: src/distrib/utils/embedded/conf

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 14:05:48 UTC 2021

Modified Files:
src/distrib/utils/embedded/conf: arm64.conf

Log Message:
Background dhcpcd if ec2_init is not enabled to speed up boot.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/embedded/conf/arm64.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/arm64.conf
diff -u src/distrib/utils/embedded/conf/arm64.conf:1.13 src/distrib/utils/embedded/conf/arm64.conf:1.14
--- src/distrib/utils/embedded/conf/arm64.conf:1.13	Thu Jul  1 17:32:07 2021
+++ src/distrib/utils/embedded/conf/arm64.conf	Sat Oct 16 14:05:48 2021
@@ -1,4 +1,4 @@
-# $NetBSD: arm64.conf,v 1.13 2021/07/01 17:32:07 jmcneill Exp $
+# $NetBSD: arm64.conf,v 1.14 2021/10/16 14:05:48 jmcneill Exp $
 # ARM64 customization script used by mkimage
 #
 board=arm64
@@ -31,6 +31,8 @@ wscons=\$(dev_exists wsdisplay0)
 ec2_init=\$(dev_exists ena0)
 if checkyesno ec2_init ; then
 	dhcpcd_flags="\$dhcpcd_flags -w"
+else
+	dhcpcd_flags="\$dhcpcd_flags -b"
 fi
 EOF
 }



CVS commit: src/distrib/utils/embedded/conf

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 14:05:48 UTC 2021

Modified Files:
src/distrib/utils/embedded/conf: arm64.conf

Log Message:
Background dhcpcd if ec2_init is not enabled to speed up boot.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/embedded/conf/arm64.conf

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



CVS commit: src/sys/arch/x86/isa

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:15:01 UTC 2021

Modified Files:
src/sys/arch/x86/isa: isa_machdep.c

Log Message:
Skip legacy device detection for VMware guests with ACPI enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/isa/isa_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/x86/isa

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:15:01 UTC 2021

Modified Files:
src/sys/arch/x86/isa: isa_machdep.c

Log Message:
Skip legacy device detection for VMware guests with ACPI enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/isa/isa_machdep.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/x86/isa/isa_machdep.c
diff -u src/sys/arch/x86/isa/isa_machdep.c:1.48 src/sys/arch/x86/isa/isa_machdep.c:1.49
--- src/sys/arch/x86/isa/isa_machdep.c:1.48	Fri Oct 15 19:01:52 2021
+++ src/sys/arch/x86/isa/isa_machdep.c	Sat Oct 16 13:15:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.c,v 1.48 2021/10/15 19:01:52 jmcneill Exp $	*/
+/*	$NetBSD: isa_machdep.c,v 1.49 2021/10/16 13:15:01 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.48 2021/10/15 19:01:52 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.49 2021/10/16 13:15:01 jmcneill Exp $");
 
 #include 
 #include 
@@ -387,6 +387,11 @@ device_isa_register(device_t dev, void *
 			"no-legacy-devices", true);
 		}
 	}
+	if (vm_guest == VM_GUEST_VMWARE &&
+	device_is_a(dev, "isa") && acpi_active) {
+		prop_dictionary_set_bool(device_properties(dev),
+		"no-legacy-devices", true);
+	}
 #endif /* NACPICA > 0 */
 	return NULL;
 }



CVS commit: src/sys/arch/amd64/conf

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:09:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable com and lpt at ACPI attachments.


To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/sys/arch/amd64/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.591 src/sys/arch/amd64/conf/GENERIC:1.592
--- src/sys/arch/amd64/conf/GENERIC:1.591	Fri Oct 15 19:22:12 2021
+++ src/sys/arch/amd64/conf/GENERIC	Sat Oct 16 13:09:40 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.591 2021/10/15 19:22:12 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.592 2021/10/16 13:09:40 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.591 $"
+#ident		"GENERIC-$Revision: 1.592 $"
 
 maxusers	64		# estimated number of users
 
@@ -337,7 +337,9 @@ acpiwmi*	at acpi?		# ACPI WMI Mapper
 aibs*		at acpi?		# ASUSTeK AI Booster hardware monitor
 asus*		at acpi?		# ASUS hotkeys
 attimer*	at acpi?		# AT Timer
-#com*		at acpi?		# Serial communications interface
+com0		at acpi?		# Serial communications interface
+com1		at acpi?		# Serial communications interface
+com*		at acpi?		# Serial communications interface
 fdc*		at acpi?		# Floppy disk controller
 fd*		at fdc? drive ?		# the drives themselves
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer
@@ -347,7 +349,9 @@ fujhk*		at acpi?		# Fujitsu Hotkeys
 hpet*		at acpihpetbus?		# High Precision Event Timer (table)
 hpet*		at acpinodebus?		# High Precision Event Timer (device)
 joy*		at acpi?		# Joystick/Game port
-#lpt*		at acpi?		# Parallel port
+lpt0		at acpi?		# Parallel port
+lpt1		at acpi?		# Parallel port
+lpt*		at acpi?		# Parallel port
 mpu*		at acpi?		# Roland MPU-401 MIDI UART
 pckbc*		at acpi?		# PC keyboard controller
 pcppi*		at acpi?		# AT-style speaker sound



CVS commit: src/sys/arch/amd64/conf

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:09:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable com and lpt at ACPI attachments.


To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/sys/arch/amd64/conf/GENERIC

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



CVS commit: src/lib/libcrypt

2021-10-16 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 16 10:53:34 UTC 2021

Modified Files:
src/lib/libcrypt: bcrypt.c crypt-argon2.c crypt-sha1.c crypt.h hmac.c
md5crypt.c pw_gensalt.c

Log Message:
libcrypt: Hide more private symbols by default. Fix style.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libcrypt/bcrypt.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libcrypt/crypt-argon2.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libcrypt/crypt-sha1.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcrypt/crypt.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libcrypt/hmac.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libcrypt/md5crypt.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libcrypt/pw_gensalt.c

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



CVS commit: src/lib/libcrypt

2021-10-16 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 16 10:53:34 UTC 2021

Modified Files:
src/lib/libcrypt: bcrypt.c crypt-argon2.c crypt-sha1.c crypt.h hmac.c
md5crypt.c pw_gensalt.c

Log Message:
libcrypt: Hide more private symbols by default. Fix style.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libcrypt/bcrypt.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libcrypt/crypt-argon2.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libcrypt/crypt-sha1.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcrypt/crypt.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libcrypt/hmac.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libcrypt/md5crypt.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libcrypt/pw_gensalt.c

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

Modified files:

Index: src/lib/libcrypt/bcrypt.c
diff -u src/lib/libcrypt/bcrypt.c:1.21 src/lib/libcrypt/bcrypt.c:1.22
--- src/lib/libcrypt/bcrypt.c:1.21	Wed Mar 25 21:02:26 2020
+++ src/lib/libcrypt/bcrypt.c	Sat Oct 16 10:53:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcrypt.c,v 1.21 2020/03/25 21:02:26 christos Exp $	*/
+/*	$NetBSD: bcrypt.c,v 1.22 2021/10/16 10:53:33 nia Exp $	*/
 /*	$OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $	*/
 
 /*
@@ -46,7 +46,7 @@
  *
  */
 #include 
-__RCSID("$NetBSD: bcrypt.c,v 1.21 2020/03/25 21:02:26 christos Exp $");
+__RCSID("$NetBSD: bcrypt.c,v 1.22 2021/10/16 10:53:33 nia Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ static void encode_salt(char *, u_int8_t
 static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
 static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *);
 
-char *__bcrypt(const char *, const char *);	/* XXX */
+crypt_private char *__bcrypt(const char *, const char *);	/* XXX */
 
 static charencrypted[_PASSWORD_LEN];
 
@@ -149,7 +149,7 @@ encode_salt(char *salt, u_int8_t *csalt,
 	encode_base64((u_int8_t *) salt + 7, csalt, clen);
 }
 
-int
+crypt_private int
 __gensalt_blowfish(char *salt, size_t saltlen, const char *option)
 {
 	size_t i;
@@ -209,7 +209,7 @@ bcrypt_gensalt(u_int8_t log_rounds)
 /* We handle $Vers$log2(NumRounds)$salt+passwd$
i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
 
-char   *
+crypt_private char   *
 __bcrypt(const char *key, const char *salt)
 {
 	blf_ctx state;

Index: src/lib/libcrypt/crypt-argon2.c
diff -u src/lib/libcrypt/crypt-argon2.c:1.9 src/lib/libcrypt/crypt-argon2.c:1.10
--- src/lib/libcrypt/crypt-argon2.c:1.9	Tue Oct 12 15:55:31 2021
+++ src/lib/libcrypt/crypt-argon2.c	Sat Oct 16 10:53:33 2021
@@ -243,7 +243,7 @@ decode_option(argon2_context *ctx, argon
 return error;
 }
 
-char * 
+crypt_private char * 
 __crypt_argon2(const char *pw, const char * salt)
 {
 	/* we use the libargon2 api to generate */

Index: src/lib/libcrypt/crypt-sha1.c
diff -u src/lib/libcrypt/crypt-sha1.c:1.8 src/lib/libcrypt/crypt-sha1.c:1.9
--- src/lib/libcrypt/crypt-sha1.c:1.8	Wed Aug 28 17:47:07 2013
+++ src/lib/libcrypt/crypt-sha1.c	Sat Oct 16 10:53:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: crypt-sha1.c,v 1.8 2013/08/28 17:47:07 riastradh Exp $ */
+/* $NetBSD: crypt-sha1.c,v 1.9 2021/10/16 10:53:33 nia Exp $ */
 
 /*
  * Copyright (c) 2004, Juniper Networks, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: crypt-sha1.c,v 1.8 2013/08/28 17:47:07 riastradh Exp $");
+__RCSID("$NetBSD: crypt-sha1.c,v 1.9 2021/10/16 10:53:33 nia Exp $");
 #endif /* not lint */
 
 #include 
@@ -68,7 +68,7 @@ __RCSID("$NetBSD: crypt-sha1.c,v 1.8 201
  * The number is varied to frustrate those attempting to generate a
  * dictionary of pre-computed hashes.
  */
-unsigned int
+crypt_private unsigned int
 __crypt_sha1_iterations (unsigned int hint)
 {
 static int once = 1;
@@ -115,7 +115,7 @@ __crypt_sha1_iterations (unsigned int hi
  * strength, and avoid the need to hash it before using as the 
  * hmac key.
  */
-char *
+crypt_private char *
 __crypt_sha1 (const char *pw, const char *salt)
 {
 static const char *magic = SHA1_MAGIC;

Index: src/lib/libcrypt/crypt.h
diff -u src/lib/libcrypt/crypt.h:1.7 src/lib/libcrypt/crypt.h:1.8
--- src/lib/libcrypt/crypt.h:1.7	Tue Oct 12 15:25:39 2021
+++ src/lib/libcrypt/crypt.h	Sat Oct 16 10:53:33 2021
@@ -1,32 +1,32 @@
 /*
- * $NetBSD: crypt.h,v 1.7 2021/10/12 15:25:39 nia Exp $
+ * $NetBSD: crypt.h,v 1.8 2021/10/16 10:53:33 nia Exp $
  */
 
 #define crypt_private __attribute__((__visibility__("hidden")))
 
-char	*__md5crypt(const char *pw, const char *salt);	/* XXX */
-char *__bcrypt(const char *, const char *);	/* XXX */
-char *__crypt_sha1(const char *pw, const char *salt);
-unsigned int __crypt_sha1_iterations (unsigned int hint);
-void __hmac_sha1(const unsigned char *, size_t, const unsigned char *, size_t,
-		 unsigned char *);
+crypt_private char *__md5crypt(const char *, const char *);	/* XXX */
+crypt_private char *__bcrypt(const char *, const char *);	/* XXX */
+crypt_private char *__crypt_sha1(const char *, const char *);
+cryp

CVS commit: src/tests/usr.bin/indent

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 09:39:21 UTC 2021

Modified Files:
src/tests/usr.bin/indent: opt_bad.c opt_badp.c

Log Message:
tests/indent: clean up tests for '-bad' and '-badp'


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/opt_bad.c \
src/tests/usr.bin/indent/opt_badp.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/opt_bad.c
diff -u src/tests/usr.bin/indent/opt_bad.c:1.1 src/tests/usr.bin/indent/opt_bad.c:1.2
--- src/tests/usr.bin/indent/opt_bad.c:1.1	Sat Oct 16 03:20:13 2021
+++ src/tests/usr.bin/indent/opt_bad.c	Sat Oct 16 09:39:21 2021
@@ -1,34 +1,52 @@
-/* $NetBSD: opt_bad.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_bad.c,v 1.2 2021/10/16 09:39:21 rillig Exp $ */
 /* $FreeBSD$ */
 
-#indent input
 /*
- * The option -bad only affects declarations of local variables.  It does not
- * affect file-scoped declarations or definitions.
+ * Tests for the options '-bad' and '-nbad'.
+ *
+ * The option '-bad' forces a blank line after every block of declarations.
+ * It only affects declarations of local variables.  It does not affect
+ * file-scoped declarations or definitions.
+ *
+ * The option '-nbad' leaves everything as is.
  */
 
+/* Test global declarations. */
+#indent input
 int global_variable;
 void function_declaration(void);
 #if 0
 #endif
-void function_definition(void) {
-	int local_variable;
-	function_call();
-	int local_variable_after_statement;
-	function_call();
-}
+/* comment */
 #indent end
 
 #indent run -bad
-/*
- * The option -bad only affects declarations of local variables.  It does not
- * affect file-scoped declarations or definitions.
- */
+int		global_variable;
+void		function_declaration(void);
+#if 0
+#endif
+/* comment */
+#indent end
 
+#indent run -nbad
 int		global_variable;
 void		function_declaration(void);
 #if 0
 #endif
+/* comment */
+#indent end
+
+/* Test local declarations. */
+#indent input
+void function_definition(void) {
+int local_variable;
+function_call();
+int local_variable_after_statement;
+function_call();
+}
+#indent end
+
+#indent run -bad
 void
 function_definition(void)
 {
@@ -41,30 +59,15 @@ function_definition(void)
 }
 #indent end
 
-#indent input
-int global_variable;
-void function_declaration(void);
-#if 0
-#endif
-void function_definition(void) {
-	int local_variable;
-	function_call();
-	int local_variable_after_statement;
-	function_call();
-}
-#indent end
-
 #indent run -nbad
-int		global_variable;
-void		function_declaration(void);
-#if 0
-#endif
 void
 function_definition(void)
 {
 	int		local_variable;
+	/* $ No blank line here. */
 	function_call();
 	int		local_variable_after_statement;
+	/* $ No blank line here. */
 	function_call();
 }
 #indent end
Index: src/tests/usr.bin/indent/opt_badp.c
diff -u src/tests/usr.bin/indent/opt_badp.c:1.1 src/tests/usr.bin/indent/opt_badp.c:1.2
--- src/tests/usr.bin/indent/opt_badp.c:1.1	Sat Oct 16 03:20:13 2021
+++ src/tests/usr.bin/indent/opt_badp.c	Sat Oct 16 09:39:21 2021
@@ -1,6 +1,13 @@
-/* $NetBSD: opt_badp.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_badp.c,v 1.2 2021/10/16 09:39:21 rillig Exp $ */
 /* $FreeBSD$ */
 
+/*
+ * Tests for the options '-badp' and '-nbadp'.
+ *
+ * The option '-badp' forces a blank line after the first set of declarations
+ * in a function. It produces a blank line even if there are no declarations.
+ */
+
 #indent input
 static void
 no_declarations(void)
@@ -12,7 +19,7 @@ static void
 declarations_without_blank_line(void)
 {
 	int local_variable;
-	action();		/* FIXME: need empty line above */
+	action();
 }
 
 static void
@@ -46,7 +53,8 @@ static void
 declarations_without_blank_line(void)
 {
 	int		local_variable;
-	action();		/* FIXME: need empty line above */
+	/* $ FIXME: need empty line here */
+	action();
 }
 
 static void
@@ -68,39 +76,6 @@ declaration_with_several_blank_lines(voi
 }
 #indent end
 
-#indent input
-static void
-no_declarations(void)
-{
-	action();
-}
-
-static void
-declarations_without_blank_line(void)
-{
-	int local_variable;
-	action();
-}
-
-static void
-declaration_with_blank_line(void)
-{
-	int local_variable;
-
-	action();
-}
-
-static void
-declaration_with_several_blank_lines(void)
-{
-	int local_variable;
-
-
-
-	action();
-}
-#indent end
-
 #indent run -nbadp
 static void
 no_declarations(void)



CVS commit: src/tests/usr.bin/indent

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 09:39:21 UTC 2021

Modified Files:
src/tests/usr.bin/indent: opt_bad.c opt_badp.c

Log Message:
tests/indent: clean up tests for '-bad' and '-badp'


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/opt_bad.c \
src/tests/usr.bin/indent/opt_badp.c

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



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

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 09:17:21 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
tests/indent: add newly added t_options to file list


To generate a diff of this commit:
cvs rdiff -u -r1.1140 -r1.1141 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1140 src/distrib/sets/lists/tests/mi:1.1141
--- src/distrib/sets/lists/tests/mi:1.1140	Sat Oct 16 05:21:57 2021
+++ src/distrib/sets/lists/tests/mi	Sat Oct 16 09:17:21 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1140 2021/10/16 05:21:57 rillig Exp $
+# $NetBSD: mi,v 1.1141 2021/10/16 09:17:21 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5033,6 +5033,7 @@
 ./usr/tests/usr.bin/indent/t_errors	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/t_indent	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/t_misc	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/indent/t_options	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/token-binary_op.0tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/token-binary_op.0.pro			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/token-binary_op.0.stdout			tests-usr.bin-tests	compattestfile,atf



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

2021-10-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 16 09:17:21 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
tests/indent: add newly added t_options to file list


To generate a diff of this commit:
cvs rdiff -u -r1.1140 -r1.1141 src/distrib/sets/lists/tests/mi

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



CVS commit: src/sys/kern

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:12:01 UTC 2021

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

Log Message:
Spinkle some KNF spaces after commas.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 src/sys/kern/vfs_subr.c

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

Modified files:

Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.490 src/sys/kern/vfs_subr.c:1.491
--- src/sys/kern/vfs_subr.c:1.490	Thu Feb  4 21:07:06 2021
+++ src/sys/kern/vfs_subr.c	Sat Oct 16 07:12:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.490 2021/02/04 21:07:06 jdolecek Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.491 2021/10/16 07:12:01 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.490 2021/02/04 21:07:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.491 2021/10/16 07:12:01 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1619,10 +1619,10 @@ vfs_mount_print(struct mount *mp, int fu
 	char sbuf[256];
 
 	(*pr)("vnodecovered = %p data = %p\n",
-			mp->mnt_vnodecovered,mp->mnt_data);
+			mp->mnt_vnodecovered, mp->mnt_data);
 
 	(*pr)("fs_bshift %d dev_bshift = %d\n",
-			mp->mnt_fs_bshift,mp->mnt_dev_bshift);
+			mp->mnt_fs_bshift, mp->mnt_dev_bshift);
 
 	snprintb(sbuf, sizeof(sbuf), __MNT_FLAG_BITS, mp->mnt_flag);
 	(*pr)("flag = %s\n", sbuf);
@@ -1633,37 +1633,37 @@ vfs_mount_print(struct mount *mp, int fu
 	(*pr)("refcnt = %d updating @ %p\n", mp->mnt_refcnt, mp->mnt_updating);
 
 	(*pr)("statvfs cache:\n");
-	(*pr)("\tbsize = %lu\n",mp->mnt_stat.f_bsize);
-	(*pr)("\tfrsize = %lu\n",mp->mnt_stat.f_frsize);
-	(*pr)("\tiosize = %lu\n",mp->mnt_stat.f_iosize);
-
-	(*pr)("\tblocks = %"PRIu64"\n",mp->mnt_stat.f_blocks);
-	(*pr)("\tbfree = %"PRIu64"\n",mp->mnt_stat.f_bfree);
-	(*pr)("\tbavail = %"PRIu64"\n",mp->mnt_stat.f_bavail);
-	(*pr)("\tbresvd = %"PRIu64"\n",mp->mnt_stat.f_bresvd);
-
-	(*pr)("\tfiles = %"PRIu64"\n",mp->mnt_stat.f_files);
-	(*pr)("\tffree = %"PRIu64"\n",mp->mnt_stat.f_ffree);
-	(*pr)("\tfavail = %"PRIu64"\n",mp->mnt_stat.f_favail);
-	(*pr)("\tfresvd = %"PRIu64"\n",mp->mnt_stat.f_fresvd);
+	(*pr)("\tbsize = %lu\n", mp->mnt_stat.f_bsize);
+	(*pr)("\tfrsize = %lu\n", mp->mnt_stat.f_frsize);
+	(*pr)("\tiosize = %lu\n", mp->mnt_stat.f_iosize);
+
+	(*pr)("\tblocks = %"PRIu64"\n", mp->mnt_stat.f_blocks);
+	(*pr)("\tbfree = %"PRIu64"\n", mp->mnt_stat.f_bfree);
+	(*pr)("\tbavail = %"PRIu64"\n", mp->mnt_stat.f_bavail);
+	(*pr)("\tbresvd = %"PRIu64"\n", mp->mnt_stat.f_bresvd);
+
+	(*pr)("\tfiles = %"PRIu64"\n", mp->mnt_stat.f_files);
+	(*pr)("\tffree = %"PRIu64"\n", mp->mnt_stat.f_ffree);
+	(*pr)("\tfavail = %"PRIu64"\n", mp->mnt_stat.f_favail);
+	(*pr)("\tfresvd = %"PRIu64"\n", mp->mnt_stat.f_fresvd);
 
 	(*pr)("\tf_fsidx = { 0x%"PRIx32", 0x%"PRIx32" }\n",
 			mp->mnt_stat.f_fsidx.__fsid_val[0],
 			mp->mnt_stat.f_fsidx.__fsid_val[1]);
 
-	(*pr)("\towner = %"PRIu32"\n",mp->mnt_stat.f_owner);
-	(*pr)("\tnamemax = %lu\n",mp->mnt_stat.f_namemax);
+	(*pr)("\towner = %"PRIu32"\n", mp->mnt_stat.f_owner);
+	(*pr)("\tnamemax = %lu\n", mp->mnt_stat.f_namemax);
 
 	snprintb(sbuf, sizeof(sbuf), __MNT_FLAG_BITS, mp->mnt_stat.f_flag);
 
-	(*pr)("\tflag = %s\n",sbuf);
-	(*pr)("\tsyncwrites = %" PRIu64 "\n",mp->mnt_stat.f_syncwrites);
-	(*pr)("\tasyncwrites = %" PRIu64 "\n",mp->mnt_stat.f_asyncwrites);
-	(*pr)("\tsyncreads = %" PRIu64 "\n",mp->mnt_stat.f_syncreads);
-	(*pr)("\tasyncreads = %" PRIu64 "\n",mp->mnt_stat.f_asyncreads);
-	(*pr)("\tfstypename = %s\n",mp->mnt_stat.f_fstypename);
-	(*pr)("\tmntonname = %s\n",mp->mnt_stat.f_mntonname);
-	(*pr)("\tmntfromname = %s\n",mp->mnt_stat.f_mntfromname);
+	(*pr)("\tflag = %s\n", sbuf);
+	(*pr)("\tsyncwrites = %" PRIu64 "\n", mp->mnt_stat.f_syncwrites);
+	(*pr)("\tasyncwrites = %" PRIu64 "\n", mp->mnt_stat.f_asyncwrites);
+	(*pr)("\tsyncreads = %" PRIu64 "\n", mp->mnt_stat.f_syncreads);
+	(*pr)("\tasyncreads = %" PRIu64 "\n", mp->mnt_stat.f_asyncreads);
+	(*pr)("\tfstypename = %s\n", mp->mnt_stat.f_fstypename);
+	(*pr)("\tmntonname = %s\n", mp->mnt_stat.f_mntonname);
+	(*pr)("\tmntfromname = %s\n", mp->mnt_stat.f_mntfromname);
 
 	{
 		int cnt = 0;



CVS commit: src/sys/kern

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:12:01 UTC 2021

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

Log Message:
Spinkle some KNF spaces after commas.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 src/sys/kern/vfs_subr.c

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



CVS commit: src/sys/dev/dkwedge

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:05:45 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Remove funny straggling blank line.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.107 src/sys/dev/dkwedge/dk.c:1.108
--- src/sys/dev/dkwedge/dk.c:1.107	Sat Aug 21 11:55:25 2021
+++ src/sys/dev/dkwedge/dk.c	Sat Oct 16 07:05:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.107 2021/08/21 11:55:25 andvar Exp $	*/
+/*	$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.107 2021/08/21 11:55:25 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -1339,7 +1339,6 @@ dkstart(struct dkwedge_softc *sc)
 
 	/* Do as much work as has been enqueued. */
 	while ((bp = bufq_peek(sc->sc_bufq)) != NULL) {
-
 		if (sc->sc_state != DKW_STATE_RUNNING) {
 			(void) bufq_get(sc->sc_bufq);
 			if (sc->sc_iopend-- == 1 &&



CVS commit: src/sys/dev/dkwedge

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:05:45 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Remove funny straggling blank line.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/dkwedge/dk.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/include/arm32

2021-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 07:04:36 UTC 2021

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
pm_remove_all is a shared field so move it out the #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/arch/arm/include/arm32/pmap.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/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.170 src/sys/arch/arm/include/arm32/pmap.h:1.171
--- src/sys/arch/arm/include/arm32/pmap.h:1.170	Tue May  4 09:02:21 2021
+++ src/sys/arch/arm/include/arm32/pmap.h	Sat Oct 16 07:04:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.170 2021/05/04 09:02:21 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.171 2021/10/16 07:04:36 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -238,10 +238,10 @@ struct pmap {
 	struct l2_dtable	*pm_l2[L2_SIZE];
 	struct pmap_statistics	pm_stats;
 	LIST_ENTRY(pmap)	pm_list;
+	bool			pm_remove_all;
 #ifdef ARM_MMU_EXTENDED
 	pd_entry_t		*pm_l1;
 	paddr_t			pm_l1_pa;
-	bool			pm_remove_all;
 #ifdef MULTIPROCESSOR
 	kcpuset_t		*pm_onproc;
 	kcpuset_t		*pm_active;
@@ -255,7 +255,6 @@ struct pmap {
 	union pmap_cache_state	pm_cstate;
 	uint8_t			pm_domain;
 	bool			pm_activated;
-	bool			pm_remove_all;
 #endif
 };
 



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

2021-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 07:04:36 UTC 2021

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
pm_remove_all is a shared field so move it out the #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/arch/arm/include/arm32/pmap.h

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



CVS commit: src/distrib/sets/lists

2021-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 07:01:03 UTC 2021

Modified Files:
src/distrib/sets/lists/base: md.amd64 shl.mi
src/distrib/sets/lists/comp: md.amd64 shl.mi
src/distrib/sets/lists/debug: md.amd64 shl.mi

Log Message:
Move tsan entries marked machine=amd64 from .mi files into md.amd64


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.928 -r1.929 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.288 -r1.289 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.347 -r1.348 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.115 -r1.116 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.285 -r1.286 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.285 src/distrib/sets/lists/base/md.amd64:1.286
--- src/distrib/sets/lists/base/md.amd64:1.285	Wed Jun 23 18:30:32 2021
+++ src/distrib/sets/lists/base/md.amd64	Sat Oct 16 07:01:02 2021
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.285 2021/06/23 18:30:32 christos Exp $
+# $NetBSD: md.amd64,v 1.286 2021/10/16 07:01:02 skrll Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			base-sys-shlib		compat,pic
@@ -11,6 +11,12 @@
 ./usr/lib/i386/libproc.so.1.0			base-compat-shlib	compat,pic,dtrace
 ./usr/lib/i386/librtld_db.so.0			base-compat-shlib	compat,pic,dtrace
 ./usr/lib/i386/librtld_db.so.0.0		base-compat-shlib	compat,pic,dtrace
+./usr/lib/libtsan.sobase-sys-shlib		cxx,gcc=9
+./usr/lib/libtsan.so.1base-sys-shlib		cxx,gcc=9
+./usr/lib/libtsan.so.1.0			base-sys-shlib		cxx,gcc=9
+./usr/lib/libtsan.sobase-sys-shlib		cxx,gcc=10
+./usr/lib/libtsan.so.1base-sys-shlib		cxx,gcc=10
+./usr/lib/libtsan.so.1.0			base-sys-shlib		cxx,gcc=10
 ./usr/lib/libx86_64.sobase-sys-shlib		pic
 ./usr/lib/libx86_64.so.0			base-sys-shlib		pic
 ./usr/lib/libx86_64.so.0.0			base-sys-shlib		pic

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.928 src/distrib/sets/lists/base/shl.mi:1.929
--- src/distrib/sets/lists/base/shl.mi:1.928	Thu Sep 30 02:00:19 2021
+++ src/distrib/sets/lists/base/shl.mi	Sat Oct 16 07:01:02 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.928 2021/09/30 02:00:19 yamaguchi Exp $
+# $NetBSD: shl.mi,v 1.929 2021/10/16 07:01:02 skrll Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -911,12 +911,6 @@
 ./usr/lib/libtre.sobase-sys-shlib		compatfile
 ./usr/lib/libtre.so.0base-sys-shlib		compatfile
 ./usr/lib/libtre.so.0.8base-sys-shlib		compatfile
-./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=9,machine=amd64
-./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=9,machine=amd64
-./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=9,machine=amd64
-./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=10,machine=amd64
-./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=10,machine=amd64
-./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=10,machine=amd64
 ./usr/lib/libtspi.sobase-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3base-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3.0			base-sys-shlib		compatfile,tpm

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.288 src/distrib/sets/lists/comp/md.amd64:1.289
--- src/distrib/sets/lists/comp/md.amd64:1.288	Thu Sep 16 23:32:49 2021
+++ src/distrib/sets/lists/comp/md.amd64	Sat Oct 16 07:01:03 2021
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.288 2021/09/16 23:32:49 christos Exp $
+# $NetBSD: md.amd64,v 1.289 2021/10/16 07:01:03 skrll Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -1429,6 +1429,8 @@
 ./usr/lib/i386/libi386.so			comp-sys-shlib		compat,pic
 ./usr/lib/i386/libi386_p.a			comp-c-proflib		compat,profile
 ./usr/lib/i386/libi386_pic.a			comp-c-piclib		compat,pic,picinstall
+./usr/lib/libtsan_pic.acomp-c-piclib		picinstall,cxx,gcc=9
+./usr/lib/libtsan_pic.acomp-c-piclib		picinstall,cxx,gcc=10
 ./usr/lib/libx86_64.acomp-c-lib
 ./usr/lib/libx86_64_p.acomp-c-proflib		profile
 ./usr/lib/libx86_64_pic.a			comp-c-piclib		pic,picinstall

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.347 src/distrib/sets/lists/comp/shl.mi:1.348
--- src/distrib/sets/lists/comp/shl.mi:1.347	Wed Jul 14 03:19:24 2021
+++ src/distrib/sets/lists/comp/shl.mi	Sat Oct 16 07:01:03 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.347 2021/07/14 03:19:24 ozaki-r Exp $
+# $NetBSD: shl.mi,v 1.348 2021/10/16 07:01:03 skrll Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -277,8 +

CVS commit: src/distrib/sets/lists

2021-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 07:01:03 UTC 2021

Modified Files:
src/distrib/sets/lists/base: md.amd64 shl.mi
src/distrib/sets/lists/comp: md.amd64 shl.mi
src/distrib/sets/lists/debug: md.amd64 shl.mi

Log Message:
Move tsan entries marked machine=amd64 from .mi files into md.amd64


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.928 -r1.929 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.288 -r1.289 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.347 -r1.348 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.115 -r1.116 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.285 -r1.286 src/distrib/sets/lists/debug/shl.mi

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