CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:32:43 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_netbsd.h

Log Message:
 Enable TX multiqueue by default on both ixg(4) and ixv(4).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_netbsd.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/ixgbe/ixgbe_netbsd.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.6 src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.7
--- src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.6	Wed Feb  1 10:47:13 2017
+++ src/sys/dev/pci/ixgbe/ixgbe_netbsd.h	Wed Feb  8 04:32:43 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixgbe_netbsd.h,v 1.6 2017/02/01 10:47:13 msaitoh Exp $*/
+/*$NetBSD: ixgbe_netbsd.h,v 1.7 2017/02/08 04:32:43 msaitoh Exp $*/
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #ifndef _IXGBE_NETBSD_H
 #define _IXGBE_NETBSD_H
 
-#if 1 /* Enable this if you don't want to use TX multiqueue function */
+#if 0 /* Enable this if you don't want to use TX multiqueue function */
 #define	IXGBE_LEGACY_TX	1
 #endif
 



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:28:53 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
 Enable multiqueue.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.43 src/sys/dev/pci/ixgbe/ixv.c:1.44
--- src/sys/dev/pci/ixgbe/ixv.c:1.43	Wed Feb  8 04:24:44 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 04:28:53 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.43 2017/02/08 04:24:44 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.44 2017/02/08 04:28:53 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -186,7 +186,7 @@ MODULE_DEPEND(ix, netmap, 1, 1, 1);
 */
 
 /* Number of Queues - do not exceed MSIX vectors - 1 */
