CVS commit: src/lib/libc/stdlib

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 05:40:27 UTC 2016

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

Log Message:
Document return value for realloc(3) when size is 0.  From PR lib/47384


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/stdlib/malloc.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/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.46 src/lib/libc/stdlib/malloc.3:1.47
--- src/lib/libc/stdlib/malloc.3:1.46	Sat Nov  7 18:46:37 2015
+++ src/lib/libc/stdlib/malloc.3	Wed Jun  1 05:40:26 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.46 2015/11/07 18:46:37 wiz Exp $
+.\" $NetBSD: malloc.3,v 1.47 2016/06/01 05:40:26 pgoyette Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 .\" @(#)malloc.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.73 2007/06/15 22:32:33 jasone Exp $
 .\"
-.Dd July 26, 2015
+.Dd June 1, 2016
 .Dt MALLOC 3
 .Os
 .Sh NAME
@@ -144,6 +144,11 @@ The
 .Fn realloc
 function always leaves the original buffer intact
 when an error occurs.
++If
++.Ar size
++is 0, either NULL or a pointer that can be safely passed to
++.Xr free 3
++is returned.
 .Pp
 The
 .Fn free



CVS commit: src/sys/dev/iscsi

2016-05-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  1 05:31:59 UTC 2016

Modified Files:
src/sys/dev/iscsi: iscsi_send.c

