CVS commit: src/bin/cp

2016-02-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb 29 04:22:21 UTC 2016

Modified Files:
src/bin/cp: utils.c

Log Message:
for display in the (post) SIGINFO handler use off_t not size_t for
file sizes.  fixes incorrect reporting errors on 32 bit platforms
with >4GB file sizes.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/bin/cp/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/bin/cp/utils.c
diff -u src/bin/cp/utils.c:1.44 src/bin/cp/utils.c:1.45
--- src/bin/cp/utils.c:1.44	Tue Mar  3 00:20:38 2015
+++ src/bin/cp/utils.c	Mon Feb 29 04:22:21 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: utils.c,v 1.44 2015/03/03 00:20:38 enami Exp $ */
+/* $NetBSD: utils.c,v 1.45 2016/02/29 04:22:21 mrg Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utils.c	8.3 (Berkeley) 4/1/94";
 #else
-__RCSID("$NetBSD: utils.c,v 1.44 2015/03/03 00:20:38 enami Exp $");
+__RCSID("$NetBSD: utils.c,v 1.45 2016/02/29 04:22:21 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -77,17 +77,18 @@ set_utimes(const char *file, struct stat
 struct finfo {
 	const char *from;
 	const char *to;
-	size_t size;
+	off_t size;
 };
 
 static void
-progress(const struct finfo *fi, size_t written)
+progress(const struct finfo *fi, off_t written)
 {
 	int pcent = (int)((100.0 * written) / fi->size);
 
 	pinfo = 0;
-	(void)fprintf(stderr, "%s => %s %zu/%zu bytes %d%% written\n",
-	fi->from, fi->to, written, fi->size, pcent);
+	(void)fprintf(stderr, "%s => %s %llu/%llu bytes %d%% written\n",
+	fi->from, fi->to, (unsigned long long)written,
+	(unsigned long long)fi->size, pcent);
 }
 
 int
@@ -97,7 +98,7 @@ copy_file(FTSENT *entp, int dne)
 	struct stat to_stat, *fs;
 	int ch, checkch, from_fd, rcount, rval, to_fd, tolnk, wcount;
 	char *p;
-	size_t ptotal = 0;
+	off_t ptotal = 0;
 	
 	if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
 		warn("%s", entp->fts_path);
@@ -184,7 +185,7 @@ copy_file(FTSENT *entp, int dne)
 
 		fi.from = entp->fts_path;
 		fi.to = to.p_path;
-		fi.size = (size_t)fs->st_size;
+		fi.size = fs->st_size;
 
 		/*
 		 * Mmap and write if less than 8M (the limit is so



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 29 02:19:38 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: drti.c

Log Message:
Add __printflike as appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.5 src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.6
--- src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.5	Sun Feb 28 19:10:45 2016
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c	Mon Feb 29 02:19:37 2016
@@ -67,7 +67,7 @@ static int gen;			/* DOF helper generati
 extern dof_hdr_t __SUNW_dof;	/* DOF defined in the .SUNW_dof section */
 static boolean_t dof_init_debug = B_FALSE;	/* From DTRACE_DOF_INIT_DEBUG */
 
