CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 03:44:59 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.h ipsec6.h ipsec_input.c xform.h xform_ah.c
xform_esp.c xform_ipcomp.c

Log Message:
Remove codes for PACKET_TAG_IPSEC_IN_CRYPTO_DONE

It seems that PACKET_TAG_IPSEC_IN_CRYPTO_DONE is for network adapters
that have IPsec accelerators; a driver sets the mtag to a packet
when its device has already encrypted the packet.

Unfortunately no driver implements such offload features for long
years and seems unlikely to implement them soon. (Note that neither
FreeBSD nor Linux doesn't have such drivers.) Let's remove related
(unused) codes and simplify the IPsec code.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/netipsec/ipsec.h
cvs rdiff -u -r1.17 -r1.18 src/sys/netipsec/ipsec6.h
cvs rdiff -u -r1.44 -r1.45 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.8 -r1.9 src/sys/netipsec/xform.h
cvs rdiff -u -r1.55 -r1.56 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.56 -r1.57 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.39 -r1.40 src/sys/netipsec/xform_ipcomp.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/netipsec/ipsec.h
diff -u src/sys/netipsec/ipsec.h:1.50 src/sys/netipsec/ipsec.h:1.51
--- src/sys/netipsec/ipsec.h:1.50	Fri Jun  2 03:41:20 2017
+++ src/sys/netipsec/ipsec.h	Wed Jul  5 03:44:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.h,v 1.50 2017/06/02 03:41:20 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec.h,v 1.51 2017/07/05 03:44:59 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $	*/
 
@@ -339,7 +339,7 @@ void *ah4_ctlinput(int, const struct soc
 struct m_tag;
 void ipsec4_common_input(struct mbuf *m, ...);
 int ipsec4_common_input_cb(struct mbuf *, struct secasvar *,
-			int, int, struct m_tag *);
+			int, int);
 int ipsec4_process_packet(struct mbuf *, struct ipsecrequest *);
 int ipsec_process_done (struct mbuf *, struct ipsecrequest *);
 #define ipsec_indone(m)	\

Index: src/sys/netipsec/ipsec6.h
diff -u src/sys/netipsec/ipsec6.h:1.17 src/sys/netipsec/ipsec6.h:1.18
--- src/sys/netipsec/ipsec6.h:1.17	Thu Apr 20 08:46:07 2017
+++ src/sys/netipsec/ipsec6.h	Wed Jul  5 03:44:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec6.h,v 1.17 2017/04/20 08:46:07 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec6.h,v 1.18 2017/07/05 03:44:59 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/ipsec6.h,v 1.1.4.1 2003/01/24 05:11:35 sam Exp $	*/
 /*	$KAME: ipsec.h,v 1.44 2001/03/23 08:08:47 itojun Exp $	*/
 
@@ -82,8 +82,7 @@ void * ah6_ctlinput(int, const struct so
 
 struct m_tag;
 int ipsec6_common_input(struct mbuf **, int *, int);
-int ipsec6_common_input_cb(struct mbuf *, struct secasvar *, 
-	int, int, struct m_tag *);
+int ipsec6_common_input_cb(struct mbuf *, struct secasvar *, int, int);
 int ipsec6_process_packet (struct mbuf*,struct ipsecrequest *);
 #endif /*_KERNEL*/
 

Index: src/sys/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.44 src/sys/netipsec/ipsec_input.c:1.45
--- src/sys/netipsec/ipsec_input.c:1.44	Wed Jun 28 13:12:37 2017
+++ src/sys/netipsec/ipsec_input.c	Wed Jul  5 03:44:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_input.c,v 1.44 2017/06/28 13:12:37 christos Exp $	*/
+/*	$NetBSD: ipsec_input.c,v 1.45 2017/07/05 03:44:59 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $	*/
 /*	$OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $	*/
 
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.44 2017/06/28 13:12:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.45 2017/07/05 03:44:59 ozaki-r Exp $");
 
 /*
  * IPsec input processing.
@@ -331,11 +331,10 @@ ipsec4_common_input(struct mbuf *m, ...)
  */
 int
 ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
-int skip, int protoff, struct m_tag *mt)
+int skip, int protoff)
 {
 	int prot, af __diagused, sproto;
 	struct ip *ip;
-	struct m_tag *mtag;
 	struct tdb_ident *tdbi;
 	struct secasindex *saidx;
 	int error;
@@ -476,13 +475,10 @@ cantpull:
 
 	/*
 	 * Record what we've done to the packet (under what SA it was
-	 * processed). If we've been passed an mtag, it means the packet
-	 * was already processed by an ethernet/crypto combo card and
-	 * thus has a tag attached with all the right information, but
-	 * with a PACKET_TAG_IPSEC_IN_CRYPTO_DONE as opposed to
-	 * PACKET_TAG_IPSEC_IN_DONE type; in that case, just change the type.
+	 * processed).
 	 */
-	if (mt == NULL && sproto != IPPROTO_IPCOMP) {
+	if (sproto != IPPROTO_IPCOMP) {
+		struct m_tag *mtag;
 		mtag = m_tag_get(PACKET_TAG_IPSEC_IN_DONE,
 		sizeof(struct tdb_ident), M_NOWAIT);
 		if (mtag == NULL) {
@@ -499,10 +495,6 @@ cantpull:
 		

CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 03:44:59 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.h ipsec6.h ipsec_input.c xform.h xform_ah.c
xform_esp.c xform_ipcomp.c

Log Message:
Remove codes for PACKET_TAG_IPSEC_IN_CRYPTO_DONE

It seems that PACKET_TAG_IPSEC_IN_CRYPTO_DONE is for network adapters
that have IPsec accelerators; a driver sets the mtag to a packet
when its device has already encrypted the packet.

Unfortunately no driver implements such offload features for long
years and seems unlikely to implement them soon. (Note that neither
FreeBSD nor Linux doesn't have such drivers.) Let's remove related
(unused) codes and simplify the IPsec code.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/netipsec/ipsec.h
cvs rdiff -u -r1.17 -r1.18 src/sys/netipsec/ipsec6.h
cvs rdiff -u -r1.44 -r1.45 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.8 -r1.9 src/sys/netipsec/xform.h
cvs rdiff -u -r1.55 -r1.56 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.56 -r1.57 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.39 -r1.40 src/sys/netipsec/xform_ipcomp.c

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



Re: CVS commit: src/sys/netinet

2017-07-04 Thread Ryota Ozaki
On Tue, Jul 4, 2017 at 7:26 PM, Roy Marples  wrote:
> On 04/07/2017 09:04, Ryota Ozaki wrote:
>> On Tue, Jul 4, 2017 at 1:43 AM, Roy Marples  wrote:
>>> Module Name:src
>>> Committed By:   roy
>>> Date:   Mon Jul  3 16:43:01 UTC 2017
>>>
>>> Modified Files:
>>> src/sys/netinet: ip_output.c
>>>
>>> Log Message:
>>> When outputting, search for the sending address on the sending interface
>>> rather than blindly picking the first matcing address from any interface
>>> when testing source address validity.
>>>
>>> This allows another interface to have the same address, but be detached.
>>
>> http://releng.netbsd.org/b5reports/i386/commits-2017.07.html#2017.07.03.16.43.01
>>
>> The commit causes many test failures.
>
> Should be fixed in r1.282
> Sorry about that.

NP. Confirmed that the tests pass again.

Thanks,
  ozaki-r


CVS commit: src/tests/net/ipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 01:25:03 UTC 2017

Modified Files:
src/tests/net/ipsec: t_ipsec_misc.sh

Log Message:
Add test cases for updating SA/SP

The tests require newly-added udpate command of setkey.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/net/ipsec/t_ipsec_misc.sh

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



CVS commit: src/tests/net/ipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 01:25:03 UTC 2017

Modified Files:
src/tests/net/ipsec: t_ipsec_misc.sh

Log Message:
Add test cases for updating SA/SP

The tests require newly-added udpate command of setkey.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/net/ipsec/t_ipsec_misc.sh

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

Modified files:

Index: src/tests/net/ipsec/t_ipsec_misc.sh
diff -u src/tests/net/ipsec/t_ipsec_misc.sh:1.7 src/tests/net/ipsec/t_ipsec_misc.sh:1.8
--- src/tests/net/ipsec/t_ipsec_misc.sh:1.7	Mon Jun 19 10:05:04 2017
+++ src/tests/net/ipsec/t_ipsec_misc.sh	Wed Jul  5 01:25:03 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ipsec_misc.sh,v 1.7 2017/06/19 10:05:04 ozaki-r Exp $
+#	$NetBSD: t_ipsec_misc.sh,v 1.8 2017/07/05 01:25:03 ozaki-r Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -38,24 +38,39 @@ setup_sasp()
 	local ip_local=$3
 	local ip_peer=$4
 	local lifetime=$5
+	local update=$6
 	local tmpfile=./tmp
+	local extra=
+
+	if [ "$update" = sa ]; then
+		extra="update $ip_local $ip_peer $proto 1 $algo_args;
+		   update $ip_peer $ip_local $proto 10001 $algo_args;"
+	elif [ "$update" = sp ]; then
+		extra="spdupdate $ip_local $ip_peer any -P out ipsec $proto/transport//require;"
+	fi
 
 	export RUMP_SERVER=$SOCK_LOCAL
 	cat > $tmpfile <<-EOF
 	add $ip_local $ip_peer $proto 1 -lh $lifetime -ls $lifetime $algo_args;
 	add $ip_peer $ip_local $proto 10001 -lh $lifetime -ls $lifetime $algo_args;
 	spdadd $ip_local $ip_peer any -P out ipsec $proto/transport//require;
+	$extra
 	EOF
 	$DEBUG && cat $tmpfile
 	atf_check -s exit:0 -o empty $HIJACKING setkey -c < $tmpfile
 	# XXX it can be expired if $lifetime is very short
 	#check_sa_entries $SOCK_LOCAL $ip_local $ip_peer
 
+	if [ "$update" = sp ]; then
+		extra="spdupdate $ip_peer $ip_local any -P out ipsec $proto/transport//require;"
+	fi
+
 	export RUMP_SERVER=$SOCK_PEER
 	cat > $tmpfile <<-EOF
 	add $ip_local $ip_peer $proto 1 -lh $lifetime -ls $lifetime $algo_args;
 	add $ip_peer $ip_local $proto 10001 -lh $lifetime -ls $lifetime $algo_args;
 	spdadd $ip_peer $ip_local any -P out ipsec $proto/transport//require;
+	$extra
 	EOF
 	$DEBUG && cat $tmpfile
 	atf_check -s exit:0 -o empty $HIJACKING setkey -c < $tmpfile
@@ -512,6 +527,74 @@ add_test_tcp()
 	atf_add_test_case ${name}
 }
 
+test_update()
+{
+	local proto=$1
+	local algo=$2
+	local update=$3
+	local ip_local=10.0.0.1
+	local ip_peer=10.0.0.2
+	local algo_args="$(generate_algo_args $proto $algo)"
+	local proto_cap=$(echo $proto | tr 'a-z' 'A-Z')
+	local outfile=./out
+
+	rump_server_crypto_start $SOCK_LOCAL netipsec
+	rump_server_crypto_start $SOCK_PEER netipsec
+	rump_server_add_iface $SOCK_LOCAL shmif0 $BUS
+	rump_server_add_iface $SOCK_PEER shmif0 $BUS
+
+	export RUMP_SERVER=$SOCK_LOCAL
+	atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.dad_count=0
+	atf_check -s exit:0 rump.ifconfig shmif0 $ip_local/24
+
+	export RUMP_SERVER=$SOCK_PEER
+	atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.dad_count=0
+	atf_check -s exit:0 rump.ifconfig shmif0 $ip_peer/24
+
+	setup_sasp $proto "$algo_args" $ip_local $ip_peer 100 $update
+
+	extract_new_packets $BUS > $outfile
+
+	export RUMP_SERVER=$SOCK_LOCAL
+	atf_check -s exit:0 -o ignore rump.ping -c 1 -n -w 3 $ip_peer
+
+	extract_new_packets $BUS > $outfile
+	atf_check -s exit:0 -o match:"$ip_local > $ip_peer: $proto_cap" \
+	cat $outfile
+	atf_check -s exit:0 -o match:"$ip_peer > $ip_local: $proto_cap" \
+	cat $outfile
+}
+
+add_test_update()
+{
+	local proto=$1
+	local algo=$2
+	local update=$3
+	local _update=$(echo $update |tr 'a-z' 'A-Z')
+	local _algo=$(echo $algo | sed 's/-//g')
+	local name= desc=
+
+	desc="Tests trying to udpate $_update of $proto ($algo)"
+	name="ipsec_update_${update}_${proto}_${_algo}"
+
+	atf_test_case ${name} cleanup
+	eval "\
+	${name}_head() {		\
+	atf_set \"descr\" \"$desc\";\
+	atf_set \"require.progs\" \"rump_server\" \"setkey\";	\
+	};\
+	${name}_body() {		\
+	test_update $proto $algo $update;			\
+	rump_server_destroy_ifaces;\
+	};\
+	${name}_cleanup() {		\
+	$DEBUG && dump;		\
+	cleanup;		\
+	}\
+	"
+	atf_add_test_case ${name}
+}
+
 atf_init_test_cases()
 {
 	local algo=
@@ -522,6 +605,8 @@ atf_init_test_cases()
 		add_test_tcp ipv4 esp $algo
 		add_test_tcp ipv6 esp $algo
 		add_test_tcp ipv4mappedipv6 esp $algo
+		add_test_update esp $algo sa
+		add_test_update esp $algo sp
 	done
 	for algo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
 		add_test_lifetime ipv4 ah $algo
@@ -529,6 +614,8 @@ atf_init_test_cases()
 		add_test_tcp ipv4 ah $algo
 		add_test_tcp ipv6 ah $algo
 		add_test_tcp ipv4mappedipv6 ah $algo
+		add_test_update ah $algo sa
+		add_test_update ah $algo sp
 	done
 
 

CVS commit: src/crypto/dist/ipsec-tools/src/setkey

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 01:22:40 UTC 2017

Modified Files:
src/crypto/dist/ipsec-tools/src/setkey: parse.y token.l

Log Message:
Add update command for testing

Updating an SA (SADB_UPDATE) requires that a process issuing
SADB_UPDATE is the same as a process issued SADB_ADD (or SADB_GETSPI).
This means that update command must be used with add command in a
configuration of setkey. This usage is normally meaningless but
useful for testing (and debugging) purposes.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/crypto/dist/ipsec-tools/src/setkey/parse.y
cvs rdiff -u -r1.19 -r1.20 src/crypto/dist/ipsec-tools/src/setkey/token.l

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/setkey/parse.y
diff -u src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.18 src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.19
--- src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.18	Thu Apr 13 01:19:17 2017
+++ src/crypto/dist/ipsec-tools/src/setkey/parse.y	Wed Jul  5 01:22:40 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.y,v 1.18 2017/04/13 01:19:17 ozaki-r Exp $	*/
+/*	$NetBSD: parse.y,v 1.19 2017/07/05 01:22:40 ozaki-r Exp $	*/
 
 /*	$KAME: parse.y,v 1.81 2003/07/01 04:01:48 itojun Exp $	*/
 
@@ -115,7 +115,7 @@ static int setkeymsg_add __P((unsigned i
 }
 
 %token EOT SLASH BLCL ELCL
-%token ADD GET DELETE DELETEALL FLUSH DUMP EXIT
+%token ADD UPDATE GET DELETE DELETEALL FLUSH DUMP EXIT
 %token PR_ESP PR_AH PR_IPCOMP PR_ESPUDP PR_TCP
 %token F_PROTOCOL F_AUTH F_ENC F_REPLAY F_COMP F_RAWCPI
 %token F_MODE MODE F_REQID
@@ -160,6 +160,7 @@ commands
 
 command
 	:	add_command
+	|	update_command
 	|	get_command
 	|	delete_command
 	|	deleteall_command
@@ -186,6 +187,18 @@ add_command
 		}
 	;
 
+	/* update */
+update_command
+	:	UPDATE ipaddropts ipandport ipandport protocol_spec spi extension_spec algorithm_spec EOT
+		{
+			int status;
+
+			status = setkeymsg_add(SADB_UPDATE, $5, $3, $4);
+			if (status < 0)
+return -1;
+		}
+	;
+
 	/* delete */
 delete_command
 	:	DELETE ipaddropts ipandport ipandport protocol_spec spi extension_spec EOT

Index: src/crypto/dist/ipsec-tools/src/setkey/token.l
diff -u src/crypto/dist/ipsec-tools/src/setkey/token.l:1.19 src/crypto/dist/ipsec-tools/src/setkey/token.l:1.20
--- src/crypto/dist/ipsec-tools/src/setkey/token.l:1.19	Wed Sep 10 21:01:33 2014
+++ src/crypto/dist/ipsec-tools/src/setkey/token.l	Wed Jul  5 01:22:40 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: token.l,v 1.19 2014/09/10 21:01:33 christos Exp $	*/
+/*	$NetBSD: token.l,v 1.20 2017/07/05 01:22:40 ozaki-r Exp $	*/
 
 /*	$KAME: token.l,v 1.44 2003/10/21 07:20:58 itojun Exp $	*/
 
@@ -116,6 +116,7 @@ hostname	{name}(({dot}{name})+{dot}?)?
 
 
 add		{ return(ADD); }
+update		{ return(UPDATE); }
 delete		{ return(DELETE); }
 deleteall	{ return(DELETEALL); }
 get		{ return(GET); }



CVS commit: src/crypto/dist/ipsec-tools/src/setkey

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul  5 01:22:40 UTC 2017

Modified Files:
src/crypto/dist/ipsec-tools/src/setkey: parse.y token.l

Log Message:
Add update command for testing

Updating an SA (SADB_UPDATE) requires that a process issuing
SADB_UPDATE is the same as a process issued SADB_ADD (or SADB_GETSPI).
This means that update command must be used with add command in a
configuration of setkey. This usage is normally meaningless but
useful for testing (and debugging) purposes.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/crypto/dist/ipsec-tools/src/setkey/parse.y
cvs rdiff -u -r1.19 -r1.20 src/crypto/dist/ipsec-tools/src/setkey/token.l

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



CVS commit: src/usr.bin/mkubootimage

2017-07-04 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul  5 01:09:17 UTC 2017

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

Log Message:
Load address is not required for "ramdisk" images.


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

2017-07-04 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul  5 01:09:17 UTC 2017

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

Log Message:
Load address is not required for "ramdisk" images.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mkubootimage/mkubootimage.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/mkubootimage/mkubootimage.c
diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.18 src/usr.bin/mkubootimage/mkubootimage.c:1.19
--- src/usr.bin/mkubootimage/mkubootimage.c:1.18	Tue Sep 30 10:21:50 2014
+++ src/usr.bin/mkubootimage/mkubootimage.c	Wed Jul  5 01:09:17 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.18 2014/09/30 10:21:50 msaitoh Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.19 2017/07/05 01:09:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: mkubootimage.c,v 1.18 2014/09/30 10:21:50 msaitoh Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.19 2017/07/05 01:09:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -429,7 +429,8 @@ main(int argc, char *argv[])
 
 	if (image_arch == IH_ARCH_UNKNOWN ||
 	image_type == IH_TYPE_UNKNOWN ||
-	(image_type != IH_TYPE_SCRIPT && image_loadaddr == 0) ||
+	(image_type != IH_TYPE_SCRIPT && image_type != IH_TYPE_RAMDISK &&
+	 image_loadaddr == 0) ||
 	image_name == NULL)
 		usage();
 



CVS commit: src/sys/arch/evbarm

2017-07-04 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul  5 01:08:45 UTC 2017

Modified Files:
src/sys/arch/evbarm/conf: files.evbarm std.exynos std.sunxi std.tegra
std.vexpress
src/sys/arch/evbarm/fdt: fdt_machdep.c
src/sys/arch/evbarm/include: bootconfig.h

Log Message:
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/files.evbarm
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.exynos
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/std.sunxi
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/std.tegra
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/std.vexpress
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/include/bootconfig.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/evbarm/conf/files.evbarm
diff -u src/sys/arch/evbarm/conf/files.evbarm:1.25 src/sys/arch/evbarm/conf/files.evbarm:1.26
--- src/sys/arch/evbarm/conf/files.evbarm:1.25	Thu Dec  4 21:15:48 2014
+++ src/sys/arch/evbarm/conf/files.evbarm	Wed Jul  5 01:08:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.evbarm,v 1.25 2014/12/04 21:15:48 joerg Exp $
+#	$NetBSD: files.evbarm,v 1.26 2017/07/05 01:08:44 jmcneill Exp $
 #
 # First try for arm-specific configuration info
 #
@@ -48,4 +48,9 @@ defflag	opt_plcom.h	PLCOM_DEBUG
 device	plcom { }: tty
 file	arch/evbarm/dev/plcom.c			plcom needs-flag
 
+#
+# Maximum number of memory ranges
+#
+defparam	opt_machdep.h			DRAM_BLOCKS
+
 include "arch/arm/conf/majors.arm32"

Index: src/sys/arch/evbarm/conf/std.exynos
diff -u src/sys/arch/evbarm/conf/std.exynos:1.4 src/sys/arch/evbarm/conf/std.exynos:1.5
--- src/sys/arch/evbarm/conf/std.exynos:1.4	Sun Jul  2 18:22:29 2017
+++ src/sys/arch/evbarm/conf/std.exynos	Wed Jul  5 01:08:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: std.exynos,v 1.4 2017/07/02 18:22:29 skrll Exp $
+#	$NetBSD: std.exynos,v 1.5 2017/07/05 01:08:44 jmcneill Exp $
 #
 
 machine	evbarm arm
@@ -12,6 +12,7 @@ options 	ARM_TRUSTZONE_FIRMWARE
 options		__NO_FIQ
 
 options 	FDT# Flattened Device Tree support
+options 	DRAM_BLOCKS=256
 options 	MODULAR
 options 	MODULAR_DEFAULT_AUTOLOAD
 options 	__HAVE_CPU_COUNTER

Index: src/sys/arch/evbarm/conf/std.sunxi
diff -u src/sys/arch/evbarm/conf/std.sunxi:1.2 src/sys/arch/evbarm/conf/std.sunxi:1.3
--- src/sys/arch/evbarm/conf/std.sunxi:1.2	Mon Jul  3 00:51:44 2017
+++ src/sys/arch/evbarm/conf/std.sunxi	Wed Jul  5 01:08:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: std.sunxi,v 1.2 2017/07/03 00:51:44 jmcneill Exp $
+#	$NetBSD: std.sunxi,v 1.3 2017/07/05 01:08:44 jmcneill Exp $
 #
 
 machine	evbarm arm
@@ -7,6 +7,7 @@ include 	"arch/evbarm/conf/std.evbarm"
 include		"arch/evbarm/conf/files.sunxi"
 
 options 	FDT# Flattened Device Tree support
+options 	DRAM_BLOCKS=256
 options 	MODULAR
 options 	MODULAR_DEFAULT_AUTOLOAD
 options 	__HAVE_CPU_COUNTER
@@ -28,3 +29,8 @@ makeoptions	CPUFLAGS="-march=armv7-a -mf
 
 options 	ARM_INTR_IMPL=""
 options		ARM_GENERIC_TODR
+
+# initrd support
+options 	MEMORY_DISK_HOOKS
+options 	MEMORY_DISK_DYNAMIC
+pseudo-device	md

Index: src/sys/arch/evbarm/conf/std.tegra
diff -u src/sys/arch/evbarm/conf/std.tegra:1.14 src/sys/arch/evbarm/conf/std.tegra:1.15
--- src/sys/arch/evbarm/conf/std.tegra:1.14	Sat Jul  1 09:17:44 2017
+++ src/sys/arch/evbarm/conf/std.tegra	Wed Jul  5 01:08:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: std.tegra,v 1.14 2017/07/01 09:17:44 skrll Exp $
+#	$NetBSD: std.tegra,v 1.15 2017/07/05 01:08:44 jmcneill Exp $
 #
 
 machine	evbarm arm
@@ -7,6 +7,7 @@ include 	"arch/evbarm/conf/std.evbarm"
 include		"arch/evbarm/conf/files.tegra"
 
 options 	FDT# Flattened Device Tree support
+options 	DRAM_BLOCKS=256
 options 	MODULAR
 options 	MODULAR_DEFAULT_AUTOLOAD
 options 	__HAVE_CPU_COUNTER

Index: src/sys/arch/evbarm/conf/std.vexpress
diff -u src/sys/arch/evbarm/conf/std.vexpress:1.5 src/sys/arch/evbarm/conf/std.vexpress:1.6
--- src/sys/arch/evbarm/conf/std.vexpress:1.5	Sun Jul  2 10:52:35 2017
+++ src/sys/arch/evbarm/conf/std.vexpress	Wed Jul  5 01:08:44 2017
@@ -1,4 +1,4 @@
-#   $NetBSD: std.vexpress,v 1.5 2017/07/02 10:52:35 skrll Exp $
+#   $NetBSD: std.vexpress,v 1.6 2017/07/05 01:08:44 jmcneill Exp $
 #
 # standard NetBSD/evbarm for VEXPRESS options
 
@@ -9,6 +9,7 @@ include 	"arch/evbarm/conf/std.evbarm"
 include 	"arch/evbarm/conf/files.vexpress"
 
 options 	FDT# Flattened Device Tree support
+options 	DRAM_BLOCKS=256
 options 	MODULAR
 options 	MODULAR_DEFAULT_AUTOLOAD
 options 	ARM_HAS_VBAR

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.7 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.8
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.7	Sun Jun 11 20:25:07 2017
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Wed Jul  5 01:08:45 2017
@@ -1,4 +1,4 @@

CVS commit: src/sys/arch/evbarm

2017-07-04 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul  5 01:08:45 UTC 2017

Modified Files:
src/sys/arch/evbarm/conf: files.evbarm std.exynos std.sunxi std.tegra
std.vexpress
src/sys/arch/evbarm/fdt: fdt_machdep.c
src/sys/arch/evbarm/include: bootconfig.h

Log Message:
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/files.evbarm
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.exynos
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/std.sunxi
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/std.tegra
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/std.vexpress
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/include/bootconfig.h

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



CVS commit: src

2017-07-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jul  4 21:19:33 UTC 2017

Modified Files:
src/usr.bin/vmstat: drvstats.c drvstats.h vmstat.c
src/usr.sbin/iostat: iostat.c

Log Message:
Use I/O timestamps to compute disk statistics for better precision.

Disk statistics are collected in a fixed size array, that got corrupted
when a disk was detached. Adapt by skipping entries of detached disks
and detect reused disknames at the array end.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/vmstat/drvstats.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/vmstat/drvstats.h
cvs rdiff -u -r1.216 -r1.217 src/usr.bin/vmstat/vmstat.c
cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/iostat/iostat.c

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

Modified files:

Index: src/usr.bin/vmstat/drvstats.c
diff -u src/usr.bin/vmstat/drvstats.c:1.10 src/usr.bin/vmstat/drvstats.c:1.11
--- src/usr.bin/vmstat/drvstats.c:1.10	Sun Mar  5 23:07:12 2017
+++ src/usr.bin/vmstat/drvstats.c	Tue Jul  4 21:19:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: drvstats.c,v 1.10 2017/03/05 23:07:12 mlelstv Exp $	*/
+/*	$NetBSD: drvstats.c,v 1.11 2017/07/04 21:19:33 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -97,6 +97,31 @@ drvswap(void)
 		if (!cur.select[i])
 			continue;
 
+		/*
+		 * When a drive is replaced with one of the same
+		 * name, the previous statistics are invalid. Try
+		 * to detect this by validating counters and timestamp
+		 */
+		if ((cur.rxfer[i] == 0 && cur.wxfer[i] == 0)
+		|| cur.rxfer[i] - last.rxfer[i] > INT64_MAX
+		|| cur.wxfer[i] - last.wxfer[i] > INT64_MAX
+		|| cur.seek[i] - last.seek[i] > INT64_MAX
+		|| (cur.timestamp[i].tv_sec == 0 &&
+		cur.timestamp[i].tv_usec == 0)) {
+
+			last.rxfer[i] = cur.rxfer[i];
+			last.wxfer[i] = cur.wxfer[i];
+			last.seek[i] = cur.seek[i];
+			last.rbytes[i] = cur.rbytes[i];
+			last.wbytes[i] = cur.wbytes[i];
+
+			timerclear([i]);
+			timerclear([i]);
+			timerclear([i]);
+			timerclear([i]);
+			timerclear([i]);
+		}
+
 		/* Delta Values. */
 		SWAP(rxfer[i]);
 		SWAP(wxfer[i]);
@@ -108,6 +133,7 @@ drvswap(void)
 		DELTA(time[i]);
 		DELTA(waitsum[i]);
 		DELTA(busysum[i]);
+		DELTA(timestamp[i]);
 	}
 }
 
@@ -151,7 +177,7 @@ cpuswap(void)
 void
 drvreadstats(void)
 {
-	size_t		size, i;
+	size_t		size, i, j, count;
 	int		mib[3];
 
 	mib[0] = CTL_HW;
@@ -161,27 +187,46 @@ drvreadstats(void)
 	size = ndrive * sizeof(struct io_sysctl);
 	if (sysctl(mib, 3, drives, , NULL, 0) < 0)
 		err(1, "sysctl hw.iostats failed");
+	/* recalculate array length */
+	count = size / sizeof(struct io_sysctl);
 
-#define COPYF(x,k) cur.x[k] = drives[k].x
-#define COPYT(x,k) do {			\
-		cur.x[k].tv_sec = drives[k].x##_sec;			\
-		cur.x[k].tv_usec = drives[k].x##_usec;			\
+#define COPYF(x,k,l) cur.x[k] = drives[l].x
+#define COPYT(x,k,l) do {		\
+		cur.x[k].tv_sec = drives[l].x##_sec;			\
+		cur.x[k].tv_usec = drives[l].x##_usec;			\
 } while (/* CONSTCOND */0)
 
-	for (i = 0; i < ndrive; i++) {
+	for (i = 0, j = 0; i < ndrive && j < count; i++) {
+
+		/*
+		 * skip removed entries
+		 *
+		 * we cannot detect entries replaced with
+		 * devices of the same name (e.g. unplug/replug).
+		 */
+		if (strcmp(cur.name[i], drives[j].name)) {
+			cur.select[i] = 0;
+			continue;
+		}
+
+		COPYF(rxfer, i, j);
+		COPYF(wxfer, i, j);
+		COPYF(seek, i, j);
+		COPYF(rbytes, i, j);
+		COPYF(wbytes, i, j);
+
+		COPYT(wait, i, j);
+		COPYT(time, i, j);
+		COPYT(waitsum, i, j);
+		COPYT(busysum, i, j);
+		COPYT(timestamp, i, j);
 
-		COPYF(rxfer, i);
-		COPYF(wxfer, i);
-		COPYF(seek, i);
-		COPYF(rbytes, i);
-		COPYF(wbytes, i);
-
-		COPYT(wait, i);
-		COPYT(time, i);
-		COPYT(waitsum, i);
-		COPYT(busysum, i);
+		++j;
 	}
 
+	/* shrink table to new size */
+	ndrive = j;
+
 	mib[0] = CTL_KERN;
 	mib[1] = KERN_TKSTAT;
 	mib[2] = KERN_TKSTAT_NIN;
@@ -295,6 +340,7 @@ drvinit(int selected)
 	cur.wait = calloc(ndrive, sizeof(struct timeval));
 	cur.waitsum = calloc(ndrive, sizeof(struct timeval));
 	cur.busysum = calloc(ndrive, sizeof(struct timeval));
+	cur.timestamp = calloc(ndrive, sizeof(struct timeval));
 	cur.rxfer = calloc(ndrive, sizeof(u_int64_t));
 	cur.wxfer = calloc(ndrive, sizeof(u_int64_t));
 	cur.seek = calloc(ndrive, sizeof(u_int64_t));
@@ -304,6 +350,7 @@ drvinit(int selected)
 	last.wait = calloc(ndrive, sizeof(struct timeval));
 	last.waitsum = calloc(ndrive, sizeof(struct timeval));
 	last.busysum = calloc(ndrive, sizeof(struct timeval));
+	last.timestamp = calloc(ndrive, sizeof(struct timeval));
 	last.rxfer = calloc(ndrive, sizeof(u_int64_t));
 	last.wxfer = calloc(ndrive, sizeof(u_int64_t));
 	last.seek = calloc(ndrive, sizeof(u_int64_t));
@@ -314,11 +361,13 @@ drvinit(int selected)
 
 	if (cur.time == NULL || cur.wait == NULL ||
 	cur.waitsum == NULL || cur.busysum == NULL ||
+	cur.timestamp == NULL ||
 	cur.rxfer == NULL || cur.wxfer 

CVS commit: src

2017-07-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jul  4 21:19:33 UTC 2017

Modified Files:
src/usr.bin/vmstat: drvstats.c drvstats.h vmstat.c
src/usr.sbin/iostat: iostat.c

Log Message:
Use I/O timestamps to compute disk statistics for better precision.

Disk statistics are collected in a fixed size array, that got corrupted
when a disk was detached. Adapt by skipping entries of detached disks
and detect reused disknames at the array end.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/vmstat/drvstats.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/vmstat/drvstats.h
cvs rdiff -u -r1.216 -r1.217 src/usr.bin/vmstat/vmstat.c
cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/iostat/iostat.c

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



CVS commit: [netbsd-8] src/doc

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 16:36:40 UTC 2017

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

Log Message:
Tickets #80 - #82


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-8.0

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

Modified files:

Index: src/doc/CHANGES-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.16 src/doc/CHANGES-8.0:1.1.2.17
--- src/doc/CHANGES-8.0:1.1.2.16	Tue Jul  4 12:59:12 2017
+++ src/doc/CHANGES-8.0	Tue Jul  4 16:36:40 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.16 2017/07/04 12:59:12 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.17 2017/07/04 16:36:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -1624,3 +1624,31 @@ lib/libc/gen/getcap.c1.57
 	-DSMALL does not remove code necessary for building a shared libc
 	[manu, ticket #79]
 
+sys/dev/pci/pci_subr.c1.184-1.189
+sys/dev/pci/pcireg.h1.131
+
+	Add missing return to print the Slot Power Limit Value correctly.
+
+	Fix to print the following bit fields correctly.
+	 -  Supported Link Speeds Vector in LCAP2
+	 -  Lower SKP OS Generation Supported Speed Vector  in LCAP2
+	 -  Lower SKP OS Reception Supported Speed Vector in LCAP2
+	 -  Enable Lower SKP OS Generation Vector in LCTL3
+
+	Fix a bug that LTR's latency in L1 PM Substates capability and Latency
+	Tolerance Reporting capability isn't printed correctly.
+	[msaitoh, ticket #80]
+
+sys/dev/pci/if_wm.c1.509
+sys/dev/pci/ixgbe/ixgbe.c			1.89-1.90
+
+	Use IFM_1000_KX and IFM_2500_KX.
+	[msaitoh, ticket #81]
+
+sys/net/if_media.h1.58-1.59
+
+	Stylistic changes.
+	Add some missing baudrate entries
+	Add 1000BASE-KX and 2500BASE-KX
+	[msaitoh, ticket #82]
+



CVS commit: [netbsd-8] src/doc

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 16:36:40 UTC 2017

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

Log Message:
Tickets #80 - #82


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-8.0

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



CVS commit: [netbsd-8] src/sys/net

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 16:13:58 UTC 2017

Modified Files:
src/sys/net [netbsd-8]: if_media.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #82):
sys/net/if_media.h: revision 1.58
sys/net/if_media.h: revision 1.59
No functional change:
- Relocate definitions in the following order to be easy to understand.
 0) IFM_*MASK
 1) macros to extract various bits of information from the media word.
 2) Media type.
 3) Shared media sub-type.
 4) Status bits.
 5) Shared (global) options
 6) Media dependent definitions.
 7) kernel function declarations.
 7) userland function declarations.