Log Message:
don't sleep in run_xfer path.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/iscsi/iscsi_send.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/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.18 src/sys/dev/iscsi/iscsi_send.c:1.19
--- src/sys/dev/iscsi/iscsi_send.c:1.18	Wed Jun  1 05:13:07 2016
+++ src/sys/dev/iscsi/iscsi_send.c	Wed Jun  1 05:31:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.18 2016/06/01 05:13:07 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.19 2016/06/01 05:31:59 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1221,7 +1221,7 @@ send_task_management(connection_t *conn,
 	/* can only happen if terminating... */
 	if (ccb == NULL)
 		return conn->terminating;
-	ppdu = get_pdu(conn, TRUE);
+	ppdu = get_pdu(conn, xs == NULL);
 	if (ppdu == NULL) {
 		free_ccb(ccb);
 		return conn->terminating;
@@ -1371,7 +1371,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 	}
 	mutex_exit(>lock);
 
-	ppdu = get_pdu(conn, FALSE);
+	ppdu = get_pdu(conn, waitok);
 	if (ppdu == NULL) {
 		DEBOUT(("No PDU for send_command, ccb = %p\n",ccb));
 		ccb->disp = disp;



CVS commit: src/sys/arch/macppc/dev

2016-05-31 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun  1 05:27:40 UTC 2016

Modified Files:
src/sys/arch/macppc/dev: pmu.c pmuvar.h

Log Message:
report the power button to sysmon when possible


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/macppc/dev/pmu.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/pmuvar.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/macppc/dev/pmu.c
diff -u src/sys/arch/macppc/dev/pmu.c:1.26 src/sys/arch/macppc/dev/pmu.c:1.27
--- src/sys/arch/macppc/dev/pmu.c:1.26	Tue May 31 03:50:30 2016
+++ src/sys/arch/macppc/dev/pmu.c	Wed Jun  1 05:27:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmu.c,v 1.26 2016/05/31 03:50:30 macallan Exp $ */
+/*	$NetBSD: pmu.c,v 1.27 2016/06/01 05:27:40 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.26 2016/05/31 03:50:30 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.27 2016/06/01 05:27:40 macallan Exp $");
 
 #include 
 #include 
@@ -35,6 +35,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.26
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -70,6 +71,13 @@ static void pmu_autopoll(void *, int);
 
 static int pmu_intr(void *);
 
+
+/* bits for sc_pending, as signals to the event thread */
+#define PMU_EV_CARD0	1
+#define PMU_EV_CARD1	2
+#define PMU_EV_BUTTON	4
+#define PMU_EV_LID	8
+
 struct pmu_softc {
 	device_t sc_dev;
 	void *sc_ih;
@@ -78,6 +86,7 @@ struct pmu_softc {
 	struct i2c_controller sc_i2c;
 	struct pmu_ops sc_pmu_ops;
 	struct sysmon_pswitch sc_lidswitch;
+	struct sysmon_pswitch sc_powerbutton;
 	bus_space_tag_t sc_memt;
 	bus_space_handle_t sc_memh;
 	uint32_t sc_flags;
@@ -86,13 +95,15 @@ struct pmu_softc {
 	int sc_iic_done;
 	int sc_error;
 	int sc_autopoll;
-	int sc_pending_eject;
 	int sc_brightness, sc_brightness_wanted;
 	int sc_volume, sc_volume_wanted;
 	int sc_lid_closed;
-	int sc_pswitch_pending;
+	int sc_button;
+	uint8_t sc_env_old;
+	uint8_t sc_env_mask;
 	/* deferred processing */
 	lwp_t *sc_thread;
+	int sc_pending;
 	/* signalling the event thread */
 	int sc_event;
 	/* ADB */
@@ -261,7 +272,7 @@ pmu_attach(device_t parent, device_t sel
 	int type = IST_EDGE;
 	uint8_t cmd[2] = {2, 0};
 	uint8_t resp[16];
-	char name[256];
+	char name[256], model[32];
 
 	extint_node = of_getnode_byname(OF_parent(ca->ca_node), "extint-gpio1");
 	if (extint_node) {
@@ -280,13 +291,27 @@ pmu_attach(device_t parent, device_t sel
 
 	sc->sc_error = 0;
 	sc->sc_autopoll = 0;
-	sc->sc_pending_eject = 0;
+	sc->sc_pending = 0;
+	sc->sc_env_old = 0;
 	sc->sc_brightness = sc->sc_brightness_wanted = 0x80;
 	sc->sc_volume = sc->sc_volume_wanted = 0x80;
 	sc->sc_flags = 0;
 	sc->sc_callback = NULL;
 	sc->sc_lid_closed = 0;
-	sc->sc_pswitch_pending = 0;
+	sc->sc_button = 0;
+	sc->sc_env_mask = 0xff;
+
+	/*
+	 * core99 PowerMacs like to send environment messages with the lid
+	 * switch bit set - since that doesn't make any sense here and it
+	 * probably means something else anyway we mask it out
+	 */
+
+	if (OF_getprop(root_node, "model", model, 32) != 0) {
+		if (strncmp(model, "PowerMac", 8) == 0) {
+			sc->sc_env_mask = PMU_ENV_POWER_BUTTON;
+		}
+	}
 
 	if (bus_space_map(sc->sc_memt, ca->ca_reg[0] + ca->ca_baseaddr,
 	ca->ca_reg[1], 0, >sc_memh) != 0) {
@@ -411,6 +436,12 @@ bat_done:
 	if (sysmon_pswitch_register(>sc_lidswitch) != 0)
 		aprint_error_dev(self,
 		"unable to register lid switch with sysmon\n");
+
+	sc->sc_powerbutton.smpsw_name = "Power button";
+	sc->sc_powerbutton.smpsw_type = PSWITCH_TYPE_POWER;
+	if (sysmon_pswitch_register(>sc_powerbutton) != 0)
+		aprint_error_dev(self,
+		"unable to register power button with sysmon\n");
 }
 
 static void
@@ -636,7 +667,7 @@ pmu_intr(void *arg)
 	if (resp[1] & PMU_INT_PCEJECT) {
 		/* deal with PCMCIA eject buttons */
 		DPRINTF("card eject %d\n", resp[3]);
-		sc->sc_pending_eject |= (resp[3] & 3);
+		atomic_or_32(>sc_pending, (resp[3] & 3));
 		wakeup(>sc_event);
 		goto done;
 	}
@@ -649,7 +680,7 @@ pmu_intr(void *arg)
 		goto done;
 	}
 	if (resp[1] & PMU_INT_ENVIRONMENT) {
-		int closed;
+		uint8_t diff;
 #ifdef PMU_VERBOSE
 		/* deal with environment messages */
 		printf("environment:");
@@ -657,10 +688,17 @@ pmu_intr(void *arg)
 			printf(" %02x", resp[i]);
 		printf("\n");
 #endif
-		closed = (resp[2] & PMU_ENV_LID_CLOSED) != 0;
-		if (closed != sc->sc_lid_closed) {
-			sc->sc_lid_closed = closed;
-			sc->sc_pswitch_pending = 1;
+		diff = (resp[2] ^ sc->sc_env_old ) & sc->sc_env_mask;
+		if (diff == 0) goto done;
+		sc->sc_env_old = resp[2];
+		if (diff & PMU_ENV_LID_CLOSED) {
+			sc->sc_lid_closed = (resp[2] & PMU_ENV_LID_CLOSED) != 0;
+			atomic_or_32(>sc_pending, PMU_EV_LID);
+			wakeup(>sc_event);
+		}
+		if (diff & PMU_ENV_POWER_BUTTON) {
+			sc->sc_button = (resp[2] & PMU_ENV_POWER_BUTTON) != 0;
+			

CVS commit: src/sys/dev/iscsi

2016-05-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  1 05:13:07 UTC 2016

Modified Files:
src/sys/dev/iscsi: iscsi_globals.h iscsi_ioctl.c iscsi_rcv.c
iscsi_send.c iscsi_utils.c

Log Message:
refactor callouts
remove timed out ccbs and connections from cleanup queue when stopping timeout.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/iscsi/iscsi_globals.h \
src/sys/dev/iscsi/iscsi_ioctl.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/iscsi/iscsi_rcv.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/iscsi/iscsi_send.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/iscsi/iscsi_utils.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/iscsi/iscsi_globals.h
diff -u src/sys/dev/iscsi/iscsi_globals.h:1.15 src/sys/dev/iscsi/iscsi_globals.h:1.16
--- src/sys/dev/iscsi/iscsi_globals.h:1.15	Wed Jun  1 04:19:08 2016
+++ src/sys/dev/iscsi/iscsi_globals.h	Wed Jun  1 05:13:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_globals.h,v 1.15 2016/06/01 04:19:08 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_globals.h,v 1.16 2016/06/01 05:13:07 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -253,6 +253,7 @@ struct ccb_s {
 
 	struct callout		timeout; /* To make sure it isn't lost */
 	TAILQ_ENTRY(ccb_s)	tchain;
+	bool			timedout;
 	int			num_timeouts;
 	/* How often we've sent out SNACK without answer */
 	int			total_tries;
@@ -373,6 +374,7 @@ struct connection_s {
 	struct callout			timeout;
 		/* Timeout for checking if connection is dead */
 	TAILQ_ENTRY(connection_s)	tchain;
+	booltimedout;
 	intnum_timeouts;
 		/* How often we've sent out a NOP without answer */
 	uint32_t			idle_timeout_val;
@@ -698,7 +700,11 @@ void connection_timeout_co(void *);
 void ccb_timeout_co(void *);
 
 void connection_timeout(connection_t *);
+void connection_timeout_start(connection_t *, int);
+void connection_timeout_stop(connection_t *);
 void ccb_timeout(ccb_t *);
+void ccb_timeout_start(ccb_t *, int);
+void ccb_timeout_stop(ccb_t *);
 
 /* in iscsi_rcv.c */
 
Index: src/sys/dev/iscsi/iscsi_ioctl.c
diff -u src/sys/dev/iscsi/iscsi_ioctl.c:1.15 src/sys/dev/iscsi/iscsi_ioctl.c:1.16
--- src/sys/dev/iscsi/iscsi_ioctl.c:1.15	Wed Jun  1 04:07:03 2016
+++ src/sys/dev/iscsi/iscsi_ioctl.c	Wed Jun  1 05:13:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.c,v 1.15 2016/06/01 04:07:03 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_ioctl.c,v 1.16 2016/06/01 05:13:07 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -497,7 +497,7 @@ kill_connection(connection_t *conn, uint
 		/* of logging in */
 		if (logout >= 0) {
 			conn->state = ST_WINDING_DOWN;
-			callout_schedule(>timeout, CONNECTION_TIMEOUT);
+			connection_timeout_start(conn, CONNECTION_TIMEOUT);
 
 			if (sess->ErrorRecoveryLevel < 2 &&
 			logout == RECOVER_CONNECTION) {
@@ -887,7 +887,7 @@ recreate_connection(iscsi_login_paramete
 			mutex_exit(>lock);
 			resend_pdu(ccb);
 		} else {
-			callout_schedule(>timeout, COMMAND_TIMEOUT);
+			ccb_timeout_start(ccb, COMMAND_TIMEOUT);
 		}
 	}
 
@@ -1576,22 +1576,60 @@ connection_timeout_co(void *par)
 	connection_t *conn = par;
 
 	mutex_enter(_cleanup_mtx);
+	conn->timedout = true;
 	TAILQ_INSERT_TAIL(_timeout_conn_list, conn, tchain);
 	mutex_exit(_cleanup_mtx);
 	iscsi_notify_cleanup();
 }
 
+void
+connection_timeout_start(connection_t *conn, int ticks)
+{
+	callout_schedule(>timeout, ticks);
+}   
+
+void
+connection_timeout_stop(connection_t *conn)
+{
+	callout_halt(>timeout, NULL);
+	mutex_enter(_cleanup_mtx);
+	if (conn->timedout) {
+		TAILQ_REMOVE(_timeout_conn_list, conn, tchain);
+		conn->timedout = false;
+	}   
+	mutex_exit(_cleanup_mtx);
+}
+
 void
 ccb_timeout_co(void *par)
 {
 	ccb_t *ccb = par;
 
 	mutex_enter(_cleanup_mtx);
+	ccb->timedout = true;
 	TAILQ_INSERT_TAIL(_timeout_ccb_list, ccb, tchain);
 	mutex_exit(_cleanup_mtx);
 	iscsi_notify_cleanup();
 }
 
+void
+ccb_timeout_start(ccb_t *ccb, int ticks)
+{   
+	callout_schedule(>timeout, ticks);
+} 
+ 
+void
+ccb_timeout_stop(ccb_t *ccb)
+{
+	callout_halt(>timeout, NULL);
+	mutex_enter(_cleanup_mtx);
+	if (ccb->timedout) {
+		TAILQ_REMOVE(_timeout_ccb_list, ccb, tchain);
+		ccb->timedout = false;
+	} 
+	mutex_exit(_cleanup_mtx);
+}
+
 /*
  * iscsi_cleanup_thread
  *Global thread to handle connection and session cleanup after termination.

Index: src/sys/dev/iscsi/iscsi_rcv.c
diff -u src/sys/dev/iscsi/iscsi_rcv.c:1.11 src/sys/dev/iscsi/iscsi_rcv.c:1.12
--- src/sys/dev/iscsi/iscsi_rcv.c:1.11	Sun May 29 13:51:16 2016
+++ src/sys/dev/iscsi/iscsi_rcv.c	Wed Jun  1 05:13:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_rcv.c,v 1.11 2016/05/29 13:51:16 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_rcv.c,v 1.12 2016/06/01 05:13:07 mlelstv 

CVS commit: src/bin/sh

2016-05-31 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jun  1 05:11:52 UTC 2016

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

Log Message:
PR bin/51207   Only check for ELF bnaries in regular files.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/bin/sh/input.c

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

Modified files:

Index: src/bin/sh/input.c
diff -u src/bin/sh/input.c:1.50 src/bin/sh/input.c:1.51
--- src/bin/sh/input.c:1.50	Sat May  7 20:06:30 2016
+++ src/bin/sh/input.c	Wed Jun  1 05:11:52 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: input.c,v 1.50 2016/05/07 20:06:30 kre Exp $	*/
+/*	$NetBSD: input.c,v 1.51 2016/06/01 05:11:52 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)input.c	8.3 (Berkeley) 6/9/95";
 #else
-__RCSID("$NetBSD: input.c,v 1.50 2016/05/07 20:06:30 kre Exp $");
+__RCSID("$NetBSD: input.c,v 1.51 2016/06/01 05:11:52 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -48,6 +48,7 @@ __RCSID("$NetBSD: input.c,v 1.50 2016/05
 #include 
 #include 
 #include 
+#include 
 
 /*
  * This file implements the input routines used by the parser.
@@ -392,6 +393,7 @@ setinputfile(const char *fname, int push
 	unsigned char magic[4];
 	int fd;
 	int fd2;
+	struct stat sb;
 
 	INTOFF;
 	if ((fd = open(fname, O_RDONLY)) < 0)
@@ -402,7 +404,8 @@ setinputfile(const char *fname, int push
 	 * avoid that message. The first lseek tries to make sure that
 	 * we can later rewind the file.
 	 */
-	if (lseek(fd, 0, SEEK_SET) == 0) {
+	if (fstat(fd, ) == 0 && S_ISREG(sb.st_mode) &&
+	lseek(fd, 0, SEEK_SET) == 0) {
 		if (read(fd, magic, 4) == 4) {
 			if (memcmp(magic, "\177ELF", 4) == 0) {
 (void)close(fd);



CVS commit: src/bin/sh

2016-05-31 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jun  1 05:10:41 UTC 2016

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

Log Message:
PR bin/43639

Redo earlier fix to only prohibit sourcing directories and block special files.
char specials (/dev/tty, /dev/null, ... incl /dev/rwd0a) and fifos are OK.

Posix actually requires that we find only readable files - that is not yet
implemented (doing it sanely, without opening the file twice, is going to
take some more modifications to code elsewhere).


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.127 src/bin/sh/eval.c:1.128
--- src/bin/sh/eval.c:1.127	Fri May 13 10:32:52 2016
+++ src/bin/sh/eval.c	Wed Jun  1 05:10:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.127 2016/05/13 10:32:52 kre Exp $	*/
+/*	$NetBSD: eval.c,v 1.128 2016/06/01 05:10:41 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.127 2016/05/13 10:32:52 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.128 2016/06/01 05:10:41 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -1266,18 +1266,40 @@ find_dot_file(char *basename)
 	/* don't try this for absolute or relative paths */
 	if (strchr(basename, '/')) {
 		if (stat(basename, ) == 0) {
-			if (S_ISREG(statb.st_mode))
-return basename;
-			error("%s: not a regular file", basename);
-			/* NOTREACHED */
+			if (S_ISDIR(statb.st_mode))
+error("%s: is a directory", basename);
+			if (S_ISBLK(statb.st_mode))
+error("%s: is a block device", basename);
+			return basename;
 		}
 	} else while ((fullname = padvance(, basename)) != NULL) {
-		if ((stat(fullname, ) == 0) && S_ISREG(statb.st_mode)) {
-			/*
-			 * Don't bother freeing here, since it will
-			 * be freed by the caller.
-			 */
-			return fullname;
+		if ((stat(fullname, ) == 0)) {
+			/* weird format is to ease future code... */
+			if (S_ISDIR(statb.st_mode) || S_ISBLK(statb.st_mode))
+;
+#if notyet
+			else if (unreadable()) {
+/*
+ * testing this via st_mode is ugly to get
+ * correct (and would ignore ACLs).
+ * better way is just to open the file.
+ * But doing that here would (currently)
+ * mean opening the file twice, which
+ * might not be safe.  So, defer this
+ * test until code is restructures so
+ * we can return a fd.   Then we also
+ * get to fix the mem leak just below...
+ */
+			}
+#endif
+			else {
+/*
+ * Don't bother freeing here, since
+ * it will be freed by the caller.
+ * XXX no it won't - a bug for later.
+ */
+return fullname;
+			}
 		}
 		stunalloc(fullname);
 	}



CVS commit: src/sys/dev/usb

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 04:54:59 UTC 2016

Modified Files:
src/sys/dev/usb: umass_quirks.c

Log Message:
Add quick for Sandisk Cruzer - from PR kern/46547


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/usb/umass_quirks.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/usb/umass_quirks.c
diff -u src/sys/dev/usb/umass_quirks.c:1.97 src/sys/dev/usb/umass_quirks.c:1.98
--- src/sys/dev/usb/umass_quirks.c:1.97	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/umass_quirks.c	Wed Jun  1 04:54:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_quirks.c,v 1.97 2016/04/23 10:15:32 skrll Exp $	*/
+/*	$NetBSD: umass_quirks.c,v 1.98 2016/06/01 04:54:59 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.97 2016/04/23 10:15:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.98 2016/06/01 04:54:59 pgoyette Exp $");
 
 #include 
 #include 
@@ -270,6 +270,17 @@ Static const struct umass_quirk umass_qu
 	},
 
 	/*
+	 * SanDisk Cruzer rejects cache sync.
+	 */
+	{ { USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_CRUZER },
+	  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
+	  0,
+	  PQUIRK_NOSYNCCACHE,
+	  UMATCH_VENDOR_PRODUCT,
+	  NULL, NULL
+	},
+
+	/*
 	 * SanDisk Sansa Clip rejects cache sync in unconventional way.
 	 * However, unlike some other devices listed in this table,
 	 * this is does not cause the device firmware to stop responding.



CVS commit: src/sys/dev/usb

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 04:52:20 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.707 -r1.708 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.707 src/sys/dev/usb/usbdevs_data.h:1.708
--- src/sys/dev/usb/usbdevs_data.h:1.707	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/usbdevs_data.h	Wed Jun  1 04:52:20 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.707 2016/04/23 10:15:32 skrll Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.708 2016/06/01 04:52:20 pgoyette Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.684.2.6 2016/04/22 13:43:55 skrll Exp
+ *	NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp
  */
 
 /*
@@ -3840,32 +3840,34 @@ static const uint16_t usb_products[] = {
 	16689, 16740, 0,
 	USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR75, 
 	16689, 16748, 0,
+	USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_CRUZER, 
+	16756, 0,
 	USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SANSA_CLIP, 
-	16756, 16762, 0,
+	16763, 16769, 0,
 	USB_VENDOR_SANWASUPPLY, USB_PRODUCT_SANWASUPPLY_JYDV9USB, 
-	16767, 12215, 0,
+	16774, 12215, 0,
 	USB_VENDOR_SANYO, USB_PRODUCT_SANYO_SCP4900, 
-	519, 16777, 4718, 14473, 0,
+	519, 16784, 4718, 14473, 0,
 	USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R, 
-	16786, 0,
+	16793, 0,
 	USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_336CX, 
 	13730, 13738, 4890, 13744, 7024, 0,
 	USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_USBSERIAL, 
-	16796, 9362, 0,
+	16803, 9362, 0,
 	USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_SEAPORT4P1, 
-	16807, 8345, 5429, 0,
+	16814, 8345, 5429, 0,
 	USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_SEAPORT4P2, 
-	16807, 8345, 6328, 0,
+	16814, 8345, 6328, 0,
 	USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_SEAPORT4P3, 
-	16807, 8345, 6330, 0,
+	16814, 8345, 6330, 0,
 	USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_SEAPORT4P4, 
-	16807, 8345, 6310, 0,
+	16814, 8345, 6310, 0,
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3, 
 	4944, 0,
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4, 
 	4944, 0,
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_NUB8301, 
-	16817, 0,
+	16824, 0,
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RTL8192SU_1, 
 	5213, 0,
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RTL8192SU_2, 
@@ -3889,241 +3891,241 @@ static const uint16_t usb_products[] = {
 	USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5, 
 	4965, 0,
 	USB_VENDOR_SGI, USB_PRODUCT_SGI_SN1_L1_SC, 
-	16826, 16830, 2707, 6342, 0,
+	16833, 16837, 2707, 6342, 0,
 	USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ST268_USB_NIC, 
-	16833, 4718, 13597, 0,
+	16840, 4718, 13597, 0,
 	USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515, 
 	5488, 4748, 0,
 	USB_VENDOR_SHARK, USB_PRODUCT_SHARK_PA, 
-	16839, 4732, 0,
+	16846, 4732, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_CE175TU, 
-	16846, 0,
+	16853, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500, 
-	16854, 0,
-	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_A300, 
 	16861, 0,
+	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_A300, 
+	16868, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5600, 
-	16866, 0,
-	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C700, 
 	16873, 0,
+	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C700, 
+	16880, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C750, 
-	16878, 0,
+	16885, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_RUITZ1016YCZZ, 
-	16883, 5148, 0,
+	16890, 5148, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WS007SH, 
-	16891, 0,
+	16898, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WS011SH, 
-	16899, 0,
+	16906, 0,
 	USB_VENDOR_SHARP, USB_PRODUCT_SHARP_NWKBD, 
-	16907, 5709, 0,
+	16914, 5709, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSB, 
-	16917, 1764, 0,
+	16924, 1764, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSCSI, 
-	16923, 1764, 0,
+	16930, 1764, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_SDDR09, 
-	16689, 16930, 0,
+	16689, 16937, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSBSMCF, 
-	16937, 10468, 600, 10118, 4732, 0,
+	16944, 10468, 600, 10118, 4732, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_ZIOMMC, 
-	16937, 15093, 4732, 0,
+	16944, 15093, 4732, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_HIFD, 
-	1234, 16942, 0,
+	1234, 16949, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSBATAPI, 
-	16937, 5306, 4732, 0,
+	16944, 5306, 4732, 0,
 	USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_CF, 
-	16937, 10118, 

CVS commit: src/sys/dev/usb

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 04:51:33 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs.h

Log Message:
Regen for Sandisk Cruzer


To generate a diff of this commit:
cvs rdiff -u -r1.706 -r1.707 src/sys/dev/usb/usbdevs.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.706 src/sys/dev/usb/usbdevs.h:1.707
--- src/sys/dev/usb/usbdevs.h:1.706	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/usbdevs.h	Wed Jun  1 04:51:33 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.706 2016/04/23 10:15:32 skrll Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.707 2016/06/01 04:51:33 pgoyette Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.684.2.6 2016/04/22 13:43:55 skrll Exp
+ *	NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp
  */
 
 /*
@@ -2834,6 +2834,7 @@
 #define	USB_PRODUCT_SANDISK_SDDR09	0x0200		/* ImageMate SDDR-09 */
 #define	USB_PRODUCT_SANDISK_SDDR86	0x0621		/* ImageMate SDDR-86 */
 #define	USB_PRODUCT_SANDISK_SDDR75	0x0810		/* ImageMate SDDR-75 */
+#define	USB_PRODUCT_SANDISK_CRUZER	0x5530		/* Cruzer */
 #define	USB_PRODUCT_SANDISK_SANSA_CLIP	0x7433		/* Sansa Clip */
 
 /* Sanwa Supply products */



CVS commit: src/sys/dev/usb

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 04:47:02 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add Sandisk Cruzer - from PR kern/46547


To generate a diff of this commit:
cvs rdiff -u -r1.714 -r1.715 src/sys/dev/usb/usbdevs

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/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.714 src/sys/dev/usb/usbdevs:1.715
--- src/sys/dev/usb/usbdevs:1.714	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/usbdevs	Wed Jun  1 04:47:02 2016
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.714 2016/04/23 10:15:32 skrll Exp $
+$NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2827,6 +2827,7 @@ product SANDISK SDDR12		0x0100	ImageMate
 product SANDISK SDDR09		0x0200	ImageMate SDDR-09
 product SANDISK SDDR86		0x0621	ImageMate SDDR-86
 product SANDISK SDDR75		0x0810	ImageMate SDDR-75
+product SANDISK CRUZER		0x5530	Cruzer
 product SANDISK SANSA_CLIP	0x7433	Sansa Clip
 
 /* Sanwa Supply products */



CVS commit: src/external/gpl3/gcc/lib/libasan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 04:20:20 UTC 2016

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
missing space


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libasan/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/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.14 src/external/gpl3/gcc/lib/libasan/Makefile:1.15
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.14	Tue May 31 20:54:20 2016
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Wed Jun  1 00:20:20 2016
@@ -89,7 +89,7 @@ CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MAC
 LIBDPLIBS+=stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
 COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
-COPTS+=-fno-builtin -fno-exceptions -fno-rtti-funwind-tables
+COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables
 # Can't profile without it`
 #-fomit-frame-pointer
 



CVS commit: src/sys/dev/iscsi

2016-05-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  1 04:19:08 UTC 2016

Modified Files:
src/sys/dev/iscsi: iscsi_globals.h iscsi_send.c iscsi_utils.c

Log Message:
factor out sernum handling.
make incrementing sernum atomic.
declare variables for atomic operations as volatile.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/iscsi/iscsi_globals.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/iscsi/iscsi_send.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/iscsi/iscsi_utils.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/iscsi/iscsi_globals.h
diff -u src/sys/dev/iscsi/iscsi_globals.h:1.14 src/sys/dev/iscsi/iscsi_globals.h:1.15
--- src/sys/dev/iscsi/iscsi_globals.h:1.14	Sun May 29 13:51:16 2016
+++ src/sys/dev/iscsi/iscsi_globals.h	Wed Jun  1 04:19:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_globals.h,v 1.14 2016/05/29 13:51:16 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_globals.h,v 1.15 2016/06/01 04:19:08 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -289,7 +289,7 @@ struct ccb_s {
 	int			sense_len_got; /* actual sense data length */
 
 	pdu_t			*pdu_waiting; /* PDU waiting to be ack'ed */
-	uint32_t		CmdSN; /* CmdSN associated with waiting PDU */
+	volatile uint32_t	CmdSN; /* CmdSN associated with waiting PDU */
 
 	int			flags;
 	connection_t		*connection; /* connection for CCB */
@@ -363,7 +363,7 @@ struct connection_s {
 	/* if closing down: status */
 	intrecover; /* recovery count */
 		/* (reset on first successful data transfer) */
-	unsigned			usecount; /* number of active CCBs */
+	volatile unsigned		usecount; /* number of active CCBs */
 
 	booldestroy; /* conn will be destroyed */
 	boolin_session;
@@ -724,6 +724,9 @@ void init_sernum(sernum_buffer_t *);
 int add_sernum(sernum_buffer_t *, uint32_t);
 uint32_t ack_sernum(sernum_buffer_t *, uint32_t);
 
+uint32_t get_sernum(session_t *, bool);
+int sernum_in_window(session_t *);
+
 /* in iscsi_text.c */
 
 int assemble_login_parameters(connection_t *, ccb_t *, pdu_t *);

Index: src/sys/dev/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.16 src/sys/dev/iscsi/iscsi_send.c:1.17
--- src/sys/dev/iscsi/iscsi_send.c:1.16	Sun May 29 13:51:16 2016
+++ src/sys/dev/iscsi/iscsi_send.c	Wed Jun  1 04:19:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.16 2016/05/29 13:51:16 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.17 2016/06/01 04:19:08 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -145,6 +145,7 @@ reassign_tasks(connection_t *oldconn)
 	pdu_t *opdu;
 	int no_tm = 1;
 	int rc = 1;
+	uint32_t sn;
 
 	if ((conn = assign_connection(sess, FALSE)) == NULL) {
 		DEB(1, ("Reassign_tasks of Session %d, connection %d failed, "
@@ -255,14 +256,12 @@ reassign_tasks(connection_t *oldconn)
 			mutex_enter(>lock);
 			if (ccb->CmdSN < sess->ExpCmdSN) {
 pdu = ccb->pdu_waiting;
+sn = get_sernum(sess, !(pdu->pdu.Opcode & OP_IMMEDIATE));
 
 /* update CmdSN */
 DEBC(conn, 1, ("Resend Updating CmdSN - old %d, new %d\n",
 	   ccb->CmdSN, sess->CmdSN));
-ccb->CmdSN = sess->CmdSN;
-if (!(pdu->pdu.Opcode & OP_IMMEDIATE)) {
-	sess->CmdSN++;
-}
+ccb->CmdSN = sn;
 pdu->pdu.p.command.CmdSN = htonl(ccb->CmdSN);
 			}
 			mutex_exit(>lock);
@@ -1351,7 +1350,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 	mutex_enter(>lock);
 	while (/*CONSTCOND*/ISCSI_THROTTLING_ENABLED &&
 	/*CONSTCOND*/!ISCSI_SERVER_TRUSTED &&
-	!sn_a_le_b(sess->CmdSN, sess->MaxCmdSN)) {
+	!sernum_in_window(sess)) {
 
 		ccb->disp = disp;
 		if (waitok)
@@ -1419,9 +1418,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 	ccb->flags |= CCBF_REASSIGN;
 
 	mutex_enter(>lock);
-	ccb->CmdSN = sess->CmdSN;
-	if (!immed)
-		sess->CmdSN++;
+	ccb->CmdSN = get_sernum(sess, !immed);
 	mutex_exit(>lock);
 
 	pdu->p.command.CmdSN = htonl(ccb->CmdSN);

Index: src/sys/dev/iscsi/iscsi_utils.c
diff -u src/sys/dev/iscsi/iscsi_utils.c:1.9 src/sys/dev/iscsi/iscsi_utils.c:1.10
--- src/sys/dev/iscsi/iscsi_utils.c:1.9	Sun May 29 13:51:16 2016
+++ src/sys/dev/iscsi/iscsi_utils.c	Wed Jun  1 04:19:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_utils.c,v 1.9 2016/05/29 13:51:16 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_utils.c,v 1.10 2016/06/01 04:19:08 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2008 The NetBSD Foundation, Inc.
@@ -678,3 +678,35 @@ ack_sernum(sernum_buffer_t *buff, uint32
 
 	return buff->ExpSN;
 }
+
+/*
+ * next_sernum:
+ *   Return the current command serial number of the session
+ *   and optionally increment it for the next query
+ */
+uint32_t
+get_sernum(session_t *sess, bool bump)
+{
+	uint32_t sn;
+
+	KASSERT(mutex_owned(>lock));
+
+	sn = sess->CmdSN;
+	if (bump)
+		atomic_inc_32(>CmdSN);
+	return sn;
+}
+
+/*
+ * sernum_in_window:
+ *   Check wether serial number is in send window
+ *
+ */
+int

CVS commit: src/sys/sys

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 04:15:54 UTC 2016

Modified Files:
src/sys/sys: socketvar.h

Log Message:
Move macro inside of #ifdef KERNEL

PR kern/46706


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/sys/socketvar.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/sys/socketvar.h
diff -u src/sys/sys/socketvar.h:1.139 src/sys/sys/socketvar.h:1.140
--- src/sys/sys/socketvar.h:1.139	Sat May  9 15:22:47 2015
+++ src/sys/sys/socketvar.h	Wed Jun  1 04:15:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: socketvar.h,v 1.139 2015/05/09 15:22:47 rtr Exp $	*/
+/*	$NetBSD: socketvar.h,v 1.140 2016/06/01 04:15:54 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -184,15 +184,6 @@ struct socket {
 	kauth_cred_t	so_cred;	/* socket credentials */
 };
 
-#define	SB_EMPTY_FIXUP(sb)		\
-do {	\
-	KASSERT(solocked((sb)->sb_so));	\
-	if ((sb)->sb_mb == NULL) {	\
-		(sb)->sb_mbtail = NULL;	\
-		(sb)->sb_lastrecord = NULL;\
-	}\
-} while (/*CONSTCOND*/0)
-
 /*
  * Socket state bits.
  */
@@ -237,6 +228,15 @@ struct sockopt {
 	uint8_t		sopt_buf[sizeof(int)];	/* internal storage */
 };
 
+#define	SB_EMPTY_FIXUP(sb)		\
+do {	\
+	KASSERT(solocked((sb)->sb_so));	\
+	if ((sb)->sb_mb == NULL) {	\
+		(sb)->sb_mbtail = NULL;	\
+		(sb)->sb_lastrecord = NULL;\
+	}\
+} while (/*CONSTCOND*/0)
+
 extern u_long		sb_max;
 extern int		somaxkva;
 extern int		sock_loan_thresh;



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/asan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 04:07:51 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/asan: asan_mapping.h

Log Message:
use the default offsets since gcc hardcodes them (TARGET_ASAN_SHADOW_OFFSET ->
ix86_asan_shadow_offset)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h

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/gcc/dist/libsanitizer/asan/asan_mapping.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.2 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.3
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.2	Tue May 31 16:47:25 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h	Wed Jun  1 00:07:51 2016
@@ -97,7 +97,7 @@ static const u64 kFreeBSD_ShadowOffset64
 # if SANITIZER_WORDSIZE == 32
 #  if defined(__mips__)
 #define SHADOW_OFFSET kMIPS32_ShadowOffset32
-#  elif SANITIZER_FREEBSD || SANITIZER_NETBSD
+#  elif SANITIZER_FREEBSD
 #define SHADOW_OFFSET kFreeBSD_ShadowOffset32
 #  else
 #if SANITIZER_IOS
@@ -111,7 +111,7 @@ static const u64 kFreeBSD_ShadowOffset64
 #define SHADOW_OFFSET kAArch64_ShadowOffset64
 #  elif defined(__powerpc64__)
 #define SHADOW_OFFSET kPPC64_ShadowOffset64
-#  elif SANITIZER_FREEBSD || SANITIZER_NETBSD
+#  elif SANITIZER_FREEBSD
 #define SHADOW_OFFSET kFreeBSD_ShadowOffset64
 #  elif SANITIZER_MAC
 #   define SHADOW_OFFSET kDefaultShadowOffset64



CVS commit: src/sys/dev/iscsi

2016-05-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun  1 04:07:03 UTC 2016

Modified Files:
src/sys/dev/iscsi: iscsi_ioctl.c

Log Message:
close session when last connection is removed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/iscsi/iscsi_ioctl.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/iscsi/iscsi_ioctl.c
diff -u src/sys/dev/iscsi/iscsi_ioctl.c:1.14 src/sys/dev/iscsi/iscsi_ioctl.c:1.15
--- src/sys/dev/iscsi/iscsi_ioctl.c:1.14	Sun May 29 13:51:16 2016
+++ src/sys/dev/iscsi/iscsi_ioctl.c	Wed Jun  1 04:07:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.c,v 1.14 2016/05/29 13:51:16 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_ioctl.c,v 1.15 2016/06/01 04:07:03 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1645,7 +1645,10 @@ iscsi_cleanup_thread(void *par)
 			mutex_destroy(>lock);
 			free(conn, M_DEVBUF);
 
-			--sess->total_connections;
+			if (--sess->total_connections == 0) {
+DEB(1, ("Cleanup: session %d\n", sess->id));
+TAILQ_INSERT_HEAD(_cleanups_list, sess, sessions);
+			}
 
 			TAILQ_FOREACH_SAFE(sess, _cleanups_list, sessions, nxt) {
 if (sess->total_connections != 0)



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 04:06:15 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_procmaps_netbsd.cc

Log Message:
use the correct array size.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc

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/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc:1.1 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc:1.1	Tue May 31 17:35:11 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc	Wed Jun  1 00:06:15 2016
@@ -30,7 +30,7 @@ void ReadProcMaps(ProcSelfMapsBuff *proc
   size_t MmapedSize = Size * 4 / 3;
   void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
   Size = MmapedSize;
-  Err = sysctl(Mib, 4, VmMap, , NULL, 0);
+  Err = sysctl(Mib, __arraycount(Mib), VmMap, , NULL, 0);
   CHECK_EQ(Err, 0);
 
   proc_maps->data = (char*)VmMap;



CVS commit: src/sys/dev/pci

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 03:37:35 UTC 2016

Modified Files:
src/sys/dev/pci: if_msk.c

Log Message:
Commit patch from t-hash in PR kern/48309


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_msk.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_msk.c
diff -u src/sys/dev/pci/if_msk.c:1.49 src/sys/dev/pci/if_msk.c:1.50
--- src/sys/dev/pci/if_msk.c:1.49	Tue Feb  9 08:32:11 2016
+++ src/sys/dev/pci/if_msk.c	Wed Jun  1 03:37:35 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.49 2016/02/09 08:32:11 ozaki-r Exp $ */
+/* $NetBSD: if_msk.c,v 1.50 2016/06/01 03:37:35 pgoyette Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $	*/
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.49 2016/02/09 08:32:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.50 2016/06/01 03:37:35 pgoyette Exp $");
 
 #include 
 #include 
@@ -2038,6 +2038,11 @@ msk_init_yukon(struct sk_if_softc *sc_if
 	SK_YU_WRITE_2(sc_if, YUKON_SMR, reg);
 
 	DPRINTFN(6, ("msk_init_yukon: 10\n"));
+	struct ifnet *ifp = _if->sk_ethercom.ec_if;
+	/* msk_attach calls me before ether_ifattach so check null */
+	if (ifp != NULL && ifp->if_sadl != NULL)
+		memcpy(sc_if->sk_enaddr, CLLADDR(ifp->if_sadl),
+		sizeof(sc_if->sk_enaddr));
 	/* Setup Yukon's address */
 	for (i = 0; i < 3; i++) {
 		/* Write Source Address 1 (unicast filter) */



CVS commit: src/bin/sh

2016-05-31 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jun  1 02:50:03 UTC 2016

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

Log Message:
PR bin/47065 PR bin/39466

When the shell exits after an error (when that is the right thing for
it to do) ensure that it never does exit(0).


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/bin/sh/error.c

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

Modified files:

Index: src/bin/sh/error.c
diff -u src/bin/sh/error.c:1.38 src/bin/sh/error.c:1.39
--- src/bin/sh/error.c:1.38	Thu Mar 15 02:02:20 2012
+++ src/bin/sh/error.c	Wed Jun  1 02:50:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: error.c,v 1.38 2012/03/15 02:02:20 joerg Exp $	*/
+/*	$NetBSD: error.c,v 1.39 2016/06/01 02:50:02 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)error.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: error.c,v 1.38 2012/03/15 02:02:20 joerg Exp $");
+__RCSID("$NetBSD: error.c,v 1.39 2016/06/01 02:50:02 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -179,6 +179,11 @@ error(const char *msg, ...)
 {
 	va_list ap;
 
+	/*
+	 * On error, we certainly never want exit(0)...
+	 */
+	if (exerrno == 0)
+		exerrno = 1;
 	va_start(ap, msg);
 	exverror(EXERROR, msg, ap);
 	/* NOTREACHED */



CVS commit: src/bin/sh

2016-05-31 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jun  1 02:47:05 UTC 2016

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

Log Message:
PR bin/51145 PR bin/48489
More fixes to the shell parser to prevent empty simple commands (where
empty means no significant text at all) - as discussed on tech-userlevel
this still allows { } (which can be useful in function definitions, not
really anywhere else though) except in posix mode.  ( ) now generates
a syntax error, as should any other place where commands are required but
nothing is present.  (nb, redirections, var assignments, even var expansions
that expand to nothing, are all OK, and avoid the error - just comments, or
whits space, are not.)This is (aside from allowing { } at all) all in
accordance with the posix spec.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/bin/sh/parser.c

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

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.119 src/bin/sh/parser.c:1.120
--- src/bin/sh/parser.c:1.119	Mon May  9 20:36:07 2016
+++ src/bin/sh/parser.c	Wed Jun  1 02:47:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.119 2016/05/09 20:36:07 kre Exp $	*/
+/*	$NetBSD: parser.c,v 1.120 2016/06/01 02:47:05 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.119 2016/05/09 20:36:07 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.120 2016/06/01 02:47:05 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -488,12 +488,16 @@ TRACE(("expecting DO got %s %s\n", tokna
 		n1->type = NSUBSHELL;
 		n1->nredir.n = list(0, 0);
 		n1->nredir.redirect = NULL;
+		if (n1->nredir.n == NULL)
+			synexpect(-1, 0);
 		if (readtoken() != TRP)
 			synexpect(TRP, 0);
 		checkkwd = 1;
 		break;
 	case TBEGIN:
 		n1 = list(0, 0);
+		if (posix && n1 == NULL)
+			synexpect(-1, 0);
 		if (readtoken() != TEND)
 			synexpect(TEND, 0);
 		checkkwd = 1;
@@ -620,6 +624,9 @@ simplecmd(union node **rpp, union node *
 			break;
 		}
 	}
+
+	if (args == NULL && redir == NULL)
+		synexpect(-1, 0);
 	*app = NULL;
 	*rpp = NULL;
 	n = stalloc(sizeof(struct ncmd));



CVS commit: src/usr.bin/sort

2016-05-31 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jun  1 02:37:55 UTC 2016

Modified Files:
src/usr.bin/sort: msort.c sort.1 sort.c sort.h

Log Message:
Add the posix -C option (-c but quieter).  Fix -R to work properly when
setting \n as the record delimited using a numeric value rather than literal
\n - and to not incorrectly turn \n into a field separator if -R is used to
make some other char the record separator (\n becomes a field separator in
that case as long as the field separator remains "white space" but should not
be in any other case - unless set explicitly of course.)

Plus more cosmetic changes - the man page and usage are updated to make it
more clear that the 2 (or 1) params to -k are not fields (field1 and field2)
but specifiers of the beginning and end of one key field.   There was an
unused 'x' option in the GETOPTS string.  The usage message is reformatted
to display properly on both 80 col and > 80 col displays (on < 80 it will
still probably look pretty ugly ... perhaps not quite so bad though), and
is also updated to show the different usage for the -c case (and -C) from the
others (only 1 file permitted) - the man page synopsis has a similar update.

Using more than one of -c -C or -m generates a usage message rather than
just ignoring the -m as it did before (there was no -C before of course).

Aside from the bug fix to the interaction between -R and -t, there are no
changes that affect the way anything is sorted (or read, or written).

Discussed on tech-userlevel earlier this week.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/sort/msort.c
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/sort/sort.1
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/sort/sort.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/sort/sort.h

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/sort/msort.c
diff -u src/usr.bin/sort/msort.c:1.30 src/usr.bin/sort/msort.c:1.31
--- src/usr.bin/sort/msort.c:1.30	Fri Feb  5 21:58:42 2010
+++ src/usr.bin/sort/msort.c	Wed Jun  1 02:37:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: msort.c,v 1.30 2010/02/05 21:58:42 enami Exp $	*/
+/*	$NetBSD: msort.c,v 1.31 2016/06/01 02:37:55 kre Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 #include "sort.h"
 #include "fsort.h"
 
-__RCSID("$NetBSD: msort.c,v 1.30 2010/02/05 21:58:42 enami Exp $");
+__RCSID("$NetBSD: msort.c,v 1.31 2016/06/01 02:37:55 kre Exp $");
 
 #include 
 #include 
@@ -365,7 +365,7 @@ insert(struct mfile **flist, struct mfil
  * check order on one file
  */
 void
-order(struct filelist *filelist, struct field *ftbl)
+order(struct filelist *filelist, struct field *ftbl, int quiet)
 {
 	get_func_t get = SINGL_FLD ? makeline : makekey;
 	RECHEADER *crec, *prec, *trec;
@@ -387,10 +387,14 @@ order(struct filelist *filelist, struct 
 		exit(0);
 	while (get(fp, crec, crec_end, ftbl) == 0) {
 		if (0 < (c = cmp(prec, crec))) {
+			if (quiet)
+exit(1);
 			crec->data[crec->length-1] = 0;
 			errx(1, "found disorder: %s", crec->data+crec->offset);
 		}
 		if (UNIQUE && !c) {
+			if (quiet)
+exit(1);
 			crec->data[crec->length-1] = 0;
 			errx(1, "found non-uniqueness: %s",
 			crec->data+crec->offset);

Index: src/usr.bin/sort/sort.1
diff -u src/usr.bin/sort/sort.1:1.34 src/usr.bin/sort/sort.1:1.35
--- src/usr.bin/sort/sort.1:1.34	Wed May 29 15:00:35 2013
+++ src/usr.bin/sort/sort.1	Wed Jun  1 02:37:55 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sort.1,v 1.34 2013/05/29 15:00:35 wiz Exp $
+.\"	$NetBSD: sort.1,v 1.35 2016/06/01 02:37:55 kre Exp $
 .\"
 .\" Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -67,16 +67,26 @@
 .Nd sort or merge text files
 .Sh SYNOPSIS
 .Nm
-.Op Fl bcdfHilmnrSsu
+.Op Fl bdfHilmnrSsu
 .Oo
 .Fl k
-.Ar field1 Ns Op Li \&, Ns Ar field2
+.Ar kstart Ns Op Li \&, Ns Ar kend
 .Oc
 .Op Fl o Ar output
 .Op Fl R Ar char
 .Op Fl T Ar dir
 .Op Fl t Ar char
 .Op Ar
+.Nm
+.Fl c|C
+.Op Fl bdfilnru
+.Oo
+.Fl k
+.Ar kstart Ns Op Li \&, Ns Ar kend
+.Op Fl t Ar char
+.Oc
+.Op Fl R Ar char
+.Op Ar file
 .Sh DESCRIPTION
 The
 .Nm
@@ -101,6 +111,10 @@ returns 0.
 produces no output.
 See also
 .Fl u .
+.It Fl C
+Identical to
+.Fl c
+without the error messages in the case of unsorted input.
 .It Fl H
 Ignored for compatibility with earlier versions of
 .Nm .
@@ -137,9 +151,13 @@ If used with the
 option, check that there are no lines with duplicate keys.
 .El
 .Pp
-The following options override the default ordering rules.
-When ordering options appear independent of key field
-specifications, the requested field ordering rules are
+The following options,
+which should be given before any
+.Fl k
+options, override the default ordering rules.
+When ordering options appear independent of,
+and before, key field specifications,
+the requested field ordering rules are
 applied globally to all sort keys.
 When attached to a specific 

CVS commit: src/sys/dev

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:37:47 UTC 2016

Modified Files:
src/sys/dev/ic: nslm7x.c nslm7xvar.h
src/sys/dev/isa: lm_isa_common.c wbsio.c

Log Message:
Add support for Nuvoton NCT6776F from OpenBSD

>From PR kern/49747


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/nslm7xvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/isa/lm_isa_common.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isa/wbsio.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/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.62 src/sys/dev/ic/nslm7x.c:1.63
--- src/sys/dev/ic/nslm7x.c:1.62	Thu Apr 23 23:23:00 2015
+++ src/sys/dev/ic/nslm7x.c	Wed Jun  1 02:37:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.62 2015/04/23 23:23:00 pgoyette Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.63 2016/06/01 02:37:47 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.62 2015/04/23 23:23:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.63 2016/06/01 02:37:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -1619,6 +1619,154 @@ static struct lm_sensor as99127f_sensors
 	{ .desc = NULL }
 };
 
+/*  NCT6776F */
+static struct lm_sensor nct6776f_sensors[] = {
+	/* Voltage */
+	{
+		.desc = "VCore",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x20,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT_NONE / 2
+	},
+	{
+		.desc = "+12V",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x21,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT(56, 10) / 2
+	},
+	{
+		.desc = "AVCC",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x22,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT(34, 34) / 2
+	},
+	{
+		.desc = "+3.3V",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x23,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT(34, 34) / 2
+	},
+	{
+		.desc = "-12V",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x24,
+		.refresh = wb_w83627ehf_refresh_nvolt,
+		.rfact = 0
+	},
+	{
+		.desc = "+5V",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x25,
+		.refresh = lm_refresh_volt,
+		.rfact = 16000
+	},
+	{
+		.desc = "VIN3",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 0,
+		.reg = 0x26,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT_NONE
+	},
+	{
+		.desc = "+3.3VSB",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 5,
+		.reg = 0x50,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT(34, 34) / 2
+	},
+	{
+		.desc = "VBAT",
+		.type = ENVSYS_SVOLTS_DC,
+		.bank = 5,
+		.reg = 0x51,
+		.refresh = lm_refresh_volt,
+		.rfact = RFACT(34, 34) / 2
+	},
+
+	/* Temperature */
+	{
+		.desc = "MB Temperature",
+		.type = ENVSYS_STEMP,
+		.bank = 0,
+		.reg = 0x27,
+		.refresh = lm_refresh_temp,
+		.rfact = 0
+	},
+	{
+		.desc = "CPU Temperature",
+		.type = ENVSYS_STEMP,
+		.bank = 1,
+		.reg = 0x50,
+		.refresh = wb_refresh_temp,
+		.rfact = 0
+	},
+	{
+		.desc = "Aux Temp",
+		.type = ENVSYS_STEMP,
+		.bank = 2,
+		.reg = 0x50,
+		.refresh = wb_refresh_temp,
+		.rfact = 0
+	},
+
+	/* Fans */
+	{
+		.desc = "System Fan",
+		.type = ENVSYS_SFANRPM,
+		.bank = 6,
+		.reg = 0x56,
+		.refresh = wb_nct6776f_refresh_fanrpm,
+		.rfact = 0
+	},
+	{
+		.desc = "CPU Fan",
+		.type = ENVSYS_SFANRPM,
+		.bank = 6,
+		.reg = 0x58,
+		.refresh = wb_nct6776f_refresh_fanrpm,
+		.rfact = 0
+	},
+	{
+		.desc = "Aux Fan0",
+		.type = ENVSYS_SFANRPM,
+		.bank = 6,
+		.reg = 0x5a,
+		.refresh = wb_nct6776f_refresh_fanrpm,
+		.rfact = 0
+	},
+	{
+		.desc = "Aux Fan1",
+		.type = ENVSYS_SFANRPM,
+		.bank = 6,
+		.reg = 0x5c,
+		.refresh = wb_nct6776f_refresh_fanrpm,
+		.rfact = 0
+	},
+
+	{
+		.desc = "Aux Fan2",
+		.type = ENVSYS_SFANRPM,
+		.bank = 6,
+		.reg = 0x5e,
+		.refresh = wb_nct6776f_refresh_fanrpm,
+		.rfact = 0
+	},
+
+	{ .desc = NULL }
+};
+
 static void
 lm_generic_banksel(struct lm_softc *lmsc, int bank)
 {
@@ -1819,6 +1967,7 @@ static int
 wb_match(struct lm_softc *sc)
 {
 	const char *model = NULL;
+	const char *vendor = "Winbond";
 	int banksel, vendid, cf_flags;
 
 	aprint_naive("\n");
@@ -1866,8 +2015,14 @@ wb_match(struct lm_softc *sc)
 		wb_temp_diode_type(sc, cf_flags);
 		break;
 	case WB_CHIPID_W83627DHG:
-		model = "W83627DHG";
-		lm_setup_sensors(sc, w83627dhg_sensors);
+		if (sc->sioid == WBSIO_ID_NCT6776F) {
+			vendor = "Nuvoton";
+			model = "NCT6776F";
+			lm_setup_sensors(sc, nct6776f_sensors);
+		} else {
+			model = "W83627DHG";
+			lm_setup_sensors(sc, w83627dhg_sensors);
+		}
 		wb_temp_diode_type(sc, cf_flags);
 		break;
 	case WB_CHIPID_W83637HF:
@@ -1912,6 +2067,7 @@ wb_match(struct lm_softc *sc)
 		lm_setup_sensors(sc, w83792d_sensors);
 		break;
 	case WB_CHIPID_AS99127F:
+		vendor = "ASUS";
 		if (vendid == WB_VENDID_ASUS) {
 			model = "AS99127F";
 			lm_setup_sensors(sc, w83781d_sensors);
@@ -1929,7 

CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:15:26 UTC 2016

Modified Files:
src/share/man/man4: smscmon.4 swsensor.4

Log Message:
Use fixed number of entries in each row of a table.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/smscmon.4
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/swsensor.4

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/man4/smscmon.4
diff -u src/share/man/man4/smscmon.4:1.4 src/share/man/man4/smscmon.4:1.5
--- src/share/man/man4/smscmon.4:1.4	Wed Oct 10 18:06:41 2012
+++ src/share/man/man4/smscmon.4	Wed Jun  1 02:15:26 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: smscmon.4,v 1.4 2012/10/10 18:06:41 njoly Exp $
+.\"	$NetBSD: smscmon.4,v 1.5 2016/06/01 02:15:26 pgoyette Exp $
 .\"
 .\" Copyright (c) 2009 Takahiro Hayashi
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 21, 2010
+.Dd June 1, 2016
 .Dt SMSCMON 4
 .Os
 .Sh NAME
@@ -55,7 +55,7 @@ The chip supports 11 sensor inputs:
 .It Li "+1.8V" Ta "uV DC" Ta "1.8V Supply"
 .It Li "Remote Temp1" Ta "uK" Ta "CPU temperature"
 .It Li "Ambient Temp" Ta "uK" Ta "Local chip temperature"
-.It Li "Remote Temp2" Ta "uK"
+.It Li "Remote Temp2" Ta "uK" Ta ""
 .El
 .Sh SEE ALSO
 .Xr envsys 4 ,

Index: src/share/man/man4/swsensor.4
diff -u src/share/man/man4/swsensor.4:1.12 src/share/man/man4/swsensor.4:1.13
--- src/share/man/man4/swsensor.4:1.12	Mon Aug 27 20:52:40 2012
+++ src/share/man/man4/swsensor.4	Wed Jun  1 02:15:26 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: swsensor.4,v 1.12 2012/08/27 20:52:40 wiz Exp $
+.\"	$NetBSD: swsensor.4,v 1.13 2016/06/01 02:15:26 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation
 .\" 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 August 27, 2012
+.Dd June 1, 2016
 .Dt SWSENSOR 4
 .Os
 .Sh NAME
@@ -96,7 +96,7 @@ Any of the string values from the follow
 .It "Voltage DC"   Ta "Ohms"  Ta "Watts"
 .It "Ampere"   Ta "Watt hour" Ta "Ampere hour"
 .It "Indicator"Ta "Integer"   Ta "Drive"
-.It "Battery capacity" Ta "Battery charge"
+.It "Battery capacity" Ta "Battery charge" Ta ""
 .El
 (Values are case-sensitive, and spaces must be included.)
 .It Li "value"



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:06:54 UTC 2016

Modified Files:
src/share/man/man9: sysmon_pswitch.9

Log Message:
Fix spello.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/sysmon_pswitch.9

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

Modified files:

Index: src/share/man/man9/sysmon_pswitch.9
diff -u src/share/man/man9/sysmon_pswitch.9:1.6 src/share/man/man9/sysmon_pswitch.9:1.7
--- src/share/man/man9/sysmon_pswitch.9:1.6	Tue Jan  6 15:39:54 2015
+++ src/share/man/man9/sysmon_pswitch.9	Wed Jun  1 02:06:54 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: sysmon_pswitch.9,v 1.6 2015/01/06 15:39:54 bouyer Exp $
+.\" $NetBSD: sysmon_pswitch.9,v 1.7 2016/06/01 02:06:54 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -45,7 +45,7 @@
 The machine-independent
 .Nm
 provides a framework for power management.
-The interface has been largely superceded by the
+The interface has been largely superseded by the
 .Xr pmf 9
 framework, but
 .Nm



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:05:10 UTC 2016

Modified Files:
src/share/man/man9: rt_timer.9 scsipi.9 ubc.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/rt_timer.9
cvs rdiff -u -r1.25 -r1.26 src/share/man/man9/scsipi.9
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/ubc.9

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

Modified files:

Index: src/share/man/man9/rt_timer.9
diff -u src/share/man/man9/rt_timer.9:1.13 src/share/man/man9/rt_timer.9:1.14
--- src/share/man/man9/rt_timer.9:1.13	Tue Sep 17 19:58:03 2013
+++ src/share/man/man9/rt_timer.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rt_timer.9,v 1.13 2013/09/17 19:58:03 wiz Exp $
+.\"	$NetBSD: rt_timer.9,v 1.14 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 23, 1998
+.Dd June 1, 2016
 .Dt RT_TIMER 9
 .Os
 .Sh NAME
@@ -129,5 +129,6 @@ interface appeared in
 .Sh AUTHORS
 This interface is roughly based on (but, alas, not compatible with) one
 designed by David Borman of BSDI.
-This implementation is by Kevin Lahey of the Numerical Aerospace
-Simulation Facility, NASA Ames Research Center.
+This implementation is by
+.An Kevin Lahey
+of the Numerical Aerospace Simulation Facility, NASA Ames Research Center.

Index: src/share/man/man9/scsipi.9
diff -u src/share/man/man9/scsipi.9:1.25 src/share/man/man9/scsipi.9:1.26
--- src/share/man/man9/scsipi.9:1.25	Mon Mar 22 18:58:33 2010
+++ src/share/man/man9/scsipi.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsipi.9,v 1.25 2010/03/22 18:58:33 joerg Exp $
+.\"	$NetBSD: scsipi.9,v 1.26 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\"
 .\" Copyright (c) 2001 Manuel Bouyer.
@@ -24,7 +24,7 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd December 20, 2005
+.Dd June 1, 2016
 .Dt SCSIPI 9
 .Os
 .Sh NAME
@@ -596,5 +596,7 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Jason R. Thorpe.
-Manuel Bouyer converted most drivers to the new interface.
+interface was designed and implemented by
+.An Jason R. Thorpe .
+.An Manuel Bouyer
+converted most drivers to the new interface.

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.7 src/share/man/man9/ubc.9:1.8
--- src/share/man/man9/ubc.9:1.7	Tue Jun 14 00:19:20 2011
+++ src/share/man/man9/ubc.9	Wed Jun  1 02:05:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.7 2011/06/14 00:19:20 rmind Exp $
+.\"	$NetBSD: ubc.9,v 1.8 2016/06/01 02:05:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd June 14, 2011
+.Dd June 1, 2016
 .Dt UBC 9
 .Os
 .Sh NAME
@@ -145,7 +145,7 @@ subsystem is implemented within the file
 UBC first appeared in
 .Nx 1.6 .
 .Sh AUTHORS
-Chuck Silvers
+.An Chuck Silvers
 .Aq c...@chuq.com
 designed and implemented the UBC part of UVM, which uses UVM pages
 to cache vnode data rather than the traditional buffer cache buffers.



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:02:11 UTC 2016

Modified Files:
src/share/man/man9: pmc.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pmc.9

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

Modified files:

Index: src/share/man/man9/pmc.9
diff -u src/share/man/man9/pmc.9:1.12 src/share/man/man9/pmc.9:1.13
--- src/share/man/man9/pmc.9:1.12	Wed Feb 22 19:04:38 2012
+++ src/share/man/man9/pmc.9	Wed Jun  1 02:02:11 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pmc.9,v 1.12 2012/02/22 19:04:38 njoly Exp $
+.\" $NetBSD: pmc.9,v 1.13 2016/06/01 02:02:11 pgoyette Exp $
 .\"
 .\" Copyright (c) 2002, 2005 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 14, 2010
+.Dd June 1, 2016
 .Dt PMC 9
 .Os
 .Sh NAME
@@ -253,7 +253,10 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Allen Briggs for Wasabi Systems, Inc.
+interface was designed and implemented by
+.An Allen Briggs
+for Wasabi Systems, Inc.
 Additional input on the
 .Nm
-design was provided by Jason R. Thorpe.
+design was provided by
+.An Jason R. Thorpe .



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 02:00:10 UTC 2016

Modified Files:
src/share/man/man9: pfil.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/pfil.9

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

Modified files:

Index: src/share/man/man9/pfil.9
diff -u src/share/man/man9/pfil.9:1.33 src/share/man/man9/pfil.9:1.34
--- src/share/man/man9/pfil.9:1.33	Thu Aug 22 07:17:11 2013
+++ src/share/man/man9/pfil.9	Wed Jun  1 02:00:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfil.9,v 1.33 2013/08/22 07:17:11 wiz Exp $
+.\"	$NetBSD: pfil.9,v 1.34 2016/06/01 02:00:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 22, 2013
+.Dd June 1, 2016
 .Dt PFIL 9
 .Os
 .Sh NAME
@@ -174,10 +174,17 @@ as well as be less IP-centric.
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Matthew R. Green, with help
-from Darren Reed, Jason R. Thorpe and Charles M. Hannum.
-Darren Reed added support for IPv6 in addition to IPv4.
-Jason R. Thorpe added support for multiple hooks and other clean up.
+interface was designed and implemented by
+.An Matthew R. Green ,
+with help from
+.An Darren Reed ,
+.An Jason R. Thorpe ,
+and
+.An Charles M. Hannum .
+.An Darren Reed
+added support for IPv6 in addition to IPv4.
+.An Jason R. Thorpe
+added support for multiple hooks and other clean up.
 .Sh BUGS
 The current
 .Nm



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:57:31 UTC 2016

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
Use .An for authors.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/bus_space.9

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

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.46 src/share/man/man9/bus_space.9:1.47
--- src/share/man/man9/bus_space.9:1.46	Thu Jul 19 17:48:55 2012
+++ src/share/man/man9/bus_space.9	Wed Jun  1 01:57:31 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.46 2012/07/19 17:48:55 jdf Exp $
+.\" $NetBSD: bus_space.9,v 1.47 2016/06/01 01:57:31 pgoyette Exp $
 .\"
 .\" Copyright (c) 1997 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 6, 2011
+.Dd June 1, 2016
 .Dt BUS_SPACE 9
 .Os
 .Sh NAME
@@ -1994,9 +1994,14 @@ interfaces were designed and implemented
 .Nx
 developer
 community.
-Primary contributors and implementors were Chris Demetriou,
-Jason Thorpe, and Charles Hannum, but the rest of the
+Primary contributors and implementors were
+.An Chris Demetriou ,
+.An Jason Thorpe,
+and
+.An Charles Hannum ,
+but the rest of the
 .Nx
 developers and the user community played a significant role in development.
 .Pp
-Chris Demetriou wrote this manual page.
+,An Chris Demetriou
+wrote this manual page.



CVS commit: src/share/man/man9

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:55:18 UTC 2016

Modified Files:
src/share/man/man9: bus_dma.9

Log Message:
Use .An for author names.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/share/man/man9/bus_dma.9

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

Modified files:

Index: src/share/man/man9/bus_dma.9
diff -u src/share/man/man9/bus_dma.9:1.59 src/share/man/man9/bus_dma.9:1.60
--- src/share/man/man9/bus_dma.9:1.59	Wed Oct 30 04:16:44 2013
+++ src/share/man/man9/bus_dma.9	Wed Jun  1 01:55:18 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_dma.9,v 1.59 2013/10/30 04:16:44 msaitoh Exp $
+.\" $NetBSD: bus_dma.9,v 1.60 2016/06/01 01:55:18 pgoyette Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 8, 2011
+.Dd June 1, 2016
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -841,9 +841,17 @@ interface appeared in
 .Sh AUTHORS
 The
 .Nm
-interface was designed and implemented by Jason R. Thorpe of the
+interface was designed and implemented by
+.An Jason R. Thorpe
+of the
 Numerical Aerospace Simulation Facility, NASA Ames Research Center.
 Additional input on the
 .Nm
-design was provided by Chris Demetriou, Charles Hannum, Ross Harvey,
-Matthew Jacob, Jonathan Stone, and Matt Thomas.
+design was provided by
+.An Chris Demetriou ,
+.An Charles Hannum ,
+.An Ross Harvey ,
+.An Matthew Jacob ,
+.An Jonathan Stone ,
+and
+.An Matt Thomas.



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 01:54:06 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc

Log Message:
zero pad syscall.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc

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/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.3 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.4
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.3	Tue May 31 17:35:11 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Tue May 31 21:54:06 2016
@@ -103,7 +103,7 @@ uptr internal_mmap(void *addr, uptr leng
 int fd, u64 offset) {
 #if SANITIZER_NETBSD || SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS
   return internal_syscall(SYSCALL(mmap), (uptr)addr, length, prot, flags, fd,
-  offset);
+  offset, 0);
 #else
   return internal_syscall(SYSCALL(mmap2), addr, length, prot, flags, fd,
   offset);



CVS commit: src/share/man/man8

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:52:19 UTC 2016

Modified Files:
src/share/man/man8: compat_ibcs2.8

Log Message:
Move the .Pp to after the .El

from PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man8/compat_ibcs2.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/compat_ibcs2.8
diff -u src/share/man/man8/compat_ibcs2.8:1.7 src/share/man/man8/compat_ibcs2.8:1.8
--- src/share/man/man8/compat_ibcs2.8:1.7	Mon Nov 21 15:11:45 2011
+++ src/share/man/man8/compat_ibcs2.8	Wed Jun  1 01:52:19 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: compat_ibcs2.8,v 1.7 2011/11/21 15:11:45 wiz Exp $
+.\"	$NetBSD: compat_ibcs2.8,v 1.8 2016/06/01 01:52:19 pgoyette Exp $
 .\"
 .\" Copyright (c) 1998 Scott Bartram
 .\" Copyright (c) 1995 Frank van der Linden
@@ -32,7 +32,7 @@
 .\"
 .\" Based on compat_linux.8
 .\"
-.Dd February 8, 1998
+.Dd June 1, 2016
 .Dt COMPAT_IBCS2 8
 .Os
 .Sh NAME
@@ -159,8 +159,8 @@ following files on your system:
 .Pa /emul/ibcs2/usr/lib/libndbm.so
 .Pa /emul/ibcs2/usr/lib/libsocket.so.1
 .Ed
-.Pp
 .El
+.Pp
 If you don't have access to a SCO system, you will need to get the
 extra files you need from a SCO distribution.
 As of January 1998, SCO



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:46:51 UTC 2016

Modified Files:
src/share/man/man4: ss.4

Log Message:
Use .An for author names.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/ss.4

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/man4/ss.4
diff -u src/share/man/man4/ss.4:1.4 src/share/man/man4/ss.4:1.5
--- src/share/man/man4/ss.4:1.4	Thu Mar 11 21:24:32 2004
+++ src/share/man/man4/ss.4	Wed Jun  1 01:46:51 2016
@@ -1,6 +1,6 @@
-.\"	$NetBSD: ss.4,v 1.4 2004/03/11 21:24:32 wiz Exp $
+.\"	$NetBSD: ss.4,v 1.5 2016/06/01 01:46:51 pgoyette Exp $
 .\"
-.Dd March 11, 2004
+.Dd June 1, 2016
 .Dt SS 4
 .Os
 .Sh NAME
@@ -37,8 +37,8 @@ operations only.
 .Xr scsi 4 ,
 .Xr uk 4
 .Sh AUTHORS
-Kenneth Stailey,
-Joachim Koenig
+.An Kenneth Stailey ,
+.An Joachim Koenig
 .Sh BUGS
 Only a limited number of
 .Tn HP Scanjet



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:44:22 UTC 2016

Modified Files:
src/share/man/man4: sony.4

Log Message:
Use .An for author names.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/sony.4

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/man4/sony.4
diff -u src/share/man/man4/sony.4:1.2 src/share/man/man4/sony.4:1.3
--- src/share/man/man4/sony.4:1.2	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/sony.4	Wed Jun  1 01:44:22 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: sony.4,v 1.2 2008/04/30 13:10:54 martin Exp $
+.\" $NetBSD: sony.4,v 1.3 2016/06/01 01:44:22 pgoyette Exp $
 .\"
 .\" Copyright (c) 2005 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 December 23, 2007
+.Dd June 1, 2016
 .Dt SONY 4
 .Os
 .Sh NAME
@@ -109,8 +109,10 @@ driver
 appeared in
 .Nx 4.0 .
 .Sh AUTHORS
-Sami Kantoluoto for the original driver and manual information.
-Christos Zoulas for cleaning up the driver and this manual page.
+.An Sami Kantoluoto
+for the original driver and manual information.
+.An Christos Zoulas
+for cleaning up the driver and this manual page.
 .Sh BUGS
 .Bl -bullet
 .It



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:41:27 UTC 2016

Modified Files:
src/share/man/man4: nsclpcsio.4

Log Message:
Remove trailing space.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/nsclpcsio.4

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/man4/nsclpcsio.4
diff -u src/share/man/man4/nsclpcsio.4:1.3 src/share/man/man4/nsclpcsio.4:1.4
--- src/share/man/man4/nsclpcsio.4:1.3	Mon May 18 12:00:46 2009
+++ src/share/man/man4/nsclpcsio.4	Wed Jun  1 01:41:27 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: nsclpcsio.4,v 1.3 2009/05/18 12:00:46 wiz Exp $
+.\" $NetBSD: nsclpcsio.4,v 1.4 2016/06/01 01:41:27 pgoyette Exp $
 .\"
 .Dd November 9, 2007
 .Dt NSCLPCSIO 4
@@ -12,7 +12,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the 
+driver provides support for the
 .Tn National Semiconductor
 PC87366 LPC Super I/O.
 The Super I/O incorporates several logical



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:39:52 UTC 2016

Modified Files:
src/share/man/man4: mc.4

Log Message:
Use .An markup for author names.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/mc.4

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/man4/mc.4
diff -u src/share/man/man4/mc.4:1.2 src/share/man/man4/mc.4:1.3
--- src/share/man/man4/mc.4:1.2	Sat Sep 13 00:50:57 2008
+++ src/share/man/man4/mc.4	Wed Jun  1 01:39:52 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mc.4,v 1.2 2008/09/13 00:50:57 reed Exp $
+.\"	$NetBSD: mc.4,v 1.3 2016/06/01 01:39:52 pgoyette Exp $
 .\"
 .\" Copyright (c) 1997 David Huang 
 .\" All rights reserved.
@@ -22,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 13, 1997
+.Dd June 1, 2016
 .Dt MC 4
 .Os
 .Sh NAME
@@ -81,9 +81,12 @@ interface first appeared in
 .Sh AUTHORS
 The
 .Nm
-Ethernet driver was written by Dave Huang
+Ethernet driver was written by
+.An Dave Huang
 .Aq k...@bga.com .
-The man page was written by Thomas Klausner
+The man page was written by
+.An Thomas Klausner
 .Aq w...@netbsd.org
-and Michael Wolfson
+and
+.An Michael Wolfson
 .Aq m...@netbsd.org .



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:34:43 UTC 2016

Modified Files:
src/share/man/man4: cgd.4

Log Message:
Remove trailing space.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/cgd.4

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/man4/cgd.4
diff -u src/share/man/man4/cgd.4:1.18 src/share/man/man4/cgd.4:1.19
--- src/share/man/man4/cgd.4:1.18	Sun Dec  1 00:17:14 2013
+++ src/share/man/man4/cgd.4	Wed Jun  1 01:34:43 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: cgd.4,v 1.18 2013/12/01 00:17:14 christos Exp $
+.\" $NetBSD: cgd.4,v 1.19 2016/06/01 01:34:43 pgoyette Exp $
 .\"
 .\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -50,7 +50,7 @@ To do this, add a line similar to:
 pseudo-device   cgd # cryptographic disk driver
 .Ed
 .Pp
-The 
+The
 .Nm
 devices are allocated as needed.
 .Ss Encryption Algorithms



CVS commit: src/share/man/man4

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:33:10 UTC 2016

Modified Files:
src/share/man/man4: aac.4

Log Message:
Fix formatting.  From PR misc/49516


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/aac.4

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/man4/aac.4
diff -u src/share/man/man4/aac.4:1.14 src/share/man/man4/aac.4:1.15
--- src/share/man/man4/aac.4:1.14	Sat Feb 19 10:54:31 2011
+++ src/share/man/man4/aac.4	Wed Jun  1 01:33:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: aac.4,v 1.14 2011/02/19 10:54:31 jmcneill Exp $
+.\"	$NetBSD: aac.4,v 1.15 2016/06/01 01:33:10 pgoyette Exp $
 .\"
 .\" Copyright (c) 2000 Scott Long
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from FreeBSD: aac.4,v 1.18 2001/09/27 21:52:42 scottl Exp
-.Dd February 19, 2011
+.Dd June 1, 2016
 .Dt AAC 4
 .Os
 .Sh NAME
@@ -76,8 +76,8 @@ HP NetRAID 4M
 HP ML110 G2 (Adaptec SATA RAID 2610SA)
 .It
 IBM ServeRAID 8k
-.Pp
 .El
+.Pp
 Access to RAID containers is available via the
 .Nm ld
 device driver.



CVS commit: src/share/man/man3

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:31:11 UTC 2016

Modified Files:
src/share/man/man3: assert.3

Log Message:
Fix AT version reference.  From PR misc/49519


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man3/assert.3

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/man3/assert.3
diff -u src/share/man/man3/assert.3:1.13 src/share/man/man3/assert.3:1.14
--- src/share/man/man3/assert.3:1.13	Tue Jan 23 20:32:05 2007
+++ src/share/man/man3/assert.3	Wed Jun  1 01:31:11 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: assert.3,v 1.13 2007/01/23 20:32:05 wiz Exp $
+.\"	$NetBSD: assert.3,v 1.14 2016/06/01 01:31:11 pgoyette Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)assert.3	8.1 (Berkeley) 6/9/93
 .\"
-.Dd January 22, 2007
+.Dd June 1, 2016
 .Dt ASSERT 3
 .Os
 .Sh NAME
@@ -92,7 +92,7 @@ macro conforms to
 A
 .Nm
 macro appeared in
-.At v6 .
+.At v7 .
 .Pp
 Information on the name of the enclosing function appeared in
 .St -isoC-99 .



CVS commit: src/tests/lib/libc/stdlib

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  1 01:12:03 UTC 2016

Modified Files:
src/tests/lib/libc/stdlib: t_strtol.c

Log Message:
Fix testing of returned entptr, and fix three affected tests.

>From kamil@ via PR lib/49632


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdlib/t_strtol.c

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

Modified files:

Index: src/tests/lib/libc/stdlib/t_strtol.c
diff -u src/tests/lib/libc/stdlib/t_strtol.c:1.5 src/tests/lib/libc/stdlib/t_strtol.c:1.6
--- src/tests/lib/libc/stdlib/t_strtol.c:1.5	Tue Jun 14 02:45:58 2011
+++ src/tests/lib/libc/stdlib/t_strtol.c	Wed Jun  1 01:12:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_strtol.c,v 1.5 2011/06/14 02:45:58 jruoho Exp $ */
+/*	$NetBSD: t_strtol.c,v 1.6 2016/06/01 01:12:02 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_strtol.c,v 1.5 2011/06/14 02:45:58 jruoho Exp $");
+__RCSID("$NetBSD: t_strtol.c,v 1.6 2016/06/01 01:12:02 pgoyette Exp $");
 
 #include 
 #include 
@@ -59,7 +59,8 @@ check(struct test *t, long int li, long 
 		atf_tc_fail_nonfatal("strtoll(%s, NULL, %d) failed "
 		"(rv = %lld)", t->str, t->base, lli);
 
-	if (t->end != NULL && strcmp(t->end, end) != 0)
+	if ((t->end != NULL && strcmp(t->end, end) != 0) ||
+	(t->end == NULL && *end != '\0'))
 		atf_tc_fail_nonfatal("invalid end pointer ('%s') from "
 		"strtol(%s, , %d)", end, t->str, t->base);
 }
@@ -89,8 +90,8 @@ ATF_TC_BODY(strtol_base, tc)
 		{ "12579781",			 123456789, 14, NULL	},
 		{ "AC89BC9",			 123456789, 15, NULL	},
 		{ "75BCD15",			 123456789, 16, NULL	},
-		{ "123456789",			342391,  8, NULL	},
-		{ "0123456789",			342391,  0, NULL	},
+		{ "1234567",			342391,  8, NULL	},
+		{ "01234567",			342391,  0, NULL	},
 		{ "0123456789",			 123456789, 10, NULL	},
 		{ "0x75bcd15",		 123456789,  0, NULL	},
 	};
@@ -121,7 +122,7 @@ ATF_TC_BODY(strtol_case, tc)
 		{ "abcd",	0xabcd, 16, NULL	},
 		{ " dcba",	0xdcba, 16, NULL	},
 		{ "abcd dcba",	0xabcd, 16, " dcba"	},
-		{ "abc0x123",	0xabc0, 16, NULL	},
+		{ "abc0x123",	0xabc0, 16, "x123"	},
 		{ "abcd\0x123",	0xabcd, 16, "\0x123"	},
 		{ "ABCD",	0xabcd, 16, NULL	},
 		{ "aBcD",	0xabcd, 16, NULL	},



CVS commit: src/external/gpl3/gcc/lib/libasan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 00:54:20 UTC 2016

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
more flags.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/libasan/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/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.13 src/external/gpl3/gcc/lib/libasan/Makefile:1.14
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.13	Tue May 31 17:34:13 2016
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Tue May 31 20:54:20 2016
@@ -89,6 +89,9 @@ CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MAC
 LIBDPLIBS+=stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
 COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
+COPTS+=-fno-builtin -fno-exceptions -fno-rtti-funwind-tables
+# Can't profile without it`
+#-fomit-frame-pointer
 
 .if ${MACHINE_ARCH} == "vax"
 COPTS.asan_allocator2.cc += -O1



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/asan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 00:53:35 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/asan: asan_linux.cc

Log Message:
Ignore the first dlpi entry which is ourselves on NetBSD instead of having
a NULL name as on linux.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc

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/gcc/dist/libsanitizer/asan/asan_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.8 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.9
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.8	Tue May 31 16:47:25 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc	Tue May 31 20:53:35 2016
@@ -95,6 +95,15 @@ static int FindFirstDSOCallback(struct d
   if (internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
 return 0;
 
+#if SANITIZER_NETBSD
+  // Ignore first entry (the main program)
+  char **p = (char **)data;
+  if (*p == NULL) {
+*p = (char *)-1;
+return 0;
+  }
+#endif
+
   *(const char **)data = info->dlpi_name;
   return 1;
 }



CVS commit: othersrc/external/bsd/tiger/tiger

2016-05-31 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Jun  1 00:50:21 UTC 2016

Added Files:
othersrc/external/bsd/tiger/tiger: 1.expected 1.in 2.expected 2.in
3.expected 3.in 4.expected 4.in 5.expected 5.in 6.expected 6.in
Testspec

Log Message:
Add atf-based tests for tiger, generated using human2atf.

Running the tests produced the following output:

[17:48:18] agc@netbsd-002 ...tests/usr.bin/tiger [3829] > sudo make test
*** WARNING: make test is experimental
***
*** Using this test does not preclude you from running the tests
*** installed in /usr/tests.  This test run may raise false
*** positives and/or false negatives.

Tests root: /usr/tests/usr.bin/tiger

t_tiger (1/1): 2 test cases
tiger_testset_1_tiger1: [0.028527s] Passed.
tiger_testset_2_tiger2: [0.031147s] Passed.
[0.063389s]

Summary for 1 test programs:
2 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.

*** The verbatim output of atf-run has been saved to 
/usr/tests/usr.bin/tiger/atf-run.log
*** Once again, note that make test is unsupported.
[17:48:21] agc@netbsd-002 ...tests/usr.bin/tiger [3830] >


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/tiger/tiger/1.expected \
othersrc/external/bsd/tiger/tiger/1.in \
othersrc/external/bsd/tiger/tiger/2.expected \
othersrc/external/bsd/tiger/tiger/2.in \
othersrc/external/bsd/tiger/tiger/3.expected \
othersrc/external/bsd/tiger/tiger/3.in \
othersrc/external/bsd/tiger/tiger/4.expected \
othersrc/external/bsd/tiger/tiger/4.in \
othersrc/external/bsd/tiger/tiger/5.expected \
othersrc/external/bsd/tiger/tiger/5.in \
othersrc/external/bsd/tiger/tiger/6.expected \
othersrc/external/bsd/tiger/tiger/6.in \
othersrc/external/bsd/tiger/tiger/Testspec

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

Added files:

Index: othersrc/external/bsd/tiger/tiger/1.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/1.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/1.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3
Index: othersrc/external/bsd/tiger/tiger/2.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/2.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/2.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+6d12a41e72e644f017b6f0e2f7b44c6285f06dd5d2c5b075
Index: othersrc/external/bsd/tiger/tiger/2.in
diff -u /dev/null othersrc/external/bsd/tiger/tiger/2.in:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/2.in	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+The quick brown fox jumps over the lazy dog
\ No newline at end of file
Index: othersrc/external/bsd/tiger/tiger/3.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/3.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/3.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+a8f04b0f7201a0d728101c9d26525b31764a3493fcd8458f
Index: othersrc/external/bsd/tiger/tiger/3.in
diff -u /dev/null othersrc/external/bsd/tiger/tiger/3.in:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/3.in	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+The quick brown fox jumps over the lazy cog
\ No newline at end of file
Index: othersrc/external/bsd/tiger/tiger/4.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/4.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/4.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+4441be75f6018773c206c22745374b924aa8313fef919f41
Index: othersrc/external/bsd/tiger/tiger/5.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/5.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/5.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+976abff8062a2e9dcea3a1ace966ed9c19cb85558b4976d8
Index: othersrc/external/bsd/tiger/tiger/5.in
diff -u /dev/null othersrc/external/bsd/tiger/tiger/5.in:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/5.in	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+The quick brown fox jumps over the lazy dog
\ No newline at end of file
Index: othersrc/external/bsd/tiger/tiger/6.expected
diff -u /dev/null othersrc/external/bsd/tiger/tiger/6.expected:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ othersrc/external/bsd/tiger/tiger/6.expected	Wed Jun  1 00:50:21 2016
@@ -0,0 +1 @@
+09c11330283a27efb51930aa7dc1ec624ff738a8d9bdd3df
Index: othersrc/external/bsd/tiger/tiger/6.in
diff -u /dev/null othersrc/external/bsd/tiger/tiger/6.in:1.1
--- /dev/null	Wed Jun  1 00:50:21 2016
+++ 

CVS commit: src/sys/uvm

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 00:49:45 UTC 2016

Modified Files:
src/sys/uvm: uvm_map.c

Log Message:
Avoid locking issues when copying out requires taking a fault and we are
finding out our own maps, by allocating a buffer and copying out after
we collected the information.


To generate a diff of this commit:
cvs rdiff -u -r1.337 -r1.338 src/sys/uvm/uvm_map.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/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.337 src/sys/uvm/uvm_map.c:1.338
--- src/sys/uvm/uvm_map.c:1.337	Wed May 25 13:43:58 2016
+++ src/sys/uvm/uvm_map.c	Tue May 31 20:49:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.337 2016/05/25 17:43:58 christos Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.338 2016/06/01 00:49:44 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.337 2016/05/25 17:43:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.338 2016/06/01 00:49:44 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -4877,14 +4877,18 @@ fill_vmentries(struct lwp *l, pid_t pid,
 {
 	int error;
 	struct proc *p;
-	struct kinfo_vmentry vme;
+	struct kinfo_vmentry *vme;
 	struct vmspace *vm;
 	struct vm_map *map;
 	struct vm_map_entry *entry;
 	char *dp;
-	size_t count;
+	size_t count, vmesize;
 
+	vme = NULL;
+	vmesize = *oldlenp;
 	count = 0;
+	if (oldp && *oldlenp > 1024 * 1024)
+		return E2BIG;
 
 	if ((error = proc_find_locked(l, , pid)) != 0)
 		return error;
@@ -4896,31 +4900,44 @@ fill_vmentries(struct lwp *l, pid_t pid,
 	vm_map_lock_read(map);
 
 	dp = oldp;
+	if (oldp)
+		vme = kmem_alloc(vmesize, KM_SLEEP);
 	for (entry = map->header.next; entry != >header;
 	entry = entry->next) {
 		if (oldp && (dp - (char *)oldp) < *oldlenp + elem_size) {
-			error = fill_vmentry(l, p, , map, entry);
+			error = fill_vmentry(l, p, [count], map, entry);
 			if (error)
-break;
-			error = sysctl_copyout(l, , dp,
-			min(elem_size, sizeof(vme)));
-			if (error)
-break;
+goto out;
 			dp += elem_size;
 		}
 		count++;
 	}
 	vm_map_unlock_read(map);
 	uvmspace_free(vm);
+
 out:
 	if (pid != -1)
 		mutex_exit(p->p_lock);
 	if (error == 0) {
+		const u_int esize = min(sizeof(*vme), elem_size);
+		dp = oldp;
+		for (size_t i = 0; i < count; i++) {
+			if (oldp && (dp - (char *)oldp) < *oldlenp + elem_size)
+			{
+error = sysctl_copyout(l, [i], dp, esize);
+if (error)
+	break;
+dp += elem_size;
+			} else
+break;
+		}
 		count *= elem_size;
 		if (oldp != NULL && *oldlenp < count)
 			error = ENOSPC;
 		*oldlenp = count;
 	}
+	if (vme)
+		kmem_free(vme, vmesize);
 	return error;
 }
 



CVS commit: src/usr.bin/kdump

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 00:47:16 UTC 2016

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

Log Message:
Symbolic printing for mmap


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/usr.bin/kdump/kdump.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/kdump/kdump.c
diff -u src/usr.bin/kdump/kdump.c:1.123 src/usr.bin/kdump/kdump.c:1.124
--- src/usr.bin/kdump/kdump.c:1.123	Sun Mar 27 17:51:20 2016
+++ src/usr.bin/kdump/kdump.c	Tue May 31 20:47:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kdump.c,v 1.123 2016/03/27 21:51:20 alnsn Exp $	*/
+/*	$NetBSD: kdump.c,v 1.124 2016/06/01 00:47:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)kdump.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: kdump.c,v 1.123 2016/03/27 21:51:20 alnsn Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.124 2016/06/01 00:47:16 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -48,6 +48,7 @@ __RCSID("$NetBSD: kdump.c,v 1.123 2016/0
 #define _KMEMUSER/* To get the pseudo errors defined */
 #include 
 #undef _KMEMUSER
+#include 
 #include 
 #include 
 #include 
@@ -598,7 +599,43 @@ ktrsyscall(struct ktr_syscall *ktr)
 			ap += 2;
 			argcount -= 2;
 			c = ',';
-
+		} else if (strcmp(sys_name, "mmap") == 0 && argcount >= 6) {
+			char buf[1024];
+			putchar('(');
+			output_long((long)ap[0], !(decimal || small(ap[0])));
+			c = ',';
+			putchar(c);
+			output_long((long)ap[1], !(decimal || small(ap[1])));
+			putchar(c);
+			if (ap[2] == PROT_NONE) {
+			fputs("PROT_NONE", stdout);
+			} else {
+			const char *s = "";
+			c = 0;
+			if (ap[2] & PROT_READ) {
+fputs("PROT_READ", stdout);
+s = "|";
+ap[2] &= ~PROT_READ;
+			}
+			if (ap[2] & PROT_WRITE) {
+printf("%sPROT_WRITE", s);
+ap[2] &= ~PROT_WRITE;
+s = "|";
+			}
+			if (ap[2] & PROT_EXEC) {
+printf("%sPROT_EXEC", s);
+ap[2] &= ~PROT_EXEC;
+s = "|";
+			}
+			if (ap[2]) {
+printf("%s%#lx", s, (long)ap[2]);
+			}
+			}
+			snprintb(buf, sizeof(buf), MAP_FMT, ap[3]);
+			printf(",%s", buf);
+			ap += 4;
+			argcount -= 4;
+			c = ',';
 		} else if (strcmp(sys_name, "ptrace") == 0 && argcount >= 1) {
 			putchar('(');
 			if (strcmp(emul->name, "linux") == 0 ||



CVS commit: src/sys/sys

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  1 00:46:44 UTC 2016

Modified Files:
src/sys/sys: mman.h

Log Message:
Add more alignments


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/sys/mman.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/sys/mman.h
diff -u src/sys/sys/mman.h:1.49 src/sys/sys/mman.h:1.50
--- src/sys/sys/mman.h:1.49	Sat Mar 19 14:44:10 2016
+++ src/sys/sys/mman.h	Tue May 31 20:46:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mman.h,v 1.49 2016/03/19 18:44:10 christos Exp $	*/
+/*	$NetBSD: mman.h,v 1.50 2016/06/01 00:46:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -129,12 +129,19 @@ F\14\1\
 :\1ANONYMOUS\0\
 b\15STACK\0\
 F\30\010\
+:\000ALIGN=NONE\0\
 :\020ALIGN=64KB\0\
+:\024ALIGN=1MB\0\
 :\030ALIGN=16MB\0\
+:\034ALIGN=256MB\0\
 :\040ALIGN=4GB\0\
+:\044ALIGN=64GB\0\
 :\050ALIGN=1TB\0\
+:\054ALIGN=16TB\0\
 :\060ALIGN=256TB\0\
+:\064ALIGN=4PB\0\
 :\070ALIGN=64PB\0\
+:\074ALIGN=256PB\0\
 "
 #endif
 



CVS commit: src/doc

2016-05-31 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Jun  1 00:12:27 UTC 2016

Modified Files:
src/doc: CHANGES

Log Message:
Note update of tzdata to 2016d:

Import tzdata2016d from 
ftp://ftp.iana.org/tz/releases/tzdata2016d.tar.gz

Summary of changes in tzdata2016d (2016-04-17 22:50:29 -0700):
  * America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
  * Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
  * New zone Asia/Tomsk, split off from Asia/Novosibirsk.
  * New zone Europe/Kirov, split off from Europe/Volgograd.
  * Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00.
  * Many corrections to historical time in Kazakhstan from 1991
through 2005.
  * Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone 
references).

Summary of changes in tzdata2016c (2016-03-23 00:51:27 -0700):
  * Azerbaijan no longer observes DST.
  * Chile reverts from permanent to seasonal DST.
  * Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31.
  * Several updates and URLs for historical and proposed Russian 
changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2166 -r1.2167 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.2166 src/doc/CHANGES:1.2167
--- src/doc/CHANGES:1.2166	Thu May 26 16:55:08 2016
+++ src/doc/CHANGES	Wed Jun  1 00:12:27 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2166 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2167 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -310,3 +310,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 		the kernel image on amd64 and i386. [maxv 20160515]
 	arm: Add support for i.MX7 SoC. [ryo 20160517]
 	bind: Import version 9.10.4-P1. [christos 20160526]
+	zoneinfo: Import tzdata2016d. [agc 20160531]



CVS commit: src/doc

2016-05-31 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Jun  1 00:11:09 UTC 2016

Modified Files:
src/doc: 3RDPARTY

Log Message:
Note update of tzdata to 2016d

Import tzdata2016d from 
ftp://ftp.iana.org/tz/releases/tzdata2016d.tar.gz

Summary of changes in tzdata2016d (2016-04-17 22:50:29 -0700):
  * America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
  * Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
  * New zone Asia/Tomsk, split off from Asia/Novosibirsk.
  * New zone Europe/Kirov, split off from Europe/Volgograd.
  * Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00.
  * Many corrections to historical time in Kazakhstan from 1991
through 2005.
  * Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone 
references).

Summary of changes in tzdata2016c (2016-03-23 00:51:27 -0700):
  * Azerbaijan no longer observes DST.
  * Chile reverts from permanent to seasonal DST.
  * Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31.
  * Several updates and URLs for historical and proposed Russian 
changes.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1333 src/doc/3RDPARTY:1.1334
--- src/doc/3RDPARTY:1.1333	Sun May 29 22:41:54 2016
+++ src/doc/3RDPARTY	Wed Jun  1 00:11:08 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1333 2016/05/29 22:41:54 alnsn Exp $
+#	$NetBSD: 3RDPARTY,v 1.1334 2016/06/01 00:11:08 agc Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1382,8 +1382,8 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2016b / tzdata2016b
-Current Vers:	tzcode2016b / tzdata2016b
+Version:	tzcode2016b / tzdata2016d
+Current Vers:	tzcode2016b / tzdata2016d
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/



CVS commit: src/external/public-domain/tz

2016-05-31 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Jun  1 00:02:12 UTC 2016

Modified Files:
src/external/public-domain/tz: tzdata2netbsd

Log Message:
Add an extra set in the instructions (to make sure that you have the
public key the data was signed with)

Take the EDITOR variable from the environment and use that, defaulting to vi,
rather than just hardcoding vi.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/tz/tzdata2netbsd

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

Modified files:

Index: src/external/public-domain/tz/tzdata2netbsd
diff -u src/external/public-domain/tz/tzdata2netbsd:1.8 src/external/public-domain/tz/tzdata2netbsd:1.9
--- src/external/public-domain/tz/tzdata2netbsd:1.8	Tue Mar 15 17:33:14 2016
+++ src/external/public-domain/tz/tzdata2netbsd	Wed Jun  1 00:02:12 2016
@@ -1,20 +1,22 @@
-# $NetBSD: tzdata2netbsd,v 1.8 2016/03/15 17:33:14 christos Exp $
+# $NetBSD: tzdata2netbsd,v 1.9 2016/06/01 00:02:12 agc Exp $
 
 # For use by NetBSD developers when updating to new versions of tzdata.
 #
 # 0. Be in an up-to-date checkout of src/external/public-domain/tz
 #from NetBSD-current.
 # 1. Edit OLDVER and NEWVER below.
-# 2. Run this script.  You will be prompted for confirmation before
+# 2. Make sure that you have Paul Eggert's 4K RSA public key in your
+#keyring (62AA7E34, egg...@cs.ucla.edu)
+# 3. Run this script.  You will be prompted for confirmation before
 #anything major (such as a cvs operation).
-# 3. If something fails, abort the script and fix it.
-# 4. Re-run this script until you are happy.  It's designed to
+# 4. If something fails, abort the script and fix it.
+# 5. Re-run this script until you are happy.  It's designed to
 #be re-run over and over, and later runs will try not to
 #redo non-trivial work done by earlier runs.
 #
 
-OLDVER=2015f
-NEWVER=2016b
+OLDVER=2016b
+NEWVER=2016d
 
 # Uppercase variants of OLDVER and NEWVER
 OLDVER_UC="$( echo "${OLDVER}" | tr '[a-z]' '[A-Z]' )"
@@ -49,6 +51,8 @@ MERGSMSGFILE="${WORKDIR}/merge.msg"
 MERGEDONEFILE="${WORKDIR}/merge.done"
 COMMITMERGEDONEFILE="${WORKDIR}/commitmerge.done"
 
+EDITOR=${EDITOR:-vi}
+
 DOIT()
 {
 	local really_do_it=false
@@ -266,7 +270,7 @@ editimportmsg()
 	fi
 	# Pass both IMPORTMSGFILE and NEWSFILE to the editor, so that the
 	# user can easily consult NEWSFILE while editing IMPORTMSGFILE.
-	vi "${IMPORTMSGFILE}" "${NEWSFILE}"
+	${EDITOR} "${IMPORTMSGFILE}" "${NEWSFILE}"
 }
 
 cvsimport()



CVS import: src/external/public-domain/tz/dist

2016-05-31 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Jun  1 00:03:15 UTC 2016

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv8673

Log Message:
Import tzdata2016d from ftp://ftp.iana.org/tz/releases/tzdata2016d.tar.gz

Summary of changes in tzdata2016d (2016-04-17 22:50:29 -0700):
  * America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
  * Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
  * New zone Asia/Tomsk, split off from Asia/Novosibirsk.
  * New zone Europe/Kirov, split off from Europe/Volgograd.
  * Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00.
  * Many corrections to historical time in Kazakhstan from 1991
through 2005.
  * Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone references).

Summary of changes in tzdata2016c (2016-03-23 00:51:27 -0700):
  * Azerbaijan no longer observes DST.
  * Chile reverts from permanent to seasonal DST.
  * Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31.
  * Several updates and URLs for historical and proposed Russian changes.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2016D

U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/Theory
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/pacificnew
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/systemv
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/yearistype.sh
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl

No conflicts created by this import



CVS commit: src/share/misc

2016-05-31 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Tue May 31 23:15:05 UTC 2016

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

Log Message:
PR/51205 - Nikolai Lifanov -- add EAPOL, PEAP, and RSN


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

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.165 src/share/misc/acronyms.comp:1.166
--- src/share/misc/acronyms.comp:1.165	Sun May 15 23:54:19 2016
+++ src/share/misc/acronyms.comp	Tue May 31 23:15:05 2016
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.165 2016/05/15 23:54:19 jnemeth Exp $
+$NetBSD: acronyms.comp,v 1.166 2016/05/31 23:15:05 jnemeth Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -377,6 +377,7 @@ EABI	embedded-application binary interfa
 EAI	Email Address Internationalization
 EAI	Enterprise Application Integration
 EAP	Extensible Authentication Protocol
+EAPOL	EAP over Lan
 EBCDIC	Extended Binary Coded Decimal Interchange Code
 EBR	extended boot record
 EC	elliptical curve
@@ -919,6 +920,7 @@ PDP	page {descriptor,directory} page
 PDS	product data sheet
 PDU	protocol data unit
 PE	protection enable
+PEAP	Protected EAP
 PECI	platform environment control interface
 PEP	protocol extension protocol
 PER	packed encoding rules
@@ -1062,6 +1064,7 @@ RR	round robin
 RS	relay station
 RSA	Rivest, Shamir, [and] Adleman
 RSIP	Realm Specific IP
+RSN	Robust Secure Network
 RSS	really simple syndication
 RSS	residual sum of squares
 RT	real time



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 21:35:11 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc
Added Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_procmaps_netbsd.cc
Removed Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_netbsd.cc

Log Message:
- hack BlockingMutex
- add NetBSD procmaps
- remove old unused source


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_netbsd.cc
cvs rdiff -u -r0 -r1.1 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc

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/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.2 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.3
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.2	Tue May 31 16:47:25 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Tue May 31 17:35:11 2016
@@ -420,7 +420,6 @@ void GetThreadStackAndTls(bool main, upt
 }
 #endif  // SANITIZER_GO
 
-#if !SANITIZER_NETBSD
 enum MutexState {
   MtxUnlocked = 0,
   MtxLocked = 1,
@@ -442,6 +441,8 @@ void BlockingMutex::Lock() {
   while (atomic_exchange(m, MtxSleeping, memory_order_acquire) != MtxUnlocked) {
 #if SANITIZER_FREEBSD
 _umtx_op(m, UMTX_OP_WAIT_UINT, MtxSleeping, 0, 0);
+#elif SANITIZER_NETBSD
+sched_yield();	// XXX:
 #else
 internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAIT, MtxSleeping, 0, 0, 0);
 #endif
@@ -455,6 +456,8 @@ void BlockingMutex::Unlock() {
   if (v == MtxSleeping) {
 #if SANITIZER_FREEBSD
 _umtx_op(m, UMTX_OP_WAKE, 1, 0, 0);
+#elif SANITIZER_NETBSD
+// XXX:
 #else
 internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAKE, 1, 0, 0, 0);
 #endif
@@ -465,7 +468,6 @@ void BlockingMutex::CheckLocked() {
   atomic_uint32_t *m = reinterpret_cast(_storage_);
   CHECK_NE(MtxUnlocked, atomic_load(m, memory_order_relaxed));
 }
-#endif // !SANITIZER_NETBSD
 
 // - sanitizer_linux.h
 // The actual size of this structure is specified by d_reclen.

Added files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc
diff -u /dev/null src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc:1.1
--- /dev/null	Tue May 31 17:35:12 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc	Tue May 31 17:35:11 2016
@@ -0,0 +1,78 @@
+//===-- sanitizer_procmaps_freebsd.cc -===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+//
+// Information about the process mappings (FreeBSD-specific parts).
+//===--===//
+
+#include "sanitizer_platform.h"
+#if SANITIZER_NETBSD
+#include "sanitizer_common.h"
+#include "sanitizer_procmaps.h"
+
+#include 
+#include 
+#include 
+
+namespace __sanitizer {
+
+void ReadProcMaps(ProcSelfMapsBuff *proc_maps) {
+  struct kinfo_vmentry *kiv;
+  const int Mib[] = { CTL_VM, VM_PROC, VM_PROC_MAP, getpid(), sizeof(*kiv) };
+  size_t Size = 0;
+  int Err = sysctl(Mib, __arraycount(Mib), NULL, , NULL, 0);
+  CHECK_EQ(Err, 0);
+  CHECK_GT(Size, 0);
+
+  size_t MmapedSize = Size * 4 / 3;
+  void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
+  Size = MmapedSize;
+  Err = sysctl(Mib, 4, VmMap, , NULL, 0);
+  CHECK_EQ(Err, 0);
+
+  proc_maps->data = (char*)VmMap;
+  proc_maps->mmaped_size = MmapedSize;
+  proc_maps->len = Size;
+}
+
+bool MemoryMappingLayout::Next(uptr *start, uptr *end, uptr *offset,
+   char filename[], uptr filename_size,
+   uptr *protection) {
+  char *last = proc_self_maps_.data + proc_self_maps_.len;
+  if (current_ >= last) return false;
+  uptr dummy;
+  if (!start) start = 
+  if (!end) end = 
+  if (!offset) offset = 
+  if (!protection) protection = 
+  struct kinfo_vmentry *VmEntry = (struct kinfo_vmentry*)current_;
+
+  *start = (uptr)VmEntry->kve_start;
+  *end = (uptr)VmEntry->kve_end;
+  *offset = (uptr)VmEntry->kve_offset;
+
+  *protection = 0;
+  if ((VmEntry->kve_protection & KVME_PROT_READ) != 0)
+*protection |= kProtectionRead;
+  if ((VmEntry->kve_protection & KVME_PROT_WRITE) != 0)
+*protection |= kProtectionWrite;
+  if 

CVS commit: src/external/gpl3/gcc/lib/libasan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 21:34:13 UTC 2016

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
Add procmaps for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/lib/libasan/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/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.12 src/external/gpl3/gcc/lib/libasan/Makefile:1.13
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.12	Tue May 31 16:47:52 2016
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Tue May 31 17:34:13 2016
@@ -57,6 +57,7 @@ sanitizer_posix.cc \
 sanitizer_posix_libcdep.cc \
 sanitizer_printf.cc \
 sanitizer_procmaps_common.cc \
+sanitizer_procmaps_netbsd.cc \
 sanitizer_procmaps_freebsd.cc \
 sanitizer_procmaps_linux.cc \
 sanitizer_procmaps_mac.cc \



CVS commit: src/external/gpl3/gcc/lib/libasan

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 20:47:52 UTC 2016

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile shlib_version

Log Message:
Update sources and flags (compiles but missing stuff)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libasan/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/external/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.11 src/external/gpl3/gcc/lib/libasan/Makefile:1.12
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.11	Wed Mar 23 17:24:53 2016
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Tue May 31 16:47:52 2016
@@ -7,40 +7,74 @@ ASAN=${GCCDIST}/libsanitizer
 .PATH: ${ASAN}/asan ${ASAN}/interception ${ASAN}/sanitizer_common
 
 ASAN_SRCS= \
-	asan_allocator2.cc \
-	asan_interceptors.cc \
-	asan_posix.cc \
-	asan_new_delete.cc \
-	asan_rtl.cc \
-	asan_stats.cc \
-	asan_globals.cc \
-	asan_fake_stack.cc \
-	asan_linux.cc \
-	asan_report.cc \
-	asan_malloc_linux.cc \
-	asan_poisoning.cc \
-	asan_stack.cc \
-	asan_thread.cc \
-	asan_preinit.cc
+asan_activation.cc \
+asan_allocator2.cc \
+asan_debugging.cc \
+asan_fake_stack.cc \
+asan_globals.cc \
+asan_interceptors.cc \
+asan_linux.cc \
+asan_mac.cc \
+asan_malloc_linux.cc \
+asan_malloc_mac.cc \
+asan_malloc_win.cc \
+asan_new_delete.cc \
+asan_poisoning.cc \
+asan_posix.cc \
+asan_report.cc \
+asan_rtl.cc \
+asan_stack.cc \
+asan_stats.cc \
+asan_thread.cc \
+asan_win.cc \
+asan_win_dll_thunk.cc \
+asan_win_dynamic_runtime_thunk.cc
 
 INTERCEPTION_SRCS= \
-	interception_linux.cc \
-	interception_type_test.cc
+interception_linux.cc \
+interception_mac.cc \
+interception_type_test.cc \
+interception_win.cc
 
 SANITIZER_SRCS= \
-	sanitizer_allocator.cc \
-	sanitizer_common.cc \
-	sanitizer_flags.cc \
-	sanitizer_libc.cc \
-	sanitizer_netbsd.cc \
-	sanitizer_mac.cc \
-	sanitizer_posix.cc \
-	sanitizer_platform_limits_posix.cc \
-	sanitizer_printf.cc \
-	sanitizer_stackdepot.cc \
-	sanitizer_stacktrace.cc \
-	sanitizer_symbolizer.cc \
-	sanitizer_win.cc
+sanitizer_allocator.cc \
+sanitizer_common.cc \
+sanitizer_common_libcdep.cc \
+sanitizer_coverage_libcdep.cc \
+sanitizer_coverage_mapping_libcdep.cc \
+sanitizer_deadlock_detector1.cc \
+sanitizer_deadlock_detector2.cc \
+sanitizer_flags.cc \
+sanitizer_libc.cc \
+sanitizer_libignore.cc \
+sanitizer_linux.cc \
+sanitizer_linux_libcdep.cc \
+sanitizer_mac.cc \
+sanitizer_persistent_allocator.cc \
+sanitizer_platform_limits_linux.cc \
+sanitizer_platform_limits_posix.cc \
+sanitizer_posix.cc \
+sanitizer_posix_libcdep.cc \
+sanitizer_printf.cc \
+sanitizer_procmaps_common.cc \
+sanitizer_procmaps_freebsd.cc \
+sanitizer_procmaps_linux.cc \
+sanitizer_procmaps_mac.cc \
+sanitizer_stackdepot.cc \
+sanitizer_stacktrace.cc \
+sanitizer_stacktrace_libcdep.cc \
+sanitizer_stacktrace_printer.cc \
+sanitizer_stoptheworld_linux_libcdep.cc \
+sanitizer_suppressions.cc \
+sanitizer_symbolizer.cc \
+sanitizer_symbolizer_libbacktrace.cc \
+sanitizer_symbolizer_libcdep.cc \
+sanitizer_symbolizer_posix_libcdep.cc \
+sanitizer_symbolizer_win.cc \
+sanitizer_thread_registry.cc \
+sanitizer_tls_get_addr.cc \
+sanitizer_unwind_posix_libcdep.cc \
+sanitizer_win.cc
 
 # The linux build does this to avoid preinit sections on shared libraries
 CSHLIBFLAGS+= -DPIC
@@ -49,9 +83,11 @@ LIB=	asan
 SRCS=	${ASAN_SRCS} ${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
 CPPFLAGS+=-I${ASAN}/include -I${ASAN}
 CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
+CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
 
 LIBDPLIBS+=stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
+COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
 
 .if ${MACHINE_ARCH} == "vax"
 COPTS.asan_allocator2.cc += -O1

Index: src/external/gpl3/gcc/lib/libasan/shlib_version
diff -u src/external/gpl3/gcc/lib/libasan/shlib_version:1.1 src/external/gpl3/gcc/lib/libasan/shlib_version:1.2
--- src/external/gpl3/gcc/lib/libasan/shlib_version:1.1	Tue Oct 21 20:16:29 2014
+++ src/external/gpl3/gcc/lib/libasan/shlib_version	Tue May 31 16:47:52 2016
@@ -1,2 +1,2 @@
-major=0
+major=1
 minor=0



CVS commit: src/external/gpl3/gcc/dist/libsanitizer

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 20:47:26 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/asan: asan_interceptors.h
asan_linux.cc asan_mapping.h asan_stack.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_common.h sanitizer_common_interceptors.inc
sanitizer_internal_defs.h sanitizer_libignore.cc sanitizer_linux.cc
sanitizer_linux.h sanitizer_linux_libcdep.cc sanitizer_platform.h
sanitizer_platform_interceptors.h
sanitizer_platform_limits_posix.cc
sanitizer_platform_limits_posix.h sanitizer_procmaps_common.cc
sanitizer_syscall_generic.inc sanitizer_unwind_posix_libcdep.cc
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc
src/external/gpl3/gcc/dist/libsanitizer/ubsan: ubsan_value.h

Log Message:
First steps to port this to NetBSD (compiles now but missing stuff)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_stack.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common.h 
\
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc 
\

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_libignore.cc 
\
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform.h \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_common.cc
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc
 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_unwind_posix_libcdep.cc
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_value.h

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/gcc/dist/libsanitizer/asan/asan_interceptors.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h:1.1.1.2	Sun Jan 24 01:05:41 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_interceptors.h	Tue May 31 16:47:25 2016
@@ -34,7 +34,7 @@
 # define ASAN_INTERCEPT_FORK 0
 #endif
 
-#if SANITIZER_FREEBSD || SANITIZER_LINUX
+#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
 # define ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX 1
 #else
 # define ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX 0
Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h:1.1.1.2	Sun Jan 24 01:05:41 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h	Tue May 31 16:47:25 2016
@@ -97,7 +97,7 @@ static const u64 kFreeBSD_ShadowOffset64
 # if SANITIZER_WORDSIZE == 32
 #  if defined(__mips__)
 #define SHADOW_OFFSET kMIPS32_ShadowOffset32
-#  elif SANITIZER_FREEBSD
+#  elif SANITIZER_FREEBSD || SANITIZER_NETBSD
 #define SHADOW_OFFSET kFreeBSD_ShadowOffset32
 #  else
 #if SANITIZER_IOS
@@ -111,7 +111,7 @@ static const u64 kFreeBSD_ShadowOffset64
 #define SHADOW_OFFSET kAArch64_ShadowOffset64
 #  elif defined(__powerpc64__)
 #define SHADOW_OFFSET kPPC64_ShadowOffset64
-#  elif SANITIZER_FREEBSD
+#  elif SANITIZER_FREEBSD || SANITIZER_NETBSD
 #define SHADOW_OFFSET kFreeBSD_ShadowOffset64
 #  elif SANITIZER_MAC
 #   define SHADOW_OFFSET kDefaultShadowOffset64
Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_stack.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_stack.h:1.1.1.2 

CVS commit: src/sys/sys

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 20:40:51 UTC 2016

Modified Files:
src/sys/sys: cdefs_elf.h

Log Message:
revert weak change. next time point to an example of what breaks in the
commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/sys/cdefs_elf.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/sys/cdefs_elf.h
diff -u src/sys/sys/cdefs_elf.h:1.50 src/sys/sys/cdefs_elf.h:1.51
--- src/sys/sys/cdefs_elf.h:1.50	Thu Mar 10 19:44:56 2016
+++ src/sys/sys/cdefs_elf.h	Tue May 31 16:40:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs_elf.h,v 1.50 2016/03/11 00:44:56 christos Exp $	*/
+/*	$NetBSD: cdefs_elf.h,v 1.51 2016/05/31 20:40:51 christos Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -173,10 +173,9 @@
 #define	__link_set_start(set)	(__start_link_set_##set)
 #define	__link_set_end(set)	(__stop_link_set_##set)
 
-/* XXX: we want end to be __weak, but this is broken */
 #define	__link_set_decl(set, ptype)	\
 	extern ptype * const __link_set_start(set)[] __dso_hidden;	\
-	extern ptype * const __link_set_end(set)[] __dso_hidden
+	extern ptype * const __link_set_end(set)[] __weak __dso_hidden
 
 #define	__link_set_count(set)		\
 	(__link_set_end(set) - __link_set_start(set))



CVS commit: othersrc/external/bsd/sqlite3db/bin

2016-05-31 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue May 31 20:34:01 UTC 2016

Added Files:
othersrc/external/bsd/sqlite3db/bin: Testspec

Log Message:
Add a Testspec file which can be used by human2atf to derive the unit tests.

The Testspec file is derived from the Makefile tests. It includes 2 examples
of on-the-fly gzip(1) compression of large test files.

Running the generated test script produces the following output:

[23:28:33] agc@netbsd-002 ...tests/usr.bin/sqlite3db [3696] > sudo make 
test
*** WARNING: make test is experimental
***
*** Using this test does not preclude you from running the tests
*** installed in /usr/tests.  This test run may raise false
*** positives and/or false negatives.

Tests root: /usr/tests/usr.bin/sqlite3db

t_sqlite3db (1/1): 6 test cases
sqlite3db_testset_1_basic_test_set: [0.046954s] Passed.
sqlite3db_testset_2_convert_small: [0.092268s] Passed.
sqlite3db_testset_3_convert_large: [68.611927s] Passed.
sqlite3db_testset_4_get: [0.046001s] Passed.
sqlite3db_testset_5_get: [0.045498s] Passed.
sqlite3db_testset_6_get: [0.045098s] Passed.
[68.897778s]

Summary for 1 test programs:
6 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.

*** The verbatim output of atf-run has been saved to 
/usr/tests/usr.bin/sqlite3db/atf-run.log
*** Once again, note that make test is unsupported.
[23:29:46] agc@netbsd-002 ...tests/usr.bin/sqlite3db [3697] >


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/sqlite3db/bin/Testspec

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

Added files:

Index: othersrc/external/bsd/sqlite3db/bin/Testspec
diff -u /dev/null othersrc/external/bsd/sqlite3db/bin/Testspec:1.1
--- /dev/null	Tue May 31 20:34:01 2016
+++ othersrc/external/bsd/sqlite3db/bin/Testspec	Tue May 31 20:34:01 2016
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+# $NetBSD: Testspec,v 1.1 2016/05/31 20:34:01 agc Exp $
+
+# Copyright (c) 2016 Alistair Crooks 
+# 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.
+#
+
+TESTNAME=sqlite3db
+
+TESTSET_1_NAME=basic_test_set
+TESTSET_1_FILES='
+1.in
+2.expected
+'
+TESTSET_1_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_1_CASE_2="-s eq:0 -o file:2.expected -e empty sqlite3db dump sql1.db"
+
+TESTSET_2_NAME=convert_small
+TESTSET_2_FILES='
+pkgdb.byfile.db
+3.expected
+'
+TESTSET_2_CASE_1="-s eq:0 -o empty -e empty sqlite3db convert pkgdb.byfile.db"
+TESTSET_2_CASE_2="-s eq:0 -o file:3.expected -e empty db btree pkgdb.byfile.db"
+TESTSET_2_CASE_3="-s eq:0 -o file:3.expected -e empty sqlite3db dump sql3pkgdb.byfile.db"
+
+TESTSET_3_NAME=convert_large
+TESTSET_3_FILES='
+large.pkgdb.byfile.db:gzip
+3.large.expected:gzip
+'
+TESTSET_3_CASE_1="-s eq:0 -o empty -e empty sqlite3db convert large.pkgdb.byfile.db"
+TESTSET_3_CASE_2="-s eq:0 -o file:3.large.expected -e empty db btree large.pkgdb.byfile.db"
+TESTSET_3_CASE_3="-s eq:0 -o file:3.large.expected -e empty sqlite3db dump sql3large.pkgdb.byfile.db"
+
+TESTSET_4_NAME=get
+TESTSET_4_FILES='
+1.in
+4.expected
+'
+TESTSET_4_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_4_CASE_2="-s eq:0 -o file:4.expected -e empty sqlite3db get sql1.db equals hey yowza"
+
+TESTSET_5_NAME=get
+TESTSET_5_FILES='
+1.in
+5.expected
+'
+TESTSET_5_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_5_CASE_2="-s eq:0 -o file:5.expected -e empty sqlite3db del sql1.db 

CVS commit: othersrc/external/bsd/human2atf

2016-05-31 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue May 31 20:26:58 UTC 2016

Modified Files:
othersrc/external/bsd/human2atf: Testspec.template human2atf.1
human2atf.sh

Log Message:
Add the ability to provide gzip(1) encoding of large input and expected
output files in the generated test scripts.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/human2atf/Testspec.template \
othersrc/external/bsd/human2atf/human2atf.1 \
othersrc/external/bsd/human2atf/human2atf.sh

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

Modified files:

Index: othersrc/external/bsd/human2atf/Testspec.template
diff -u othersrc/external/bsd/human2atf/Testspec.template:1.1 othersrc/external/bsd/human2atf/Testspec.template:1.2
--- othersrc/external/bsd/human2atf/Testspec.template:1.1	Sun May 29 20:47:56 2016
+++ othersrc/external/bsd/human2atf/Testspec.template	Tue May 31 20:26:58 2016
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: Testspec.template,v 1.1 2016/05/29 20:47:56 agc Exp $
+# $NetBSD: Testspec.template,v 1.2 2016/05/31 20:26:58 agc Exp $
 
 # Copyright (c) 2016 Alistair Crooks 
 # All rights reserved.
@@ -46,7 +46,10 @@ TESTSET_2_FILES='
 4.expected
 5.in
 5.expected
+6.in:gzip
+6.expected:gzip
 '
 TESTSET_2_CASE_1="-s eq:0 -o file:3.expected -e empty b2e < 3.in"
 TESTSET_2_CASE_2="-s eq:0 -o file:4.expected -e empty b2e < 4.in"
 DISABLE_TESTSET_2_CASE_3="-s eq:0 -o file:5.expected -e empty b2e < 5.in"
+TESTSET_2_CASE_4="-s eq:0 -o file:6.expected -e empty b2e < 6.in"
Index: othersrc/external/bsd/human2atf/human2atf.1
diff -u othersrc/external/bsd/human2atf/human2atf.1:1.1 othersrc/external/bsd/human2atf/human2atf.1:1.2
--- othersrc/external/bsd/human2atf/human2atf.1:1.1	Sun May 29 20:47:56 2016
+++ othersrc/external/bsd/human2atf/human2atf.1	Tue May 31 20:26:58 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: human2atf.1,v 1.1 2016/05/29 20:47:56 agc Exp $
+.\" $NetBSD: human2atf.1,v 1.2 2016/05/31 20:26:58 agc Exp $
 .\"
 .\" Copyright (c) 2016 Alistair Crooks 
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 29, 2016
+.Dd May 31, 2016
 .Dt HUMAN2ATF 1
 .Os
 .Sh NAME
@@ -55,6 +55,18 @@ of the default file, which is named
 Perform operations in a verbose manner (useful for debugging)
 .El
 .Pp
+The generated shell script contains the ATF commands to run the test.
+It includes a list of the files used for input to commands,
+and for files containing expected output.
+Files are encoded in the test script using base64 encoding provided by
+.Xr uuencode 1 .
+Sometimes these files can be large. For this reason, on the fly
+.Xr gzip 1
+compression has been enabled, and is activated by using
+a suffix of
+.Dq :gzip
+when specifying the files.
+.Pp
 .Sh RETURN VALUES
 The
 .Nm
@@ -62,7 +74,7 @@ utility will return 0 for success,
 and non-zero for failure.
 .Sh EXAMPLES
 .Bd -literal
-% ./human2atf.sh -f Testspec2
+% human2atf -f Testspec2
 Generating Makefile for b2e tests as tests-Makefile
 Generating test harness t_b2e.sh for b2e
 % sudo cp t_b2e.sh =1
@@ -108,6 +120,8 @@ Summary for 1 test programs:
 %
 .Ed
 .Sh SEE ALSO
+.Xr gzip 1 ,
+.Xr uuencode 1 ,
 .Xr atf 7
 .Sh HISTORY
 The
Index: othersrc/external/bsd/human2atf/human2atf.sh
diff -u othersrc/external/bsd/human2atf/human2atf.sh:1.1 othersrc/external/bsd/human2atf/human2atf.sh:1.2
--- othersrc/external/bsd/human2atf/human2atf.sh:1.1	Sun May 29 20:47:56 2016
+++ othersrc/external/bsd/human2atf/human2atf.sh	Tue May 31 20:26:58 2016
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: human2atf.sh,v 1.1 2016/05/29 20:47:56 agc Exp $
+# $NetBSD: human2atf.sh,v 1.2 2016/05/31 20:26:58 agc Exp $
 
 # Copyright (c) 2016 Alistair Crooks 
 # All rights reserved.
@@ -143,13 +143,28 @@ ${TESTNAME}_testset_${setnum}_${setname}
 human2atf_EOF
 	eval filelist=\$TESTSET_${setnum}_FILES
 	for f in ${filelist}; do
+		comp=""
+		case "${f}" in
+		*:gzip)	comp=.gz
+			f=${f%:gzip}
+			;;
+		esac
 		if [ ! -f ${f} ]; then
 			echo "File ${f} not found" >&2
 			continue
 		fi
 		echo "	uudecode << EOF" >> ${output}
-		uuencode -m ${f} ${f} >> ${output}
+		case "${comp}" in
+		"")	uuencode -m ${f} ${f} >> ${output}
+			;;
+		.gz)	gzip -9 -c ${f} | uuencode -m ${f}${comp} >> ${output}
+			;;
+		esac
 		echo EOF >> ${output}
+		case "${comp}" in
+		.gz)	echo "  gunzip ${f}${comp}" >> ${output}
+			;;
+		esac
 	done
 	casenum=1
 	while true; do



CVS commit: src/sys/sys

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 20:02:16 UTC 2016

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Add an ElfW() macro like linux.


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.154 src/sys/sys/exec_elf.h:1.155
--- src/sys/sys/exec_elf.h:1.154	Mon May 23 20:49:55 2016
+++ src/sys/sys/exec_elf.h	Tue May 31 16:02:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.154 2016/05/24 00:49:55 christos Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.155 2016/05/31 20:02:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1059,6 +1059,7 @@ struct netbsd_elfcore_procinfo {
 #define ELFNAME2(x,y)	CONCAT(x,CONCAT(_elf,CONCAT(ELFSIZE,CONCAT(_,y
 #define ELFNAMEEND(x)	CONCAT(x,CONCAT(_elf,ELFSIZE))
 #define ELFDEFNNAME(x)	CONCAT(ELF,CONCAT(ELFSIZE,CONCAT(_,x)))
+#define	ElfW(x)		CONCAT(Elf,CONCAT(ELFSIZE,CONCAT(_,x)))
 #endif
 
 #if defined(ELFSIZE) && (ELFSIZE == 32)



CVS commit: src/lib/libedit

2016-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 31 19:25:17 UTC 2016

Modified Files:
src/lib/libedit: readline.c

Log Message:
remove the right history entry (Ingo Schwarze)


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/lib/libedit/readline.c

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

Modified files:

Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.133 src/lib/libedit/readline.c:1.134
--- src/lib/libedit/readline.c:1.133	Fri May 13 11:55:59 2016
+++ src/lib/libedit/readline.c	Tue May 31 15:25:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.133 2016/05/13 15:55:59 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.134 2016/05/31 19:25:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.133 2016/05/13 15:55:59 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.134 2016/05/31 19:25:17 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 
@@ -1190,7 +1190,7 @@ stifle_history(int max)
 		if (max < len)
 			history_base += len - max;
 		for (i = 0; i < len - max; i++) {
-			he = remove_history(i);
+			he = remove_history(0);
 			el_free(he->data);
 			el_free((void *)(unsigned long)he->line);
 			el_free(he);



CVS commit: src/external/bsd/fetch/dist/libfetch

2016-05-31 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Tue May 31 16:26:48 UTC 2016

Modified Files:
src/external/bsd/fetch/dist/libfetch: fetch.3

Log Message:
Add the missing parameter "const char *pattern" to the fetchList* functions.

>From Julian Fagir in PR lib/45579


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/fetch/dist/libfetch/fetch.3

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/fetch/dist/libfetch/fetch.3
diff -u src/external/bsd/fetch/dist/libfetch/fetch.3:1.3 src/external/bsd/fetch/dist/libfetch/fetch.3:1.4
--- src/external/bsd/fetch/dist/libfetch/fetch.3:1.3	Tue Mar 18 18:20:36 2014
+++ src/external/bsd/fetch/dist/libfetch/fetch.3	Tue May 31 16:26:47 2016
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: fetch.3,v 1.64 2007/12/18 11:03:26 des Exp $
-.\" $NetBSD: fetch.3,v 1.3 2014/03/18 18:20:36 riastradh Exp $
+.\" $NetBSD: fetch.3,v 1.4 2016/05/31 16:26:47 abhinav Exp $
 .\"
 .Dd January 22, 2010
 .Dt FETCH 3
@@ -91,7 +91,7 @@
 .Ft int
 .Fn fetchStatURL "const char *URL" "struct url_stat *us" "const char *flags"
 .Ft int
-.Fn fetchListURL "struct url_list *list" "const char *URL" "const char *flags"
+.Fn fetchListURL "struct url_list *list" "const char *URL" "const char *pattern" "const char *flags"
 .Ft fetchIO *
 .Fn fetchXGet "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft fetchIO *
@@ -101,7 +101,7 @@
 .Ft int
 .Fn fetchStat "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft int
-.Fn fetchList "struct url_list *list" "struct url *u" "const char *flags"
+.Fn fetchList "struct url_list *list" "struct url *u" "const char *pattern" "const char *flags"
 .Ft fetchIO *
 .Fn fetchXGetFile "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft fetchIO *
@@ -111,7 +111,7 @@
 .Ft int
 .Fn fetchStatFile "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft int
-.Fn fetchListFile "struct url_list *list" "struct url *u" "const char *flags"
+.Fn fetchListFile "struct url_list *list" "struct url *u" "const char *pattern" "const char *flags"
 .Ft fetchIO *
 .Fn fetchXGetHTTP "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft fetchIO *
@@ -121,7 +121,7 @@
 .Ft int
 .Fn fetchStatHTTP "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft int
-.Fn fetchListHTTP "struct url_list *list" "struct url *u" "const char *flags"
+.Fn fetchListHTTP "struct url_list *list" "struct url *u" "const char *pattern" "const char *flags"
 .Ft fetchIO *
 .Fn fetchXGetFTP "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft fetchIO *
@@ -131,7 +131,7 @@
 .Ft int
 .Fn fetchStatFTP "struct url *u" "struct url_stat *us" "const char *flags"
 .Ft int
-.Fn fetchListFTP "struct url_list *list" "struct url *u" "const char *flags"
+.Fn fetchListFTP "struct url_list *list" "struct url *u" "const char *pattern" "const char *flags"
 .Ft void
 .Fn fetchInitURLList "struct url_list *ul"
 .Ft int
@@ -158,7 +158,7 @@ its components function according to the
 detailed in RFC 1738.
 A regular expression which produces this syntax is:
 .Bd -literal -offset indent
-\*[Lt]scheme\*[Gt]:(//(\*[Lt]user\*[Gt](:\*[Lt]pwd\*[Gt])?@)?\*[Lt]host\*[Gt](:\*[Lt]port\*[Gt])?)?/(\*[Lt]document\*[Gt])?
+\*[Lt]scheme\*[Gt]:(//(\*[Lt]user\*[Gt](:\*[Lt]pwd\*[Gt])?@)?\*[Lt]host\*[Gt](:\*[Lt]port\*[Gt])?)?/(\*[Lt]doc\*[Gt])?
 .Ed
 .Pp
 If the URL does not seem to begin with a scheme name, it is assumed to be a local path.
@@ -169,7 +169,7 @@ all URL schemes.
 For instance, the file scheme only needs the
 .Aq scheme
 and
-.Aq document
+.Aq doc
 components.
 .Fn fetchParseURL
 quotes any unsafe character in the URL automatically.



CVS commit: src/sbin/swapctl

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 31 09:34:25 UTC 2016

Modified Files:
src/sbin/swapctl: swaplist.c

Log Message:
Minor formatting change in swapctl -l as noted in my PR bin/51155


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sbin/swapctl/swaplist.c

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

Modified files:

Index: src/sbin/swapctl/swaplist.c
diff -u src/sbin/swapctl/swaplist.c:1.17 src/sbin/swapctl/swaplist.c:1.18
--- src/sbin/swapctl/swaplist.c:1.17	Mon Apr  6 12:38:35 2009
+++ src/sbin/swapctl/swaplist.c	Tue May 31 09:34:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: swaplist.c,v 1.17 2009/04/06 12:38:35 lukem Exp $	*/
+/*	$NetBSD: swaplist.c,v 1.18 2016/05/31 09:34:25 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1997 Matthew R. Green
@@ -28,7 +28,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: swaplist.c,v 1.17 2009/04/06 12:38:35 lukem Exp $");
+__RCSID("$NetBSD: swaplist.c,v 1.18 2016/05/31 09:34:25 pgoyette Exp $");
 #endif
 
 
@@ -184,10 +184,10 @@ list_swap(int pri, int kflag, int pflag,
 			if ((humanize_number(avbuf, sizeof(avbuf), (dbtoqb(totalsize-totalinuse)),
 "", HN_AUTOSCALE, (HN_DECIMAL | HN_B | HN_NOSPACE))) == -1)
 err(1, "humanize_number");
-			(void)printf("total: %s allocated = %s used, %s available.\n",
+			(void)printf("total: %s allocated, %s used, %s available.\n",
 szbuf, usbuf, avbuf);
 		} else {
-		printf("total: %ld %s allocated = %ld %s used, "
+		printf("total: %ld %s allocated, %ld %s used, "
 			   "%ld %s available\n",
 		(long)(dbtoqb(totalsize) / blocksize), suff,
 		(long)(dbtoqb(totalinuse) / blocksize), suff,



CVS commit: src/common/lib/libprop

2016-05-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue May 31 09:31:13 UTC 2016

Modified Files:
src/common/lib/libprop: prop_array_util.3

Log Message:
Punctuation nits.
(adding space makes sure they are not marked up)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/common/lib/libprop/prop_array_util.3

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

Modified files:

Index: src/common/lib/libprop/prop_array_util.3
diff -u src/common/lib/libprop/prop_array_util.3:1.8 src/common/lib/libprop/prop_array_util.3:1.9
--- src/common/lib/libprop/prop_array_util.3:1.8	Tue May 31 09:29:25 2016
+++ src/common/lib/libprop/prop_array_util.3	Tue May 31 09:31:13 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_array_util.3,v 1.8 2016/05/31 09:29:25 pgoyette Exp $
+.\"	$NetBSD: prop_array_util.3,v 1.9 2016/05/31 09:31:13 wiz Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -196,8 +196,8 @@ See
 for more information.
 .Pp
 The
-.Fn prop_array_add_cstring_nocopy,
-.Fn prop_array_get_cstring_nocopy,
+.Fn prop_array_add_cstring_nocopy ,
+.Fn prop_array_get_cstring_nocopy ,
 and
 .Fn prop_array_set_cstring_nocopy
 functions do not copy the string that is set or returned.



CVS commit: src/common

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 31 09:29:26 UTC 2016

Modified Files:
src/common/include/prop: prop_array.h
src/common/lib/libprop: prop_array_util.3 prop_array_util.c

Log Message:
Add prop_array_add_cstring{,_no_copy} utility functions as suggested in
PR lib/46723 using the patch provided.  (Header file updates are mine.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/common/include/prop/prop_array.h
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libprop/prop_array_util.3
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libprop/prop_array_util.c

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

Modified files:

Index: src/common/include/prop/prop_array.h
diff -u src/common/include/prop/prop_array.h:1.13 src/common/include/prop/prop_array.h:1.14
--- src/common/include/prop/prop_array.h:1.13	Fri Sep 30 22:08:18 2011
+++ src/common/include/prop/prop_array.h	Tue May 31 09:29:25 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: prop_array.h,v 1.13 2011/09/30 22:08:18 jym Exp $*/
+/* $NetBSD: prop_array.h,v 1.14 2016/05/31 09:29:25 pgoyette Exp $*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -144,11 +144,13 @@ bool		prop_array_add_uint32(prop_array_t
 bool		prop_array_add_int64(prop_array_t, int64_t);
 bool		prop_array_add_uint64(prop_array_t, uint64_t);
 
+bool		prop_array_add_cstring(prop_array_t, const char *);
 bool		prop_array_get_cstring(prop_array_t, unsigned int,
 	 char **);
 bool		prop_array_set_cstring(prop_array_t, unsigned int,
 	const char *);
 
+bool		prop_array_add_cstring_nocopy(prop_array_t, const char *);
 bool		prop_array_get_cstring_nocopy(prop_array_t,
unsigned int,
 		   const char **);

Index: src/common/lib/libprop/prop_array_util.3
diff -u src/common/lib/libprop/prop_array_util.3:1.7 src/common/lib/libprop/prop_array_util.3:1.8
--- src/common/lib/libprop/prop_array_util.3:1.7	Mon Oct 17 09:24:54 2011
+++ src/common/lib/libprop/prop_array_util.3	Tue May 31 09:29:25 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_array_util.3,v 1.7 2011/10/17 09:24:54 wiz Exp $
+.\"	$NetBSD: prop_array_util.3,v 1.8 2016/05/31 09:29:25 pgoyette Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 12, 2011
+.Dd May 31, 2016
 .Dt PROP_ARRAY_UTIL 3
 .Os
 .Sh NAME
@@ -58,8 +58,10 @@
 .Nm prop_array_add_uint32 ,
 .Nm prop_array_add_int64 ,
 .Nm prop_array_add_uint64 ,
+.Nm prop_array_add_cstring ,
 .Nm prop_array_get_cstring ,
 .Nm prop_array_set_cstring ,
+.Nm prop_array_add_cstring_nocopy ,
 .Nm prop_array_get_cstring_nocopy ,
 .Nm prop_array_set_cstring_nocopy ,
 .Nm prop_array_add_and_rel
@@ -153,6 +155,8 @@
 .Fn prop_array_add_uint64 "prop_array_t dict" "uint64_t val"
 .\"
 .Ft bool
+.Fn prop_array_add_cstring "prop_array_t dict" "const char *cp"
+.Ft bool
 .Fn prop_array_get_cstring "prop_array_t dict" "unsigned int indx" \
 "char **strp"
 .Ft bool
@@ -160,6 +164,8 @@
 "const char *str"
 .\"
 .Ft bool
+.Fn prop_array_add_cstring_nocopy "prop_array_t dict" "const char *cp"
+.Ft bool
 .Fn prop_array_get_cstring_nocopy "prop_array_t dict" \
 "unsigned int indx" "const char **strp"
 .Ft bool
@@ -181,14 +187,17 @@ value type.
 The setters handle object creation and release for the caller.
 .Pp
 The
+.Fn prop_array_add_cstring
+and
 .Fn prop_array_get_cstring
-function returns dynamically allocated memory.
+functions returns dynamically allocated memory.
 See
 .Xr prop_string 3
 for more information.
 .Pp
 The
-.Fn prop_array_get_cstring_nocopy
+.Fn prop_array_add_cstring_nocopy,
+.Fn prop_array_get_cstring_nocopy,
 and
 .Fn prop_array_set_cstring_nocopy
 functions do not copy the string that is set or returned.

Index: src/common/lib/libprop/prop_array_util.c
diff -u src/common/lib/libprop/prop_array_util.c:1.4 src/common/lib/libprop/prop_array_util.c:1.5
--- src/common/lib/libprop/prop_array_util.c:1.4	Fri Jul 27 09:10:59 2012
+++ src/common/lib/libprop/prop_array_util.c	Tue May 31 09:29:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_array_util.c,v 1.4 2012/07/27 09:10:59 pooka Exp $	*/
+/*	$NetBSD: prop_array_util.c,v 1.5 2016/05/31 09:29:25 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -201,6 +201,21 @@ TEMPLATE(64)
 #undef TEMPLATE
 
 #define	TEMPLATE(variant, qualifier)	\
+bool	\
+prop_array_add_cstring ## variant (prop_array_t array,			\
+	const char *cp)			\
+{	\
+	prop_string_t str;		\
+	bool rv;			\
+	\
+	str = prop_string_create_cstring ## variant (cp);		\
+	if (str == NULL)		\
+		return false;		\
+	rv = prop_array_add(array, str);\
+	prop_object_release(str);	\
+	return rv;			\
+}	\
+	\
 bool

CVS commit: src/sys/dev/usb

2016-05-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue May 31 09:22:11 UTC 2016

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Flush memory correctly during ring put.
See PR 51199.

>From Sprow, ok skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/usb/xhci.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/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.46 src/sys/dev/usb/xhci.c:1.47
--- src/sys/dev/usb/xhci.c:1.46	Tue May 10 15:14:03 2016
+++ src/sys/dev/usb/xhci.c	Tue May 31 09:22:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.46 2016/05/10 15:14:03 pooka Exp $	*/
+/*	$NetBSD: xhci.c,v 1.47 2016/05/31 09:22:11 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.46 2016/05/10 15:14:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.47 2016/05/31 09:22:11 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2559,7 +2559,7 @@ xhci_ring_put(struct xhci_softc * const 
 	}
 
 	xhci_trb_put(>xr_trb[xr->xr_ep], parameter, status, control);
-	usb_syncmem(>xr_dma, XHCI_TRB_SIZE * ri, XHCI_TRB_SIZE * 1,
+	usb_syncmem(>xr_dma, XHCI_TRB_SIZE * xr->xr_ep, XHCI_TRB_SIZE * 1,
 	BUS_DMASYNC_PREWRITE);
 	xr->xr_cookies[xr->xr_ep] = cookie;
 



CVS commit: src/share/man/man3

2016-05-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue May 31 08:24:43 UTC 2016

Modified Files:
src/share/man/man3: queue.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/share/man/man3/queue.3

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/man3/queue.3
diff -u src/share/man/man3/queue.3:1.52 src/share/man/man3/queue.3:1.53
--- src/share/man/man3/queue.3:1.52	Tue May 31 06:00:38 2016
+++ src/share/man/man3/queue.3	Tue May 31 08:24:43 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: queue.3,v 1.52 2016/05/31 06:00:38 pgoyette Exp $
+.\"	$NetBSD: queue.3,v 1.53 2016/05/31 08:24:43 wiz Exp $
 .\"
 .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1041,7 +1041,7 @@ TAILQ_FOREACH(np, \*[Am]head, entries)	/
 	/* Reverse traversal. */
 TAILQ_FOREACH_REVERSE(np, \*[Am]head, tailhead, entries)
 	np-\*[Gt] ...
-	
+
 while (TAILQ_FIRST(\*[Am]head) != NULL)	/* Delete. */
 	TAILQ_REMOVE(\*[Am]head, TAILQ_FIRST(\*[Am]head), entries);
 if (TAILQ_EMPTY(\*[Am]head))			/* Test for emptiness. */



CVS commit: src/lib/libc/gen

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 31 07:49:10 UTC 2016

Modified Files:
src/lib/libc/gen: fts.c

Log Message:
Use calloc(1, ...) instead of malloc(...) followed immediately by memset()

Addresses PR lib/46818


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libc/gen/fts.c

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

Modified files:

Index: src/lib/libc/gen/fts.c
diff -u src/lib/libc/gen/fts.c:1.48 src/lib/libc/gen/fts.c:1.49
--- src/lib/libc/gen/fts.c:1.48	Thu Jan 29 15:55:21 2015
+++ src/lib/libc/gen/fts.c	Tue May 31 07:49:09 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fts.c,v 1.48 2015/01/29 15:55:21 manu Exp $	*/
+/*	$NetBSD: fts.c,v 1.49 2016/05/31 07:49:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
 #else
-__RCSID("$NetBSD: fts.c,v 1.48 2015/01/29 15:55:21 manu Exp $");
+__RCSID("$NetBSD: fts.c,v 1.49 2016/05/31 07:49:09 pgoyette Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -133,9 +133,8 @@ fts_open(char * const *argv, int options
 	}
 
 	/* Allocate/initialize the stream */
-	if ((sp = malloc(sizeof(FTS))) == NULL)
+	if ((sp = calloc(1, sizeof(FTS))) == NULL)
 		return (NULL);
-	memset(sp, 0, sizeof(FTS));
 	sp->fts_compar = compar;
 	sp->fts_options = options;
 



CVS commit: src/usr.bin/xinstall

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 31 06:55:02 UTC 2016

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

Log Message:
Move __MKTEMP_OK up earlier so it has an actual impact.  Reduces the
number of warnings during build.

XXX There are still some other warnings remaining to be resolved.

Fixes PR bin/48195 although we really should go back someday and fix
this correctly (by replacing all uses of mktemp(3)!)


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/usr.bin/xinstall/xinstall.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/xinstall/xinstall.c
diff -u src/usr.bin/xinstall/xinstall.c:1.124 src/usr.bin/xinstall/xinstall.c:1.125
--- src/usr.bin/xinstall/xinstall.c:1.124	Fri Jun 19 17:20:02 2015
+++ src/usr.bin/xinstall/xinstall.c	Tue May 31 06:55:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xinstall.c,v 1.124 2015/06/19 17:20:02 christos Exp $	*/
+/*	$NetBSD: xinstall.c,v 1.125 2016/05/31 06:55:02 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -29,6 +29,8 @@
  * SUCH DAMAGE.
  */
 
+#define __MKTEMP_OK__	/* All uses of mktemp have been checked */
+
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
 #else
@@ -46,11 +48,10 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)xinstall.c	8.1 (Berkeley) 7/21/93";
 #else
-__RCSID("$NetBSD: xinstall.c,v 1.124 2015/06/19 17:20:02 christos Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.125 2016/05/31 06:55:02 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
-#define __MKTEMP_OK__	/* All uses of mktemp have been checked */
 #include 
 #include 
 #include 



CVS commit: src/share/man/man3

2016-05-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 31 06:00:39 UTC 2016

Modified Files:
src/share/man/man3: queue.3

Log Message:
Correct list of operations to note that SLISTs and SIMPLEQs cannot insert
entries before existing entries.  This can only be done for LISTs and
TAILQs.

Fixes PR kern/50845


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/share/man/man3/queue.3

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/man3/queue.3
diff -u src/share/man/man3/queue.3:1.51 src/share/man/man3/queue.3:1.52
--- src/share/man/man3/queue.3:1.51	Tue Feb  2 12:25:24 2016
+++ src/share/man/man3/queue.3	Tue May 31 06:00:38 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: queue.3,v 1.51 2016/02/02 12:25:24 ryoon Exp $
+.\"	$NetBSD: queue.3,v 1.52 2016/05/31 06:00:38 pgoyette Exp $
 .\"
 .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,7 +53,7 @@
 .\"
 .\"	@(#)queue.3	8.1 (Berkeley) 12/13/93
 .\"
-.Dd February 2, 2016
+.Dd May 31, 2016
 .Dt QUEUE 3
 .Os
 .Sh NAME
@@ -256,7 +256,7 @@ All five structures support the followin
 .It
 Insertion of a new entry at the head of the list.
 .It
-Insertion of a new entry before or after any element in the list.
+Insertion of a new entry after any element in the list.
 .It
 Removal of any entry in the list.
 .It