-static void
+static void __printflike(2,3)
 dprintf(int debug, const char *fmt, ...)
 {
 	va_list ap;



CVS commit: src/sys/kern

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 29 01:57:30 UTC 2016

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

Log Message:
Mark skewsrcp as __diagused to unbreak non-DIAGNOSTIC builds.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.87 src/sys/kern/kern_rndq.c:1.88
--- src/sys/kern/kern_rndq.c:1.87	Sun Feb 28 20:37:16 2016
+++ src/sys/kern/kern_rndq.c	Mon Feb 29 01:57:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.87 2016/02/28 20:37:16 riastradh Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.88 2016/02/29 01:57:30 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.87 2016/02/28 20:37:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.88 2016/02/29 01:57:30 riastradh Exp $");
 
 #include 
 #include 
@@ -463,7 +463,7 @@ rnd_skew_enable(krndsource_t *rs, bool e
 static void
 rnd_skew_get(size_t bytes, void *priv)
 {
-	krndsource_t *skewsrcp = priv;
+	krndsource_t *skewsrcp __diagused = priv;
 
 	KASSERT(skewsrcp == _skew.source);
 



CVS commit: src/sys

2016-02-28 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Feb 29 01:29:15 UTC 2016

Modified Files:
src/sys/netinet: ip_encap.h
src/sys/netinet6: in6_gif.c

Log Message:
remove unnecessary declarations and fix KNF

Thanks to riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/netinet/ip_encap.h
cvs rdiff -u -r1.72 -r1.73 src/sys/netinet6/in6_gif.c

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

Modified files:

Index: src/sys/netinet/ip_encap.h
diff -u src/sys/netinet/ip_encap.h:1.18 src/sys/netinet/ip_encap.h:1.19
--- src/sys/netinet/ip_encap.h:1.18	Fri Feb 26 07:35:17 2016
+++ src/sys/netinet/ip_encap.h	Mon Feb 29 01:29:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_encap.h,v 1.18 2016/02/26 07:35:17 knakahara Exp $	*/
+/*	$NetBSD: ip_encap.h,v 1.19 2016/02/29 01:29:15 knakahara Exp $	*/
 /*	$KAME: ip_encap.h,v 1.7 2000/03/25 07:23:37 sumikawa Exp $	*/
 
 /*
@@ -106,9 +106,6 @@ void	*encap6_ctlinput(int, const struct 
 int	encap_detach(const struct encaptab *);
 void	*encap_getarg(struct mbuf *);
 
-void encap_lock_enter(void);
-void encap_lock_exit(void);
-
 #define	ENCAP_PR_WRAP_CTLINPUT(name)\
 static void *			\
 name##_wrapper(int a, const struct sockaddr *b, void *c, void *d) \

Index: src/sys/netinet6/in6_gif.c
diff -u src/sys/netinet6/in6_gif.c:1.72 src/sys/netinet6/in6_gif.c:1.73
--- src/sys/netinet6/in6_gif.c:1.72	Fri Feb 26 07:35:17 2016
+++ src/sys/netinet6/in6_gif.c	Mon Feb 29 01:29:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_gif.c,v 1.72 2016/02/26 07:35:17 knakahara Exp $	*/
+/*	$NetBSD: in6_gif.c,v 1.73 2016/02/29 01:29:15 knakahara Exp $	*/
 /*	$KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.72 2016/02/26 07:35:17 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.73 2016/02/29 01:29:15 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -398,7 +398,7 @@ in6_gif_detach(struct gif_softc *sc)
 void *
 in6_gif_ctlinput(int cmd, const struct sockaddr *sa, void *d, void *eparg)
 {
-	struct gif_softc *sc = (struct gif_softc *)eparg;
+	struct gif_softc *sc = eparg;
 	struct ip6ctlparam *ip6cp = NULL;
 	struct ip6_hdr *ip6;
 	const struct sockaddr_in6 *dst6;



CVS commit: src/lib/libedit/TEST

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 29 00:54:19 UTC 2016

Modified Files:
src/lib/libedit/TEST: rl1.c

Log Message:
convert to 2 clause


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libedit/TEST/rl1.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/TEST/rl1.c
diff -u src/lib/libedit/TEST/rl1.c:1.1 src/lib/libedit/TEST/rl1.c:1.2
--- src/lib/libedit/TEST/rl1.c:1.1	Thu Sep 16 16:08:51 2010
+++ src/lib/libedit/TEST/rl1.c	Sun Feb 28 19:54:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $	*/
+/*	$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *This product includes software developed by the NetBSD
- *Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -38,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $");
+__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $");
 #endif /* not lint  */
 
 /*



CVS commit: src

2016-02-28 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Feb 29 00:34:17 UTC 2016

Modified Files:
src/share/man/man9: kmem.9 vmem.9
src/sys/kern: subr_kmem.c subr_vmem.c

Log Message:
fix vmem_alloc() to never return an error for VM_SLEEP requests,
thus fixing kmem_alloc() to never return NULL for KM_SLEEP requests.
instead these operations will retry forever, which was the intent.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/kmem.9
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/vmem.9
cvs rdiff -u -r1.61 -r1.62 src/sys/kern/subr_kmem.c
cvs rdiff -u -r1.93 -r1.94 src/sys/kern/subr_vmem.c

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/kmem.9
diff -u src/share/man/man9/kmem.9:1.19 src/share/man/man9/kmem.9:1.20
--- src/share/man/man9/kmem.9:1.19	Fri Dec 11 10:05:17 2015
+++ src/share/man/man9/kmem.9	Mon Feb 29 00:34:17 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kmem.9,v 1.19 2015/12/11 10:05:17 wiz Exp $
+.\"	$NetBSD: kmem.9,v 1.20 2016/02/29 00:34:17 chs Exp $
 .\"
 .\" Copyright (c)2006 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" 
-.Dd December 10, 2015
+.Dd February 28, 2016
 .Dt KMEM 9
 .Os
 .\" 
@@ -77,15 +77,9 @@ Either of the following:
 .It Dv KM_SLEEP
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
-Note that this does not mean that if
+If
 .Dv KM_SLEEP
 is specified, then the allocation cannot fail.
-Under resource stress conditions, the allocation can fail and the
-function will return
-.Dv NULL .
-One such scenario is when the allocation size is larger than it can ever
-be allocated; another is when the system memory resources are exhausted
-to even allocate pools of pages.
 .It Dv KM_NOSLEEP
 Don't sleep.
 Immediately return
@@ -143,9 +137,6 @@ It must be the one returned by
 .Fn kmem_alloc
 or
 .Fn kmem_zalloc .
-One such scenario is when the allocation size is larger than it can ever
-be allocated; another is when the system memory resources are exhausted
-to even allocate pools of pages.
 .It Fa size
 The size of the memory being freed, in bytes.
 It must be the same as the
@@ -185,10 +176,6 @@ It should be noted that
 .Fn kmem_free
 may also block.
 .Pp
-Always check the return value of the allocators, even when
-.Dv KM_SLEEP
-is specified to avoid kernel crashes during resource stress conditions.
-.Pp
 For some locks this is permissible or even unavoidable.
 For others, particularly locks that may be taken from soft interrupt context,
 it is a serious problem.

Index: src/share/man/man9/vmem.9
diff -u src/share/man/man9/vmem.9:1.15 src/share/man/man9/vmem.9:1.16
--- src/share/man/man9/vmem.9:1.15	Tue Jan 29 22:02:17 2013
+++ src/share/man/man9/vmem.9	Mon Feb 29 00:34:17 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vmem.9,v 1.15 2013/01/29 22:02:17 wiz Exp $
+.\"	$NetBSD: vmem.9,v 1.16 2016/02/29 00:34:17 chs Exp $
 .\"
 .\" Copyright (c)2006 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" 
-.Dd January 29, 2013
+.Dd February 28, 2016
 .Dt VMEM 9
 .Os
 .\" 
@@ -83,7 +83,7 @@ other than virtual memory.
 .Fn vmem_create
 creates a new vmem arena.
 .Pp
-.Bl -tag -width qcache_max
+.Bl -tag -offset indent -width qcache_max
 .It Fa name
 The string to describe the vmem.
 .It Fa base
@@ -118,7 +118,7 @@ calls
 to import a span of size at least
 .Fa size .
 .Fa allocfn
-should accept the same
+must accept the same
 .Fa flags
 as
 .Fn vmem_alloc .
@@ -169,7 +169,8 @@ It is merely a hint and can be ignored.
 Either of:
 .Bl -tag -width VM_NOSLEEP
 .It Dv VM_SLEEP
-Can sleep until enough resources are available.
+If the allocation cannot be satisfied immediately, sleep until enough
+resources are available.
 .It Dv VM_NOSLEEP
 Don't sleep.
 Immediately return
@@ -184,7 +185,7 @@ Interrupt level to be blocked for alloca
 .Fn vmem_xcreate
 creates a new vmem arena.
 .Pp
-.Bl -tag -width qcache_max
+.Bl -tag -offset indent -width qcache_max
 .It Fa name
 The string to describe the vmem.
 .It Fa base
@@ -220,7 +221,7 @@ calls
 to import a span of size at least
 .Fa size .
 .Fa allocfn
-should accept the same
+must accept the same
 .Fa flags
 as
 .Fn vmem_alloc .
@@ -274,7 +275,8 @@ It is merely a hint and can be ignored.
 Either of:
 .Bl -tag -width VM_NOSLEEP
 .It Dv VM_SLEEP
-Can sleep until enough resources are available.
+If the allocation cannot be satisfied immediately, sleep until enough
+resources are available.
 .It Dv VM_NOSLEEP
 Don't sleep.
 Immediately return
@@ -297,23 +299,26 @@ Returns
 on success,
 .Dv ENOMEM
 on failure.
-.Fa flags
-should be one of:
+.Bl -tag -offset indent 

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

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 29 00:17:54 UTC 2016

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Let the compiler decide whether to inline.

Works around ICE in PCC for now:

/home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195: bad 
xasm node type 23
/home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195: bad 
xasm node type 23
internal compiler error: 
/home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195

This code is not performance-critical.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/cpu_rng.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu_rng.c
diff -u src/sys/arch/x86/x86/cpu_rng.c:1.4 src/sys/arch/x86/x86/cpu_rng.c:1.5
--- src/sys/arch/x86/x86/cpu_rng.c:1.4	Sun Feb 28 20:51:03 2016
+++ src/sys/arch/x86/x86/cpu_rng.c	Mon Feb 29 00:17:54 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_rng.c,v 1.4 2016/02/28 20:51:03 riastradh Exp $ */
+/* $NetBSD: cpu_rng.c,v 1.5 2016/02/29 00:17:54 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ cpu_rng_init(void)
 	return false;
 }
 
-static inline size_t
+static size_t
 cpu_rng_rdrand(cpu_rng_t *out)
 {
 	uint8_t rndsts;
@@ -98,7 +98,7 @@ cpu_rng_rdrand(cpu_rng_t *out)
 	return sizeof(*out) * NBBY;
 }
 
-static inline size_t
+static size_t
 cpu_rng_rdseed(cpu_rng_t *out)
 {
 	uint8_t rndsts;



CVS commit: src/sys/compat

2016-02-28 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sun Feb 28 23:24:36 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c
src/sys/compat/sunos32: sunos32_misc.c
src/sys/compat/svr4_32: svr4_32_misc.c

Log Message:
Add missing newline character in error message

This is related to kern/50469.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/sunos32/sunos32_misc.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/svr4_32/svr4_32_misc.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/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.198 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.199
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.198	Tue Dec  1 02:20:43 2015
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Sun Feb 28 23:24:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.198 2015/12/01 02:20:43 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.198 2015/12/01 02:20:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.199 2016/02/28 23:24:35 khorben Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1537,7 +1537,7 @@ netbsd32_mmap(struct lwp *l, const struc
 #endif
 	error = sys_mmap(l, , retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("netbsd32_mmap: retval out of range: 0x%lx",
+		printf("netbsd32_mmap: retval out of range: 0x%lx\n",
 		(u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}

Index: src/sys/compat/sunos32/sunos32_misc.c
diff -u src/sys/compat/sunos32/sunos32_misc.c:1.76 src/sys/compat/sunos32/sunos32_misc.c:1.77
--- src/sys/compat/sunos32/sunos32_misc.c:1.76	Fri Oct 23 19:40:11 2015
+++ src/sys/compat/sunos32/sunos32_misc.c	Sun Feb 28 23:24:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_misc.c,v 1.76 2015/10/23 19:40:11 maxv Exp $	*/
+/*	$NetBSD: sunos32_misc.c,v 1.77 2016/02/28 23:24:35 khorben Exp $	*/
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp	*/
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.76 2015/10/23 19:40:11 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.77 2016/02/28 23:24:35 khorben Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -758,7 +758,7 @@ sunos32_sys_mmap(struct lwp *l, const st
 
 	error = sys_mmap(l, , retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("sunos32_mmap: retval out of range: 0x%lx",
+		printf("sunos32_mmap: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}

Index: src/sys/compat/svr4_32/svr4_32_misc.c
diff -u src/sys/compat/svr4_32/svr4_32_misc.c:1.75 src/sys/compat/svr4_32/svr4_32_misc.c:1.76
--- src/sys/compat/svr4_32/svr4_32_misc.c:1.75	Fri Sep  5 09:21:55 2014
+++ src/sys/compat/svr4_32/svr4_32_misc.c	Sun Feb 28 23:24:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_misc.c,v 1.75 2014/09/05 09:21:55 matt Exp $	 */
+/*	$NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.75 2014/09/05 09:21:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $");
 
 #include 
 #include 
@@ -490,7 +490,7 @@ svr4_32_sys_mmap(struct lwp *l, const st
 
 	error = sys_mmap(l, , retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("svr4_32_mmap: retval out of range: 0x%lx",
+		printf("svr4_32_mmap: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}
@@ -523,7 +523,7 @@ svr4_32_sys_mmap64(struct lwp *l, const 
 
 	error = sys_mmap(l, , retval);
 	if ((u_long)*retval > (u_long)UINT_MAX) {
-		printf("svr4_32_mmap64: retval out of range: 0x%lx",
+		printf("svr4_32_mmap64: retval out of range: 0x%lx\n",
 		   (u_long)*retval);
 		/* Should try to recover and return an error here. */
 	}



CVS commit: src/bin/sh

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 23:12:23 UTC 2016

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

Log Message:
Bug fixes to handling of unterminated here documents
(they should be, and now are, a syntax error), and
miscellaneous other minor cleanups. (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/bin/sh/output.c
cvs rdiff -u -r1.101 -r1.102 src/bin/sh/parser.c
cvs rdiff -u -r1.30 -r1.31 src/bin/sh/show.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/output.c
diff -u src/bin/sh/output.c:1.33 src/bin/sh/output.c:1.34
--- src/bin/sh/output.c:1.33	Mon Aug 30 02:27:14 2010
+++ src/bin/sh/output.c	Sun Feb 28 18:12:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $	*/
+/*	$NetBSD: output.c,v 1.34 2016/02/28 23:12:23 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)output.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $");
+__RCSID("$NetBSD: output.c,v 1.34 2016/02/28 23:12:23 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -524,7 +524,7 @@ xwrite(int fd, char *buf, int nbytes)
 
 	n = nbytes;
 	ntry = 0;
-	for (;;) {
+	while (n > 0) {
 		i = write(fd, buf, n);
 		if (i > 0) {
 			if ((n -= i) <= 0)
@@ -538,6 +538,7 @@ xwrite(int fd, char *buf, int nbytes)
 			return -1;
 		}
 	}
+	return nbytes;
 }
 
 

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.101 src/bin/sh/parser.c:1.102
--- src/bin/sh/parser.c:1.101	Sat Feb 27 11:28:50 2016
+++ src/bin/sh/parser.c	Sun Feb 28 18:12:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.101 2016/02/27 16:28:50 christos Exp $	*/
+/*	$NetBSD: parser.c,v 1.102 2016/02/28 23:12:23 christos 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.101 2016/02/27 16:28:50 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.102 2016/02/28 23:12:23 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -122,6 +122,8 @@ STATIC void synerror(const char *) __dea
 STATIC void setprompt(int);
 
 
+static const char EOFhere[] = "EOF reading here (<<) document";
+
 /*
  * Read and parse a command.  Returns NEOF on end of file.  (NULL is a
  * valid parse tree indicating a blank line.)
@@ -720,14 +722,17 @@ parseheredoc(void)
 
 	while (heredoclist) {
 		int c;
+
 		here = heredoclist;
 		heredoclist = here->next;
 		if (needprompt) {
 			setprompt(2);
 			needprompt = 0;
 		}
-		if ((c = pgetc()) == PEOF)
-			continue;
+		if ((c = pgetc()) == PEOF) {
+			synerror(EOFhere);
+			/* NOTREACHED */
+		}
 		readtoken1(c, here->here->type == NHERE? SQSYNTAX : DQSYNTAX,
 		here->eofmark, here->striptabs);
 		n = stalloc(sizeof(struct narg));
@@ -913,7 +918,7 @@ breakloop:
 
 /*
  * We used to remember only the current syntax, variable nesting level,
- * double quote state for each var nexting level, and arith nesting
+ * double quote state for each var nesting level, and arith nesting
  * level (unrelated to var nesting) and one prev syntax when in arith
  * syntax.  This worked for simple cases, but can't handle arith inside
  * var expansion inside arith inside var with some quoted and some not.
@@ -924,7 +929,7 @@ breakloop:
  * Every time something changes, which will eventually end and should
  * revert to the previous state, we push this stack, and then pop it
  * again later (that is every ${} with an operator (to parse the word
- * or pattern that follows) ${x} and $x are too * simple to need it)
+ * or pattern that follows) ${x} and $x are too simple to need it)
  * $(( )) $( ) and "...".   Always.   Really, always!
  *
  * The stack is implemented as one static (on the C stack) base block
@@ -1321,6 +1326,8 @@ endword:
 
 checkend: {
 	if (eofmark) {
+		if (c == PEOF)
+			synerror(EOFhere);
 		if (striptabs) {
 			while (c == '\t')
 c = pgetc();
@@ -1339,7 +1346,8 @@ checkend: {
 } else {
 	pushstring(line, strlen(line), NULL);
 }
-			}
+			} else
+synerror(EOFhere);
 		}
 	}
 	goto checkend_return;

Index: src/bin/sh/show.c
diff -u src/bin/sh/show.c:1.30 src/bin/sh/show.c:1.31
--- src/bin/sh/show.c:1.30	Sat Feb 27 18:50:13 2016
+++ src/bin/sh/show.c	Sun Feb 28 18:12:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: show.c,v 1.30 2016/02/27 23:50:13 christos Exp $	*/
+/*	$NetBSD: show.c,v 1.31 2016/02/28 23:12:23 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)show.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: show.c,v 1.30 2016/02/27 23:50:13 christos Exp $");
+__RCSID("$NetBSD: show.c,v 1.31 2016/02/28 23:12:23 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -122,7 +122,7 @@ binop:
 		break;
 	case NCMD:
 		len += shcmd(n, fp);
-		if (nl)
+		if (nl 

CVS commit: src/lib/libedit

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 23:02:24 UTC 2016

Modified Files:
src/lib/libedit: chartype.c eln.c

Log Message:
remove 4 clause licenses.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libedit/chartype.c
cvs rdiff -u -r1.27 -r1.28 src/lib/libedit/eln.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/chartype.c
diff -u src/lib/libedit/chartype.c:1.22 src/lib/libedit/chartype.c:1.23
--- src/lib/libedit/chartype.c:1.22	Wed Feb 24 12:20:01 2016
+++ src/lib/libedit/chartype.c	Sun Feb 28 18:02:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.22 2016/02/24 17:20:01 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -12,13 +12,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *This product includes software developed by the NetBSD
- *Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -38,7 +31,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.22 2016/02/24 17:20:01 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 

Index: src/lib/libedit/eln.c
diff -u src/lib/libedit/eln.c:1.27 src/lib/libedit/eln.c:1.28
--- src/lib/libedit/eln.c:1.27	Wed Feb 24 12:13:22 2016
+++ src/lib/libedit/eln.c	Sun Feb 28 18:02:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: eln.c,v 1.27 2016/02/24 17:13:22 christos Exp $	*/
+/*	$NetBSD: eln.c,v 1.28 2016/02/28 23:02:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -12,13 +12,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *This product includes software developed by the NetBSD
- *Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -34,7 +27,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.27 2016/02/24 17:13:22 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.28 2016/02/28 23:02:24 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 



CVS commit: src/external/mit/xorg/lib/gallium

2016-02-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb 28 22:55:21 UTC 2016

Modified Files:
src/external/mit/xorg/lib/gallium: Makefile

Log Message:
Make using ! on the LHS of a compare non-fatal, even if it is not
cosher. It is currently not clear what the code is actually trying to
do.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/mit/xorg/lib/gallium/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/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.13 src/external/mit/xorg/lib/gallium/Makefile:1.14
--- src/external/mit/xorg/lib/gallium/Makefile:1.13	Fri Feb 26 18:29:55 2016
+++ src/external/mit/xorg/lib/gallium/Makefile	Sun Feb 28 22:55:21 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2016/02/26 18:29:55 riastradh Exp $
+# $NetBSD: Makefile,v 1.14 2016/02/28 22:55:21 joerg Exp $
 
 # Link the gallium mega driver.
 
@@ -594,7 +594,8 @@ CWARNFLAGS.clang+=	-Wno-error=constant-c
 			-Wno-error=switch \
 			-Wno-error=absolute-value \
 			-Wno-error=tautological-compare \
-			-Wno-error=static-in-inline
+			-Wno-error=static-in-inline \
+			-Wno-error=logical-not-parentheses
 
 .include 
 LIBDIR=		${X11USRLIBDIR}/modules/dri



CVS commit: src/sys/arch/aarch64/include

2016-02-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb 28 22:19:01 UTC 2016

Modified Files:
src/sys/arch/aarch64/include: types.h

Log Message:
Reorder using register_t to the point where it is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/include/types.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/aarch64/include/types.h
diff -u src/sys/arch/aarch64/include/types.h:1.4 src/sys/arch/aarch64/include/types.h:1.5
--- src/sys/arch/aarch64/include/types.h:1.4	Sat Jan 23 22:31:19 2016
+++ src/sys/arch/aarch64/include/types.h	Sun Feb 28 22:19:01 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.4 2016/01/23 22:31:19 christos Exp $ */
+/* $NetBSD: types.h,v 1.5 2016/02/28 22:19:01 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -38,12 +38,6 @@
 #include 
 #include 
 
-#if defined(_KERNEL)
-typedef struct label_t {	/* Used by setjmp & longjmp */
-register_t lb_reg[13];	/* x19 .. x30, sp */
-} label_t;
-#endif
-
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
 typedef	unsigned long	vm_offset_t;	/* depreciated */
 typedef	unsigned long	vm_size_t;	/* depreciated */
@@ -69,6 +63,12 @@ typedef unsigned long	pmc_evid_t;
 typedef unsigned long	pmc_ctr_t;
 typedef unsigned short	tlb_asid_t;
 
+#if defined(_KERNEL)
+typedef struct label_t {	/* Used by setjmp & longjmp */
+register_t lb_reg[13];	/* x19 .. x30, sp */
+} label_t;
+#endif
+
 #endif
  
 /*



CVS commit: xsrc/external/mit/xedit/dist/lisp

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 22:16:10 UTC 2016

Modified Files:
xsrc/external/mit/xedit/dist/lisp: internal.h

Log Message:
Avoid left shifts of negative values. Right shift is implementation
defined and consist on all architectures we care about, so no change for
the reverse direction.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/xedit/dist/lisp/internal.h

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

Modified files:

Index: xsrc/external/mit/xedit/dist/lisp/internal.h
diff -u xsrc/external/mit/xedit/dist/lisp/internal.h:1.1.1.3 xsrc/external/mit/xedit/dist/lisp/internal.h:1.2
--- xsrc/external/mit/xedit/dist/lisp/internal.h:1.1.1.3	Sun Jul 19 19:37:31 2015
+++ xsrc/external/mit/xedit/dist/lisp/internal.h	Sun Feb 28 22:16:10 2016
@@ -134,7 +134,7 @@ typedef struct _LispMac LispMac;
 (((unsigned long)(object) & NIL_BIT) == 0)
 
 #define MOST_POSITIVE_FIXNUM	((1L << (sizeof(long) * 8 - 5)) - 1)
-#define MOST_NEGATIVE_FIXNUM	(-1L << (sizeof(long) * 8 - 5))
+#define MOST_NEGATIVE_FIXNUM	(-(1L << (sizeof(long) * 8 - 5)))
 
 #define SCHAR(value)			\
 ((LispObj*)(((long)(value) << BIT_COUNT) | SCHAR_MASK))
@@ -179,7 +179,7 @@ typedef struct _LispMac LispMac;
 
 /* fixnum */
 #define FIXNUM(value)			\
-((LispObj*)(((long)(value) << BIT_COUNT) | FIXNUM_MASK))
+((LispObj*)(((long)(value) * (1 << BIT_COUNT)) | FIXNUM_MASK))
 #define FIXNUM_VALUE(object)	((long)(object) >> BIT_COUNT)
 #define FIXNUMP(object)			\
 (((unsigned long)(object) & BIT_MASK) == FIXNUM_MASK)



CVS commit: xsrc/external/mit/xf86-video-sis/dist/src

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 22:15:26 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-sis/dist/src: sis300_accel.h

Log Message:
MMIO32 arguments are CARD32, so cast to the unsigned type before doing
left shifts.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h

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

Modified files:

Index: xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h
diff -u xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h:1.1.1.2 xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h:1.2
--- xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h:1.1.1.2	Wed Jun 10 00:48:31 2009
+++ xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h	Sun Feb 28 22:15:26 2016
@@ -130,7 +130,7 @@
 
 #define SiSSetupSRCXY(x,y) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(2), (x)<<16 | (y) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(2), (CARD32)(x)<<16 | (CARD32)(y) );\
 CmdQueLen--;
 
 #define SiSSetupDSTBase(base) \
@@ -140,12 +140,12 @@
 
 #define SiSSetupDSTXY(x,y) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(3), (x)<<16 | (y) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(3), (CARD32)(x)<<16 | (CARD32)(y) );\
 CmdQueLen--;
 
 #define SiSSetupDSTRect(x,y) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(5), (y)<<16 | (x) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(5), (CARD32)(y)<<16 | (CARD32)(x) );\
 CmdQueLen--;
 
 #define SiSSetupDSTColorDepth(bpp) \
@@ -157,7 +157,7 @@
 
 #define SiSSetupRect(w,h) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(6), (h)<<16 | (w) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(6), (CARD32)(h)<<16 | (CARD32)(w) );\
 CmdQueLen--;
 
 #define SiSSetupPATFG(color) \
@@ -204,12 +204,12 @@
 
 #define SiSSetupClipLT(left,top) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(13), ((left) & 0x) | (top)<<16 );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(13), ((left) & 0x) | (CARD32)(top)<<16 );\
 CmdQueLen--;
 
 #define SiSSetupClipRB(right,bottom) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(14), ((right) & 0x) | (bottom)<<16 );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(14), ((right) & 0x) | (CARD32)(bottom)<<16 );\
 CmdQueLen--;
 
 /* General */
@@ -235,12 +235,12 @@
 /* Line */
 #define SiSSetupX0Y0(x,y) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(2), (y)<<16 | (x) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(2), (CARD32)(y)<<16 | (CARD32)(x) );\
 CmdQueLen--;
 
 #define SiSSetupX1Y1(x,y) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, BR(3), (y)<<16 | (x) );\
+SIS_MMIO_OUT32(pSiS->IOBase, BR(3), (CARD32)(y)<<16 | (CARD32)(x) );\
 CmdQueLen--;
 
 #define SiSSetupLineCount(c) \
@@ -266,22 +266,22 @@
 /* Trapezoid */
 #define SiSSetupYH(y,h) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, 0x8208, (y)<<16 | (h) );\
+SIS_MMIO_OUT32(pSiS->IOBase, 0x8208, (CARD32)(y)<<16 | (CARD32)(h) );\
 CmdQueLen--;
 
 #define SiSSetupLR(left,right) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, 0x820C, (right)<<16 | (left) );\
+SIS_MMIO_OUT32(pSiS->IOBase, 0x820C, (CARD32)(right)<<16 | (CARD32)(left) );\
 CmdQueLen--;
 
 #define SiSSetupdL(dxL,dyL) \
 if (CmdQueLen <= 0)  SiSIdle;\
-SIS_MMIO_OUT32(pSiS->IOBase, 0x8244, (dyL)<<16 | (dxL) );\
+SIS_MMIO_OUT32(pSiS->IOBase, 0x8244, (CARD32)(dyL)<<16 | (CARD32)(dxL) );\
 CmdQueLen--;
 
 #define SiSSetupdR(dxR,dyR) \
 if (CmdQueLen <= 0)  SiSIdle;\
-		SIS_MMIO_OUT32(pSiS->IOBase, 0x8248, (dyR)<<16 | (dxR) );\
+		SIS_MMIO_OUT32(pSiS->IOBase, 0x8248, (CARD32)(dyR)<<16 | (CARD32)(dxR) );\
 CmdQueLen--;
 
 #define SiSSetupEL(eL) \



CVS commit: src/external/mit/xorg/tools/mkfontscale

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 22:12:27 UTC 2016

Modified Files:
src/external/mit/xorg/tools/mkfontscale: Makefile

Log Message:
Define FC_NO_MT=1 for tools mkfontscale build.

No idea what the host's atomic ops will be but we don't need them
because this tool is not multithreaded.

Fixes harmless warnings like

all ===> external/mit/xorg/tools/mkfontscale
/home/source/ab/HEAD-llvm/xsrc/external/mit/fontconfig/dist/src/fcinit.c:29:2: 
warning: #warning Could not find any system to define atomic_int macros, 
library may NOT be thread-safe. [-Wcpp]
 #warning Could not find any system to define atomic_int macros, library may 
NOT be thread-safe.
  ^


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/tools/mkfontscale/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/mit/xorg/tools/mkfontscale/Makefile
diff -u src/external/mit/xorg/tools/mkfontscale/Makefile:1.7 src/external/mit/xorg/tools/mkfontscale/Makefile:1.8
--- src/external/mit/xorg/tools/mkfontscale/Makefile:1.7	Thu Jul 23 08:03:26 2015
+++ src/external/mit/xorg/tools/mkfontscale/Makefile	Sun Feb 28 22:12:26 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2015/07/23 08:03:26 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2016/02/28 22:12:26 riastradh Exp $
 
 NOMAN=		1
 
@@ -86,6 +86,11 @@ HOST_CPPFLAGS=	-DFONTENC_NO_LIBFONT -DXF
 		-DFONT_ENCODINGS_DIRECTORY=\"${X11FONTDIR}/encodings/encodings.dir\" \
 		-DPACKAGE_STRING=\"NetBSD\ tools\ version\"
 HOST_CPPFLAGS+=	-DFT_CONFIG_OPTION_DISABLE_BZIP2
+
+# If you make mkfontscale multithreaded, remove this and fix the
+# fontconfig atomic ops.
+HOST_CPPFLAGS+=	-DFC_NO_MT=1
+
 HOST_CPPFLAGS+=	-I${FREETYPE}/include -I${DESTDIR}${X11INCDIR} \
 		-I${DESTDIR}${X11INCDIR}/freetype2
 



CVS commit: xsrc/external/mit/pixman/dist/pixman

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 22:01:26 UTC 2016

Modified Files:
xsrc/external/mit/pixman/dist/pixman: pixman.h

Log Message:
pixman_int_to_fixed is sometimes used with negative values, so do not
use left shift, but the equivalent multiplication.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/pixman/dist/pixman/pixman.h

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

Modified files:

Index: xsrc/external/mit/pixman/dist/pixman/pixman.h
diff -u xsrc/external/mit/pixman/dist/pixman/pixman.h:1.5 xsrc/external/mit/pixman/dist/pixman/pixman.h:1.6
--- xsrc/external/mit/pixman/dist/pixman/pixman.h:1.5	Mon Mar 17 01:24:18 2014
+++ xsrc/external/mit/pixman/dist/pixman/pixman.h	Sun Feb 28 22:01:26 2016
@@ -127,7 +127,7 @@ typedef pixman_fixed_16_16_t	pixman_fixe
 #define pixman_fixed_1_minus_e		(pixman_fixed_1 - pixman_fixed_e)
 #define pixman_fixed_minus_1		(pixman_int_to_fixed(-1))
 #define pixman_fixed_to_int(f)		((int) ((f) >> 16))
-#define pixman_int_to_fixed(i)		((pixman_fixed_t) ((i) << 16))
+#define pixman_int_to_fixed(i)		((pixman_fixed_t) ((i) * 65536))
 #define pixman_fixed_to_double(f)	(double) ((f) / (double) pixman_fixed_1)
 #define pixman_double_to_fixed(d)	((pixman_fixed_t) ((d) * 65536.0))
 #define pixman_fixed_frac(f)		((f) & pixman_fixed_1_minus_e)



CVS commit: xsrc/external/mit/fonttosfnt/dist

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 21:26:48 UTC 2016

Modified Files:
xsrc/external/mit/fonttosfnt/dist: struct.c

Log Message:
Left shift of negative values is UB, so just consistently use
multiplication.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/fonttosfnt/dist/struct.c

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

Modified files:

Index: xsrc/external/mit/fonttosfnt/dist/struct.c
diff -u xsrc/external/mit/fonttosfnt/dist/struct.c:1.1.1.1 xsrc/external/mit/fonttosfnt/dist/struct.c:1.2
--- xsrc/external/mit/fonttosfnt/dist/struct.c:1.1.1.1	Wed Jul 30 02:35:52 2008
+++ xsrc/external/mit/fonttosfnt/dist/struct.c	Sun Feb 28 21:26:48 2016
@@ -491,8 +491,8 @@ fontMetrics(FontPtr font,
 {
 int i, rc;
 int max_awidth = 0;
-int min_x = 1 << 16, min_y = 1 << 16;
-int max_x = -1 << 16, max_y = -1 << 16;
+int min_x = 1 * 65536, min_y = 1 * 65536;
+int max_x = -1 * 65536, max_y = -1 * 65536;
 for(i = 0; i < FONT_CODES; i++) {
 int awidth, x0, y0, x1, y1;
 rc = glyphMetrics(font, i, , , , , );



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

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 20:51:03 UTC 2016

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
KNF.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/cpu_rng.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu_rng.c
diff -u src/sys/arch/x86/x86/cpu_rng.c:1.3 src/sys/arch/x86/x86/cpu_rng.c:1.4
--- src/sys/arch/x86/x86/cpu_rng.c:1.3	Sat Feb 27 00:54:59 2016
+++ src/sys/arch/x86/x86/cpu_rng.c	Sun Feb 28 20:51:03 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_rng.c,v 1.3 2016/02/27 00:54:59 tls Exp $ */
+/* $NetBSD: cpu_rng.c,v 1.4 2016/02/28 20:51:03 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -49,7 +49,8 @@ static enum {
 	CPU_RNG_NONE = 0,
 	CPU_RNG_RDRAND,
 	CPU_RNG_RDSEED,
-	CPU_RNG_VIA } cpu_rng_mode __read_mostly = CPU_RNG_NONE;
+	CPU_RNG_VIA
+} cpu_rng_mode __read_mostly = CPU_RNG_NONE;
 
 bool
 cpu_rng_init(void)
@@ -104,7 +105,7 @@ cpu_rng_rdseed(cpu_rng_t *out)
 
 #ifdef __i386__
 	uint32_t lo, hi;
-	
+
 	__asm __volatile("rdseed %0; setc %1" : "=r"(lo), "=qm"(rndsts));
 if (rndsts != 1)
 		goto exhausted;
@@ -178,6 +179,7 @@ cpu_rng_via(cpu_rng_t *out)
 size_t
 cpu_rng(cpu_rng_t *out)
 {
+
 	switch (cpu_rng_mode) {
 	case CPU_RNG_NONE:
 		return 0;



CVS commit: src/share/mk

2016-02-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb 28 20:47:01 UTC 2016

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

Log Message:
Switch sparc64 over to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.903 -r1.904 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.903 src/share/mk/bsd.own.mk:1.904
--- src/share/mk/bsd.own.mk:1.903	Sat Feb 27 18:56:33 2016
+++ src/share/mk/bsd.own.mk	Sun Feb 28 20:47:01 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.903 2016/02/27 18:56:33 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.904 2016/02/28 20:47:01 martin Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -145,6 +145,7 @@ EXTERNAL_GDB_SUBDIR=		gdb
 ${MACHINE} == "i386" || \
 ${MACHINE} == "hppa" || \
 ${MACHINE} == "sparc" || \
+${MACHINE} == "sparc64" || \
 ${MACHINE_ARCH} == "powerpc"
 HAVE_BINUTILS?=	226
 .else



CVS commit: src/sys/kern

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 20:37:16 UTC 2016

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

Log Message:
Omit needless `if (RND_ENABLED(...))' in rnd_skew_get.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.86 src/sys/kern/kern_rndq.c:1.87
--- src/sys/kern/kern_rndq.c:1.86	Sun Feb 28 20:36:08 2016
+++ src/sys/kern/kern_rndq.c	Sun Feb 28 20:37:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.86 2016/02/28 20:36:08 riastradh Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.87 2016/02/28 20:37:16 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.86 2016/02/28 20:36:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.87 2016/02/28 20:37:16 riastradh Exp $");
 
 #include 
 #include 
@@ -466,11 +466,10 @@ rnd_skew_get(size_t bytes, void *priv)
 	krndsource_t *skewsrcp = priv;
 
 	KASSERT(skewsrcp == _skew.source);
-	if (RND_ENABLED(skewsrcp)) {
-		/* Measure 100 times */
-		rnd_skew.iter = 100;
-		callout_schedule(_skew.callout, 1);
-	}
+
+	/* Measure 100 times */
+	rnd_skew.iter = 100;
+	callout_schedule(_skew.callout, 1);
 }
 
 static void



CVS commit: src/sys/kern

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 20:36:08 UTC 2016

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

Log Message:
Omit needless `if (RND_ENABLED(...))' in rnd_cpu_get.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.85 src/sys/kern/kern_rndq.c:1.86
--- src/sys/kern/kern_rndq.c:1.85	Sun Feb 28 20:24:23 2016
+++ src/sys/kern/kern_rndq.c	Sun Feb 28 20:36:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.86 2016/02/28 20:36:08 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.86 2016/02/28 20:36:08 riastradh Exp $");
 
 #include 
 #include 
@@ -414,29 +414,27 @@ static struct {
 	kmutex_t	lock;	/* unfortunately, must protect krndsource */
 	krndsource_t	source;
 } rnd_cpu __cacheline_aligned;
-	
+
 static void
 rnd_cpu_get(size_t bytes, void *priv)
 {
 	krndsource_t *cpusrcp = priv;
+	cpu_rng_t buf[2 * RND_ENTROPY_THRESHOLD / sizeof(cpu_rng_t)];
+	cpu_rng_t *bufp;
+	size_t cnt = __arraycount(buf);
+	size_t entropy = 0;
+
 	KASSERT(cpusrcp == _cpu.source);
 
-if (RND_ENABLED(cpusrcp)) {
-		cpu_rng_t buf[2 * RND_ENTROPY_THRESHOLD / sizeof(cpu_rng_t)];
-		cpu_rng_t *bufp;
-		size_t cnt = __arraycount(buf);
-		size_t entropy = 0;
-
-		for (bufp = buf; bufp < buf + cnt; bufp++) {
-			entropy += cpu_rng(bufp);
-		}
-		if (__predict_true(entropy)) {
-			mutex_spin_enter(_cpu.lock);
-			rnd_add_data_sync(cpusrcp, buf, sizeof(buf), entropy);
-			explicit_memset(buf, 0, sizeof(buf));
-			mutex_spin_exit(_cpu.lock);
-		}
-}
+	for (bufp = buf; bufp < buf + cnt; bufp++) {
+		entropy += cpu_rng(bufp);
+	}
+	if (__predict_true(entropy)) {
+		mutex_spin_enter(_cpu.lock);
+		rnd_add_data_sync(cpusrcp, buf, sizeof(buf), entropy);
+		explicit_memset(buf, 0, sizeof(buf));
+		mutex_spin_exit(_cpu.lock);
+	}
 }
 
 #endif



CVS commit: src/sys/kern

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 20:24:23 UTC 2016

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

Log Message:
Use __arraycount(x), not howmany(sizeof(x), sizeof(*x)).


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.84 src/sys/kern/kern_rndq.c:1.85
--- src/sys/kern/kern_rndq.c:1.84	Sun Feb 28 20:20:17 2016
+++ src/sys/kern/kern_rndq.c	Sun Feb 28 20:24:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $");
 
 #include 
 #include 
@@ -424,7 +424,7 @@ rnd_cpu_get(size_t bytes, void *priv)
 if (RND_ENABLED(cpusrcp)) {
 		cpu_rng_t buf[2 * RND_ENTROPY_THRESHOLD / sizeof(cpu_rng_t)];
 		cpu_rng_t *bufp;
-		size_t cnt = howmany(sizeof(buf), sizeof(cpu_rng_t));
+		size_t cnt = __arraycount(buf);
 		size_t entropy = 0;
 
 		for (bufp = buf; bufp < buf + cnt; bufp++) {



CVS commit: src/sys/kern

2016-02-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 28 20:20:17 UTC 2016

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

Log Message:
Skip disabled sources in rnd_getmore.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.83 src/sys/kern/kern_rndq.c:1.84
--- src/sys/kern/kern_rndq.c:1.83	Sat Feb 27 14:30:33 2016
+++ src/sys/kern/kern_rndq.c	Sun Feb 28 20:20:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.83 2016/02/27 14:30:33 mlelstv Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.83 2016/02/27 14:30:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $");
 
 #include 
 #include 
@@ -260,6 +260,10 @@ rnd_getmore(size_t byteswanted)
 
 	mutex_spin_enter(_global.lock);
 	LIST_FOREACH_SAFE(rs, _global.sources, list, next) {
+		/* Skip if the source is disabled.  */
+		if (!RND_ENABLED(rs))
+			continue;
+
 		/* Skip if there's no callback.  */
 		if (!ISSET(rs->flags, RND_FLAG_HASCB))
 			continue;



CVS commit: src/sys/arch/mac68k/nubus

2016-02-28 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sun Feb 28 19:39:27 UTC 2016

Modified Files:
src/sys/arch/mac68k/nubus: grf_nubus.c

Log Message:
Set sc_dev field of softc.

Should pullup to 7.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mac68k/nubus/grf_nubus.c

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

Modified files:

Index: src/sys/arch/mac68k/nubus/grf_nubus.c
diff -u src/sys/arch/mac68k/nubus/grf_nubus.c:1.77 src/sys/arch/mac68k/nubus/grf_nubus.c:1.78
--- src/sys/arch/mac68k/nubus/grf_nubus.c:1.77	Fri Oct 25 21:42:30 2013
+++ src/sys/arch/mac68k/nubus/grf_nubus.c	Sun Feb 28 19:39:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $	*/
+/*	$NetBSD: grf_nubus.c,v 1.78 2016/02/28 19:39:27 rjs Exp $	*/
 
 /*
  * Copyright (c) 1995 Allen Briggs.  All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.78 2016/02/28 19:39:27 rjs Exp $");
 
 #include 
 
@@ -143,6 +143,7 @@ grfmv_attach(device_t parent, device_t s
 
 	memcpy(>sc_slot, na->fmt, sizeof(nubus_slot));
 
+	sc->sc_dev = self;
 	sc->sc_tag = na->na_tag;
 	sc->card_id = na->drhw;
 	sc->sc_basepa = (bus_addr_t)NUBUS_SLOT2PA(na->slot);



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

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 19:18:41 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: stl.mi

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/comp/stl.mi

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

Modified files:

Index: src/distrib/sets/lists/comp/stl.mi
diff -u src/distrib/sets/lists/comp/stl.mi:1.3 src/distrib/sets/lists/comp/stl.mi:1.4
--- src/distrib/sets/lists/comp/stl.mi:1.3	Sun Feb 28 14:11:48 2016
+++ src/distrib/sets/lists/comp/stl.mi	Sun Feb 28 14:18:41 2016
@@ -1,6 +1,6 @@
-# $NetBSD: stl.mi,v 1.3 2016/02/28 19:11:48 christos Exp $
+# $NetBSD: stl.mi,v 1.4 2016/02/28 19:18:41 christos Exp $
 ./usr/lib/crtbegin.ocomp-c-lib	compatfile
 ./usr/lib/crtend.ocomp-c-lib	compatfile
 ./usr/lib/crti.ocomp-c-lib	compatfile
 ./usr/lib/crtn.ocomp-c-lib	compatfile
-./usr/lib/dtreace/drti.o			comp-c-lib	dtrace
+./usr/lib/dtrace/drti.ocomp-c-lib	dtrace



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

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 19:11:48 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: stl.mi

Log Message:
add drti.o


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/comp/stl.mi

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

Modified files:

Index: src/distrib/sets/lists/comp/stl.mi
diff -u src/distrib/sets/lists/comp/stl.mi:1.2 src/distrib/sets/lists/comp/stl.mi:1.3
--- src/distrib/sets/lists/comp/stl.mi:1.2	Mon Jun 22 02:02:02 2015
+++ src/distrib/sets/lists/comp/stl.mi	Sun Feb 28 14:11:48 2016
@@ -1,5 +1,6 @@
-# $NetBSD: stl.mi,v 1.2 2015/06/22 06:02:02 matt Exp $
+# $NetBSD: stl.mi,v 1.3 2016/02/28 19:11:48 christos Exp $
 ./usr/lib/crtbegin.ocomp-c-lib	compatfile
 ./usr/lib/crtend.ocomp-c-lib	compatfile
 ./usr/lib/crti.ocomp-c-lib	compatfile
 ./usr/lib/crtn.ocomp-c-lib	compatfile
+./usr/lib/dtreace/drti.o			comp-c-lib	dtrace



CVS commit: src/external/cddl/osnet/lib

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 19:10:10 UTC 2016

Modified Files:
src/external/cddl/osnet/lib: Makefile
src/external/cddl/osnet/lib/drti: Makefile

Log Message:
hook drti


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/lib/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/drti/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/cddl/osnet/lib/Makefile
diff -u src/external/cddl/osnet/lib/Makefile:1.6 src/external/cddl/osnet/lib/Makefile:1.7
--- src/external/cddl/osnet/lib/Makefile:1.6	Tue Mar 25 05:52:55 2014
+++ src/external/cddl/osnet/lib/Makefile	Sun Feb 28 14:10:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2014/03/25 09:52:55 ozaki-r Exp $
+#	$NetBSD: Makefile,v 1.7 2016/02/28 19:10:10 christos Exp $
 #
 #
 
@@ -6,6 +6,7 @@
 
 .if (defined(MKDTRACE) && ${MKDTRACE} != "no")
 SUBDIR+=	libdtrace
+SUBDIR+=	drti
 .endif
 .if ${MKDTRACE:Uno} != "no" || ${MKCTF:Uno} != "no"
 SUBDIR+=	libctf

Index: src/external/cddl/osnet/lib/drti/Makefile
diff -u src/external/cddl/osnet/lib/drti/Makefile:1.1 src/external/cddl/osnet/lib/drti/Makefile:1.2
--- src/external/cddl/osnet/lib/drti/Makefile:1.1	Sat Feb 20 19:49:57 2010
+++ src/external/cddl/osnet/lib/drti/Makefile	Sun Feb 28 14:10:10 2016
@@ -1,11 +1,12 @@
 # $FreeBSD: src/cddl/lib/drti/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
-
+.include	
 .include	"../../Makefile.inc"
 
 .PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
 
 SRCS=		drti.c
-FILES=		${SRCS:R:S/$/.o/g}
+OBJS=		${SRCS:R:S/$/.o/g}
+FILES=		${OBJS}
 FILESOWN=	${LIBOWN}
 FILESGRP=	${LIBGRP}
 FILESMODE=	${LIBMODE}
@@ -13,11 +14,11 @@ FILESDIR=	${LIBDIR}/dtrace
 WARNS?=		6
 CLEANFILES=	${FILES}
 
-CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
-		-I${OPENSOLARIS_USR_DISTDIR}/head \
-		-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
-		-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
-		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+CPPFLAGS+=	-I${.CURDIR}/../../dist/lib/libdtrace/common \
+		-I${.CURDIR}/../../include \
+		-I${.CURDIR}/../../sys  \
+		-I${.CURDIR}/../../dist/uts/common
+
+realall: ${OBJS}
 
 .include 



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2016-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 28 19:10:45 UTC 2016

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: drti.c

Log Message:
- Add missing ioctl.h
- Hide dprintf


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.4 src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.5
--- src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c:1.4	Thu Sep 24 10:25:29 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/drti.c	Sun Feb 28 14:10:45 2016
@@ -29,9 +29,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
+#define dprintf __hide_dprintf
 #include 
+#undef dprintf
 #include 
 #include 
 #include 



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-02-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 28 16:23:57 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Use __func__ in printfs


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.64 -r1.264.4.65 src/sys/dev/usb/uhci.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/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.64 src/sys/dev/usb/uhci.c:1.264.4.65
--- src/sys/dev/usb/uhci.c:1.264.4.64	Sun Feb 28 16:18:15 2016
+++ src/sys/dev/usb/uhci.c	Sun Feb 28 16:23:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.64 2016/02/28 16:18:15 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.65 2016/02/28 16:23:57 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.64 2016/02/28 16:18:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.65 2016/02/28 16:23:57 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -413,7 +413,7 @@ uhci_find_prev_qh(uhci_soft_qh_t *pqh, u
 		sizeof(pqh->qh.qh_hlink),
 		BUS_DMASYNC_POSTWRITE);
 		if (le32toh(pqh->qh.qh_hlink) & UHCI_PTR_T) {
-			printf("uhci_find_prev_qh: QH not found\n");
+			printf("%s: QH not found\n", __func__);
 			return NULL;
 		}
 #endif
@@ -1905,7 +1905,7 @@ uhci_free_std_locked(uhci_softc_t *sc, u
 
 #ifdef DIAGNOSTIC
 	if (le32toh(std->td.td_token) == TD_IS_FREE) {
-		printf("uhci_free_std: freeing free TD %p\n", std);
+		printf("%s: freeing free TD %p\n", __func__, std);
 		return;
 	}
 	std->td.td_token = htole32(TD_IS_FREE);
@@ -2037,7 +2037,7 @@ uhci_alloc_std_chain(uhci_softc_t *sc, s
 	len = alen;
 	maxp = UGETW(xfer->ux_pipe->up_endpoint->ue_edesc->wMaxPacketSize);
 	if (maxp == 0) {
-		printf("uhci_alloc_std_chain: maxp=0\n");
+		printf("%s: maxp=0\n", __func__);
 		return USBD_INVAL;
 	}
 	size_t ntd = (len + maxp - 1) / maxp;
@@ -2116,7 +2116,7 @@ uhci_free_stds(uhci_softc_t *sc, struct 
 		uhci_soft_td_t *std = ux->ux_stds[i];
 #ifdef DIAGNOSTIC
 		if (le32toh(std->td.td_token) == TD_IS_FREE) {
-			printf("uhci_free_std: freeing free TD %p\n", std);
+			printf("%s: freeing free TD %p\n", __func__, std);
 			return;
 		}
 		std->td.td_token = htole32(TD_IS_FREE);
@@ -2443,7 +2443,7 @@ uhci_abort_xfer(struct usbd_xfer *xfer, 
 		DPRINTFN(2, "already aborting", 0, 0, 0, 0);
 #ifdef DIAGNOSTIC
 		if (status == USBD_TIMEOUT)
-			printf("uhci_abort_xfer: TIMEOUT while aborting\n");
+			printf("%s: TIMEOUT while aborting\n", __func__);
 #endif
 		/* Override the status which might be USBD_TIMEOUT. */
 		xfer->ux_status = status;
@@ -3057,7 +3057,7 @@ uhci_device_isoc_enter(struct usbd_xfer 
 
 #ifdef DIAGNOSTIC
 	if (isoc->inuse >= UHCI_VFRAMELIST_COUNT)
-		printf("uhci_device_isoc_enter: overflow!\n");
+		printf("%s: overflow!\n", __func__);
 #endif
 
 	next = isoc->next;
@@ -3130,7 +3130,7 @@ uhci_device_isoc_start(struct usbd_xfer 
 
 #ifdef DIAGNOSTIC
 	if (xfer->ux_status != USBD_IN_PROGRESS)
-		printf("uhci_device_isoc_start: not in progress %p\n", xfer);
+		printf("%s: not in progress %p\n", __func__, xfer);
 #endif
 
 	/* Find the last TD */
@@ -3260,7 +3260,7 @@ uhci_device_isoc_close(struct usbd_pipe 
 			;
 		if (vstd == NULL) {
 			/*panic*/
-			printf("uhci_device_isoc_close: %p not found\n", std);
+			printf("%s: %p not found\n", __func__, std);
 			mutex_exit(>sc_lock);
 			return;
 		}
@@ -3366,7 +3366,7 @@ uhci_device_isoc_done(struct usbd_xfer *
 
 #ifdef DIAGNOSTIC
 	if (ux->ux_stdend == NULL) {
-		printf("uhci_device_isoc_done: xfer=%p stdend==NULL\n", xfer);
+		printf("%s: xfer=%p stdend==NULL\n", __func__, xfer);
 #ifdef UHCI_DEBUG
 		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		uhci_dump_ii(ux);
@@ -3559,7 +3559,7 @@ uhci_device_setintr(uhci_softc_t *sc, st
 	UHCIHIST_FUNC(); UHCIHIST_CALLED();
 	DPRINTFN(2, "pipe=%p", upipe, 0, 0, 0);
 	if (ival == 0) {
-		printf("uhci_device_setintr: 0 interval\n");
+		printf("%s: 0 interval\n", __func__);
 		return USBD_INVAL;
 	}
 



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-02-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 28 16:18:15 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Use __func__ in printf


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.63 -r1.264.4.64 src/sys/dev/usb/uhci.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/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.63 src/sys/dev/usb/uhci.c:1.264.4.64
--- src/sys/dev/usb/uhci.c:1.264.4.63	Sun Feb 28 09:16:20 2016
+++ src/sys/dev/usb/uhci.c	Sun Feb 28 16:18:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.63 2016/02/28 09:16:20 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.64 2016/02/28 16:18:15 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.63 2016/02/28 09:16:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.64 2016/02/28 16:18:15 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -3051,7 +3051,7 @@ uhci_device_isoc_enter(struct usbd_xfer 
 
 	if (xfer->ux_status == USBD_IN_PROGRESS) {
 		/* This request has already been entered into the frame list */
-		printf("uhci_device_isoc_enter: xfer=%p in frame list\n", xfer);
+		printf("%s: xfer=%p in frame list\n", __func__, xfer);
 		/* XXX */
 	}
 



CVS commit: src/external/gpl3/binutils/dist/ld/emulparams

2016-02-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb 28 16:06:27 UTC 2016

Modified Files:
src/external/gpl3/binutils/dist/ld/emulparams: elf32_sparc.sh

Log Message:
Only override LIB_PATH to /usr/lib/sparc when doing elf32 for sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/dist/ld/emulparams/elf32_sparc.sh

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/binutils/dist/ld/emulparams/elf32_sparc.sh
diff -u src/external/gpl3/binutils/dist/ld/emulparams/elf32_sparc.sh:1.4 src/external/gpl3/binutils/dist/ld/emulparams/elf32_sparc.sh:1.5
--- src/external/gpl3/binutils/dist/ld/emulparams/elf32_sparc.sh:1.4	Mon Apr 14 21:09:02 2014
+++ src/external/gpl3/binutils/dist/ld/emulparams/elf32_sparc.sh	Sun Feb 28 16:06:27 2016
@@ -20,6 +20,10 @@ NO_SMALL_DATA=yes
 
 case "$target" in
   sparc64-*-netbsd*)
-LIB_PATH='=/usr/lib/sparc'
+case "$EMULATION_NAME" in
+  *32*)
+	LIB_PATH='=/usr/lib/sparc'
+	;;
+esac
 ;;
 esac



CVS commit: xsrc/external/mit/xkbutils/dist

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 15:21:57 UTC 2016

Modified Files:
xsrc/external/mit/xkbutils/dist: xkbbell.c

Log Message:
A negated boolean is either 0 or 1, so no need to explicitly test for
positive.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/xkbutils/dist/xkbbell.c

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

Modified files:

Index: xsrc/external/mit/xkbutils/dist/xkbbell.c
diff -u xsrc/external/mit/xkbutils/dist/xkbbell.c:1.1.1.3 xsrc/external/mit/xkbutils/dist/xkbbell.c:1.2
--- xsrc/external/mit/xkbutils/dist/xkbbell.c:1.1.1.3	Wed Mar 19 23:43:15 2014
+++ xsrc/external/mit/xkbutils/dist/xkbbell.c	Sun Feb 28 15:21:57 2016
@@ -202,7 +202,7 @@ main(int argc, char *argv[])
 XkbMajorVersion, XkbMinorVersion);
 fprintf(stderr, " Trying anyway\n");
 }
-if (!XkbQueryExtension(dpy, , , , , ) > 0) {
+if (!XkbQueryExtension(dpy, , , , , )) {
 if ((i4 != 0) || (i5 != 0))
 fprintf(stderr,
 "server supports incompatible XKB version %d.%02d\n", i4,



CVS commit: xsrc/external/mit/xf86-video-sis/dist/src

2016-02-28 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sun Feb 28 15:22:35 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-sis/dist/src: sis_driver.c

Log Message:
Avoid non-literal format string warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c
diff -u xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.4 xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.5
--- xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.4	Thu Mar 20 01:04:22 2014
+++ xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c	Sun Feb 28 15:22:34 2016
@@ -423,7 +423,7 @@ static void
 SISErrorLog(ScrnInfoPtr pScrn, const char *format, ...)
 {
 va_list ap;
-static const char *str = "**\n";
+static const char str[] = "**\n";
 
 va_start(ap, format);
 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, str);
@@ -1782,7 +1782,7 @@ SiSUpdateXineramaScreenInfo(ScrnInfoPtr 
 DisplayModePtr currentMode, firstMode;
 Bool infochanged = FALSE;
 Bool usenonrect = pSiS->NonRect;
-const char *rectxine = "\t... setting up rectangular Xinerama layout\n";
+static const char rectxine[] = "\t... setting up rectangular Xinerama layout\n";
 
 pSiS->MBXNR1XMAX = pSiS->MBXNR1YMAX = pSiS->MBXNR2XMAX = pSiS->MBXNR2YMAX = 65536;
 pSiS->HaveNonRect = pSiS->HaveOffsRegions = FALSE;



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos

2016-02-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb 28 15:15:42 UTC 2016

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile

Log Message:
Don't claim too much about empty loops, the SYSCALL macro is kind of
obnoxious like that...


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/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/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.40 src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.41
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.40	Wed Nov  4 17:06:23 2015
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile	Sun Feb 28 15:15:42 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2015/11/04 17:06:23 phx Exp $
+#	$NetBSD: Makefile,v 1.41 2016/02/28 15:15:42 joerg Exp $
 
 .include "../../../Makefile.serverlib"
 .include "../../../Makefile.servermod"
@@ -168,5 +168,7 @@ CPPFLAGS+=	-I${X11SRCDIR.xorg-server}/hw
 CPPFLAGS+=	${X11FLAGS.DRI}
 .endif
 
+CWARNFLAGS.clang+=	-Wno-error=empty-body
+
 .include 
 .include 



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-02-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 28 11:51:24 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c

Log Message:
ohci_hash_rem_itd the sitds in ohci_device_isoc_abort


To generate a diff of this commit:
cvs rdiff -u -r1.254.2.54 -r1.254.2.55 src/sys/dev/usb/ohci.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/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.54 src/sys/dev/usb/ohci.c:1.254.2.55
--- src/sys/dev/usb/ohci.c:1.254.2.54	Sun Feb 28 09:16:20 2016
+++ src/sys/dev/usb/ohci.c	Sun Feb 28 11:51:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.54 2016/02/28 09:16:20 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.55 2016/02/28 11:51:24 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.54 2016/02/28 09:16:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.55 2016/02/28 11:51:24 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -3764,6 +3764,7 @@ ohci_device_isoc_abort(struct usbd_xfer 
 	KASSERT(sitd);
 
 	for (; sitd->xfer == xfer; sitd = sitd->nextitd) {
+		ohci_hash_rem_itd(sc, sitd);
 #ifdef DIAGNOSTIC
 		DPRINTFN(1, "abort sets done sitd=%p", sitd, 0, 0, 0);
 		sitd->isdone = true;



CVS commit: src/doc

2016-02-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 28 11:00:14 UTC 2016

Modified Files:
src/doc: CHANGES

Log Message:
add mv(1) and SIGINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.2137 -r1.2138 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.2137 src/doc/CHANGES:1.2138
--- src/doc/CHANGES:1.2137	Mon Feb 22 10:10:15 2016
+++ src/doc/CHANGES	Sun Feb 28 11:00:14 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2137 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2138 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -250,3 +250,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	openssl: Import openssl 1.0.1r [christos 20160130]
 	elftoolchain: Import FreeBSD-2016-02-19. [christos 20160219]
 	openresolv: Import openresolv-3.7.3. [roy 20160222]
+	mv(1): Add SIGINFO support. [mrg 20160228]



CVS commit: src/bin/mv

2016-02-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 28 10:59:29 UTC 2016

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

Log Message:
add SIGINFO for mv(1), largely based upon the support in cp(1).


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/bin/mv/mv.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/mv/mv.c
diff -u src/bin/mv/mv.c:1.44 src/bin/mv/mv.c:1.45
--- src/bin/mv/mv.c:1.44	Mon Mar  2 03:17:24 2015
+++ src/bin/mv/mv.c	Sun Feb 28 10:59:29 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: mv.c,v 1.44 2015/03/02 03:17:24 enami Exp $ */
+/* $NetBSD: mv.c,v 1.45 2016/02/28 10:59:29 mrg Exp $ */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)mv.c	8.2 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: mv.c,v 1.44 2015/03/02 03:17:24 enami Exp $");
+__RCSID("$NetBSD: mv.c,v 1.45 2016/02/28 10:59:29 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -67,12 +67,20 @@ __RCSID("$NetBSD: mv.c,v 1.44 2015/03/02
 
 static int fflg, iflg, vflg;
 static int stdin_ok;
+static sig_atomic_t pinfo;
 
 static int	copy(char *, char *);
 static int	do_move(char *, char *);
 static int	fastcopy(char *, char *, struct stat *);
 __dead static void	usage(void);
 
+static void
+progress(int sig __unused)
+{
+
+	pinfo++;
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -109,6 +117,8 @@ main(int argc, char *argv[])
 
 	stdin_ok = isatty(STDIN_FILENO);
 
+	(void)signal(SIGINFO, progress);
+
 	/*
 	 * If the stat on the target fails or the target isn't a directory,
 	 * try the move.  More than 2 arguments is an error in this case.
@@ -262,7 +272,9 @@ fastcopy(char *from, char *to, struct st
 #endif
 	static blksize_t blen;
 	static char *bp;
-	int nread, from_fd, to_fd;
+	int from_fd, to_fd;
+	ssize_t nread;
+	off_t total = 0;
 
 	if ((from_fd = open(from, O_RDONLY, 0)) < 0) {
 		warn("%s", from);
@@ -281,11 +293,21 @@ fastcopy(char *from, char *to, struct st
 		(void)close(to_fd);
 		return (1);
 	}
-	while ((nread = read(from_fd, bp, blen)) > 0)
+	while ((nread = read(from_fd, bp, blen)) > 0) {
 		if (write(to_fd, bp, nread) != nread) {
 			warn("%s", to);
 			goto err;
 		}
+		total += nread;
+		if (pinfo) {
+			int pcent = (int)((100.0 * total) / sbp->st_size);
+
+			pinfo = 0;
+			(void)fprintf(stderr, "%s => %s %llu/%llu bytes %d%% "
+			"written\n", from, to, (unsigned long long)total,
+			(unsigned long long)sbp->st_size, pcent);
+		}
+	}
 	if (nread < 0) {
 		warn("%s", from);
 err:		if (unlink(to))



CVS commit: [nick-nhusb] src/sys

2016-02-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 28 09:16:20 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ehci.c ohci.c uhci.c usbdi.c xhci.c
src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c

Log Message:
Centralise the up_repeat handling and use the standard pipe method to
start the next transfer.  This allows the removal of a bunch of code
in the upm_done methods for interrupt transfers which had copies of
the upm_start method code.

At the same time we can perform the upm_done method before calling the
transfer callback allowing correct bus_dma(9) operations before
using the transfer DMA buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.90 -r1.234.2.91 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.254.2.53 -r1.254.2.54 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.62 -r1.264.4.63 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.162.2.42 -r1.162.2.43 src/sys/dev/usb/usbdi.c
cvs rdiff -u -r1.28.2.52 -r1.28.2.53 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.32.2.17 -r1.32.2.18 src/sys/external/bsd/dwc2/dwc2.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.90 src/sys/dev/usb/ehci.c:1.234.2.91
--- src/sys/dev/usb/ehci.c:1.234.2.90	Sat Feb 27 17:03:58 2016
+++ src/sys/dev/usb/ehci.c	Sun Feb 28 09:16:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.90 2016/02/27 17:03:58 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.91 2016/02/28 09:16:20 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.90 2016/02/27 17:03:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.91 2016/02/28 09:16:20 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -838,11 +838,6 @@ ehci_softintr(void *v)
 	 * the _SAFE version of TAILQ_FOREACH.
 	 */
 	TAILQ_FOREACH_SAFE(ex, , ex_next, nextex) {
-		/*
-		 * XXX transfer_complete memcpys out transfer data (for in
-		 * endpoints) during this call, before methods->done is called.
-		 * A dma sync required beforehand.
-		 */
 		usb_transfer_complete(>ex_xfer);
 	}
 
@@ -4248,11 +4243,9 @@ ehci_device_intr_close(struct usbd_pipe 
 Static void
 ehci_device_intr_done(struct usbd_xfer *xfer)
 {
-	ehci_softc_t *sc = EHCI_XFER2SC(xfer);
-	struct ehci_xfer *exfer = EHCI_XFER2EXFER(xfer);
+	ehci_softc_t *sc __diagused = EHCI_XFER2SC(xfer);
 	struct ehci_pipe *epipe = EHCI_XFER2EPIPE(xfer);
-	ehci_soft_qh_t *sqh;
-	int len, isread, endpt;
+	int isread, endpt;
 
 	USBHIST_FUNC(); USBHIST_CALLED(ehcidebug);
 
@@ -4261,43 +4254,10 @@ ehci_device_intr_done(struct usbd_xfer *
 
 	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(>sc_lock));
 
-	if (xfer->ux_pipe->up_repeat) {
-
-		KASSERT(exfer->ex_isdone);
-#ifdef DIAGNOSTIC
-		exfer->ex_isdone = false;
-#endif
-
-		len = xfer->ux_length;
-		endpt = epipe->pipe.up_endpoint->ue_edesc->bEndpointAddress;
-		isread = UE_GET_DIR(endpt) == UE_DIR_IN;
-		usb_syncmem(>ux_dmabuf, 0, len,
-		isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
-		sqh = epipe->sqh;
-
-		ehci_soft_qtd_t *end;
-		ehci_reset_sqtd_chain(sc, xfer, len, isread,
-		>nexttoggle, );
-		end->qtd.qtd_status |= htole32(EHCI_QTD_IOC);
-		usb_syncmem(>dma, end->offs, sizeof(end->qtd),
-		BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
-
-		exfer->ex_sqtdend = end;
-
-		/* also does usb_syncmem(sqh) */
-		ehci_set_qh_qtd(sqh, exfer->ex_sqtdstart);
-		if (xfer->ux_timeout && !sc->sc_bus.ub_usepolling) {
-			callout_reset(>ux_callout,
-			mstohz(xfer->ux_timeout), ehci_timeout, xfer);
-		}
-		ehci_add_intr_list(sc, exfer);
-		xfer->ux_status = USBD_IN_PROGRESS;
-	} else {
-		endpt = epipe->pipe.up_endpoint->ue_edesc->bEndpointAddress;
-		isread = UE_GET_DIR(endpt) == UE_DIR_IN;
-		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-		isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
-	}
+	endpt = epipe->pipe.up_endpoint->ue_edesc->bEndpointAddress;
+	isread = UE_GET_DIR(endpt) == UE_DIR_IN;
+	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+	isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
 }
 
 //

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.53 src/sys/dev/usb/ohci.c:1.254.2.54
--- src/sys/dev/usb/ohci.c:1.254.2.53	Sat Feb 27 15:54:30 2016
+++ src/sys/dev/usb/ohci.c	Sun Feb 28 09:16:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.53 2016/02/27 15:54:30 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.54 2016/02/28 09:16:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.53 2016/02/27 15:54:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.54 2016/02/28 09:16:20 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1679,10 +1679,7 @@ ohci_device_ctrl_done(struct usbd_xfer *
 void