- Add comments.
This change makes me realize that:
 0) RFU bit have never used.
 1) bit 1..0 are shared between Shared media sub-type and Status bits.
It's little dangerous.
 2) No. 5 of Media type is not used (hole).
 3) Only IEEE80211 uses IFM_MMASK(IFM_MODE()) bits.
 4) IFM_TOKEN's OMASK bits doesn't start from 0x0100 but starts from
0x0200. Is this for BSD/OS compatibility?
- Add some missing baudrate entries
- Add 1000BASE-KX and 2500BASE-KX


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.8.1 src/sys/net/if_media.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/if_media.h
diff -u src/sys/net/if_media.h:1.57 src/sys/net/if_media.h:1.57.8.1
--- src/sys/net/if_media.h:1.57	Wed Sep 14 11:43:08 2016
+++ src/sys/net/if_media.h	Tue Jul  4 16:13:58 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_media.h,v 1.57 2016/09/14 11:43:08 roy Exp $	*/
+/*	$NetBSD: if_media.h,v 1.57.8.1 2017/07/04 16:13:58 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -80,91 +80,124 @@
  */
 
 #ifdef _KERNEL
-
 #include 
+#endif /*_KERNEL */
 
 /*
- * Driver callbacks for media status and change requests.
+ * if_media Options word:
+ *	Bits	Use
+ *		---
+ *	0-4	Media subtype		MAX SUBTYPE == 31!
+ *	5-7	Media type
+ *	8-15	Type specific options
+ *	16-18	Mode (for multi-mode devices)
+ *	19	RFU			(not used)
+ *	20-27	Shared (global) options
+ *	28-31	Instance
+ *
+ *   3 2   1
+ *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ *  +---+---+-+-+---+-+-+
+ *  |   |   |R| |   | | |STA|
+ *  | IMASK | GMASK |F|MMASK| OMASK |NMASK| +---|
+ *  |   |   |U| |   | |  TMASK  |
+ *  +---+---+-+-+---+-+-+
+ *   <->   <---> <--->
+ *  IFM_INST()   IFM_MODE()IFM_TYPE()
+ *
+ *   <-> <->   <--->
+ *IFM_OPTIONS()  IFM_SUBTYPE()
  */