-static int ixv_num_queues = 1;
+static int ixv_num_queues = 0;
 #define	TUNABLE_INT(__x, __y)
 TUNABLE_INT("hw.ixv.num_queues", _num_queues);
 



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:24:44 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Use dmat64 if available. Same as ixgbe.c rev. 1.60.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.42 src/sys/dev/pci/ixgbe/ixv.c:1.43
--- src/sys/dev/pci/ixgbe/ixv.c:1.42	Wed Feb  8 04:20:29 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 04:24:44 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.42 2017/02/08 04:20:29 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.43 2017/02/08 04:24:44 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -340,7 +340,10 @@ ixv_attach(device_t parent, device_t dev
 
 	adapter->osdep.pc = pa->pa_pc;
 	adapter->osdep.tag = pa->pa_tag;
-	adapter->osdep.dmat = pa->pa_dmat;
+	if (pci_dma64_available(pa))
+		adapter->osdep.dmat = pa->pa_dmat64;
+	else
+		adapter->osdep.dmat = pa->pa_dmat;
 	adapter->osdep.attached = false;
 
 	ent = ixv_lookup(pa);



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:20:29 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
 Fix a bug that 1Gbps is printed even if the phyiscal media is at 100Mbps.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.41 src/sys/dev/pci/ixgbe/ixv.c:1.42
--- src/sys/dev/pci/ixgbe/ixv.c:1.41	Wed Feb  8 04:14:05 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 04:20:29 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.41 2017/02/08 04:14:05 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.42 2017/02/08 04:20:29 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1029,11 +1029,14 @@ ixv_media_status(struct ifnet * ifp, str
 	ifmr->ifm_status |= IFM_ACTIVE;
 
 	switch (adapter->link_speed) {
+		case IXGBE_LINK_SPEED_10GB_FULL:
+			ifmr->ifm_active |= IFM_10G_T | IFM_FDX;
+			break;
 		case IXGBE_LINK_SPEED_1GB_FULL:
 			ifmr->ifm_active |= IFM_1000_T | IFM_FDX;
 			break;
-		case IXGBE_LINK_SPEED_10GB_FULL:
-			ifmr->ifm_active |= IFM_10G_T | IFM_FDX;
+		case IXGBE_LINK_SPEED_100_FULL:
+			ifmr->ifm_active |= IFM_100_TX | IFM_FDX;
 			break;
 	}
 
@@ -1227,10 +1230,26 @@ ixv_update_link_status(struct adapter *a
 
 	if (adapter->link_up){ 
 		if (adapter->link_active == FALSE) {
-			if (bootverbose)
-device_printf(dev,"Link is up %d Gbps %s \n",
-((adapter->link_speed == 128)? 10:1),
-"Full Duplex");
+			if (bootverbose) {
+const char *bpsmsg;
+
+switch (adapter->link_speed) {
+case IXGBE_LINK_SPEED_10GB_FULL:
+	bpsmsg = "10 Gbps";
+	break;
+case IXGBE_LINK_SPEED_1GB_FULL:
+	bpsmsg = "1 Gbps";
+	break;
+case IXGBE_LINK_SPEED_100_FULL:
+	bpsmsg = "100 Mbps";
+	break;
+default:
+	bpsmsg = "unknown speed";
+	break;
+}
+device_printf(dev,"Link is up %s %s \n",
+bpsmsg, "Full Duplex");
+			}
 			adapter->link_active = TRUE;
 			if_link_state_change(ifp, LINK_STATE_UP);
 		}



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

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  8 04:18:42 UTC 2017

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

Log Message:
Don't track /etc/nsd/nsd.conf and /etc/unbound/unbound.conf


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/distrib/sets/lists/etc/mi

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.245 src/distrib/sets/lists/etc/mi:1.246
--- src/distrib/sets/lists/etc/mi:1.245	Sat Jan  7 18:05:35 2017
+++ src/distrib/sets/lists/etc/mi	Tue Feb  7 23:18:42 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.245 2017/01/07 23:05:35 christos Exp $
+# $NetBSD: mi,v 1.246 2017/02/08 04:18:42 christos Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -102,7 +102,6 @@
 ./etc/networks	etc-net-etc
 ./etc/newsyslog.confetc-sysutil-etc
 ./etc/nsswitch.confetc-net-etc
-./etc/nsd/nsd.confetc-nsd-etc		nsd
 ./etc/ntp.conf	etc-ntp-etc
 ./etc/obsolete/baseetc-obsolete		obsolete
 ./etc/obsolete/competc-obsolete		obsolete
@@ -341,7 +340,6 @@
 ./etc/sysctl.confetc-sys-etc
 ./etc/syslog.confetc-sys-etc
 ./etc/ttys	etc-sys-etc
-./etc/unbound/unbound.conf			etc-netutil-etc		unbound
 ./etc/weekly	etc-sys-etc
 ./etc/weekly.confetc-sys-etc
 ./etc/wscons.confetc-sys-etc



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:14:05 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Fix detach path:
 - Call softint_disestablish() and pci_intr_disestablish() for all queues
   correctly.
 - Add missing sysctl_teardown() to delete sysctl entries.
 - Call pci_intr_release(). Now NETBSD_MSI_OR_MSIX is completely deleted.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.40 src/sys/dev/pci/ixgbe/ixv.c:1.41
--- src/sys/dev/pci/ixgbe/ixv.c:1.40	Wed Feb  8 04:05:13 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 04:14:05 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.40 2017/02/08 04:05:13 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.41 2017/02/08 04:14:05 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -502,6 +502,7 @@ ixv_detach(device_t dev, int flags)
 {
 	struct adapter *adapter = device_private(dev);
 	struct ix_queue *que = adapter->queues;
+	struct tx_ring *txr = adapter->tx_rings;
 
 	INIT_DEBUGOUT("ixv_detach: begin");
 	if (adapter->osdep.attached == false)
@@ -523,10 +524,8 @@ ixv_detach(device_t dev, int flags)
 	ixv_stop(adapter);
 	IXGBE_CORE_UNLOCK(adapter);
 
-	for (int i = 0; i < adapter->num_queues; i++, que++) {
+	for (int i = 0; i < adapter->num_queues; i++, que++, txr++) {
 #ifndef IXGBE_LEGACY_TX
-		struct tx_ring *txr = adapter->tx_rings;
-
 		softint_disestablish(txr->txr_si);
 #endif
 		softint_disestablish(que->que_si);
@@ -554,6 +553,8 @@ ixv_detach(device_t dev, int flags)
 #endif
 	if_detach(adapter->ifp);
 
+	sysctl_teardown(>sysctllog);
+
 	ixgbe_free_transmit_structures(adapter);
 	ixgbe_free_receive_structures(adapter);
 
@@ -1574,7 +1575,6 @@ ixv_free_pci_resources(struct adapter * 
 	**  Release all msix queue resources:
 	*/
 	for (int i = 0; i < adapter->num_queues; i++, que++) {
-		rid = que->msix + 1;
 		if (que->res != NULL)
 			pci_intr_disestablish(adapter->osdep.pc,
 			adapter->osdep.ihs[i]);
@@ -1583,19 +1583,18 @@ ixv_free_pci_resources(struct adapter * 
 
 	/* Clean the Legacy or Link interrupt last */
 	if (adapter->vector) /* we are doing MSIX */
-		rid = adapter->vector + 1;
+		rid = adapter->vector;
 	else
-		(adapter->msix != 0) ? (rid = 1):(rid = 0);
+		rid = 0;
 
-	if (adapter->osdep.ihs[rid] != NULL)
+	if (adapter->osdep.ihs[rid] != NULL) {
 		pci_intr_disestablish(adapter->osdep.pc,
 		adapter->osdep.ihs[rid]);
-	adapter->osdep.ihs[rid] = NULL;
+		adapter->osdep.ihs[rid] = NULL;
+	}
 
-#if defined(NETBSD_MSI_OR_MSIX)
 	pci_intr_release(adapter->osdep.pc, adapter->osdep.intrs,
 	adapter->osdep.nintrs);
-#endif
 
 	if (adapter->osdep.mem_size != 0) {
 		bus_space_unmap(adapter->osdep.mem_bus_space_tag,



CVS commit: src/usr.sbin/makefs/ffs

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  8 04:08:53 UTC 2017

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
Don't store random (from ASLR) pointers into the superblock. Should be the
last (famous last words) problem with reproducible builds!


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/makefs/ffs/mkfs.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs/mkfs.c
diff -u src/usr.sbin/makefs/ffs/mkfs.c:1.34 src/usr.sbin/makefs/ffs/mkfs.c:1.35
--- src/usr.sbin/makefs/ffs/mkfs.c:1.34	Fri Jun 24 15:24:11 2016
+++ src/usr.sbin/makefs/ffs/mkfs.c	Tue Feb  7 23:08:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.34 2016/06/24 19:24:11 christos Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.35 2017/02/08 04:08:53 christos Exp $	*/
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -48,7 +48,7 @@
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
 #ifdef __RCSID
-__RCSID("$NetBSD: mkfs.c,v 1.34 2016/06/24 19:24:11 christos Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.35 2017/02/08 04:08:53 christos Exp $");
 #endif
 #endif
 #endif /* not lint */
@@ -102,7 +102,11 @@ union {
 char *iobuf;
 int iobufsize;
 
-char writebuf[FFS_MAXBSIZE];
+union {
+	struct fs fs;
+	char pad[FFS_MAXBSIZE];
+} wb;
+#define writebuf wb.pad
 
 static int Oflag;	   /* format as an 4.3BSD file system */
 static int64_t fssize;	   /* file system size */
@@ -121,6 +125,17 @@ static int sbsize;	   /* superblock 
 static int avgfilesize;	   /* expected average file size */
 static int avgfpdir;	   /* expected number of files per directory */
 
+static void
+ffs_sb_copy(struct fs *o, const struct fs *i, size_t l, fsinfo_t *fsopts)
+{
+	memcpy(o, i, l);
+	/* Zero out pointers */
+	o->fs_csp = NULL;
+	o->fs_maxcluster = NULL;
+	if (fsopts->needswap)
+		ffs_sb_swap(i, o);
+}
+
 struct fs *
 ffs_mkfs(const char *fsys, const fsinfo_t *fsopts, time_t tstamp)
 {
@@ -508,9 +523,7 @@ ffs_mkfs(const char *fsys, const fsinfo_
 	 * Make a copy of the superblock into the buffer that we will be
 	 * writing out in each cylinder group.
 	 */
-	memcpy(writebuf, , sbsize);
-	if (fsopts->needswap)
-		ffs_sb_swap(, (struct fs*)writebuf);
+	ffs_sb_copy(, , sbsize, fsopts);
 	memcpy(iobuf, writebuf, SBLOCKSIZE);
 
 	printf("super-block backups (for fsck -b #) at:");
@@ -555,9 +568,7 @@ ffs_write_superblock(struct fs *fs, cons
 	saveflag = fs->fs_flags & FS_INTERNAL;
 	fs->fs_flags &= ~FS_INTERNAL;
 
-memcpy(writebuf, , sbsize);
-	if (fsopts->needswap)
-		ffs_sb_swap(fs, (struct fs*)writebuf);
+	ffs_sb_copy(, , sbsize, fsopts);
 	ffs_wtfs(fs->fs_sblockloc / sectorsize, sbsize, writebuf, fsopts);
 
 	/* Write out the duplicate super blocks */



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 04:05:13 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
Add queue number into interrupt name.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.68 src/sys/dev/pci/ixgbe/ixgbe.c:1.69
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.68	Wed Feb  8 03:59:12 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Feb  8 04:05:13 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.68 2017/02/08 03:59:12 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.69 2017/02/08 04:05:13 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -507,7 +507,7 @@ ixgbe_attach(device_t parent, device_t d
 
 	ixgbe_set_sysctl_value(adapter, "tx_processing_limit",
 	"max number of tx packets to process",
-	>tx_process_limit, ixgbe_tx_process_limit);
+	>tx_process_limit, ixgbe_tx_process_limit);
 
 	/* Do descriptor calc and sanity checks */
 	if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
@@ -2684,8 +2684,8 @@ ixgbe_allocate_msix(struct adapter *adap
 
 	kcpuset_create(, false);
 	for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) {
-		snprintf(intr_xname, sizeof(intr_xname), "%s TX/RX",
-		device_xname(dev));
+		snprintf(intr_xname, sizeof(intr_xname), "%s TXRX%d",
+		device_xname(dev), i);
 		intrstr = pci_intr_string(pc, adapter->osdep.intrs[i], intrbuf,
 		sizeof(intrbuf));
 #ifdef IXG_MPSAFE

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.39 src/sys/dev/pci/ixgbe/ixv.c:1.40
--- src/sys/dev/pci/ixgbe/ixv.c:1.39	Wed Feb  8 03:59:12 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 04:05:13 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.39 2017/02/08 03:59:12 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.40 2017/02/08 04:05:13 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1362,8 +1362,8 @@ ixv_allocate_msix(struct adapter *adapte
 
 	kcpuset_create(, false);
 	for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) {
-		snprintf(intr_xname, sizeof(intr_xname), "%s TX/RX",
-		device_xname(dev));
+		snprintf(intr_xname, sizeof(intr_xname), "%s TXRX%d",
+		device_xname(dev), i);
 		intrstr = pci_intr_string(pc, adapter->osdep.intrs[i], intrbuf,
 		sizeof(intrbuf));
 #ifdef IXV_MPSAFE



CVS commit: src/doc

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Feb  8 04:01:44 UTC 2017

Modified Files:
src/doc: CHANGES

Log Message:
pthread_dbg(3): Removed from the base distribution.


To generate a diff of this commit:
cvs rdiff -u -r1.2243 -r1.2244 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2243 src/doc/CHANGES:1.2244
--- src/doc/CHANGES:1.2243	Mon Feb  6 16:08:40 2017
+++ src/doc/CHANGES	Wed Feb  8 04:01:44 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2243 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2244 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -459,3 +459,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	kerberos(8): Update to latest Heimdal-HEAD [christos 20170128]
 	libevent: Import libevent 2.1.18 [christos 20170131]
 	nc(1): Add a netcat utility from OpenBSD [christos 20170206]
+	pthread_dbg(3): Removed from the base distribution. [kamil 20170208]



CVS commit: src/sys/dev/pci/ixgbe

2017-02-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  8 03:59:12 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Set ifm_active to IFM_NONE when the physical interface's link is down.
Now ifconfig shows "media: Ethernet autoselect '(none)'".


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.67 src/sys/dev/pci/ixgbe/ixgbe.c:1.68
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.67	Wed Feb  1 10:47:13 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Feb  8 03:59:12 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.67 2017/02/01 10:47:13 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.68 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1879,6 +1879,7 @@ ixgbe_media_status(struct ifnet * ifp, s
 	ifmr->ifm_active = IFM_ETHER;
 
 	if (!adapter->link_active) {
+		ifmr->ifm_active |= IFM_NONE;
 		IXGBE_CORE_UNLOCK(adapter);
 		return;
 	}

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.38 src/sys/dev/pci/ixgbe/ixv.c:1.39
--- src/sys/dev/pci/ixgbe/ixv.c:1.38	Tue Feb  7 04:27:43 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Feb  8 03:59:12 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.38 2017/02/07 04:27:43 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.39 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1020,6 +1020,7 @@ ixv_media_status(struct ifnet * ifp, str
 	ifmr->ifm_active = IFM_ETHER;
 
 	if (!adapter->link_active) {
+		ifmr->ifm_active |= IFM_NONE;
 		IXGBE_CORE_UNLOCK(adapter);
 		return;
 	}



CVS commit: src

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Feb  8 03:44:41 UTC 2017

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/distrib/sets/lists/tests: mi
src/doc: TODO.ptrace
src/lib: Makefile
src/lib/libpthread: README TODO pthread.3 pthread_int.h
src/share/mk: bsd.README bsd.hostprog.mk bsd.prog.mk
src/tests/lib: Makefile
Removed Files:
src/lib/libpthread_dbg: Makefile pthread_dbg.3 pthread_dbg.c
pthread_dbg.h pthread_dbg_int.h shlib_version td_map_pth2thr.3
td_open.3 td_thr_getname.3 td_thr_info.3 td_thr_iter.3
src/tests/lib/libpthread_dbg: Makefile h_common.h t_dummy.c t_threads.c

Log Message:
libpthread_dbg(3) deletion from the base distribution

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.799 -r1.800 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2107 -r1.2108 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.299 -r1.300 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.196 -r1.197 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.158 -r1.159 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.716 -r1.717 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.15 src/doc/TODO.ptrace
cvs rdiff -u -r1.248 -r1.249 src/lib/Makefile
cvs rdiff -u -r1.6 -r1.7 src/lib/libpthread/README
cvs rdiff -u -r1.17 -r1.18 src/lib/libpthread/TODO
cvs rdiff -u -r1.16 -r1.17 src/lib/libpthread/pthread.3
cvs rdiff -u -r1.92 -r1.93 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.16 -r0 src/lib/libpthread_dbg/Makefile
cvs rdiff -u -r1.4 -r0 src/lib/libpthread_dbg/pthread_dbg.3
cvs rdiff -u -r1.51 -r0 src/lib/libpthread_dbg/pthread_dbg.c
cvs rdiff -u -r1.9 -r0 src/lib/libpthread_dbg/pthread_dbg.h
cvs rdiff -u -r1.8 -r0 src/lib/libpthread_dbg/pthread_dbg_int.h
cvs rdiff -u -r1.5 -r0 src/lib/libpthread_dbg/shlib_version
cvs rdiff -u -r1.2 -r0 src/lib/libpthread_dbg/td_map_pth2thr.3 \
src/lib/libpthread_dbg/td_open.3 src/lib/libpthread_dbg/td_thr_getname.3 \
src/lib/libpthread_dbg/td_thr_info.3 src/lib/libpthread_dbg/td_thr_iter.3
cvs rdiff -u -r1.357 -r1.358 src/share/mk/bsd.README
cvs rdiff -u -r1.76 -r1.77 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.301 -r1.302 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/Makefile
cvs rdiff -u -r1.2 -r0 src/tests/lib/libpthread_dbg/Makefile \
src/tests/lib/libpthread_dbg/h_common.h
cvs rdiff -u -r1.6 -r0 src/tests/lib/libpthread_dbg/t_dummy.c
cvs rdiff -u -r1.9 -r0 src/tests/lib/libpthread_dbg/t_threads.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/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.799 src/distrib/sets/lists/base/shl.mi:1.800
--- src/distrib/sets/lists/base/shl.mi:1.799	Tue Jan 31 23:19:20 2017
+++ src/distrib/sets/lists/base/shl.mi	Wed Feb  8 03:44:40 2017
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.799 2017/01/31 23:19:20 christos Exp $
+# $NetBSD: shl.mi,v 1.800 2017/02/08 03:44:40 kamil Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -451,9 +451,9 @@
 ./usr/lib/libpthread.sobase-sys-shlib		compatfile
 ./usr/lib/libpthread.so.1			base-sys-shlib		compatfile
 ./usr/lib/libpthread.so.1.3			base-sys-shlib		compatfile
-./usr/lib/libpthread_dbg.so			base-sys-shlib		compatfile
-./usr/lib/libpthread_dbg.so.2			base-sys-shlib		compatfile
-./usr/lib/libpthread_dbg.so.2.0			base-sys-shlib		compatfile
+./usr/lib/libpthread_dbg.so			base-obsolete		obsolete
+./usr/lib/libpthread_dbg.so.2			base-obsolete		obsolete
+./usr/lib/libpthread_dbg.so.2.0			base-obsolete		obsolete
 ./usr/lib/libpuffs.sobase-puffs-shlib	compatfile
 ./usr/lib/libpuffs.so.2base-puffs-shlib	compatfile
 ./usr/lib/libpuffs.so.2.0			base-puffs-shlib	compatfile

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2107 src/distrib/sets/lists/comp/mi:1.2108
--- src/distrib/sets/lists/comp/mi:1.2107	Wed Feb  1 12:33:58 2017
+++ src/distrib/sets/lists/comp/mi	Wed Feb  8 03:44:40 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2107 2017/02/01 12:33:58 christos Exp $
+#	$NetBSD: mi,v 1.2108 2017/02/08 03:44:40 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ 

CVS commit: src/usr.sbin/makefs

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  8 02:23:45 UTC 2017

Modified Files:
src/usr.sbin/makefs: ffs.c

Log Message:
no, this is wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/makefs/ffs.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.67 src/usr.sbin/makefs/ffs.c:1.68
--- src/usr.sbin/makefs/ffs.c:1.67	Tue Feb  7 21:20:35 2017
+++ src/usr.sbin/makefs/ffs.c	Tue Feb  7 21:23:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.c,v 1.67 2017/02/08 02:20:35 christos Exp $	*/
+/*	$NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.67 2017/02/08 02:20:35 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -294,7 +294,6 @@ ffs_makefs(const char *image, const char
 
 		/* update various superblock parameters */
 	superblock = fsopts->superblock;
-	memset(superblock, 0, sizeof(*superblock));
 	superblock->fs_fmod = 0;
 	superblock->fs_old_cstotal.cs_ndir   = superblock->fs_cstotal.cs_ndir;
 	superblock->fs_old_cstotal.cs_nbfree = superblock->fs_cstotal.cs_nbfree;



CVS commit: src/usr.sbin/makefs

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  8 02:20:35 UTC 2017

Modified Files:
src/usr.sbin/makefs: ffs.c

Log Message:
zero out the superblock so that it does not contain random stuff in the
spare fields.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/makefs/ffs.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.66 src/usr.sbin/makefs/ffs.c:1.67
--- src/usr.sbin/makefs/ffs.c:1.66	Sun Dec 20 19:58:08 2015
+++ src/usr.sbin/makefs/ffs.c	Tue Feb  7 21:20:35 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $	*/
+/*	$NetBSD: ffs.c,v 1.67 2017/02/08 02:20:35 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.67 2017/02/08 02:20:35 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -294,6 +294,7 @@ ffs_makefs(const char *image, const char
 
 		/* update various superblock parameters */
 	superblock = fsopts->superblock;
+	memset(superblock, 0, sizeof(*superblock));
 	superblock->fs_fmod = 0;
 	superblock->fs_old_cstotal.cs_ndir   = superblock->fs_cstotal.cs_ndir;
 	superblock->fs_old_cstotal.cs_nbfree = superblock->fs_cstotal.cs_nbfree;



CVS commit: src/external/gpl3/gdb.old

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Feb  8 01:32:37 UTC 2017

Modified Files:
src/external/gpl3/gdb.old/bin/gdb: Makefile
src/external/gpl3/gdb.old/bin/gdbtui: Makefile
src/external/gpl3/gdb.old/dist/gdb: nbsd-thread.c

Log Message:
Detach libpthread_dbg(3) from gdb(1) and gdbtui (gdb.old)

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

pthread_dbg(3) is going to be removed from the base distribution and moved
to pkgsrc.

Patch reviewed by 

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb.old/bin/gdb/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb.old/bin/gdbtui/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c

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

Modified files:

Index: src/external/gpl3/gdb.old/bin/gdb/Makefile
diff -u src/external/gpl3/gdb.old/bin/gdb/Makefile:1.5 src/external/gpl3/gdb.old/bin/gdb/Makefile:1.6
--- src/external/gpl3/gdb.old/bin/gdb/Makefile:1.5	Wed Oct 12 15:36:05 2016
+++ src/external/gpl3/gdb.old/bin/gdb/Makefile	Wed Feb  8 01:32:37 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/10/12 15:36:05 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2017/02/08 01:32:37 kamil Exp $
 
 .include 
 .include "../Makefile.inc"
@@ -85,8 +85,6 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm
 DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
 
-LDADD+=-lpthread_dbg
-
 .include 
 
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \

Index: src/external/gpl3/gdb.old/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb.old/bin/gdbtui/Makefile:1.5 src/external/gpl3/gdb.old/bin/gdbtui/Makefile:1.6
--- src/external/gpl3/gdb.old/bin/gdbtui/Makefile:1.5	Wed Oct 12 15:36:05 2016
+++ src/external/gpl3/gdb.old/bin/gdbtui/Makefile	Wed Feb  8 01:32:37 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/10/12 15:36:05 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2017/02/08 01:32:37 kamil Exp $
 
 .include "../Makefile.inc"
 
@@ -71,7 +71,5 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm
 DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
 
-LDADD+=-lpthread_dbg
-
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
 ${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${GDB_MACHINE_ARCH}

Index: src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c:1.5 src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c:1.6
--- src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c:1.5	Wed Oct 12 15:36:09 2016
+++ src/external/gpl3/gdb.old/dist/gdb/nbsd-thread.c	Wed Feb  8 01:32:37 2017
@@ -26,7 +26,6 @@
 #include 
 
 #include 
-#include 
 
 #include "symtab.h"
 #include "symfile.h"
@@ -78,14 +77,10 @@ static ptid_t cached_thread;
 
 struct target_ops nbsd_thread_ops;
 
-struct td_proc_callbacks_t nbsd_thread_callbacks;
-
 static ptid_t find_active_thread (void);
 static void nbsd_update_thread_list (struct target_ops *);
 
 
-static td_proc_t *main_ta;
-
 struct nbsd_thread_proc_arg {
   struct target_ops *ops;
   struct regcache *cache;
@@ -101,36 +96,6 @@ struct string_map
 char *str;
   };
 
-static char *
-td_err_string (int errcode)
-{
-  static struct string_map
-td_err_table[] =
-  {
-{TD_ERR_OK, "generic \"call succeeded\""},
-{TD_ERR_ERR, "generic error."},
-{TD_ERR_NOSYM, "symbol not found"},
-{TD_ERR_NOOBJ, "no object can be found to satisfy query"},
-{TD_ERR_BADTHREAD, "thread can not answer request"},
-{TD_ERR_INUSE, "debugging interface already in use for this process"},
-{TD_ERR_NOLIB, "process is not using libpthread"},
-{TD_ERR_NOMEM, "out of memory"},
-{TD_ERR_IO, "process callback error"},
-{TD_ERR_INVAL, "invalid argument"},
-  };
-  const int td_err_size = sizeof td_err_table / sizeof (struct string_map);
-  int i;
-  static char buf[90];
-
-  for (i = 0; i < td_err_size; i++)
-if (td_err_table[i].num == errcode)
-  return td_err_table[i].str;
-
-  sprintf (buf, "Unknown thread_db error code: %d", errcode);
-
-  return buf;
-}
-
 static void
 nbsd_thread_activate (void)
 {
@@ -172,11 +137,6 @@ nbsd_thread_attach (struct target_ops *o
 static void
 nbsd_thread_post_attach (struct target_ops *ops, int pid)
 {
-#if 0
-  struct target_ops *beneath = find_target_beneath (ops);
-  beneath->to_post_attach (ops, pid);
-#endif
-

CVS commit: src/external/gpl3/gdb

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  7 22:53:20 UTC 2017

Modified Files:
src/external/gpl3/gdb/bin/gdb: Makefile
src/external/gpl3/gdb/bin/gdbtui: Makefile
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
Detach libpthread_dbg(3) from gdb(1) and gdbtui

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

pthread_dbg(3) is going to be removed from the base distribution and moved
to pkgsrc.

Patch reviewed by 

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/bin/gdb/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/bin/gdbtui/Makefile
cvs rdiff -u -r1.24 -r1.25 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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

Modified files:

Index: src/external/gpl3/gdb/bin/gdb/Makefile
diff -u src/external/gpl3/gdb/bin/gdb/Makefile:1.9 src/external/gpl3/gdb/bin/gdb/Makefile:1.10
--- src/external/gpl3/gdb/bin/gdb/Makefile:1.9	Mon Jun 23 15:05:30 2014
+++ src/external/gpl3/gdb/bin/gdb/Makefile	Tue Feb  7 22:53:19 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2014/06/23 15:05:30 christos Exp $
+#	$NetBSD: Makefile,v 1.10 2017/02/07 22:53:19 kamil Exp $
 
 .include 
 .include "../Makefile.inc"
@@ -85,8 +85,6 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm
 DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
 
-LDADD+=-lpthread_dbg
-
 .include 
 
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \

Index: src/external/gpl3/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.6 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.7
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.6	Sun Jun 22 23:52:57 2014
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Tue Feb  7 22:53:20 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2014/06/22 23:52:57 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2017/02/07 22:53:20 kamil Exp $
 
 .include "../Makefile.inc"
 
@@ -71,7 +71,5 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm
 DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM}
 
-LDADD+=-lpthread_dbg
-
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
 ${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${GDB_MACHINE_ARCH}

Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.24 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.25
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.24	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Tue Feb  7 22:53:20 2017
@@ -26,7 +26,6 @@
 #include 
 
 #include 
-#include 
 
 #include "symtab.h"
 #include "symfile.h"
@@ -78,14 +77,10 @@ static ptid_t cached_thread;
 
 struct target_ops nbsd_thread_ops;
 
-struct td_proc_callbacks_t nbsd_thread_callbacks;
-
 static ptid_t find_active_thread (void);
 static void nbsd_update_thread_list (struct target_ops *);
 
 
-static td_proc_t *main_ta;
-
 struct nbsd_thread_proc_arg {
   struct target_ops *ops;
   struct regcache *cache;
@@ -101,36 +96,6 @@ struct string_map
 char *str;
   };
 
-static char *
-td_err_string (int errcode)
-{
-  static struct string_map
-td_err_table[] =
-  {
-{TD_ERR_OK, "generic \"call succeeded\""},
-{TD_ERR_ERR, "generic error."},
-{TD_ERR_NOSYM, "symbol not found"},
-{TD_ERR_NOOBJ, "no object can be found to satisfy query"},
-{TD_ERR_BADTHREAD, "thread can not answer request"},
-{TD_ERR_INUSE, "debugging interface already in use for this process"},
-{TD_ERR_NOLIB, "process is not using libpthread"},
-{TD_ERR_NOMEM, "out of memory"},
-{TD_ERR_IO, "process callback error"},
-{TD_ERR_INVAL, "invalid argument"},
-  };
-  const int td_err_size = sizeof td_err_table / sizeof (struct string_map);
-  int i;
-  static char buf[90];
-
-  for (i = 0; i < td_err_size; i++)
-if (td_err_table[i].num == errcode)
-  return td_err_table[i].str;
-
-  sprintf (buf, "Unknown thread_db error code: %d", errcode);
-
-  return buf;
-}
-
 static void
 nbsd_thread_activate (void)
 {
@@ -172,11 +137,6 @@ nbsd_thread_attach (struct target_ops *o
 static void
 nbsd_thread_post_attach (struct target_ops *ops, int pid)
 {
-#if 0
-  struct target_ops *beneath = find_target_beneath (ops);
-  beneath->to_post_attach (ops, pid);
-#endif
-
   if (nbsd_thread_present && !nbsd_thread_active)
 nbsd_thread_activate ();
 }

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

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 22:37:18 UTC 2017

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

Log Message:
add config files as examples


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/distrib/sets/lists/misc/mi

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

Modified files:

Index: src/distrib/sets/lists/misc/mi
diff -u src/distrib/sets/lists/misc/mi:1.199 src/distrib/sets/lists/misc/mi:1.200
--- src/distrib/sets/lists/misc/mi:1.199	Wed Aug 31 13:28:58 2016
+++ src/distrib/sets/lists/misc/mi	Tue Feb  7 17:37:18 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.199 2016/08/31 17:28:58 christos Exp $
+# $NetBSD: mi,v 1.200 2017/02/07 22:37:18 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1463,6 +1463,7 @@
 ./usr/share/examples/mount_portal/tcp.1		misc-sys-examples	share
 ./usr/share/examples/mount_portal/tcp.1.conf	misc-sys-examples	share
 ./usr/share/examples/named/named.conf		misc-obsolete		obsolete
+./usr/share/examples/nsd/nsd.conf		misc-netutil-examples	share
 ./usr/share/examples/openssl/CA.pl		misc-crypto-examples	crypto,share
 ./usr/share/examples/openssl/CA.sh		misc-crypto-examples	crypto,share
 ./usr/share/examples/openssl/der_chop		misc-obsolete		obsolete
@@ -1618,6 +1619,7 @@
 ./usr/share/examples/usermgmt/.cshrc		misc-obsolete		obsolete
 ./usr/share/examples/usermgmt/.login		misc-obsolete		obsolete
 ./usr/share/examples/usermgmt/.profile		misc-obsolete		obsolete
+./usr/share/examples/unbound/unbound.conf	misc-netutil-examples	share
 ./usr/share/misc/NetBSD.el			misc-reference-share	share
 ./usr/share/misc/airport			misc-reference-share	share
 ./usr/share/misc/birthtoken			misc-reference-share	share



CVS commit: src/external/bsd

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 22:34:37 UTC 2017

Modified Files:
src/external/bsd/nsd/etc: Makefile
src/external/bsd/unbound/etc: Makefile

Log Message:
don't overwrite etc files.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/nsd/etc/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/unbound/etc/Makefile

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

Modified files:

Index: src/external/bsd/nsd/etc/Makefile
diff -u src/external/bsd/nsd/etc/Makefile:1.1 src/external/bsd/nsd/etc/Makefile:1.2
--- src/external/bsd/nsd/etc/Makefile:1.1	Sat Jan  7 14:51:21 2017
+++ src/external/bsd/nsd/etc/Makefile	Tue Feb  7 17:34:37 2017
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/07 19:51:21 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2017/02/07 22:34:37 christos Exp $
 
 SUBDIR=rc.d
 
-FILESDIR=   /etc/nsd
+FILESDIR=   /usr/share/examples/nsd
 FILESMODE=644
 FILES=	nsd.conf
 

Index: src/external/bsd/unbound/etc/Makefile
diff -u src/external/bsd/unbound/etc/Makefile:1.2 src/external/bsd/unbound/etc/Makefile:1.3
--- src/external/bsd/unbound/etc/Makefile:1.2	Tue Aug 23 11:04:29 2016
+++ src/external/bsd/unbound/etc/Makefile	Tue Feb  7 17:34:37 2017
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.2 2016/08/23 15:04:29 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2017/02/07 22:34:37 christos Exp $
 
 SUBDIR=rc.d
 
-FILESDIR=   /etc/unbound
+FILESDIR=   /usr/share/examples/unbound
 FILESMODE=644
 FILES=	unbound.conf
 FILESBUILD_unbound.conf=yes



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

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 22:34:09 UTC 2017

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

Log Message:
add nsd and unbound example dirs


To generate a diff of this commit:
cvs rdiff -u -r1.1152 -r1.1153 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1152 src/distrib/sets/lists/base/mi:1.1153
--- src/distrib/sets/lists/base/mi:1.1152	Mon Feb  6 14:45:17 2017
+++ src/distrib/sets/lists/base/mi	Tue Feb  7 17:34:09 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1152 2017/02/06 19:45:17 kre Exp $
+# $NetBSD: mi,v 1.1153 2017/02/07 22:34:09 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -2186,6 +2186,7 @@
 ./usr/share/examples/npf/l2tp_gw-npf.conf	base-netutil-examples   share
 ./usr/share/examples/npf/soho_gw-npf.conf	base-netutil-examples   share
 ./usr/share/examples/npf/treetablefile		base-netutil-examples   share
+./usr/share/examples/nsd			base-netutil-examples   share
 ./usr/share/examples/openssl			base-crypto-examples
 ./usr/share/examples/pfbase-netutil-examples
 ./usr/share/examples/postfix			base-postfix-examples
@@ -2209,6 +2210,7 @@
 ./usr/share/examples/wpa_supplicant/wpa_supplicant.conf		base-netutil-examples	share
 ./usr/share/examples/wsmoused			base-sysutil-examples
 ./usr/share/examples/wsmoused/wsmoused.conf	base-sysutil-examples	share
+./usr/share/examples/unbound			base-netutil-examples   share
 ./usr/share/gamesbase-games-share
 ./usr/share/games/atcbase-games-share
 ./usr/share/games/boggle			base-games-share



CVS commit: src/etc/mtree

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 22:31:29 UTC 2017

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
add nsd and unbound example dirs


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.156 src/etc/mtree/NetBSD.dist.base:1.157
--- src/etc/mtree/NetBSD.dist.base:1.156	Wed Jan 11 07:10:48 2017
+++ src/etc/mtree/NetBSD.dist.base	Tue Feb  7 17:31:29 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.156 2017/01/11 12:10:48 joerg Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.157 2017/02/07 22:31:29 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -377,6 +377,7 @@
 ./usr/share/examples/lutok
 ./usr/share/examples/mount_portal
 ./usr/share/examples/npf
+./usr/share/examples/nsd
 ./usr/share/examples/openssl
 ./usr/share/examples/pf
 ./usr/share/examples/postfix
@@ -392,6 +393,7 @@
 ./usr/share/examples/tmux
 ./usr/share/examples/wpa_supplicant
 ./usr/share/examples/wsmoused
+./usr/share/examples/unbound
 ./usr/share/games
 ./usr/share/games/atc
 ./usr/share/games/boggle



CVS commit: src/lib/libc/stdlib

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 22:25:25 UTC 2017

Modified Files:
src/lib/libc/stdlib: hcreate.3

Log Message:
PR/51958: Ngie Cooper: ESRCH error description in hcreate(3) contains typo
for action


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/hcreate.3

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/stdlib/hcreate.3
diff -u src/lib/libc/stdlib/hcreate.3:1.13 src/lib/libc/stdlib/hcreate.3:1.14
--- src/lib/libc/stdlib/hcreate.3:1.13	Sun Jul 20 16:17:21 2014
+++ src/lib/libc/stdlib/hcreate.3	Tue Feb  7 17:25:25 2017
@@ -1,4 +1,4 @@
-.\" 	$NetBSD: hcreate.3,v 1.13 2014/07/20 20:17:21 christos Exp $
+.\" 	$NetBSD: hcreate.3,v 1.14 2017/02/07 22:25:25 christos Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 20, 2014
+.Dd February 7, 2017
 .Dt HCREATE 3
 .Os
 .Sh NAME
@@ -274,7 +274,7 @@ The
 and
 .Fn hsearch_r
 functions will also fail if the action is
-.Dv SEARCH
+.Dv FIND
 and the element is not found:
 .Bl -tag -width Er
 .It Bq Er ESRCH



CVS commit: src/share/mk

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 21:19:14 UTC 2017

Modified Files:
src/share/mk: bsd.sys.mk

Log Message:
Kernel build objdirs have a kernel name after the objdir. Use a regex for
that. Note that debug-prefix-map and debug-regex-map insert entries in a
linked list in reverse order.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.268 src/share/mk/bsd.sys.mk:1.269
--- src/share/mk/bsd.sys.mk:1.268	Tue Jan 17 06:09:10 2017
+++ src/share/mk/bsd.sys.mk	Tue Feb  7 16:19:13 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.268 2017/01/17 11:09:10 joerg Exp $
+#	$NetBSD: bsd.sys.mk,v 1.269 2017/02/07 21:19:13 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -31,6 +31,7 @@ REPROFLAGS+=	-fdebug-prefix-map=\$$X11SR
 LINTFLAGS+=	-R${NETBSDSRCDIR}=/usr/src -R${X11SRCDIR}=/usr/xsrc
 
 REPROFLAGS+=	-fdebug-regex-map='/usr/src/(.*)/obj.*=/usr/obj/\1'
+REPROFLAGS+=	-fdebug-regex-map='/usr/src/(.*)/obj.*/(.*)=/usr/obj/\1/\2'
 
 CFLAGS+=	${REPROFLAGS}
 CXXFLAGS+=	${REPROFLAGS}



CVS commit: src/etc

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 21:18:05 UTC 2017

Modified Files:
src/etc: Makefile

Log Message:
Use make -C instead of cd && make; this is done to preserve the logical path
for debugging info DW_AT_comp_dir


To generate a diff of this commit:
cvs rdiff -u -r1.426 -r1.427 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.426 src/etc/Makefile:1.427
--- src/etc/Makefile:1.426	Sat Dec 19 21:35:34 2015
+++ src/etc/Makefile	Tue Feb  7 16:18:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.426 2015/12/20 02:35:34 christos Exp $
+#	$NetBSD: Makefile,v 1.427 2017/02/07 21:18:05 christos Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -591,9 +591,10 @@ kern-${configfile}: .PHONY .MAKE
 	cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \
 	-U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
 .if ${MKUPDATE} == "no"
-	cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean
+	${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean
 .endif
-	cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE}
+	${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} depend && \
+	${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} 
 	sync
 .endfor	# ALL_KERNELS			# }
 .endif	# KERNELS_DONE			# }



CVS commit: src/usr.bin/make

2017-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  7 21:16:31 UTC 2017

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

Log Message:
use the logical path for -C if correct.


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/usr.bin/make/main.c

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

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.255 src/usr.bin/make/main.c:1.256
--- src/usr.bin/make/main.c:1.255	Tue Jan 31 01:54:23 2017
+++ src/usr.bin/make/main.c	Tue Feb  7 16:16:31 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.255 2017/01/31 06:54:23 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.255 2017/01/31 06:54:23 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $";
 #else
 #include 
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.255 2017/01/31 06:54:23 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -376,6 +376,7 @@ MainParseArgs(int argc, char **argv)
 	int arginc;
 	char *argvalue;
 	const char *getopt_def;
+	struct stat sa, sb;
 	char *optscan;
 	Boolean inOption, dashDash = FALSE;
 	char found_path[MAXPATHLEN + 1];	/* for searching for sys.mk */
@@ -444,6 +445,11 @@ rearg:	
 (void)fprintf(stderr, "%s: %s.\n", progname, strerror(errno));
 exit(2);
 			}
+			if (stat(argvalue, ) != -1 &&
+			stat(curdir, ) != -1 &&
+			sa.st_ino == sb.st_ino &&
+			sa.st_dev == sb.st_dev)
+strlcpy(curdir, argvalue, MAXPATHLEN);
 			ignorePWD = TRUE;
 			break;
 		case 'D':



CVS commit: src/lib/libc

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  7 19:29:40 UTC 2017

Modified Files:
src/lib/libc/gen: Makefile.inc
src/lib/libc/sys: Makefile.inc
Added Files:
src/lib/libc/gen: exect.c
Removed Files:
src/lib/libc/arch/aarch64/sys: exect.S
src/lib/libc/arch/alpha/sys: exect.S
src/lib/libc/arch/arm/sys: exect.S
src/lib/libc/arch/hppa/sys: exect.S
src/lib/libc/arch/i386/sys: exect.S
src/lib/libc/arch/ia64/sys: exect.S
src/lib/libc/arch/m68k/sys: exect.S
src/lib/libc/arch/mips/sys: exect.S
src/lib/libc/arch/or1k/sys: exect.S
src/lib/libc/arch/powerpc/sys: exect.S
src/lib/libc/arch/powerpc64/sys: exect.S
src/lib/libc/arch/riscv/sys: exect.S
src/lib/libc/arch/sh3/sys: exect.S
src/lib/libc/arch/sparc/sys: exect.S
src/lib/libc/arch/sparc64/sys: exect.S
src/lib/libc/arch/vax/sys: exect.S
src/lib/libc/arch/x86_64/sys: exect.S
src/lib/libc/sys: Lint_exect.c

Log Message:
Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
 - exect(2) traces (single-steps) libc and it requires hundreds or
   thousands steps before entering a new image
 - it's vax and x86 specific code
 - this functionality has been moved to the kernel - once a process is
   traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
   its debugger
 - the side effects and unportability make this interface unusable
 - there are no known users of this interface
 - it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/aarch64/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/alpha/sys/exect.S
cvs rdiff -u -r1.4 -r0 src/lib/libc/arch/arm/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/hppa/sys/exect.S
cvs rdiff -u -r1.15 -r0 src/lib/libc/arch/i386/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/ia64/sys/exect.S
cvs rdiff -u -r1.8 -r0 src/lib/libc/arch/m68k/sys/exect.S
cvs rdiff -u -r1.10 -r0 src/lib/libc/arch/mips/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/or1k/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/powerpc/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/powerpc64/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/riscv/sys/exect.S
cvs rdiff -u -r1.5 -r0 src/lib/libc/arch/sh3/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/sparc/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/sparc64/sys/exect.S
cvs rdiff -u -r1.6 -r0 src/lib/libc/arch/vax/sys/exect.S
cvs rdiff -u -r1.4 -r0 src/lib/libc/arch/x86_64/sys/exect.S
cvs rdiff -u -r1.197 -r1.198 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/exect.c
cvs rdiff -u -r1.2 -r0 src/lib/libc/sys/Lint_exect.c
cvs rdiff -u -r1.231 -r1.232 src/lib/libc/sys/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/gen/Makefile.inc
diff -u src/lib/libc/gen/Makefile.inc:1.197 src/lib/libc/gen/Makefile.inc:1.198
--- src/lib/libc/gen/Makefile.inc:1.197	Thu Jan 12 00:38:01 2017
+++ src/lib/libc/gen/Makefile.inc	Tue Feb  7 19:29:40 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.197 2017/01/12 00:38:01 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.198 2017/02/07 19:29:40 kamil Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -13,7 +13,7 @@ SRCS+=	alarm.c alphasort.c arc4random.c 
 	confstr.c ctermid.c ctype_.c \
 	dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \
 	errc.c errlist.c errno.c execl.c execle.c execlp.c execv.c execvp.c \
-	extattr.c fmtcheck.c fmtmsg.c fnmatch.c fstab.c ftok.c \
+	exect.c extattr.c fmtcheck.c fmtmsg.c fnmatch.c fstab.c ftok.c \
 	fts.c ftw.c getbsize.c getcap.c getcwd.c \
 	getdevmajor.c getdomainname.c getgrent.c \
 	getgrouplist.c getgroupmembership.c gethostname.c \

Index: src/lib/libc/sys/Makefile.inc
diff -u src/lib/libc/sys/Makefile.inc:1.231 src/lib/libc/sys/Makefile.inc:1.232
--- src/lib/libc/sys/Makefile.inc:1.231	Sun Jul  3 14:24:58 2016
+++ src/lib/libc/sys/Makefile.inc	Tue Feb  7 19:29:40 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.231 2016/07/03 14:24:58 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.232 2017/02/07 19:29:40 kamil Exp $
 #	@(#)Makefile.inc	

CVS commit: src/distrib/utils/x_ifconfig

2017-02-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb  7 16:49:40 UTC 2017

Modified Files:
src/distrib/utils/x_ifconfig: Makefile

Log Message:
Define NOMAN before including bsd.own.mk to set MKMAN=no appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/x_ifconfig/Makefile

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/x_ifconfig/Makefile
diff -u src/distrib/utils/x_ifconfig/Makefile:1.33 src/distrib/utils/x_ifconfig/Makefile:1.34
--- src/distrib/utils/x_ifconfig/Makefile:1.33	Tue Apr 28 15:14:07 2015
+++ src/distrib/utils/x_ifconfig/Makefile	Tue Feb  7 16:49:40 2017
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.33 2015/04/28 15:14:07 christos Exp $
+# $NetBSD: Makefile,v 1.34 2017/02/07 16:49:40 rin Exp $
 # Build a smaller ifconfig (i.e. for boot media)
 
-.include 
-
 NOMAN=	# defined
 
+.include 
+
 SRCDIR=		${.CURDIR}/../../../sbin/ifconfig
 
 



CVS commit: src/doc

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  7 16:15:05 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

Note PT_WATCHPOINT change to PT_*ETDBREGS.
Remove GDB and LLDB related entries from generic ptrace(2) TODO.
Note need for TRAP_SCE and TRAP_SCX si_codes in PT_SYSCALL*.
Note removal request of pthread_dbg(3).

Sponsord by 


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/doc/TODO.ptrace

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

Modified files:

Index: src/doc/TODO.ptrace
diff -u src/doc/TODO.ptrace:1.13 src/doc/TODO.ptrace:1.14
--- src/doc/TODO.ptrace:1.13	Thu Jan 26 01:12:13 2017
+++ src/doc/TODO.ptrace	Tue Feb  7 16:15:05 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.ptrace,v 1.13 2017/01/26 01:12:13 kamil Exp $
+$NetBSD: TODO.ptrace,v 1.14 2017/02/07 16:15:05 kamil Exp $
 
 Items we (currently) plan to finish in the ptrace(2) field:
 
@@ -9,20 +9,18 @@ Items we (currently) plan to finish in t
  - add new ptrace(2) calls to lock (suspend) and unlock LWP within a process
  - add PT_DUMPCORE tests in the ATF framework
  - add ATF tests for PT_WRITE_I and PIOD_WRITE_I - test mprotect restrictions
- - once the API for hardware watchpoints will stabilize, document it
+ - switch PT_WATCHPOINT* to PT_*ETDBREGS and document it, add ATF tests
  - add tests for the procfs interface covering all functions available on the
same level as ptrace(2)
  - add support for PT_STEP, PT_GETREGS, PT_SETREGS, PT_GETFPREGS, PT_SETFPREGS
in all ports
- - integrate all ptrace(2) features in gdb
- - add ptrace(2) NetBSD support in LLDB
  - add proper implementation of PTRACE_VFORK for vfork(2)-like events
- - remove exect(3) - there is no usecase for it
- - refactor pthread_dbg(3) to only query private pthread_t data, otherwise it
-   duplicates ptrace(2) interface and cannot cover all types of threads
+ - remove exect(3) from libc - there is no usecase for it
+ - remove pthread_dbg(3) from the base distribution
  - research what happens when a tracee masks signals (including SIGTRAP) and a
breakpoint is triggered
  - add ATF tests for SIGCHLD
+ - add si_code values for PT_SYSCALL: TRAP_SCE and TRAP_SCX
  - add ATF tests for PT_SYSCALL and PT_SYSCALLEMU
 
 and of course: fix as many bugs as possible.



CVS commit: src/sbin/fsck_ffs

2017-02-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb  7 16:14:48 UTC 2017

Modified Files:
src/sbin/fsck_ffs: Makefile

Log Message:
Do not compile in progress.c when SMALLPROG is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sbin/fsck_ffs/Makefile

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

Modified files:

Index: src/sbin/fsck_ffs/Makefile
diff -u src/sbin/fsck_ffs/Makefile:1.46 src/sbin/fsck_ffs/Makefile:1.47
--- src/sbin/fsck_ffs/Makefile:1.46	Wed Mar 23 21:43:33 2016
+++ src/sbin/fsck_ffs/Makefile	Tue Feb  7 16:14:47 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.46 2016/03/23 21:43:33 christos Exp $
+#	$NetBSD: Makefile,v 1.47 2017/02/07 16:14:47 rin Exp $
 #	@(#)Makefile	8.2 (Berkeley) 4/27/95
 
 .include 
@@ -14,8 +14,8 @@ DUMP=	${NETBSDSRCDIR}/sbin/dump
 CPPFLAGS+=-I${FSCK} -I${DUMP}
 .ifndef  SMALLPROG
 CPPFLAGS+=-DPROGRESS
-.endif
 SRCS+=	progress.c
+.endif
 .PATH:	${FSCK}
 
 .PATH:	${NETBSDSRCDIR}/sys/ufs/ffs ${NETBSDSRCDIR}/sys/ufs/ufs ${FSCK} ${DUMP}



CVS commit: src/lib/libc

2017-02-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Feb  7 15:33:25 UTC 2017

Modified Files:
src/lib/libc: shlib_version

Log Message:
Document in libc's shlib_version request for exect(3) removal

This functionality has been moved long time to the kernel. Kernel exec()
emits SIGTRAP under a debugger (unless PT_SYSCALL traced).


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/lib/libc/shlib_version

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/shlib_version
diff -u src/lib/libc/shlib_version:1.269 src/lib/libc/shlib_version:1.270
--- src/lib/libc/shlib_version:1.269	Sat Sep 24 20:12:07 2016
+++ src/lib/libc/shlib_version	Tue Feb  7 15:33:25 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.269 2016/09/24 20:12:07 christos Exp $
+#	$NetBSD: shlib_version,v 1.270 2017/02/07 15:33:25 kamil Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -45,5 +45,6 @@
 # - decide whether soft-float should support fenv.h, including thread-local contett
 # - stop all math functions from setting errno
 # - boot obsolete signal functions to libcompat
+# - remove exect(3) API - tracing functionality has been moved to the kernel
 major=12
 minor=205



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k

2017-02-07 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Tue Feb  7 11:18:43 UTC 2017

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: aes-m68k.S
aes.inc

Log Message:
Implement m68k assembly version of AES.
It's approx 1.4 times faster than the original one.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes.inc

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

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.1
--- /dev/null	Tue Feb  7 11:18:43 2017
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S	Tue Feb  7 11:18:43 2017
@@ -0,0 +1,1745 @@
+|	$NetBSD: aes-m68k.S,v 1.1 2017/02/07 11:18:43 isaki Exp $
+
+| Copyright (C) 2016 Tetsuya Isaki. All rights reserved.
+| Copyright (C) 2016 Y.Sugahara (moveccr). All rights reserved.
+|
+| Redistribution and use in source and binary forms, with or without
+| modification, are permitted provided that the following conditions
+| are met:
+| 1. Redistributions of source code must retain the above copyright
+|notice, this list of conditions and the following disclaimer.
+| 2. Redistributions in binary form must reproduce the above copyright
+|notice, this list of conditions and the following disclaimer in the
+|documentation and/or other materials provided with the distribution.
+|
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+| IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+| OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+| IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+| BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+| AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+| OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+| SUCH DAMAGE.
+
+#define rd_key	(0)
+#define rounds	(60 * 4)
+
+| int
+| private_AES_set_encrypt_key(const unsigned char *userKey,
+|  const int bits,
+|  AES_KEY *key)
+.global private_AES_set_encrypt_key
+private_AES_set_encrypt_key:
+_private_AES_set_encrypt_key:
+	moveml	%d2-%d7/%a2-%a6,%sp@-
+	moveal	%sp@(44+4),%a0		| userKey
+	moveal	%sp@(44+8),%a1		| bits
+	moveal	%sp@(44+12),%a3		| key
+
+	tstl	%a0
+	beq	pek_return1		| return -1 if userKey == NULL
+	tstl	%a3
+	beq	pek_return1		| return -1 if key == NULL
+
+	cmpaw	#128,%a1
+	bne	pek192_check		| unless bits == 128
+pek128:
+	| %d0-%d7 rk[0..7]
+	| %a0 userKey, Te0
+	| %a1  Te1
+	| %a2  Te2
+	| %a3 key, Te3
+	| %a4 rcon_byte
+	| %a5 [4]
+	| %a6 end of rcon_byte
+
+	moveq	#10,%d0
+	movel	%d0,%a3@(rounds)	| key->rounds = 10
+
+	lea	%a3@(rd_key),%a5	| [0]
+
+	| rk[0] = GETU32(userKey );
+	| rk[1] = GETU32(userKey +  4);
+	| rk[2] = GETU32(userKey +  8);
+	| rk[3] = GETU32(userKey + 12);
+	moveml	%a0@,%d0-%d3
+	movel	%d0,%a5@+
+	movel	%d1,%a5@+
+	movel	%d2,%a5@+
+	movel	%d3,%a5@+
+
+	lea	%pc@(Te0),%a0		| %a0 = Te0
+	lea	%a0@(256*4),%a1		| %a1 = Te1
+	lea	%a1@(256*4),%a2		| %a2 = Te2
+	lea	%a2@(256*4),%a3		| %a3 = Te3
+
+	moveq	#0,%d7
+	lea	%pc@(rcon_byte),%a4
+	lea	%a4@(10),%a6
+
+pek128_loop:
+	| d6 consists of four Te index bytes
+	movel	%d3,%d5			| d5=rk[3] as {1,2,3,0}
+	moveb	%d5,%d7			| d7=temp
+	moveb	%a0@(2,%d7:w:4),%d4	| d4=$xx00
+	swap	%d5			| d5={3,0,1,2}
+	lsll	#8,%d4			| d4=$00xx
+	moveb	%d5,%d7			| d7=temp>>16
+	moveb	%a2@(0,%d7:w:4),%d6	| d6=$xx22
+	lsrl	#8,%d5			| d5={x,3,0,1}
+	moveb	%a4@+,%d7		| LSByte ^= rcon[i]
+	eorb	%d7,%d6
+	lsll	#8,%d6			| d6=$22xx
+	moveb	%d5,%d7			| d7=temp>>24
+	moveb	%a1@(3,%d7:w:4),%d4	| d4=$0011
+	swap	%d5			| d5={0,1,x,3}
+	moveb	%d5,%d7			| d7=temp>>8
+	moveb	%a3@(1,%d7:w:4),%d6	| d6=$2233
+	swap	%d6			| d6=$2233
+	movew	%d4,%d6			| d6=$22330011
+
+	eorl	%d6,%d0			| rk[4] = rk[0]^ (Te..)
+	movel	%d0,%a5@+
+	eorl	%d0,%d1			| rk[5] = rk[1] ^ rk[4];
+	movel	%d1,%a5@+
+	eorl	%d1,%d2			| rk[6] = rk[2] ^ rk[5];
+	movel	%d2,%a5@+
+	eorl	%d2,%d3			| rk[7] = rk[3] ^ rk[6];
+	movel	%d3,%a5@+
+
+	cmpal	%a4,%a6
+	bne	pek128_loop		|if (++i == 10) return 0;
+
+pek_return0:
+	moveql	#0,%d0
+pek_return:
+	moveml	%sp@+,%d2-%d7/%a2-%a6
+	rts
+
+pek192_check:
+	| %a0 userKey
+	| %a1 bits
+	| %a3 key
+	cmpaw	#192,%a1
+	bne	pek256_check		| unless bits == 192
+pek192:
+	| %a0 Te0
+	| %a1 Te1
+	| %a2 Te2
+	| %a3 Te3
+	| %a4 rcon_byte
+	| %a5 [6]
+	| %a6 end of rcon_byte
+	moveq	#12,%d0
+	movel	%d0,%a3@(rounds)	| key->rounds = 12
+
+	lea	

CVS commit: src/sys/net

2017-02-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  7 11:17:50 UTC 2017

Modified Files:
src/sys/net: if_tap.c

Log Message:
KNF and trailing whitespace.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/net/if_tap.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/if_tap.c
diff -u src/sys/net/if_tap.c:1.94 src/sys/net/if_tap.c:1.95
--- src/sys/net/if_tap.c:1.94	Thu Dec 15 09:28:06 2016
+++ src/sys/net/if_tap.c	Tue Feb  7 11:17:50 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.94 2016/12/15 09:28:06 ozaki-r Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.95 2017/02/07 11:17:50 skrll Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.94 2016/12/15 09:28:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.95 2017/02/07 11:17:50 skrll Exp $");
 
 #if defined(_KERNEL_OPT)
 
@@ -259,7 +259,7 @@ tapinit(void)
 (void)config_cfdriver_detach(_cd);
 return;
 }
- 
+
 	if_clone_attach(_cloners);
 	sysctl_tap_setup(_sysctl_clog);
 #ifdef _MODULE
@@ -295,7 +295,7 @@ static int
 tap_match(device_t parent, cfdata_t cfdata, void *arg)
 {
 
-	return (1);
+	return 1;
 }
 
 void
@@ -449,7 +449,7 @@ tap_detach(device_t self, int flags)
 
 	pmf_device_deregister(self);
 
-	return (0);
+	return 0;
 }
 
 /*
@@ -460,7 +460,7 @@ tap_detach(device_t self, int flags)
 static int
 tap_mediachange(struct ifnet *ifp)
 {
-	return (0);
+	return 0;
 }
 
 /*
@@ -587,7 +587,7 @@ tap_ioctl(struct ifnet *ifp, u_long cmd,
 
 	splx(s);
 
-	return (error);
+	return error;
 }
 
 /*
@@ -600,11 +600,11 @@ tap_lifaddr(struct ifnet *ifp, u_long cm
 	const struct sockaddr *sa = >ifra_addr;
 
 	if (sa->sa_family != AF_LINK)
-		return (EINVAL);
+		return EINVAL;
 
 	if_set_sadl(ifp, sa->sa_data, ETHER_ADDR_LEN, false);
 
-	return (0);
+	return 0;
 }
 
 /*
@@ -619,7 +619,7 @@ tap_init(struct ifnet *ifp)
 
 	tap_start(ifp);
 
-	return (0);
+	return 0;
 }
 
 /*
@@ -655,10 +655,10 @@ tap_clone_create(struct if_clone *ifc, i
 	if (tap_clone_creator(unit) == NULL) {
 		aprint_error("%s%d: unable to attach an instance\n",
 tap_cd.cd_name, unit);
-		return (ENXIO);
+		return ENXIO;
 	}
 	atomic_inc_uint(_count);
-	return (0);
+	return 0;
 }
 
 /*
@@ -714,7 +714,7 @@ tap_clone_destroyer(device_t dev)
 		aprint_error_dev(dev, "unable to detach instance\n");
 	free(cf, M_DEVBUF);
 
-	return (error);
+	return error;
 }
 
 /*
@@ -749,13 +749,13 @@ tap_cdev_open(dev_t dev, int flags, int 
 
 	sc = device_lookup_private(_cd, minor(dev));
 	if (sc == NULL)
-		return (ENXIO);
+		return ENXIO;
 
 	/* The device can only be opened once */
 	if (sc->sc_flags & TAP_INUSE)
-		return (EBUSY);
+		return EBUSY;
 	sc->sc_flags |= TAP_INUSE;
-	return (0);
+	return 0;
 }
 
 /*
@@ -788,11 +788,11 @@ tap_dev_cloner(struct lwp *l)
 	int error, fd;
 
 	if ((error = fd_allocfile(, )) != 0)
-		return (error);
+		return error;
 
 	if ((sc = tap_clone_creator(-1)) == NULL) {
 		fd_abort(curproc, fp, fd);
-		return (ENXIO);
+		return ENXIO;
 	}
 
 	sc->sc_flags |= TAP_INUSE;
@@ -819,7 +819,7 @@ tap_cdev_close(dev_t dev, int flags, int
 	device_lookup_private(_cd, minor(dev));
 
 	if (sc == NULL)
-		return (ENXIO);
+		return ENXIO;
 
 	return tap_dev_close(sc);
 }
@@ -839,21 +839,21 @@ tap_fops_close(file_t *fp)
 
 	sc = device_lookup_private(_cd, unit);
 	if (sc == NULL)
-		return (ENXIO);
+		return ENXIO;
 
 	/* tap_dev_close currently always succeeds, but it might not
 	 * always be the case. */
 	KERNEL_LOCK(1, NULL);
 	if ((error = tap_dev_close(sc)) != 0) {
 		KERNEL_UNLOCK_ONE(NULL);
-		return (error);
+		return error;
 	}
 
 	/* Destroy the device now that it is no longer useful,
 	 * unless it's already being destroyed. */
 	if ((sc->sc_flags & TAP_GOING) != 0) {
 		KERNEL_UNLOCK_ONE(NULL);
-		return (0);
+		return 0;
 	}
 
 	error = tap_clone_destroyer(sc->sc_dev);
@@ -894,7 +894,7 @@ tap_dev_close(struct tap_softc *sc)
 	}
 	sc->sc_flags &= ~(TAP_INUSE | TAP_ASYNCIO);
 
-	return (0);
+	return 0;
 }
 
 static int
@@ -924,20 +924,20 @@ tap_dev_read(int unit, struct uio *uio, 
 	int error = 0, s;
 
 	if (sc == NULL)
-		return (ENXIO);
+		return ENXIO;
 
 	getnanotime(>sc_atime);
 
 	ifp = >sc_ec.ec_if;
 	if ((ifp->if_flags & IFF_UP) == 0)
-		return (EHOSTDOWN);
+		return EHOSTDOWN;
 
 	/*
 	 * In the TAP_NBIO case, we have to make sure we won't be sleeping
 	 */
 	if ((sc->sc_flags & TAP_NBIO) != 0) {
 		if (!mutex_tryenter(>sc_rdlock))
-			return (EWOULDBLOCK);
+			return EWOULDBLOCK;
 	} else {
 		mutex_enter(>sc_rdlock);
 	}
@@ -957,13 +957,13 @@ tap_dev_read(int unit, struct uio *uio, 
 		splx(s);
 
 		if (error != 0)
-			return (error);
+			return error;
 		/* The device might have been downed */
 		if ((ifp->if_flags & IFF_UP) == 0)
-			return 

CVS commit: src/sys/dev/fdt

2017-02-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  7 09:14:52 UTC 2017

Modified Files:
src/sys/dev/fdt: fdtbus.c

Log Message:
Fix non-DIAGNOSTIC build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdtbus.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/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.2 src/sys/dev/fdt/fdtbus.c:1.3
--- src/sys/dev/fdt/fdtbus.c:1.2	Wed Dec 16 19:33:16 2015
+++ src/sys/dev/fdt/fdtbus.c	Tue Feb  7 09:14:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.2 2015/12/16 19:33:16 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.2 2015/12/16 19:33:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $");
 
 #include 
 #include 
@@ -93,7 +93,7 @@ static void
 fdt_scan(device_t self, const struct fdt_attach_args *faa, const char *devname)
 {
 	const int phandle = faa->faa_phandle;
-	int len, alen, child;
+	int len, child;
 	char *name, *status;
 
 	for (child = OF_child(phandle); child; child = OF_peer(child)) {
@@ -109,7 +109,7 @@ fdt_scan(device_t self, const struct fdt
 		len = OF_getproplen(child, "status");
 		if (len > 0) {
 			status = kmem_zalloc(len, KM_SLEEP);
-			alen = OF_getprop(child, "status", status, len);
+			int alen __diagused = OF_getprop(child, "status", status, len);
 			KASSERT(alen == len);
 			const bool okay_p = strcmp(status, "okay") == 0 ||
 	strcmp(status, "ok") == 0;