-typedef	int (*ifm_change_cb_t)(struct ifnet *);
-typedef	void (*ifm_stat_cb_t)(struct ifnet *, struct ifmediareq *);
 
 /*
- * In-kernel representation of a single supported media type.
+ * Masks
  */
-struct ifmedia_entry {
-	TAILQ_ENTRY(ifmedia_entry) ifm_list;
-	u_int	ifm_media;	/* description of this media attachment */
-	u_int	ifm_data;	/* for driver-specific use */
-	void	*ifm_aux;	/* for driver-specific use */
-};
+#define	IFM_NMASK	0x00e0	/* Network type */
+#define	IFM_TMASK	0x001f	/* Media sub-type */
+#define	IFM_IMASK	0xf000	/* Instance */
+#define	IFM_ISHIFT	28		/* Instance shift */
+#define	IFM_OMASK	0xff00	/* Type specific options */
+#define	IFM_MMASK	0x0007	/* Mode */
+#define	IFM_MSHIFT	16		/* Mode shift */
+#define	IFM_GMASK	0x0ff0	/* Global options */
 
 /*
- * One of these goes into a network interface's softc structure.
- * It is used to keep general media state.
+ * Macros to extract various bits of information from the media word.
  */
-struct ifmedia {
-	u_int	ifm_mask;	/* mask of changes we don't care about */
-	u_int	ifm_media;	/* current user-set media word */
-	struct ifmedia_entry *ifm_cur;	/* currently selected media */
-	TAILQ_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */
-	ifm_change_cb_t	ifm_change;	/* media change driver callback */
-	ifm_stat_cb_t	ifm_status;	/* media status driver callback */
-};
-
-/* Initialize an interface's struct if_media field. */
-void	ifmedia_init(struct ifmedia *, int, ifm_change_cb_t, ifm_stat_cb_t);
-
-int ifmedia_change(struct ifmedia *, struct ifnet *);
+#define	IFM_TYPE(x)	((x) & IFM_NMASK)
+#define	IFM_SUBTYPE(x)	((x) & IFM_TMASK)
+#define	IFM_INST(x)	(((x) & IFM_IMASK) >> IFM_ISHIFT)
+#define	IFM_OPTIONS(x)	((x) & (IFM_OMASK | IFM_GMASK))
+#define	IFM_MODE(x)	((x) & IFM_MMASK)
 
-/* Add one supported medium to a struct ifmedia. */
-void	ifmedia_add(struct ifmedia *, int, int, void *);
+#define	IFM_TYPE_MATCH(dt, t)		\
+	(IFM_TYPE((dt)) == 0 || IFM_TYPE((dt)) == IFM_TYPE((t)))
 
-/* 

CVS commit: [netbsd-8] src/sys/net

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 16:13:58 UTC 2017

Modified Files:
src/sys/net [netbsd-8]: if_media.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #82):
sys/net/if_media.h: revision 1.58
sys/net/if_media.h: revision 1.59
No functional change:
- Relocate definitions in the following order to be easy to understand.
 0) IFM_*MASK
 1) macros to extract various bits of information from the media word.
 2) Media type.
 3) Shared media sub-type.
 4) Status bits.
 5) Shared (global) options
 6) Media dependent definitions.
 7) kernel function declarations.
 7) userland function declarations.
- Add comments.
This change makes me realize that:
 0) RFU bit have never used.
 1) bit 1..0 are shared between Shared media sub-type and Status bits.
It's little dangerous.
 2) No. 5 of Media type is not used (hole).
 3) Only IEEE80211 uses IFM_MMASK(IFM_MODE()) bits.
 4) IFM_TOKEN's OMASK bits doesn't start from 0x0100 but starts from
0x0200. Is this for BSD/OS compatibility?
- Add some missing baudrate entries
- Add 1000BASE-KX and 2500BASE-KX


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.8.1 src/sys/net/if_media.h

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



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

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 14:57:19 UTC 2017

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #81):
sys/dev/pci/ixgbe/ixgbe.c: revision 1.89
sys/dev/pci/if_wm.c: revision 1.509
sys/dev/pci/ixgbe/ixgbe.c: revision 1.90
Use IFM_1000_KX and IFM_2500_KX.
 Use IFM_1000_KX more.


To generate a diff of this commit:
cvs rdiff -u -r1.508 -r1.508.4.1 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.88 -r1.88.2.1 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.508 src/sys/dev/pci/if_wm.c:1.508.4.1
--- src/sys/dev/pci/if_wm.c:1.508	Thu Apr 13 10:37:36 2017
+++ src/sys/dev/pci/if_wm.c	Tue Jul  4 14:57:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.508.4.1 2017/07/04 14:57:19 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.1 2017/07/04 14:57:19 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -10451,9 +10451,9 @@ do {	\
 		status = CSR_READ(sc, WMREG_STATUS);
 		if (((status & STATUS_2P5_SKU) != 0)
 		&& ((status & STATUS_2P5_SKU_OVER) == 0)) {
-			ADD("2500baseKX-FDX", IFM_2500_SX | IFM_FDX,ANAR_X_FD);
+			ADD("2500baseKX-FDX", IFM_2500_KX | IFM_FDX,ANAR_X_FD);
 		} else
-			ADD("1000baseSX-FDX", IFM_1000_SX | IFM_FDX,ANAR_X_FD);
+			ADD("1000baseKX-FDX", IFM_1000_KX | IFM_FDX,ANAR_X_FD);
 	} else if (sc->sc_type == WM_T_82545) {
 		/* Only 82545 is LX (XXX except SFP) */
 		ADD("1000baseLX", IFM_1000_LX, ANAR_X_HD);

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.1
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88	Fri Jun  2 08:16:52 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Tue Jul  4 14:57:19 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.88 2017/06/02 08:16:52 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.88.2.1 2017/07/04 14:57:19 martin Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2063,37 +2063,14 @@ ixgbe_media_status(struct ifnet * ifp, s
 	** XXX: These need to use the proper media types once
 	** they're added.
 	*/
-#ifndef IFM_ETH_XTYPE
 	if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR)
 		switch (adapter->link_speed) {
 		case IXGBE_LINK_SPEED_10GB_FULL:
+#ifndef IFM_ETH_XTYPE
 			ifmr->ifm_active |= IFM_10G_SR | IFM_FDX;
-			break;
-		case IXGBE_LINK_SPEED_2_5GB_FULL:
-			ifmr->ifm_active |= IFM_2500_SX | IFM_FDX;
-			break;
-		case IXGBE_LINK_SPEED_1GB_FULL:
-			ifmr->ifm_active |= IFM_1000_CX | IFM_FDX;
-			break;
-		}
-	else if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4
-	|| layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX)
-		switch (adapter->link_speed) {
-		case IXGBE_LINK_SPEED_10GB_FULL:
-			ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX;
-			break;
-		case IXGBE_LINK_SPEED_2_5GB_FULL:
-			ifmr->ifm_active |= IFM_2500_SX | IFM_FDX;
-			break;
-		case IXGBE_LINK_SPEED_1GB_FULL:
-			ifmr->ifm_active |= IFM_1000_CX | IFM_FDX;
-			break;
-		}
 #else
-	if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR)
-		switch (adapter->link_speed) {
-		case IXGBE_LINK_SPEED_10GB_FULL:
 			ifmr->ifm_active |= IFM_10G_KR | IFM_FDX;
+#endif
 			break;
 		case IXGBE_LINK_SPEED_2_5GB_FULL:
 			ifmr->ifm_active |= IFM_2500_KX | IFM_FDX;
@@ -2106,7 +2083,11 @@ ixgbe_media_status(struct ifnet * ifp, s
 	|| layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX)
 		switch (adapter->link_speed) {
 		case IXGBE_LINK_SPEED_10GB_FULL:
+#ifndef IFM_ETH_XTYPE
+			ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX;
+#else
 			ifmr->ifm_active |= IFM_10G_KX4 | IFM_FDX;
+#endif
 			break;
 		case IXGBE_LINK_SPEED_2_5GB_FULL:
 			ifmr->ifm_active |= IFM_2500_KX | IFM_FDX;
@@ -2115,7 +2096,6 @@ ixgbe_media_status(struct ifnet * ifp, s
 			ifmr->ifm_active |= IFM_1000_KX | IFM_FDX;
 			break;
 		}
-#endif
 	
 	/* If nothing is recognized... */
 #if 0
@@ -2165,41 +2145,19 @@ ixgbe_media_change(struct ifnet * ifp)
 	** media types of the adapter; ifmedia will take care of
 	** that for us.
 	*/
-#ifndef IFM_ETH_XTYPE
 	switch (IFM_SUBTYPE(ifm->ifm_media)) {
 		case IFM_AUTO:
 		case IFM_10G_T:
 			speed |= IXGBE_LINK_SPEED_100_FULL;
 		case IFM_10G_LRM:
-		case IFM_10G_SR: /* KR, too */
 		case IFM_10G_LR:
+#ifndef IFM_ETH_XTYPE
+		case IFM_10G_SR: /* KR, too */
 		case IFM_10G_CX4: /* KX4 */
-			speed |= IXGBE_LINK_SPEED_1GB_FULL;
-		case IFM_10G_TWINAX:
-			speed |= IXGBE_LINK_SPEED_10GB_FULL;
-			break;
-		case IFM_1000_T:
-			

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

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 14:57:19 UTC 2017

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #81):
sys/dev/pci/ixgbe/ixgbe.c: revision 1.89
sys/dev/pci/if_wm.c: revision 1.509
sys/dev/pci/ixgbe/ixgbe.c: revision 1.90
Use IFM_1000_KX and IFM_2500_KX.
 Use IFM_1000_KX more.


To generate a diff of this commit:
cvs rdiff -u -r1.508 -r1.508.4.1 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.88 -r1.88.2.1 src/sys/dev/pci/ixgbe/ixgbe.c

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



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

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 14:35:21 UTC 2017

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #80):
sys/dev/pci/pci_subr.c: revision 1.184
sys/dev/pci/pci_subr.c: revision 1.185
sys/dev/pci/pci_subr.c: revision 1.186
sys/dev/pci/pci_subr.c: revision 1.187
sys/dev/pci/pci_subr.c: revision 1.188
sys/dev/pci/pci_subr.c: revision 1.189
sys/dev/pci/pcireg.h: revision 1.131
 Add missing return to print the Slot Power Limit Value correctly.
 Fix to print the following bit fields correctly.
  -  Supported Link Speeds Vector in LCAP2
  -  Lower SKP OS Generation Supported Speed Vector  in LCAP2
  -  Lower SKP OS Reception Supported Speed Vector in LCAP2
  -  Enable Lower SKP OS Generation Vector in LCTL3
Note that the above bitfields start from 0 and the follwing bitfields start
from 1:
  -  Maximum Link Speed in LCAP
  -  Current Link Speed in LCSR
  -  Target Link Speed in LCSR2
 For the Target Link Speed in LCSR2, 0 is allowed for a device which supports
2.5GT/s only (and this check also works for devices which compliant to
versions of the base specification prior to 3.0.
Tested with BCM5709:
-  Target Link Speed: unknown value (0)
+  Target Link Speed: 2.5GT/s
 For Attention Indicator Control bit and Power Indicator Control bit, it's
allowed to be a read only value 0 if corresponding capability register bit
is 0.
 Fix a bug that LTR's latency in L1 PM Substates capability and Latency
Tolerance Reporting capability isn't printed correctly.
Fix printf format/argument.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.183.2.1 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130 -r1.130.2.1 src/sys/dev/pci/pcireg.h

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



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

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 14:35:21 UTC 2017

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #80):
sys/dev/pci/pci_subr.c: revision 1.184
sys/dev/pci/pci_subr.c: revision 1.185
sys/dev/pci/pci_subr.c: revision 1.186
sys/dev/pci/pci_subr.c: revision 1.187
sys/dev/pci/pci_subr.c: revision 1.188
sys/dev/pci/pci_subr.c: revision 1.189
sys/dev/pci/pcireg.h: revision 1.131
 Add missing return to print the Slot Power Limit Value correctly.
 Fix to print the following bit fields correctly.
  -  Supported Link Speeds Vector in LCAP2
  -  Lower SKP OS Generation Supported Speed Vector  in LCAP2
  -  Lower SKP OS Reception Supported Speed Vector in LCAP2
  -  Enable Lower SKP OS Generation Vector in LCTL3
Note that the above bitfields start from 0 and the follwing bitfields start
from 1:
  -  Maximum Link Speed in LCAP
  -  Current Link Speed in LCSR
  -  Target Link Speed in LCSR2
 For the Target Link Speed in LCSR2, 0 is allowed for a device which supports
2.5GT/s only (and this check also works for devices which compliant to
versions of the base specification prior to 3.0.
Tested with BCM5709:
-  Target Link Speed: unknown value (0)
+  Target Link Speed: 2.5GT/s
 For Attention Indicator Control bit and Power Indicator Control bit, it's
allowed to be a read only value 0 if corresponding capability register bit
is 0.
 Fix a bug that LTR's latency in L1 PM Substates capability and Latency
Tolerance Reporting capability isn't printed correctly.
Fix printf format/argument.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.183.2.1 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130 -r1.130.2.1 src/sys/dev/pci/pcireg.h

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.183 src/sys/dev/pci/pci_subr.c:1.183.2.1
--- src/sys/dev/pci/pci_subr.c:1.183	Mon May 29 07:09:20 2017
+++ src/sys/dev/pci/pci_subr.c	Tue Jul  4 14:35:21 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.183 2017/05/29 07:09:20 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.183.2.1 2017/07/04 14:35:21 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183 2017/05/29 07:09:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.1 2017/07/04 14:35:21 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1606,18 +1606,39 @@ pci_print_pcie_compl_timeout(uint32_t va
 	}
 }
 
-static const char * const pcie_linkspeeds[] = {"2.5", "2.5", "5.0", "8.0"};
+static const char * const pcie_linkspeeds[] = {"2.5", "5.0", "8.0"};
 
+/*
+ * Print link speed. This function is used for the following register bits:
+ *   Maximum Link Speed in LCAP
+ *   Current Link Speed in LCSR
+ *   Target Link Speed in LCSR2
+ * All of above bitfield's values start from 1.
+ * For LCSR2, 0 is allowed for a device which supports 2.5GT/s only (and
+ * this check also works for devices which compliant to versions of the base
+ * specification prior to 3.0.
+ */
 static void
-pci_print_pcie_linkspeed(pcireg_t val)
+pci_print_pcie_linkspeed(int regnum, pcireg_t val)
 {
 
-	if (val > __arraycount(pcie_linkspeeds))
+	if ((regnum == PCIE_LCSR2) && (val == 0))
+		printf("2.5GT/s\n");
+	else if ((val < 1) || (val > __arraycount(pcie_linkspeeds)))
 		printf("unknown value (%u)\n", val);
 	else
-		printf("%sGT/s\n", pcie_linkspeeds[val]);
+		printf("%sGT/s\n", pcie_linkspeeds[val - 1]);
 }
 
+/*
+ * Print link speed "vector".
+ * This function is used for the following register bits:
+ *   Supported Link Speeds Vector in LCAP2
+ *   Lower SKP OS Generation Supported Speed Vector  in LCAP2
+ *   Lower SKP OS Reception Supported Speed Vector in LCAP2
+ *   Enable Lower SKP OS Generation Vector in LCTL3
+ * All of above bitfield's values start from 0.
+ */
 static void
 pci_print_pcie_linkspeedvector(pcireg_t val)
 {
@@ -1788,7 +1809,7 @@ pci_conf_print_pcie_cap(const pcireg_t *
 		reg = regs[o2i(capoff + PCIE_LCAP)];
 		printf("Link Capabilities Register: 0x%08x\n", reg);
 		printf("  Maximum Link Speed: ");
-		pci_print_pcie_linkspeed(reg & PCIE_LCAP_MAX_SPEED);
+		pci_print_pcie_linkspeed(PCIE_LCAP, reg & PCIE_LCAP_MAX_SPEED);
 		printf("  Maximum Link Width: x%u lanes\n",
 		(unsigned int)__SHIFTOUT(reg, PCIE_LCAP_MAX_WIDTH));
 		printf("  Active State PM Support: ");
@@ -1871,7 +1892,8 @@ pci_conf_print_pcie_cap(const pcireg_t *
 		reg = regs[o2i(capoff + PCIE_LCSR)];
 		printf("Link Status Register: 0x%04x\n", reg >> 16);
 		printf("  Negotiated Link Speed: ");
-		pci_print_pcie_linkspeed(__SHIFTOUT(reg, PCIE_LCSR_LINKSPEED));
+		pci_print_pcie_linkspeed(PCIE_LCSR,
+		

CVS commit: [netbsd-8] src/doc

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:59:13 UTC 2017

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

Log Message:
Tickets #64, #78, #79


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-8.0

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

Modified files:

Index: src/doc/CHANGES-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.15 src/doc/CHANGES-8.0:1.1.2.16
--- src/doc/CHANGES-8.0:1.1.2.15	Sat Jul  1 08:58:41 2017
+++ src/doc/CHANGES-8.0	Tue Jul  4 12:59:12 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.15 2017/07/01 08:58:41 snj Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.16 2017/07/04 12:59:12 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -1563,3 +1563,64 @@ sys/netinet/if_arp.c1.253
 	be correctly dropped.
 	[roy, ticket #77]
 
+libexec/ld.elf_so/Makefile			1.137
+libexec/ld.elf_so/arch/aarch64/mdreloc.c	1.3
+libexec/ld.elf_so/arch/alpha/alpha_reloc.c	1.42
+libexec/ld.elf_so/arch/arm/mdreloc.c		1.39-1.41
+libexec/ld.elf_so/arch/hppa/hppa_reloc.c	1.44
+libexec/ld.elf_so/arch/i386/mdreloc.c		1.38
+libexec/ld.elf_so/arch/m68k/mdreloc.c		1.32
+libexec/ld.elf_so/arch/mips/mips_reloc.c	1.66-1.68
+libexec/ld.elf_so/arch/or1k/mdreloc.c		1.2
+libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	1.54
+libexec/ld.elf_so/arch/riscv/mdreloc.c		1.3
+libexec/ld.elf_so/arch/sh3/mdreloc.c		1.33-1.34
+libexec/ld.elf_so/arch/sparc/mdreloc.c		1.49-1.50
+libexec/ld.elf_so/arch/sparc64/mdreloc.c	1.60-1.61
+libexec/ld.elf_so/arch/vax/mdreloc.c		1.32-1.33
+libexec/ld.elf_so/arch/x86_64/mdreloc.c		1.42
+libexec/ld.elf_so/map_object.c			1.58
+libexec/ld.elf_so/rtld.h			1.127
+libexec/ld.elf_so/symbol.c			1.68
+
+	Replace COMBREL with just-in-time check in
+	_rtld_relocate_nonplt_objects.
+
+	Drop symbol number from default branch diagnostic, it
+	isn't set at this point and most likely not valid
+	either.
+
+	Expand symnum, GCC's uninitialized used tracking is too imprecise.
+
+	Fix C bug. Deal with more MIPS hacks overriding def.
+
+	Add last_symnum, move up def and defobj,
+
+	Add back symnum, fix debug print.
+
+	Replace last use of r_type.
+
+	Fix indentation.
+	[joerg, ticket #64]
+
+lib/libc/net/Makefile.inc			1.87
+
+	Include IPv6 global variable in USE_INET6=no libc
+
+	This ensures a binary built with USE_INET6=yes libc can still link at
+	runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not
+	available, but dynamic linking is not killed by missing symbols such
+	as in6addr_any.
+	[manu, ticket #78]
+
+distrib/utils/libhack/Makefile			1.25
+distrib/utils/libhack/Makefile.inc		1.27
+lib/libc/gen/getcap.c1.57
+
+	Make shared -DSMALL libc buildable without breaking libhack
+
+	We used -DSMALL to exclude code from libc in order to build
+	libhack. Introduce -DLIBHACK to do this without so that
+	-DSMALL does not remove code necessary for building a shared libc
+	[manu, ticket #79]
+



CVS commit: [netbsd-8] src/doc

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:59:13 UTC 2017

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

Log Message:
Tickets #64, #78, #79


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-8.0

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



CVS commit: [netbsd-8] src

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:57:45 UTC 2017

Modified Files:
src/distrib/utils/libhack [netbsd-8]: Makefile Makefile.inc
src/lib/libc/gen [netbsd-8]: getcap.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #79):
distrib/utils/libhack/Makefile.inc: revision 1.27
lib/libc/gen/getcap.c: revision 1.57
distrib/utils/libhack/Makefile: revision 1.25
Make shared -DSMALL libc buildable without breaking libhack
We used -DSMALL to exclude code from libc in order to build
libhack. Introduce -DLIBHACK to do this without so that
-DSMALL does not remove code necessary for building a shared libc


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.18.1 src/distrib/utils/libhack/Makefile
cvs rdiff -u -r1.26 -r1.26.8.1 src/distrib/utils/libhack/Makefile.inc
cvs rdiff -u -r1.56 -r1.56.8.1 src/lib/libc/gen/getcap.c

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/libhack/Makefile
diff -u src/distrib/utils/libhack/Makefile:1.24 src/distrib/utils/libhack/Makefile:1.24.18.1
--- src/distrib/utils/libhack/Makefile:1.24	Tue Aug 27 09:53:33 2013
+++ src/distrib/utils/libhack/Makefile	Tue Jul  4 12:57:45 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2013/08/27 09:53:33 christos Exp $
+# $NetBSD: Makefile,v 1.24.18.1 2017/07/04 12:57:45 martin Exp $
 #
 # Stubs to kill off some things from libc:
 # This save space on a boot system.
@@ -10,6 +10,7 @@ HACKSRC?=${.CURDIR}
 HACKOBJ?=${.OBJDIR}
 
 CPPFLAGS+=	-DSMALL
+CPPFLAGS+=	-DLIBHACK
 CPPFLAGS.runetable.c+=	-I${HACKSRC}/../../../lib/libc/citrus \
 			-DALL_80_TO_FF_SW1
 CPPFLAGS.syslog.c+=	-I${HACKSRC}/../../../lib/libc/include

Index: src/distrib/utils/libhack/Makefile.inc
diff -u src/distrib/utils/libhack/Makefile.inc:1.26 src/distrib/utils/libhack/Makefile.inc:1.26.8.1
--- src/distrib/utils/libhack/Makefile.inc:1.26	Mon Aug 25 14:11:51 2014
+++ src/distrib/utils/libhack/Makefile.inc	Tue Jul  4 12:57:45 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.26 2014/08/25 14:11:51 christos Exp $
+# $NetBSD: Makefile.inc,v 1.26.8.1 2017/07/04 12:57:45 martin Exp $
 #
 # Include this fragment to build libhack.o
 # It is .o and not .a to make sure these are the
@@ -17,6 +17,7 @@
 #			
 
 CPPFLAGS+=	-DSMALL
+CPPFLAGS+=	-DLIBHACK
 HACKOBJS+=	getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \
 		localeconv.o multibyte.o perror.o runetable.o setlocale.o \
 		strerror.o strsignal.o syslog.o utmp.o yplib.o

Index: src/lib/libc/gen/getcap.c
diff -u src/lib/libc/gen/getcap.c:1.56 src/lib/libc/gen/getcap.c:1.56.8.1
--- src/lib/libc/gen/getcap.c:1.56	Wed Sep 24 13:18:52 2014
+++ src/lib/libc/gen/getcap.c	Tue Jul  4 12:57:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcap.c,v 1.56 2014/09/24 13:18:52 christos Exp $	*/
+/*	$NetBSD: getcap.c,v 1.56.8.1 2017/07/04 12:57:45 martin Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,11 +41,11 @@
 #if 0
 static char sccsid[] = "@(#)getcap.c	8.3 (Berkeley) 3/25/94";
 #else
-__RCSID("$NetBSD: getcap.c,v 1.56 2014/09/24 13:18:52 christos Exp $");
+__RCSID("$NetBSD: getcap.c,v 1.56.8.1 2017/07/04 12:57:45 martin Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#ifndef SMALL
+#ifndef LIBHACK
 #include "namespace.h"
 #endif
 #include 
@@ -65,7 +65,7 @@ __RCSID("$NetBSD: getcap.c,v 1.56 2014/0
 #include 
 #include 
 
-#if defined(__weak_alias) && !defined(SMALL)
+#if defined(__weak_alias) && !defined(LIBHACK)
 __weak_alias(cgetcap,_cgetcap)
 __weak_alias(cgetclose,_cgetclose)
 __weak_alias(cgetent,_cgetent)



CVS commit: [netbsd-8] src

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:57:45 UTC 2017

Modified Files:
src/distrib/utils/libhack [netbsd-8]: Makefile Makefile.inc
src/lib/libc/gen [netbsd-8]: getcap.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #79):
distrib/utils/libhack/Makefile.inc: revision 1.27
lib/libc/gen/getcap.c: revision 1.57
distrib/utils/libhack/Makefile: revision 1.25
Make shared -DSMALL libc buildable without breaking libhack
We used -DSMALL to exclude code from libc in order to build
libhack. Introduce -DLIBHACK to do this without so that
-DSMALL does not remove code necessary for building a shared libc


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.18.1 src/distrib/utils/libhack/Makefile
cvs rdiff -u -r1.26 -r1.26.8.1 src/distrib/utils/libhack/Makefile.inc
cvs rdiff -u -r1.56 -r1.56.8.1 src/lib/libc/gen/getcap.c

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



CVS commit: [netbsd-8] src/lib/libc/net

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:54:30 UTC 2017

Modified Files:
src/lib/libc/net [netbsd-8]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by manu in ticket #78):
lib/libc/net/Makefile.inc: revision 1.87
Include IPv6 global variable in USE_INET6=no libc
This ensures a binary built with USE_INET6=yes libc can still link at
runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not
available, but dynamic linking is not killed by missing symbols such
as in6addr_any.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.86.8.1 src/lib/libc/net/Makefile.inc

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

Modified files:

Index: src/lib/libc/net/Makefile.inc
diff -u src/lib/libc/net/Makefile.inc:1.86 src/lib/libc/net/Makefile.inc:1.86.8.1
--- src/lib/libc/net/Makefile.inc:1.86	Wed Apr 15 19:13:46 2015
+++ src/lib/libc/net/Makefile.inc	Tue Jul  4 12:54:30 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.86 2015/04/15 19:13:46 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.86.8.1 2017/07/04 12:54:30 martin Exp $
 #	@(#)Makefile.inc	8.2 (Berkeley) 9/5/93
 
 # net sources
@@ -21,8 +21,9 @@ SRCS+=	hesiod.c
 
 SRCS+=	getaddrinfo.c getnameinfo.c
 .if (${USE_INET6} != "no")
-SRCS+=	ip6opt.c rthdr.c vars6.c inet6_scopeid.c
+SRCS+=	ip6opt.c rthdr.c inet6_scopeid.c
 .endif
+SRCS+=	vars6.c
 SRCS+=	if_indextoname.c if_nameindex.c if_nametoindex.c
 
 LPREFIX=_nsyy



CVS commit: [netbsd-8] src/lib/libc/net

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:54:30 UTC 2017

Modified Files:
src/lib/libc/net [netbsd-8]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by manu in ticket #78):
lib/libc/net/Makefile.inc: revision 1.87
Include IPv6 global variable in USE_INET6=no libc
This ensures a binary built with USE_INET6=yes libc can still link at
runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not
available, but dynamic linking is not killed by missing symbols such
as in6addr_any.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.86.8.1 src/lib/libc/net/Makefile.inc

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



CVS commit: [netbsd-8] src/libexec/ld.elf_so

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:47:59 UTC 2017

Modified Files:
src/libexec/ld.elf_so [netbsd-8]: Makefile map_object.c rtld.h symbol.c
src/libexec/ld.elf_so/arch/aarch64 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/alpha [netbsd-8]: alpha_reloc.c
src/libexec/ld.elf_so/arch/arm [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/hppa [netbsd-8]: hppa_reloc.c
src/libexec/ld.elf_so/arch/i386 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/m68k [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/mips [netbsd-8]: mips_reloc.c
src/libexec/ld.elf_so/arch/or1k [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/powerpc [netbsd-8]: ppc_reloc.c
src/libexec/ld.elf_so/arch/riscv [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sh3 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc64 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/vax [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/x86_64 [netbsd-8]: mdreloc.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #64):
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.40
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.41
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.44
libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.3
libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.3
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.60
libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.32
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.61
libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.2
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.50
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.33
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.34
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.39
libexec/ld.elf_so/symbol.c: revision 1.68
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.66
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.67
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.68
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.42
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.54
libexec/ld.elf_so/Makefile: revision 1.137
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.32
libexec/ld.elf_so/rtld.h: revision 1.127
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.33
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.38
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.42
libexec/ld.elf_so/map_object.c: revision 1.58
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.49
Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects.
The COMBREL logic predates thread-safety of the dynamic linker and
breaks the use of shared locks for the common symbol lookup case. It is
unlikely to provide any benefit for lazy binding or PLT lookups, so
provide equivalent functionality in the non-PLT relocation handling loop
by checking if the symbol used by the current relocation is the same as
the one used during the last lookup. No inter-object cachine is done as
it is also unlikely to be benefical.
Testing with Firefox startup on AMD64 shows a small performance gain by
the new method.
Drop symbol number from default branch diagnostic, it isn't set at this
point and most likely not valid either.
Expand symnum, GCC's uninitialized used tracking is too imprecise.
Fix C bug. Deal with more MIPS hacks overriding def.
Add last_symnum, move up def and defobj.
Add back symnum, fix debug print.
Replace last use of r_type.
Fix indentation.
Fix indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.136.6.1 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.57 -r1.57.4.1 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.126 -r1.126.6.1 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.67 -r1.67.6.1 src/libexec/ld.elf_so/symbol.c
cvs rdiff -u -r1.2 -r1.2.8.1 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c
cvs rdiff -u -r1.41 -r1.41.8.1 src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c
cvs rdiff -u -r1.38 -r1.38.8.1 src/libexec/ld.elf_so/arch/arm/mdreloc.c
cvs rdiff -u -r1.43 -r1.43.8.1 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c
cvs rdiff -u -r1.37 -r1.37.8.1 src/libexec/ld.elf_so/arch/i386/mdreloc.c
cvs rdiff -u -r1.31 -r1.31.8.1 src/libexec/ld.elf_so/arch/m68k/mdreloc.c
cvs rdiff -u -r1.65 -r1.65.8.1 src/libexec/ld.elf_so/arch/mips/mips_reloc.c
cvs rdiff -u -r1.1 -r1.1.8.1 src/libexec/ld.elf_so/arch/or1k/mdreloc.c
cvs rdiff -u -r1.53 -r1.53.8.1 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
cvs rdiff -u -r1.2 -r1.2.8.1 src/libexec/ld.elf_so/arch/riscv/mdreloc.c
cvs rdiff -u -r1.32 -r1.32.8.1 src/libexec/ld.elf_so/arch/sh3/mdreloc.c
cvs rdiff -u -r1.48 -r1.48.8.1 

CVS commit: [netbsd-8] src/libexec/ld.elf_so

2017-07-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  4 12:47:59 UTC 2017

Modified Files:
src/libexec/ld.elf_so [netbsd-8]: Makefile map_object.c rtld.h symbol.c
src/libexec/ld.elf_so/arch/aarch64 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/alpha [netbsd-8]: alpha_reloc.c
src/libexec/ld.elf_so/arch/arm [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/hppa [netbsd-8]: hppa_reloc.c
src/libexec/ld.elf_so/arch/i386 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/m68k [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/mips [netbsd-8]: mips_reloc.c
src/libexec/ld.elf_so/arch/or1k [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/powerpc [netbsd-8]: ppc_reloc.c
src/libexec/ld.elf_so/arch/riscv [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sh3 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc64 [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/vax [netbsd-8]: mdreloc.c
src/libexec/ld.elf_so/arch/x86_64 [netbsd-8]: mdreloc.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #64):
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.40
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.41
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.44
libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.3
libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.3
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.60
libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.32
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.61
libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.2
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.50
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.33
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.34
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.39
libexec/ld.elf_so/symbol.c: revision 1.68
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.66
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.67
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.68
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.42
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.54
libexec/ld.elf_so/Makefile: revision 1.137
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.32
libexec/ld.elf_so/rtld.h: revision 1.127
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.33
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.38
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.42
libexec/ld.elf_so/map_object.c: revision 1.58
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.49
Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects.
The COMBREL logic predates thread-safety of the dynamic linker and
breaks the use of shared locks for the common symbol lookup case. It is
unlikely to provide any benefit for lazy binding or PLT lookups, so
provide equivalent functionality in the non-PLT relocation handling loop
by checking if the symbol used by the current relocation is the same as
the one used during the last lookup. No inter-object cachine is done as
it is also unlikely to be benefical.
Testing with Firefox startup on AMD64 shows a small performance gain by
the new method.
Drop symbol number from default branch diagnostic, it isn't set at this
point and most likely not valid either.
Expand symnum, GCC's uninitialized used tracking is too imprecise.
Fix C bug. Deal with more MIPS hacks overriding def.
Add last_symnum, move up def and defobj.
Add back symnum, fix debug print.
Replace last use of r_type.
Fix indentation.
Fix indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.136.6.1 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.57 -r1.57.4.1 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.126 -r1.126.6.1 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.67 -r1.67.6.1 src/libexec/ld.elf_so/symbol.c
cvs rdiff -u -r1.2 -r1.2.8.1 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c
cvs rdiff -u -r1.41 -r1.41.8.1 src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c
cvs rdiff -u -r1.38 -r1.38.8.1 src/libexec/ld.elf_so/arch/arm/mdreloc.c
cvs rdiff -u -r1.43 -r1.43.8.1 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c
cvs rdiff -u -r1.37 -r1.37.8.1 src/libexec/ld.elf_so/arch/i386/mdreloc.c
cvs rdiff -u -r1.31 -r1.31.8.1 src/libexec/ld.elf_so/arch/m68k/mdreloc.c
cvs rdiff -u -r1.65 -r1.65.8.1 src/libexec/ld.elf_so/arch/mips/mips_reloc.c
cvs rdiff -u -r1.1 -r1.1.8.1 src/libexec/ld.elf_so/arch/or1k/mdreloc.c
cvs rdiff -u -r1.53 -r1.53.8.1 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
cvs rdiff -u -r1.2 -r1.2.8.1 src/libexec/ld.elf_so/arch/riscv/mdreloc.c
cvs rdiff -u -r1.32 -r1.32.8.1 src/libexec/ld.elf_so/arch/sh3/mdreloc.c
cvs rdiff -u -r1.48 -r1.48.8.1 

CVS commit: src/sys/netinet

2017-07-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul  4 10:25:46 UTC 2017

Modified Files:
src/sys/netinet: ip_output.c

Log Message:
Rename u to udst, .dst to .sa and .dst4 to sin.
Create sockaddr for the source address in usrc so it won't stamp on udst.

This fixes a regression caused in r1.280


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/sys/netinet/ip_output.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/netinet/ip_output.c
diff -u src/sys/netinet/ip_output.c:1.281 src/sys/netinet/ip_output.c:1.282
--- src/sys/netinet/ip_output.c:1.281	Mon Jul  3 18:54:11 2017
+++ src/sys/netinet/ip_output.c	Tue Jul  4 10:25:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_output.c,v 1.281 2017/07/03 18:54:11 khorben Exp $	*/
+/*	$NetBSD: ip_output.c,v 1.282 2017/07/04 10:25:45 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.281 2017/07/03 18:54:11 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.282 2017/07/04 10:25:45 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -243,12 +243,12 @@ ip_output(struct mbuf *m0, struct mbuf *
 	bool natt_frag = false;
 	bool rtmtu_nolock;
 	union {
-		struct sockaddr		dst;
-		struct sockaddr_in	dst4;
-	} u;
-	struct sockaddr *rdst = 	/* real IP destination, as opposed
-	 * to the nexthop
-	 */
+		struct sockaddr		sa;
+		struct sockaddr_in	sin;
+	} udst, usrc;
+	struct sockaddr *rdst = 	/* real IP destination, as
+		 * opposed to the nexthop
+		 */
 	struct psref psref, psref_ia;
 	int bound;
 	bool bind_need_restore = false;
@@ -289,7 +289,7 @@ ip_output(struct mbuf *m0, struct mbuf *
 		memset(, 0, sizeof(iproute));
 		ro = 
 	}
-	sockaddr_in_init(, >ip_dst, 0);
+	sockaddr_in_init(, >ip_dst, 0);
 	dst = satocsin(rtcache_getdst(ro));
 
 	/*
@@ -304,8 +304,8 @@ ip_output(struct mbuf *m0, struct mbuf *
 
 	if ((rt = rtcache_validate(ro)) == NULL &&
 	(rt = rtcache_update(ro, 1)) == NULL) {
-		dst = 
-		error = rtcache_setdst(ro, );
+		dst = 
+		error = rtcache_setdst(ro, );
 		if (error != 0)
 			goto bad;
 	}
@@ -447,7 +447,7 @@ ip_output(struct mbuf *m0, struct mbuf *
 			 * on the outgoing interface, and the caller did not
 			 * forbid loopback, loop back a copy.
 			 */
-			ip_mloopback(ifp, m, );
+			ip_mloopback(ifp, m, );
 		}
 #ifdef MROUTING
 		else {
@@ -611,8 +611,8 @@ sendit:
 	 * validity
 	 */
 	KASSERT(ia == NULL);
-	sockaddr_in_init(, >ip_src, 0);
-	ifa = ifaof_ifpforaddr_psref(, ifp, _ia);
+	sockaddr_in_init(, >ip_src, 0);
+	ifa = ifaof_ifpforaddr_psref(, ifp, _ia);
 	if (ifa != NULL)
 		ia = ifatoia(ifa);
 



CVS commit: src/sys/netinet

2017-07-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul  4 10:25:46 UTC 2017

Modified Files:
src/sys/netinet: ip_output.c

Log Message:
Rename u to udst, .dst to .sa and .dst4 to sin.
Create sockaddr for the source address in usrc so it won't stamp on udst.

This fixes a regression caused in r1.280


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/sys/netinet/ip_output.c

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



CVS commit: src/share/tmac

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 09:32:20 UTC 2017

Modified Files:
src/share/tmac: README

Log Message:
Update README. Noted by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/tmac/README

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

Modified files:

Index: src/share/tmac/README
diff -u src/share/tmac/README:1.8 src/share/tmac/README:1.9
--- src/share/tmac/README:1.8	Mon Mar 29 21:36:45 2004
+++ src/share/tmac/README	Tue Jul  4 09:32:20 2017
@@ -1,8 +1,5 @@
-$NetBSD: README,v 1.8 2004/03/29 21:36:45 wiz Exp $
+$NetBSD: README,v 1.9 2017/07/04 09:32:20 wiz Exp $
 
-The files previously in this dir have been replaced by versions
-(still BSD licensed) coming with GNU groff; you can find them in
-gnu/dist/groff/tmac.
-
-The only files that usually should be touched are, however, in
-gnu/usr.bin/groff/tmac.
+This directory contains a conversion tool from mdoc to html
+for use with groff. It is obsolete since NetBSD defaults to using
+mandoc, and can be removed when groff is removed.



CVS commit: src/share/tmac

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 09:32:20 UTC 2017

Modified Files:
src/share/tmac: README

Log Message:
Update README. Noted by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/tmac/README

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



CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:12:28 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_netbsd.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/netipsec/ipsec_netbsd.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/netipsec/ipsec_netbsd.c
diff -u src/sys/netipsec/ipsec_netbsd.c:1.42 src/sys/netipsec/ipsec_netbsd.c:1.43
--- src/sys/netipsec/ipsec_netbsd.c:1.42	Tue Jul  4 08:11:32 2017
+++ src/sys/netipsec/ipsec_netbsd.c	Tue Jul  4 08:12:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_netbsd.c,v 1.42 2017/07/04 08:11:32 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec_netbsd.c,v 1.43 2017/07/04 08:12:28 ozaki-r Exp $	*/
 /*	$KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $	*/
 /*	$KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.42 2017/07/04 08:11:32 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.43 2017/07/04 08:12:28 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -120,9 +120,8 @@ ah4_ctlinput(int cmd, const struct socka
 		 		 * corresponding routing entry.
 		 		 */
 icp = (struct icmp *)((char *)ip - 
-	  offsetof(struct icmp, icmp_ip));
+offsetof(struct icmp, icmp_ip));
 icmp_mtudisc(icp, ip->ip_dst);
-
 			}
 			KEY_FREESAV();
 		}
@@ -165,11 +164,9 @@ esp4_ctlinput(int cmd, const struct sock
  * recalculate the new MTU, and create the
 		 		 * corresponding routing entry.
 		 		 */
-
 icp = (struct icmp *)((char *)ip - 
-	   offsetof(struct icmp, icmp_ip));
+offsetof(struct icmp, icmp_ip));
 icmp_mtudisc(icp, ip->ip_dst);
-
 			}
 			KEY_FREESAV();
 		}



CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:12:28 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_netbsd.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/netipsec/ipsec_netbsd.c

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



CVS commit: src/sys

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:11:32 UTC 2017

Modified Files:
src/sys/net: pfkeyv2.h
src/sys/netipsec: ipsec_netbsd.c key.c

Log Message:
Introduce and use SADB_SASTATE_USABLE_P


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/net/pfkeyv2.h
cvs rdiff -u -r1.41 -r1.42 src/sys/netipsec/ipsec_netbsd.c
cvs rdiff -u -r1.164 -r1.165 src/sys/netipsec/key.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/net/pfkeyv2.h
diff -u src/sys/net/pfkeyv2.h:1.31 src/sys/net/pfkeyv2.h:1.32
--- src/sys/net/pfkeyv2.h:1.31	Thu Apr 13 16:38:31 2017
+++ src/sys/net/pfkeyv2.h	Tue Jul  4 08:11:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfkeyv2.h,v 1.31 2017/04/13 16:38:31 christos Exp $	*/
+/*	$NetBSD: pfkeyv2.h,v 1.32 2017/07/04 08:11:32 ozaki-r Exp $	*/
 /*	$KAME: pfkeyv2.h,v 1.36 2003/07/25 09:33:37 itojun Exp $	*/
 
 /*
@@ -339,6 +339,9 @@ struct sadb_x_nat_t_frag {
 #define SADB_SASTATE_DEAD 3
 #define SADB_SASTATE_MAX  3
 
+#define SADB_SASTATE_USABLE_P(sav) \
+((sav)->state == SADB_SASTATE_MATURE || (sav)->state == SADB_SASTATE_DYING)
+
 #define SADB_SAFLAGS_PFS  1
 
 /*

Index: src/sys/netipsec/ipsec_netbsd.c
diff -u src/sys/netipsec/ipsec_netbsd.c:1.41 src/sys/netipsec/ipsec_netbsd.c:1.42
--- src/sys/netipsec/ipsec_netbsd.c:1.41	Tue Jul  4 08:09:19 2017
+++ src/sys/netipsec/ipsec_netbsd.c	Tue Jul  4 08:11:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_netbsd.c,v 1.41 2017/07/04 08:09:19 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec_netbsd.c,v 1.42 2017/07/04 08:11:32 ozaki-r Exp $	*/
 /*	$KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $	*/
 /*	$KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.41 2017/07/04 08:09:19 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.42 2017/07/04 08:11:32 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -111,9 +111,7 @@ ah4_ctlinput(int cmd, const struct socka
 	   	IPPROTO_AH, ah->ah_spi, 0, 0);
 
 		if (sav) {
-	if (sav->state == SADB_SASTATE_MATURE ||
-sav->state == SADB_SASTATE_DYING) {
-
+			if (SADB_SASTATE_USABLE_P(sav)) {
 /*
  * Now that we've validated that we are actually 
  * communicating with the host indicated in the 	
@@ -159,9 +157,7 @@ esp4_ctlinput(int cmd, const struct sock
 	   	IPPROTO_ESP, esp->esp_spi, 0, 0);
 
 		if (sav) {
-	if (sav->state == SADB_SASTATE_MATURE ||
-sav->state == SADB_SASTATE_DYING) {
-
+			if (SADB_SASTATE_USABLE_P(sav)) {
 /*
  * Now that we've validated that we are actually 
  * communicating with the host indicated in the 	
@@ -242,8 +238,7 @@ ah6_ctlinput(int cmd, const struct socka
 			IPPROTO_AH, ahp->ah_spi, 0, 0);
 
 			if (sav) {
-if (sav->state == SADB_SASTATE_MATURE ||
-sav->state == SADB_SASTATE_DYING)
+if (SADB_SASTATE_USABLE_P(sav))
 	valid++;
 KEY_FREESAV();
 			}
@@ -348,8 +343,7 @@ esp6_ctlinput(int cmd, const struct sock
 	  IPPROTO_ESP, espp->esp_spi, 0, 0);
 
 			if (sav) {
-if (sav->state == SADB_SASTATE_MATURE ||
-sav->state == SADB_SASTATE_DYING)
+if (SADB_SASTATE_USABLE_P(sav))
 	valid++;
 KEY_FREESAV();
 			}

Index: src/sys/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.164 src/sys/netipsec/key.c:1.165
--- src/sys/netipsec/key.c:1.164	Sat Jun 10 14:21:01 2017
+++ src/sys/netipsec/key.c	Tue Jul  4 08:11:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.164 2017/06/10 14:21:01 ozaki-r Exp $	*/
+/*	$NetBSD: key.c,v 1.165 2017/07/04 08:11:32 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.164 2017/06/10 14:21:01 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.165 2017/07/04 08:11:32 ozaki-r Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -1191,8 +1191,7 @@ key_allocsa(
 /* sanity check */
 KEY_CHKSASTATE(sav->state, state);
 /* do not return entries w/ unusable state */
-if (sav->state != SADB_SASTATE_MATURE &&
-sav->state != SADB_SASTATE_DYING) {
+if (!SADB_SASTATE_USABLE_P(sav)) {
 	KEYDEBUG_PRINTF(KEYDEBUG_MATCH,
 	"bad state %d\n", sav->state);
 	continue;



CVS commit: src/sys

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:11:32 UTC 2017

Modified Files:
src/sys/net: pfkeyv2.h
src/sys/netipsec: ipsec_netbsd.c key.c

Log Message:
Introduce and use SADB_SASTATE_USABLE_P


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/net/pfkeyv2.h
cvs rdiff -u -r1.41 -r1.42 src/sys/netipsec/ipsec_netbsd.c
cvs rdiff -u -r1.164 -r1.165 src/sys/netipsec/key.c

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



CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:09:19 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_netbsd.c

Log Message:
KNF; replace leading whitespaces with hard tabs


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/netipsec/ipsec_netbsd.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/netipsec/ipsec_netbsd.c
diff -u src/sys/netipsec/ipsec_netbsd.c:1.40 src/sys/netipsec/ipsec_netbsd.c:1.41
--- src/sys/netipsec/ipsec_netbsd.c:1.40	Thu Apr  6 09:20:07 2017
+++ src/sys/netipsec/ipsec_netbsd.c	Tue Jul  4 08:09:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_netbsd.c,v 1.40 2017/04/06 09:20:07 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec_netbsd.c,v 1.41 2017/07/04 08:09:19 ozaki-r Exp $	*/
 /*	$KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $	*/
 /*	$KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.40 2017/04/06 09:20:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.41 2017/07/04 08:09:19 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -185,86 +185,86 @@ esp4_ctlinput(int cmd, const struct sock
 void *
 ah6_ctlinput(int cmd, const struct sockaddr *sa, void *d)
 {
-   const struct newah *ahp;
-   struct newah ah;
-   struct secasvar *sav;
-   struct ip6_hdr *ip6;
-   struct mbuf *m;
-   struct ip6ctlparam *ip6cp = NULL;
-   int off;
-
-   if (sa->sa_family != AF_INET6 ||
-   sa->sa_len != sizeof(struct sockaddr_in6))
-   return NULL;
-   if ((unsigned)cmd >= PRC_NCMDS)
-   return NULL;
-
-   /* if the parameter is from icmp6, decode it. */
-   if (d != NULL) {
-   ip6cp = (struct ip6ctlparam *)d;
-   m = ip6cp->ip6c_m;
-   ip6 = ip6cp->ip6c_ip6;
-   off = ip6cp->ip6c_off;
-   } else {
-   m = NULL;
-   ip6 = NULL;
-   off = 0;
-   }
-
-   if (ip6) {
-   /*
-* XXX: We assume that when ip6 is non NULL,
-* M and OFF are valid.
-*/
-
-   /* check if we can safely examine src and dst ports */
-   if (m->m_pkthdr.len < off + sizeof(ah))
-   return NULL;
-
-   if (m->m_len < off + sizeof(ah)) {
-   /*
-* this should be rare case,
-* so we compromise on this copy...
-*/
-   m_copydata(m, off, sizeof(ah), );
-   ahp = 
-   } else
-   ahp = (struct newah *)(mtod(m, char *) + off);
-
-   if (cmd == PRC_MSGSIZE) {
-   int valid = 0;
-
-   /*
-* Check to see if we have a valid SA corresponding
-* to the address in the ICMP message payload.
-*/
-   sav = KEY_ALLOCSA((const union sockaddr_union*)sa,
- IPPROTO_AH, ahp->ah_spi, 0, 0);
-
-   if (sav) {
-   if (sav->state == SADB_SASTATE_MATURE ||
-   sav->state == SADB_SASTATE_DYING)
-   valid++;
-   KEY_FREESAV();
-   }
-
-   /* XXX Further validation? */
-
-   /*
-* Depending on the value of "valid" and routing 
-* table size (mtudisc_{hi,lo}wat), we will:
-* - recalcurate the new MTU and create the
-*   corresponding routing entry, or
-* - ignore the MTU change notification.
-*/
-   icmp6_mtudisc_update((struct ip6ctlparam *)d,valid);
-   }
-
-   /* we normally notify single pcb here */
-   } else {
-   /* we normally notify any pcb here */
-   }
-	   return NULL;
+	const struct newah *ahp;
+	struct newah ah;
+	struct secasvar *sav;
+	struct ip6_hdr *ip6;
+	struct mbuf *m;
+	struct ip6ctlparam *ip6cp = NULL;
+	int off;
+
+	if (sa->sa_family != AF_INET6 ||
+	sa->sa_len != sizeof(struct sockaddr_in6))
+		return NULL;
+	if ((unsigned)cmd >= PRC_NCMDS)
+		return NULL;
+
+	/* if the parameter is from icmp6, decode it. */
+	if (d != NULL) {
+		ip6cp = (struct ip6ctlparam *)d;
+		m = ip6cp->ip6c_m;
+		ip6 = ip6cp->ip6c_ip6;
+		off = ip6cp->ip6c_off;
+	} else {
+		m = NULL;
+		ip6 = NULL;
+		off = 0;
+	}
+
+	if (ip6) {
+		/*
+		 * XXX: We assume that when ip6 is non NULL,
+		 * M and OFF are valid.
+		 */
+
+		/* check if we can safely examine src and dst ports 

CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 08:09:19 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_netbsd.c

Log Message:
KNF; replace leading whitespaces with hard tabs


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/netipsec/ipsec_netbsd.c

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



Re: CVS commit: src/sys/netinet

2017-07-04 Thread Ryota Ozaki
On Tue, Jul 4, 2017 at 1:43 AM, Roy Marples  wrote:
> Module Name:src
> Committed By:   roy
> Date:   Mon Jul  3 16:43:01 UTC 2017
>
> Modified Files:
> src/sys/netinet: ip_output.c
>
> Log Message:
> When outputting, search for the sending address on the sending interface
> rather than blindly picking the first matcing address from any interface
> when testing source address validity.
>
> This allows another interface to have the same address, but be detached.

http://releng.netbsd.org/b5reports/i386/commits-2017.07.html#2017.07.03.16.43.01

The commit causes many test failures.

  ozaki-r


CVS commit: src/usr.sbin/traceroute6

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:13:18 UTC 2017

Modified Files:
src/usr.sbin/traceroute6: traceroute6.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/traceroute6/traceroute6.8

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



CVS commit: src/usr.sbin/unlink

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:13:44 UTC 2017

Modified Files:
src/usr.sbin/unlink: unlink.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/unlink/unlink.8

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/unlink/unlink.8
diff -u src/usr.sbin/unlink/unlink.8:1.7 src/usr.sbin/unlink/unlink.8:1.8
--- src/usr.sbin/unlink/unlink.8:1.7	Mon Jul  3 21:35:32 2017
+++ src/usr.sbin/unlink/unlink.8	Tue Jul  4 07:13:43 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: unlink.8,v 1.7 2017/07/03 21:35:32 wiz Exp $
+.\"	$NetBSD: unlink.8,v 1.8 2017/07/04 07:13:43 wiz Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -45,9 +45,7 @@ utility performs the function call
 .Ar file
 must be the pathname of an existing file.
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std unlink
 .Sh SEE ALSO
 .Xr rm 1 ,
 .Xr rmdir 1 ,



CVS commit: src/usr.sbin/unlink

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:13:44 UTC 2017

Modified Files:
src/usr.sbin/unlink: unlink.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/unlink/unlink.8

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



CVS commit: src/usr.sbin/traceroute6

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:13:18 UTC 2017

Modified Files:
src/usr.sbin/traceroute6: traceroute6.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/traceroute6/traceroute6.8

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/traceroute6/traceroute6.8
diff -u src/usr.sbin/traceroute6/traceroute6.8:1.14 src/usr.sbin/traceroute6/traceroute6.8:1.15
--- src/usr.sbin/traceroute6/traceroute6.8:1.14	Mon Jul  3 21:35:32 2017
+++ src/usr.sbin/traceroute6/traceroute6.8	Tue Jul  4 07:13:18 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: traceroute6.8,v 1.14 2017/07/03 21:35:32 wiz Exp $
+.\"	$NetBSD: traceroute6.8,v 1.15 2017/07/04 07:13:18 wiz Exp $
 .\"	$KAME: traceroute6.8,v 1.8 2000/06/12 16:29:18 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -106,9 +106,7 @@ Specify the delay time between probes.
 .El
 .\"
 .Sh EXIT STATUS
-The
-.Nm
-command exits 0 on success, and >0 on errors.
+.Ex -std traceroute6
 .\"
 .Sh SEE ALSO
 .Xr ping 8 ,



CVS commit: src/usr.sbin/sa

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:12:18 UTC 2017

Modified Files:
src/usr.sbin/sa: sa.8

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sa/sa.8

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



CVS commit: src/usr.sbin/sa

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:12:18 UTC 2017

Modified Files:
src/usr.sbin/sa: sa.8

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sa/sa.8

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/sa/sa.8
diff -u src/usr.sbin/sa/sa.8:1.19 src/usr.sbin/sa/sa.8:1.20
--- src/usr.sbin/sa/sa.8:1.19	Mon Jul  3 21:35:32 2017
+++ src/usr.sbin/sa/sa.8	Tue Jul  4 07:12:18 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: sa.8,v 1.19 2017/07/03 21:35:32 wiz Exp $
+.\" $NetBSD: sa.8,v 1.20 2017/07/04 07:12:18 wiz Exp $
 .\"
 .\" Copyright (c) 1994 Christopher G. Demetriou
 .\" All rights reserved.
@@ -206,10 +206,6 @@ flag is specified, only the
 and
 .Fl s
 flags are honored.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
 .Sh FILES
 .Bl -tag -width /var/account/usracct -compact
 .It Pa /var/account/acct
@@ -219,6 +215,8 @@ per-command accounting summary database
 .It Pa /var/account/usracct
 per-user accounting summary database
 .El
+.Sh EXIT STATUS
+.Ex -std sa
 .Sh SEE ALSO
 .Xr lastcomm 1 ,
 .Xr acct 5 ,



CVS commit: src/usr.sbin/mld6query

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:11:18 UTC 2017

Modified Files:
src/usr.sbin/mld6query: mld6query.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/mld6query/mld6query.8

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/mld6query/mld6query.8
diff -u src/usr.sbin/mld6query/mld6query.8:1.8 src/usr.sbin/mld6query/mld6query.8:1.9
--- src/usr.sbin/mld6query/mld6query.8:1.8	Mon Jul  3 21:35:31 2017
+++ src/usr.sbin/mld6query/mld6query.8	Tue Jul  4 07:11:18 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mld6query.8,v 1.8 2017/07/03 21:35:31 wiz Exp $
+.\"	$NetBSD: mld6query.8,v 1.9 2017/07/04 07:11:18 wiz Exp $
 .\"	$KAME: mld6query.8,v 1.5 2000/12/04 06:28:23 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -74,7 +74,7 @@ similarly, MLD report packet will be tra
 options are for debugging purposes only.
 .\"
 .Sh EXIT STATUS
-The program exits 0 on success, and >0 on failures.
+.Ex -std mld6query
 .\"
 .\" .Sh SEE ALSO
 .\"



CVS commit: src/usr.sbin/mld6query

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:11:18 UTC 2017

Modified Files:
src/usr.sbin/mld6query: mld6query.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/mld6query/mld6query.8

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



CVS commit: src/usr.sbin/mailwrapper

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:10:35 UTC 2017

Modified Files:
src/usr.sbin/mailwrapper: mailwrapper.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/mailwrapper/mailwrapper.8

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/mailwrapper/mailwrapper.8
diff -u src/usr.sbin/mailwrapper/mailwrapper.8:1.17 src/usr.sbin/mailwrapper/mailwrapper.8:1.18
--- src/usr.sbin/mailwrapper/mailwrapper.8:1.17	Mon Jul  3 21:35:31 2017
+++ src/usr.sbin/mailwrapper/mailwrapper.8	Tue Jul  4 07:10:35 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mailwrapper.8,v 1.17 2017/07/03 21:35:31 wiz Exp $
+.\"	$NetBSD: mailwrapper.8,v 1.18 2017/07/04 07:10:35 wiz Exp $
 .\"
 .\" Copyright (c) 1998
 .\" 	Perry E. Metzger.  All rights reserved.
@@ -141,8 +141,7 @@ is typically set up as a symlink to
 .Nm
 which is not usually invoked on its own.
 .Sh EXIT STATUS
-.Nm
-exits 0 on success, and >0 if an error occurs.
+.Ex -std
 .Sh DIAGNOSTICS
 .Nm
 will print a diagnostic if its configuration file is missing or malformed,



CVS commit: src/usr.sbin/mailwrapper

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:10:35 UTC 2017

Modified Files:
src/usr.sbin/mailwrapper: mailwrapper.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/mailwrapper/mailwrapper.8

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



CVS commit: src/usr.sbin/lptctl

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:10:06 UTC 2017

Modified Files:
src/usr.sbin/lptctl: lptctl.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/lptctl/lptctl.8

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/lptctl/lptctl.8
diff -u src/usr.sbin/lptctl/lptctl.8:1.13 src/usr.sbin/lptctl/lptctl.8:1.14
--- src/usr.sbin/lptctl/lptctl.8:1.13	Mon Jul  3 21:35:31 2017
+++ src/usr.sbin/lptctl/lptctl.8	Tue Jul  4 07:10:06 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lptctl.8,v 1.13 2017/07/03 21:35:31 wiz Exp $
+.\"	$NetBSD: lptctl.8,v 1.14 2017/07/04 07:10:06 wiz Exp $
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -99,8 +99,7 @@ Enables or disables (default) automatic 
 - printer ports
 .El
 .Sh EXIT STATUS
-.Nm
-returns 0 on success, >0 on failure.
+.Ex -std lptctl
 .Sh SEE ALSO
 .Xr ioctl 2 ,
 .Xr lpt 4 ,



CVS commit: src/usr.sbin/lptctl

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:10:06 UTC 2017

Modified Files:
src/usr.sbin/lptctl: lptctl.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/lptctl/lptctl.8

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



CVS commit: src/usr.sbin/link

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:08:42 UTC 2017

Modified Files:
src/usr.sbin/link: link.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/link/link.8

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/link/link.8
diff -u src/usr.sbin/link/link.8:1.7 src/usr.sbin/link/link.8:1.8
--- src/usr.sbin/link/link.8:1.7	Mon Jul  3 21:35:31 2017
+++ src/usr.sbin/link/link.8	Tue Jul  4 07:08:42 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: link.8,v 1.7 2017/07/03 21:35:31 wiz Exp $
+.\"	$NetBSD: link.8,v 1.8 2017/07/04 07:08:42 wiz Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -52,10 +52,7 @@ is the pathname of the new link to
 .Ar file1
 to be created.
 .Sh EXIT STATUS
-The
-.Nm
-utility
-exits 0 on success, and >0 if an error occurs.
+.Ex -std link
 .Sh SEE ALSO
 .Xr ln 1 ,
 .Xr link 2 ,



CVS commit: src/usr.sbin/link

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:08:42 UTC 2017

Modified Files:
src/usr.sbin/link: link.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/link/link.8

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



CVS commit: src/usr.bin/fgen

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:07:23 UTC 2017

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

Log Message:
Use more macros.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fgen/fgen.1

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

Modified files:

Index: src/usr.bin/fgen/fgen.1
diff -u src/usr.bin/fgen/fgen.1:1.10 src/usr.bin/fgen/fgen.1:1.11
--- src/usr.bin/fgen/fgen.1:1.10	Mon Jul  3 21:34:57 2017
+++ src/usr.bin/fgen/fgen.1	Tue Jul  4 07:07:23 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fgen.1,v 1.10 2017/07/03 21:34:57 wiz Exp $
+.\"	$NetBSD: fgen.1,v 1.11 2017/07/04 07:07:23 wiz Exp $
 .\"
 .\" Copyright (c) 1998 Eduardo Horvath, All Rights Reserved.
 .\"
@@ -50,7 +50,8 @@ Reads Forth source and generates tokeniz
 .\" .Sh STANDARDS
 .\" .Sh HISTORY
 .Sh AUTHORS
-Written by Eduardo E. Horvath 
+Written by
+.An Eduardo E. Horvath Aq Mt e...@one-o.com
 .Sh BUGS
 String escape sequences are not recognized so things such as
 .Pp



CVS commit: src/usr.bin/fgen

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:07:23 UTC 2017

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

Log Message:
Use more macros.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fgen/fgen.1

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



CVS commit: src/usr.bin/tee

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:05:16 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tee/tee.1

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



CVS commit: src/usr.bin/tee

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:05:16 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tee/tee.1

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

Modified files:

Index: src/usr.bin/tee/tee.1
diff -u src/usr.bin/tee/tee.1:1.8 src/usr.bin/tee/tee.1:1.9
--- src/usr.bin/tee/tee.1:1.8	Mon Jul  3 21:34:21 2017
+++ src/usr.bin/tee/tee.1	Tue Jul  4 07:05:16 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tee.1,v 1.8 2017/07/03 21:34:21 wiz Exp $
+.\"	$NetBSD: tee.1,v 1.9 2017/07/04 07:05:16 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -73,10 +73,8 @@ utility takes the default action for all
 except in the event of the
 .Fl i
 option.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std tee
 .Sh STANDARDS
 The
 .Nm



CVS commit: src/usr.bin/tail

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:04:51 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tail/tail.1

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



CVS commit: src/usr.bin/tail

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:04:51 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tail/tail.1

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

Modified files:

Index: src/usr.bin/tail/tail.1
diff -u src/usr.bin/tail/tail.1:1.16 src/usr.bin/tail/tail.1:1.17
--- src/usr.bin/tail/tail.1:1.16	Mon Jul  3 21:34:21 2017
+++ src/usr.bin/tail/tail.1	Tue Jul  4 07:04:50 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tail.1,v 1.16 2017/07/03 21:34:21 wiz Exp $
+.\"	$NetBSD: tail.1,v 1.17 2017/07/04 07:04:50 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -139,10 +139,8 @@ header consisting of the string
 where
 .Dq XXX
 is the name of the file.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std tail
 .Sh SEE ALSO
 .Xr cat 1 ,
 .Xr head 1 ,



CVS commit: src/usr.bin/mkfifo

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:03:32 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/mkfifo/mkfifo.1

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

Modified files:

Index: src/usr.bin/mkfifo/mkfifo.1
diff -u src/usr.bin/mkfifo/mkfifo.1:1.12 src/usr.bin/mkfifo/mkfifo.1:1.13
--- src/usr.bin/mkfifo/mkfifo.1:1.12	Mon Jul  3 21:34:20 2017
+++ src/usr.bin/mkfifo/mkfifo.1	Tue Jul  4 07:03:32 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mkfifo.1,v 1.12 2017/07/03 21:34:20 wiz Exp $
+.\"	$NetBSD: mkfifo.1,v 1.13 2017/07/04 07:03:32 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -67,9 +67,8 @@ operators are interpreted relative to an
 .Pp
 .Nm
 requires write permission in the parent directory.
-.Pp
-.Nm
-exits 0 if successful, and >0 if an error occurred.
+.Sh EXIT STATUS
+.Ex -std
 .Sh SEE ALSO
 .Xr mkdir 1 ,
 .Xr rm 1 ,



CVS commit: src/usr.bin/mkfifo

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:03:32 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/mkfifo/mkfifo.1

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



CVS commit: src/usr.bin/logname

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:02:44 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/logname/logname.1

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



CVS commit: src/usr.bin/logname

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:02:44 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/logname/logname.1

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

Modified files:

Index: src/usr.bin/logname/logname.1
diff -u src/usr.bin/logname/logname.1:1.13 src/usr.bin/logname/logname.1:1.14
--- src/usr.bin/logname/logname.1:1.13	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/logname/logname.1	Tue Jul  4 07:02:44 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: logname.1,v 1.13 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: logname.1,v 1.14 2017/07/04 07:02:44 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -54,10 +54,8 @@ and
 .Ev USER
 environment variables
 because the environment cannot be trusted.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std logname
 .Sh SEE ALSO
 .Xr who 1 ,
 .Xr whoami 1 ,



CVS commit: src/usr.bin/join

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:01:53 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/join/join.1

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

Modified files:

Index: src/usr.bin/join/join.1
diff -u src/usr.bin/join/join.1:1.14 src/usr.bin/join/join.1:1.15
--- src/usr.bin/join/join.1:1.14	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/join/join.1	Tue Jul  4 07:01:53 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: join.1,v 1.14 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: join.1,v 1.15 2017/07/04 07:01:53 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"   The Regents of the University of California.  All rights reserved.
@@ -31,7 +31,6 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)join.1	8.3 (Berkeley) 4/28/95
-.\"	$NetBSD: join.1,v 1.14 2017/07/03 21:34:19 wiz Exp $
 .\"
 .Dd April 28, 1995
 .Dt JOIN 1
@@ -152,10 +151,8 @@ If one of the arguments
 or
 .Ar file2
 is ``-'', the standard input is used.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std join
 .Sh COMPATIBILITY
 For compatibility with historic versions of
 .Nm ,



CVS commit: src/usr.bin/id

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:01:07 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/id/id.1

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

Modified files:

Index: src/usr.bin/id/id.1
diff -u src/usr.bin/id/id.1:1.13 src/usr.bin/id/id.1:1.14
--- src/usr.bin/id/id.1:1.13	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/id/id.1	Tue Jul  4 07:01:07 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: id.1,v 1.13 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: id.1,v 1.14 2017/07/04 07:01:07 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -108,10 +108,8 @@ options instead of the effective ID.
 .It Fl u
 Display the effective user ID as a number.
 .El
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std id
 .Sh SEE ALSO
 .Xr who 1
 .Sh STANDARDS



CVS commit: src/usr.bin/join

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:01:53 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/join/join.1

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



CVS commit: src/usr.bin/id

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:01:07 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/id/id.1

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



CVS commit: src/usr.bin/id

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:00:30 UTC 2017

Modified Files:
src/usr.bin/id: groups.1

Log Message:
Add EXIT STATUS section. Use Ex. Remove duplicate RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/id/groups.1

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



CVS commit: src/usr.bin/id

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 07:00:30 UTC 2017

Modified Files:
src/usr.bin/id: groups.1

Log Message:
Add EXIT STATUS section. Use Ex. Remove duplicate RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/id/groups.1

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

Modified files:

Index: src/usr.bin/id/groups.1
diff -u src/usr.bin/id/groups.1:1.10 src/usr.bin/id/groups.1:1.11
--- src/usr.bin/id/groups.1:1.10	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/id/groups.1	Tue Jul  4 07:00:30 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: groups.1,v 1.10 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: groups.1,v 1.11 2017/07/04 07:00:30 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -28,7 +28,6 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)groups.1	8.1 (Berkeley) 6/6/93
-.\"	$NetBSD: groups.1,v 1.10 2017/07/03 21:34:19 wiz Exp $
 .\"
 .Dd June 6, 1993
 .Dt GROUPS 1
@@ -54,9 +53,7 @@ The
 .Nm
 utility displays the groups to which you (or the optionally specified user)
 belong.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std groups
 .Sh SEE ALSO
 .Xr id 1



CVS commit: src/usr.bin/compress

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:58:55 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/compress/compress.1

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

Modified files:

Index: src/usr.bin/compress/compress.1
diff -u src/usr.bin/compress/compress.1:1.15 src/usr.bin/compress/compress.1:1.16
--- src/usr.bin/compress/compress.1:1.15	Mon Jul  3 21:34:18 2017
+++ src/usr.bin/compress/compress.1	Tue Jul  4 06:58:55 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: compress.1,v 1.15 2017/07/03 21:34:18 wiz Exp $
+.\"	$NetBSD: compress.1,v 1.16 2017/07/04 06:58:55 wiz Exp $
 .\"
 .\" Copyright (c) 1986, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -129,8 +129,8 @@ If it is increasing,
 continues to use the existing code dictionary.
 However, if the compression ratio decreases,
 .Nm
-discards the table of substrings and rebuilds it from scratch.  This allows
-the algorithm to adapt to the next "block" of the file.
+discards the table of substrings and rebuilds it from scratch.
+This allows the algorithm to adapt to the next "block" of the file.
 .Pp
 The
 .Fl b
@@ -152,10 +152,8 @@ Compression is generally much better tha
 coding (as used in the historical command pack), or adaptive Huffman
 coding (as used in the historical command compact), and takes less
 time to compute.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std compress
 .Sh SEE ALSO
 .Xr zcat 1
 .Rs



CVS commit: src/usr.bin/head

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:59:35 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/head/head.1

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

Modified files:

Index: src/usr.bin/head/head.1
diff -u src/usr.bin/head/head.1:1.13 src/usr.bin/head/head.1:1.14
--- src/usr.bin/head/head.1:1.13	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/head/head.1	Tue Jul  4 06:59:34 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: head.1,v 1.13 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: head.1,v 1.14 2017/07/04 06:59:34 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -65,10 +65,8 @@ is the name of the file.
 The
 .Fl q
 flag disables the printing of the header in all cases.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std head
 .Sh COMPATIBILITY
 The historic command line syntax of
 .Nm



CVS commit: src/usr.bin/head

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:59:35 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/head/head.1

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



CVS commit: src/usr.bin/compress

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:58:55 UTC 2017

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

Log Message:
Add EXIT STATUS section. Use Ex. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/compress/compress.1

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



CVS commit: src/libexec/mail.local

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:56:51 UTC 2017

Modified Files:
src/libexec/mail.local: mail.local.8

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/libexec/mail.local/mail.local.8

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



CVS commit: src/libexec/mail.local

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:56:51 UTC 2017

Modified Files:
src/libexec/mail.local: mail.local.8

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/libexec/mail.local/mail.local.8

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

Modified files:

Index: src/libexec/mail.local/mail.local.8
diff -u src/libexec/mail.local/mail.local.8:1.13 src/libexec/mail.local/mail.local.8:1.14
--- src/libexec/mail.local/mail.local.8:1.13	Mon Jul  3 21:35:49 2017
+++ src/libexec/mail.local/mail.local.8	Tue Jul  4 06:56:50 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mail.local.8,v 1.13 2017/07/03 21:35:49 wiz Exp $
+.\"	$NetBSD: mail.local.8,v 1.14 2017/07/04 06:56:50 wiz Exp $
 .\"
 .\" Copyright (c) 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -80,10 +80,6 @@ while mail is appended.
 If the ``biff'' service is returned by
 .Xr getservbyname 3 ,
 the biff server is notified of delivered mail.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
 .Sh ENVIRONMENT
 .Bl -tag -width indent
 .It Ev TZ
@@ -96,6 +92,8 @@ temporary files
 .It Pa /var/mail/user
 user's mailbox directory
 .El
+.Sh EXIT STATUS
+.Ex -std mail.local
 .Sh SEE ALSO
 .Xr mail 1 ,
 .Xr sendmail 1 ,



CVS commit: src/sbin/route

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:54:20 UTC 2017

Modified Files:
src/sbin/route: route.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sbin/route/route.8

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



CVS commit: src/sbin/route

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:54:20 UTC 2017

Modified Files:
src/sbin/route: route.8

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sbin/route/route.8

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

Modified files:

Index: src/sbin/route/route.8
diff -u src/sbin/route/route.8:1.59 src/sbin/route/route.8:1.60
--- src/sbin/route/route.8:1.59	Mon Jul  3 21:33:42 2017
+++ src/sbin/route/route.8	Tue Jul  4 06:54:20 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: route.8,v 1.59 2017/07/03 21:33:42 wiz Exp $
+.\"	$NetBSD: route.8,v 1.60 2017/07/04 06:54:20 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -376,9 +376,7 @@ and
 As such, only the super-user may modify
 the routing tables.
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std route
 This includes the use of the
 .Cm get
 command to look up a route that is incomplete.



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:53:12 UTC 2017

Modified Files:
src/sbin/chown: chown.8

Log Message:
Add EXIT STATUS section. Use Ex. Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/chown/chown.8

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

Modified files:

Index: src/sbin/chown/chown.8
diff -u src/sbin/chown/chown.8:1.11 src/sbin/chown/chown.8:1.12
--- src/sbin/chown/chown.8:1.11	Mon Jul  3 21:33:41 2017
+++ src/sbin/chown/chown.8	Tue Jul  4 06:53:12 2017
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.11 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: chown.8,v 1.12 2017/07/04 06:53:12 wiz Exp $
 .\"
 .Dd September 11, 2016
 .Dt CHOWN 8
@@ -151,10 +151,8 @@ Unless invoked by the super-user,
 clears the set-user-id and set-group-id bits on a file to prevent
 accidental or mischievous creation of set-user-id and set-group-id
 programs.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std chown
 .Sh COMPATIBILITY
 Previous versions of the
 .Nm
@@ -169,11 +167,6 @@ group names may contain the dot characte
 .Xr lchown 2 ,
 .Xr fts 3 ,
 .Xr symlink 7
-.Sh HISTORY
-A
-.Nm
-utility appeared in
-.At v1 .
 .Sh STANDARDS
 The
 .Nm
@@ -184,3 +177,8 @@ The
 option and the use of ``#'' to force a numeric lookup
 are extensions to
 .St -p1003.2 .
+.Sh HISTORY
+A
+.Nm
+utility appeared in
+.At v1 .



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:53:12 UTC 2017

Modified Files:
src/sbin/chown: chown.8

Log Message:
Add EXIT STATUS section. Use Ex. Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/chown/chown.8

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



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:52:20 UTC 2017

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chgrp.1

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

Modified files:

Index: src/sbin/chown/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.7 src/sbin/chown/chgrp.1:1.8
--- src/sbin/chown/chgrp.1:1.7	Mon Jul  3 21:33:41 2017
+++ src/sbin/chown/chgrp.1	Tue Jul  4 06:52:20 2017
@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chgrp.1,v 1.7 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: chgrp.1,v 1.8 2017/07/04 06:52:20 wiz Exp $
 .\"
 .Dd October 22, 2012
 .Dt CHGRP 1
@@ -142,15 +142,13 @@ Unless invoked by the super-user,
 clears the set-user-id and set-group-id bits on a file to prevent
 accidental or mischievous creation of set-user-id or set-group-id
 programs.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
 .Sh FILES
 .Bl -tag -width /etc/group -compact
 .It Pa /etc/group
 Group ID file
 .El
+.Sh EXIT STATUS
+.Ex -std chgrp
 .Sh SEE ALSO
 .Xr chown 2 ,
 .Xr lchown 2 ,



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:52:20 UTC 2017

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chgrp.1

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



CVS commit: src/bin/pwd

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:50:37 UTC 2017

Modified Files:
src/bin/pwd: pwd.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/pwd/pwd.1

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

Modified files:

Index: src/bin/pwd/pwd.1
diff -u src/bin/pwd/pwd.1:1.26 src/bin/pwd/pwd.1:1.27
--- src/bin/pwd/pwd.1:1.26	Mon Jul  3 21:33:23 2017
+++ src/bin/pwd/pwd.1	Tue Jul  4 06:50:37 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pwd.1,v 1.26 2017/07/03 21:33:23 wiz Exp $
+.\"	$NetBSD: pwd.1,v 1.27 2017/07/04 06:50:37 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -69,9 +69,7 @@ command is
 is usually provided as a shell builtin (which may have a different
 default).
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std pwd
 .Sh SEE ALSO
 .Xr cd 1 ,
 .Xr csh 1 ,



CVS commit: src/bin/mv

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:50:04 UTC 2017

Modified Files:
src/bin/mv: mv.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/bin/mv/mv.1

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



CVS commit: src/bin/pwd

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:50:37 UTC 2017

Modified Files:
src/bin/pwd: pwd.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/pwd/pwd.1

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



CVS commit: src/bin/mv

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:50:04 UTC 2017

Modified Files:
src/bin/mv: mv.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/bin/mv/mv.1

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

Modified files:

Index: src/bin/mv/mv.1
diff -u src/bin/mv/mv.1:1.29 src/bin/mv/mv.1:1.30
--- src/bin/mv/mv.1:1.29	Mon Jul  3 21:33:23 2017
+++ src/bin/mv/mv.1	Tue Jul  4 06:50:04 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mv.1,v 1.29 2017/07/03 21:33:23 wiz Exp $
+.\"	$NetBSD: mv.1,v 1.30 2017/07/04 06:50:04 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -126,9 +126,7 @@ cp -PRp source_file destination_path && 
 rm -rf source_file
 .Ed
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std mv
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr rename 2 ,



CVS commit: src/bin/mkdir

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:49:35 UTC 2017

Modified Files:
src/bin/mkdir: mkdir.1

Log Message:
Use Ex. Remove superfluous Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/mkdir/mkdir.1

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



CVS commit: src/bin/mkdir

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:49:35 UTC 2017

Modified Files:
src/bin/mkdir: mkdir.1

Log Message:
Use Ex. Remove superfluous Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/mkdir/mkdir.1

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

Modified files:

Index: src/bin/mkdir/mkdir.1
diff -u src/bin/mkdir/mkdir.1:1.20 src/bin/mkdir/mkdir.1:1.21
--- src/bin/mkdir/mkdir.1:1.20	Mon Jul  3 21:33:23 2017
+++ src/bin/mkdir/mkdir.1	Tue Jul  4 06:49:35 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mkdir.1,v 1.20 2017/07/03 21:33:23 wiz Exp $
+.\"	$NetBSD: mkdir.1,v 1.21 2017/07/04 06:49:35 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -52,7 +52,6 @@ as modified by the current
 .Xr umask 2 .
 .Pp
 The options are as follows:
-.Pp
 .Bl -tag -width indent
 .It Fl m
 Set the file permission bits of the final created directory to
@@ -79,8 +78,7 @@ Do not consider it an error if the argum
 .Pp
 The user must have write permission in the parent directory.
 .Sh EXIT STATUS
-.Nm
-exits 0 if successful, and >0 if an error occurred.
+.Ex -std mkdir
 .Sh SEE ALSO
 .Xr chmod 1 ,
 .Xr rmdir 1 ,



CVS commit: src/bin/dd

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:48:15 UTC 2017

Modified Files:
src/bin/dd: dd.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/bin/dd/dd.1

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

Modified files:

Index: src/bin/dd/dd.1
diff -u src/bin/dd/dd.1:1.33 src/bin/dd/dd.1:1.34
--- src/bin/dd/dd.1:1.33	Mon Jul  3 21:33:22 2017
+++ src/bin/dd/dd.1	Tue Jul  4 06:48:15 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dd.1,v 1.33 2017/07/03 21:33:22 wiz Exp $
+.\"	$NetBSD: dd.1,v 1.34 2017/07/04 06:48:15 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -476,9 +476,7 @@ in the same format as the standard compl
 .Nm
 will exit.
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success and >0 if an error occurred.
+.Ex -std dd
 .Sh EXAMPLES
 To print summary information in human-readable form:
 .Pp



CVS commit: src/bin/dd

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:48:15 UTC 2017

Modified Files:
src/bin/dd: dd.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/bin/dd/dd.1

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



CVS commit: src/bin/echo

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:48:41 UTC 2017

Modified Files:
src/bin/echo: echo.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/bin/echo/echo.1

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

Modified files:

Index: src/bin/echo/echo.1
diff -u src/bin/echo/echo.1:1.16 src/bin/echo/echo.1:1.17
--- src/bin/echo/echo.1:1.16	Mon Jul  3 21:33:23 2017
+++ src/bin/echo/echo.1	Tue Jul  4 06:48:41 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: echo.1,v 1.16 2017/07/03 21:33:23 wiz Exp $
+.\"	$NetBSD: echo.1,v 1.17 2017/07/04 06:48:41 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -55,9 +55,7 @@ The following option is available:
 Do not print the trailing newline character.
 .El
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std echo
 .Sh SEE ALSO
 .Xr printf 1
 .Sh STANDARDS



CVS commit: src/bin/echo

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:48:41 UTC 2017

Modified Files:
src/bin/echo: echo.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/bin/echo/echo.1

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



CVS commit: src/bin/cat

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:46:51 UTC 2017

Modified Files:
src/bin/cat: cat.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/cat/cat.1

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

Modified files:

Index: src/bin/cat/cat.1
diff -u src/bin/cat/cat.1:1.39 src/bin/cat/cat.1:1.40
--- src/bin/cat/cat.1:1.39	Mon Jul  3 21:33:22 2017
+++ src/bin/cat/cat.1	Tue Jul  4 06:46:51 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cat.1,v 1.39 2017/07/03 21:33:22 wiz Exp $
+.\"	$NetBSD: cat.1,v 1.40 2017/07/04 06:46:51 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -121,9 +121,7 @@ Non-ascii characters (with the high bit 
 (for meta) followed by the character for the low 7 bits.
 .El
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std cat
 .Sh EXAMPLES
 The command:
 .Bd -literal -offset indent



CVS commit: src/bin/chmod

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:47:27 UTC 2017

Modified Files:
src/bin/chmod: chmod.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/bin/chmod/chmod.1

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

Modified files:

Index: src/bin/chmod/chmod.1
diff -u src/bin/chmod/chmod.1:1.27 src/bin/chmod/chmod.1:1.28
--- src/bin/chmod/chmod.1:1.27	Mon Jul  3 21:33:22 2017
+++ src/bin/chmod/chmod.1	Tue Jul  4 06:47:27 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chmod.1,v 1.27 2017/07/03 21:33:22 wiz Exp $
+.\"	$NetBSD: chmod.1,v 1.28 2017/07/04 06:47:27 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -113,9 +113,7 @@ option had been specified.
 Only the owner of a file or the super-user is permitted to change
 the mode of a file.
 .Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Ex -std chmod
 .Sh MODES
 Modes may be absolute or symbolic.
 An absolute mode is an octal number constructed by



CVS commit: src/bin/chmod

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:47:27 UTC 2017

Modified Files:
src/bin/chmod: chmod.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/bin/chmod/chmod.1

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



CVS commit: src/bin/cat

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:46:51 UTC 2017

Modified Files:
src/bin/cat: cat.1

Log Message:
Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/cat/cat.1

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



CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 06:45:05 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_output.c

Log Message:
Simplify IPSEC_OSTAT macro (NFC)


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/netipsec/ipsec_output.c

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



CVS commit: src/sys/netipsec

2017-07-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  4 06:45:05 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_output.c

Log Message:
Simplify IPSEC_OSTAT macro (NFC)


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/netipsec/ipsec_output.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/netipsec/ipsec_output.c
diff -u src/sys/netipsec/ipsec_output.c:1.48 src/sys/netipsec/ipsec_output.c:1.49
--- src/sys/netipsec/ipsec_output.c:1.48	Fri May 19 04:34:09 2017
+++ src/sys/netipsec/ipsec_output.c	Tue Jul  4 06:45:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_output.c,v 1.48 2017/05/19 04:34:09 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec_output.c,v 1.49 2017/07/04 06:45:05 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.48 2017/05/19 04:34:09 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.49 2017/07/04 06:45:05 ozaki-r Exp $");
 
 /*
  * IPsec output processing.
@@ -298,17 +298,17 @@ ipsec_nextisr(
 	int *error
 )
 {
-#define	IPSEC_OSTAT(x, y, z)		\
+#define	IPSEC_OSTAT(type)		\
 do {	\
 	switch (isr->saidx.proto) {	\
 	case IPPROTO_ESP:		\
-		ESP_STATINC(x);		\
+		ESP_STATINC(ESP_STAT_ ## type);\
 		break;			\
 	case IPPROTO_AH:		\
-		AH_STATINC(y);		\
+		AH_STATINC(AH_STAT_ ## type);\
 		break;			\
 	default:			\
-		IPCOMP_STATINC(z);	\
+		IPCOMP_STATINC(IPCOMP_STAT_ ## type);			\
 		break;			\
 	}\
 } while (/*CONSTCOND*/0)
@@ -419,8 +419,7 @@ again:
 	(isr->saidx.proto == IPPROTO_IPCOMP && !ipcomp_enable)) {
 		IPSECLOG(LOG_DEBUG, "IPsec outbound packet dropped due"
 		" to policy (check your sysctls)\n");
-		IPSEC_OSTAT(ESP_STAT_PDROPS, AH_STAT_PDROPS,
-		IPCOMP_STAT_PDROPS);
+		IPSEC_OSTAT(PDROPS);
 		*error = EHOSTUNREACH;
 		goto bad;
 	}
@@ -431,8 +430,7 @@ again:
 	 */
 	if (sav->tdb_xform == NULL) {
 		IPSECLOG(LOG_DEBUG, "no transform for SA\n");
-		IPSEC_OSTAT(ESP_STAT_NOXFORM, AH_STAT_NOXFORM,
-		IPCOMP_STAT_NOXFORM);
+		IPSEC_OSTAT(NOXFORM);
 		*error = EHOSTUNREACH;
 		goto bad;
 	}



CVS commit: src/share/man/man8/man8.alpha

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:42:46 UTC 2017

Modified Files:
src/share/man/man8/man8.alpha: mkbootimage.8

Log Message:
Add EXIT STATUS section. Use more macros.
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man8/man8.alpha/mkbootimage.8

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



CVS commit: src/share/man/man8/man8.alpha

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:42:46 UTC 2017

Modified Files:
src/share/man/man8/man8.alpha: mkbootimage.8

Log Message:
Add EXIT STATUS section. Use more macros.
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man8/man8.alpha/mkbootimage.8

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/man8/man8.alpha/mkbootimage.8
diff -u src/share/man/man8/man8.alpha/mkbootimage.8:1.9 src/share/man/man8/man8.alpha/mkbootimage.8:1.10
--- src/share/man/man8/man8.alpha/mkbootimage.8:1.9	Mon Jul  3 21:31:00 2017
+++ src/share/man/man8/man8.alpha/mkbootimage.8	Tue Jul  4 06:42:46 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: mkbootimage.8,v 1.9 2017/07/03 21:31:00 wiz Exp $
+.\" $NetBSD: mkbootimage.8,v 1.10 2017/07/04 06:42:46 wiz Exp $
 .\"
 .\" Copyright (c) 1999 Christopher G. Demetriou
 .\" All rights reserved.
@@ -48,10 +48,11 @@ The
 .Nm
 utility creates bootable image files from
 .Nx Ns Tn /alpha
-bootstrap programs.  Bootable image
-files can be placed directly on disk or tape to create bootable
-media which can be booted by the SRM console.  This is
-primarily useful for creating bootable tapes or disk sets with the
+bootstrap programs.
+Bootable image files can be placed directly on disk or tape to
+create bootable media which can be booted by the SRM console.
+This is primarily useful for creating bootable tapes or disk sets
+with the
 .Pa /usr/mdec/ustarboot
 bootstrap program, or for creating firmware upgrade media
 using firmware upgrade programs.
@@ -67,7 +68,8 @@ standard output.
 The
 .Nm
 utility does not install bootstrap programs to make
-disks bootable.  To do that, use
+disks bootable.
+To do that, use
 .Xr installboot 8 .
 Similarly, it is not necessary to use
 .Nm
@@ -86,16 +88,14 @@ Print information about what
 .Nm
 is doing.
 .El
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
 .Sh FILES
 .Bl -tag -width /usr/mdec/ustarboot -compact
 .It Pa /usr/mdec/ustarboot
 .Dq ustar
 file system bootstrap program
 .El
+.Sh EXIT STATUS
+.Ex -std mkbootimage
 .Sh EXAMPLES
 .Bd -literal -offset indent
 mkbootimage as200_v5_8.exe as200_v5_8.exe.bootimage
@@ -106,7 +106,6 @@ Create a bootable image from the (firmwa
 That bootable image could then be written to floppy,
 disk, CD-ROM, or tape to create bootable firmware
 update media.
-.Pp
 .Bd -literal -offset indent
 (mkbootimage /usr/mdec/ustarboot; tar cvf - netbsd) | \\
 dd of=/dev/rst0
@@ -115,8 +114,8 @@ update media.
 Make a bootable image from the bootstrap program
 .Pa /usr/mdec/ustarboot ,
 concatenate it with a tar file containing a kernel,
-and write the output to a tape.  This is an example of
-how to create a tape which boots a kernel.
+and write the output to a tape.
+This is an example of how to create a tape which boots a kernel.
 .Sh SEE ALSO
 .Xr alpha/boot 8 ,
 .Xr installboot 8
@@ -129,4 +128,5 @@ command first appeared in
 .Sh AUTHORS
 The
 .Nm
-utility was written by Chris Demetriou.
+utility was written by
+.An Chris Demetriou .



  1   2   >