CVS commit: src/usr.sbin/rpcbind

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 21:22:18 UTC 2015

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

Log Message:
use EXIT_SUCCESS/EXIT_FAILURE consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/rpcbind/rpcbind.c

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

Modified files:

Index: src/usr.sbin/rpcbind/rpcbind.c
diff -u src/usr.sbin/rpcbind/rpcbind.c:1.21 src/usr.sbin/rpcbind/rpcbind.c:1.22
--- src/usr.sbin/rpcbind/rpcbind.c:1.21	Sat May  9 14:22:37 2015
+++ src/usr.sbin/rpcbind/rpcbind.c	Sat May  9 17:22:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcbind.c,v 1.21 2015/05/09 18:22:37 dholland Exp $	*/
+/*	$NetBSD: rpcbind.c,v 1.22 2015/05/09 21:22:18 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -118,18 +118,20 @@ main(int argc, char *argv[])
 
 	parseargs(argc, argv);
 
-	if (getrlimit(RLIMIT_NOFILE, rl) != -1  rl.rlim_cur  128) {
+	if (getrlimit(RLIMIT_NOFILE, rl) == -1)
+		err(EXIT_FAILURE, getrlimit(RLIMIT_NOFILE));
+
+	if (rl.rlim_cur  128) {
 		if (rl.rlim_max = 128)
 			rl.rlim_cur = rl.rlim_max;
 		else
 			rl.rlim_cur = 128;
-		if (setrlimit(RLIMIT_NOFILE, rl)  0) {
+		if (setrlimit(RLIMIT_NOFILE, rl)  0)
 			err(EXIT_FAILURE, setrlimit(RLIMIT_NOFILE));
-		}
 	}
 	nc_handle = setnetconfig(); 	/* open netconfig file */
 	if (nc_handle == NULL)
-		errx(1, could not read /etc/netconfig);
+		errx(EXIT_FAILURE, could not read /etc/netconfig);
 #ifdef PORTMAP
 	udptrans = ;
 	tcptrans = ;
@@ -137,7 +139,7 @@ main(int argc, char *argv[])
 
 	nconf = getnetconfigent(local);
 	if (nconf == NULL)
-		errx(1, can't find local transport);
+		errx(EXIT_FAILURE, can't find local transport);
 
 	rpc_control(RPC_SVC_CONNMAXREC_SET, maxrec);
 
@@ -173,7 +175,7 @@ main(int argc, char *argv[])
 		}
 	} else {
 		if (daemon(0, 0))
-			err(1, fork failed);
+			err(EXIT_FAILURE, fork failed);
 	}
 
 	openlog(rpcbind, 0, LOG_DAEMON);
@@ -184,11 +186,11 @@ main(int argc, char *argv[])
 
 		if((p = getpwnam(RUN_AS)) == NULL) {
 			syslog(LOG_ERR, cannot get uid of daemon: %m);
-			exit(1);
+			exit(EXIT_FAILURE);
 		}
 		if (setuid(p-pw_uid) == -1) {
 			syslog(LOG_ERR, setuid to daemon failed: %m);
-			exit(1);
+			exit(EXIT_FAILURE);
 		}
 	}
 
@@ -199,7 +201,7 @@ main(int argc, char *argv[])
 	rpcbind_abort();
 	/* NOTREACHED */
 
-	return 0;
+	return EXIT_SUCCESS;
 }
 
 /*
@@ -520,7 +522,7 @@ terminate(int dummy)
 		rpcbind terminating on signal. Restart with \rpcbind -w\);
 	write_warmstart();	/* Dump yourself */
 #endif
-	exit(2);
+	exit(EXIT_FAILURE);
 }
 
 void
@@ -566,7 +568,7 @@ parseargs(int argc, char *argv[])
 #endif
 		default:	/* error */
 			fprintf(stderr,	usage: rpcbind [-Idwils]\n);
-			exit (1);
+			exit(EXIT_FAILURE);
 		}
 	}
 	if (doabort  !debugging) {



CVS commit: src/sys/dev/bluetooth

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 22:23:40 UTC 2015

Modified Files:
src/sys/dev/bluetooth: bthub.c

Log Message:
use standard idiom - thanks riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/bluetooth/bthub.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/bluetooth/bthub.c
diff -u src/sys/dev/bluetooth/bthub.c:1.21 src/sys/dev/bluetooth/bthub.c:1.22
--- src/sys/dev/bluetooth/bthub.c:1.21	Sat May  9 21:31:05 2015
+++ src/sys/dev/bluetooth/bthub.c	Sat May  9 22:23:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bthub.c,v 1.21 2015/05/09 21:31:05 dholland Exp $	*/
+/*	$NetBSD: bthub.c,v 1.22 2015/05/09 22:23:40 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.21 2015/05/09 21:31:05 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.22 2015/05/09 22:23:40 dholland Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -127,8 +127,7 @@ bthub_attach(device_t parent, device_t s
 		 * avoiding it needs a pretty big rearrangement of
 		 * device attachments.
 		 */
-		printf(bthub_attach: pmf_device_register failed -- 
-		   no power management for you!\n);
+		aprint_error_dev(self, couldn't establish power handler\n);
 	}
 }
 



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:16:51 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_cout.c rpc_util.c

Log Message:
Use errx when malloc fails, and also don't cast the return value of
malloc/realloc.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/rpcgen/rpc_cout.c
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/rpcgen/rpc_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/usr.bin/rpcgen/rpc_cout.c
diff -u src/usr.bin/rpcgen/rpc_cout.c:1.35 src/usr.bin/rpcgen/rpc_cout.c:1.36
--- src/usr.bin/rpcgen/rpc_cout.c:1.35	Sat May  9 23:14:22 2015
+++ src/usr.bin/rpcgen/rpc_cout.c	Sat May  9 23:16:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_cout.c,v 1.35 2015/05/09 23:14:22 dholland Exp $	*/
+/*	$NetBSD: rpc_cout.c,v 1.36 2015/05/09 23:16:51 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_cout.c,v 1.35 2015/05/09 23:14:22 dholland Exp $);
+__RCSID($NetBSD: rpc_cout.c,v 1.36 2015/05/09 23:16:51 dholland Exp $);
 #endif
 #endif
 
@@ -476,7 +476,7 @@ emit_struct(definition *def)
 	else {
 		char *nsizestr;
 
-		nsizestr = (char *) realloc(sizestr, strlen(sizestr) + strlen(ptemp) + 1);
+		nsizestr = realloc(sizestr, strlen(sizestr) + strlen(ptemp) + 1);
 		if (nsizestr == NULL) {
 
 			errx(EXIT_FAILURE, Out of memory);
@@ -711,11 +711,10 @@ upcase(const char *str)
 	char   *ptr, *hptr;
 
 
-	ptr = (char *) malloc(strlen(str) + 1);
+	ptr = malloc(strlen(str) + 1);
 	if (ptr == NULL) {
-		f_print(stderr, malloc failed\n);
-		exit(1);
-	};
+		errx(EXIT_FAILURE, Out of memory);
+	}
 
 	hptr = ptr;
 	while (*str != '\0')

Index: src/usr.bin/rpcgen/rpc_util.c
diff -u src/usr.bin/rpcgen/rpc_util.c:1.15 src/usr.bin/rpcgen/rpc_util.c:1.16
--- src/usr.bin/rpcgen/rpc_util.c:1.15	Sat May  9 23:12:57 2015
+++ src/usr.bin/rpcgen/rpc_util.c	Sat May  9 23:16:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_util.c,v 1.15 2015/05/09 23:12:57 dholland Exp $	*/
+/*	$NetBSD: rpc_util.c,v 1.16 2015/05/09 23:16:51 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_util.c,v 1.15 2015/05/09 23:12:57 dholland Exp $);
+__RCSID($NetBSD: rpc_util.c,v 1.16 2015/05/09 23:16:51 dholland Exp $);
 #endif
 #endif
 
@@ -432,8 +432,7 @@ make_argname(const char *pname, const ch
 	len = strlen(pname) + strlen(vname) + strlen(ARGEXT) + 3;
 	name = malloc(len);
 	if (!name) {
-		fprintf(stderr, failed in malloc);
-		exit(1);
+		errx(EXIT_FAILURE, Out of memory);
 	}
 	snprintf(name, len, %s_%s_%s, locase(pname), vname, ARGEXT);
 	return (name);
@@ -448,8 +447,7 @@ add_type(int len, const char *type)
 	bas_type *ptr;
 
 	if ((ptr = malloc(sizeof(bas_type))) == NULL) {
-		fprintf(stderr, failed in malloc);
-		exit(1);
+		errx(EXIT_FAILURE, Out of memory);
 	}
 	ptr-name = type;
 	ptr-length = len;



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:29:52 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_parse.c

Log Message:
Remove pointless casts.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/rpcgen/rpc_parse.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/rpcgen/rpc_parse.c
diff -u src/usr.bin/rpcgen/rpc_parse.c:1.20 src/usr.bin/rpcgen/rpc_parse.c:1.21
--- src/usr.bin/rpcgen/rpc_parse.c:1.20	Sat May  9 23:28:43 2015
+++ src/usr.bin/rpcgen/rpc_parse.c	Sat May  9 23:29:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_parse.c,v 1.20 2015/05/09 23:28:43 dholland Exp $	*/
+/*	$NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_parse.c,v 1.20 2015/05/09 23:28:43 dholland Exp $);
+__RCSID($NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $);
 #endif
 #endif
 
@@ -484,7 +484,7 @@ get_prog_declaration(declaration *dec, d
 		sprintf(name, %s%d, ARGNAME, num);	/* default name of
 			 * argument */
 
-	dec-name = (char *) strdup(name);
+	dec-name = strdup(name);
 
 	if (streq(dec-type, void)) {
 		return;
@@ -498,7 +498,7 @@ get_prog_declaration(declaration *dec, d
 		}
 		dec-rel = REL_POINTER;
 		if (peekscan(TOK_IDENT, tok))	/* optional name of argument */
-			dec-name = (char *) strdup(tok.str);
+			dec-name = strdup(tok.str);
 	}
 	if (peekscan(TOK_LANGLE, tok)) {
 		if (!streq(dec-type, string)) {



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 21:44:48 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_main.c rpc_parse.h rpc_scan.h rpc_svcout.c
rpc_util.c rpc_util.h

Log Message:
modernize:
- make crash() called atexit
- use err/errx
- remove __P


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/rpcgen/rpc_main.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/rpcgen/rpc_parse.h
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/rpcgen/rpc_scan.h
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/rpcgen/rpc_svcout.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rpcgen/rpc_util.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/rpcgen/rpc_util.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/rpcgen/rpc_main.c
diff -u src/usr.bin/rpcgen/rpc_main.c:1.39 src/usr.bin/rpcgen/rpc_main.c:1.40
--- src/usr.bin/rpcgen/rpc_main.c:1.39	Sun Dec 15 04:18:31 2013
+++ src/usr.bin/rpcgen/rpc_main.c	Sat May  9 17:44:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_main.c,v 1.39 2013/12/15 09:18:31 wiz Exp $	*/
+/*	$NetBSD: rpc_main.c,v 1.40 2015/05/09 21:44:47 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_main.c,v 1.39 2013/12/15 09:18:31 wiz Exp $);
+__RCSID($NetBSD: rpc_main.c,v 1.40 2015/05/09 21:44:47 christos Exp $);
 #endif
 #endif
 
@@ -128,6 +128,7 @@ int logflag;		/* Use syslog instead 
 int tblflag;		/* Support for dispatch table file */
 int	BSDflag;		/* use BSD cplusplus macros */
 int callerflag;		/* Generate svc_caller() function */
+int	docleanup = 1;		/* cause atexit to remove files */
 
 #define INLINE 3
 /*length at which to start doing an inline */
@@ -187,6 +188,7 @@ main(int argc, char *argv[])
 
 	(void) memset((char *) cmd, 0, sizeof(struct commandline));
 	clear_args();
+	atexit(crash);
 	if (!parseargs(argc, argv, cmd))
 		usage();
 
@@ -255,6 +257,7 @@ main(int argc, char *argv[])
 		(void) unlink(dos_cppfile);
 	}
 #endif
+	docleanup = 0;
 	exit(nonfatalerrors);
 	/* NOTREACHED */
 }
@@ -297,15 +300,11 @@ open_output(const char *infile, const ch
 		return;
 	}
 	if (infile != NULL  streq(outfile, infile)) {
-		f_print(stderr, %s: output would overwrite %s\n, cmdname,
-		infile);
-		crash();
+		errx(EXIT_FAILURE, output would overwrite `%s', infile);
 	}
 	fout = fopen(outfile, w);
 	if (fout == NULL) {
-		f_print(stderr, %s: unable to open , cmdname);
-		perror(outfile);
-		crash();
+		err(EXIT_FAILURE, Can't to open `%s', outfile);
 	}
 	record_open(outfile);
 
@@ -360,22 +359,18 @@ open_input(const char *infile, const cha
 
 		retval = spawnvp(P_WAIT, arglist[0], arglist);
 		if (retval != 0) {
-			fprintf(stderr, %s: C PreProcessor failed\n, cmdname);
-			crash();
+			err(EXIT_FAILURE, C PreProcessor failed);
 		}
 		fnsplit(infile, drive, dir, name, ext);
 		fnmerge(cppfile, drive, dir, name, .i);
 
 		fin = fopen(cppfile, r);
 		if (fin == NULL) {
-			f_print(stderr, %s: , cmdname);
-			perror(cppfile);
-			crash();
+			err(EXIT_FAILURE, Can't open `%s', cppfile);
 		}
 		dos_cppfile = strdup(cppfile);
 		if (dos_cppfile == NULL) {
-			fprintf(stderr, %s: out of memory\n, cmdname);
-			crash();
+			err(EXIT_FAILURE, Can't copy `%s', cppfile);
 		}
 	}
 #else
@@ -391,17 +386,15 @@ open_input(const char *infile, const cha
 		(void) dup2(pd[1], 1);
 		(void) close(pd[0]);
 		execvp(arglist[0], __UNCONST(arglist));
-		err(1, $RPCGEN_CPP: %s, CPP);
+		err(EXIT_FAILURE, $RPCGEN_CPP: %s, CPP);
 	case -1:
-		err(1, fork);
+		err(EXIT_FAILURE, fork);
 	}
 	(void) close(pd[1]);
 	fin = fdopen(pd[0], r);
 #endif
 	if (fin == NULL) {
-		f_print(stderr, %s: , cmdname);
-		perror(infilename);
-		crash();
+		err(EXIT_FAILURE, Can't open `%s', infilename);
 	}
 }
 /* valid tirpc nettypes */
@@ -543,7 +536,7 @@ h_output(const char *infile, const char 
 	else {
 		guard = strdup(STDIN_);
 		if (guard == NULL) {
-			err(1, strdup);
+			err(EXIT_FAILURE, strdup);
 		}
 	}
 
@@ -608,6 +601,7 @@ s_output(int argc, char *argv[], char *i
 	f_print(fout, #include sys/ioctl.h\n);
 	f_print(fout, #include fcntl.h\n);
 	f_print(fout, #include stdio.h\n);
+	f_print(fout, #include err.h\n);
 	f_print(fout, #include stdlib.h\n);
 	f_print(fout, #include unistd.h\n);
 	f_print(fout, #include rpc/pmap_clnt.h\n);
@@ -780,6 +774,7 @@ clnt_output(const char *infile, const ch
 	open_output(infile, outfilename);
 	add_sample_msg();
 	f_print(fout, #include stdio.h\n);
+	f_print(fout, #include err.h\n);
 	if (infile  (include = extendfile(infile, .h))) {
 		f_print(fout, #include \%s\\n, include);
 		free(include);
@@ -837,8 +832,7 @@ static void
 addarg(const char *cp)
 {
 	if (argcount = ARGLISTLEN) {
-		f_print(stderr, rpcgen: too many defines\n);
-		crash();
+		errx(EXIT_FAILURE, too many defines);
 		/* 

CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 22:58:22 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_main.c

Log Message:
#if 0 code should still compile :-)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/rpcgen/rpc_main.c

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

Modified files:

Index: src/usr.bin/rpcgen/rpc_main.c
diff -u src/usr.bin/rpcgen/rpc_main.c:1.40 src/usr.bin/rpcgen/rpc_main.c:1.41
--- src/usr.bin/rpcgen/rpc_main.c:1.40	Sat May  9 21:44:47 2015
+++ src/usr.bin/rpcgen/rpc_main.c	Sat May  9 22:58:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_main.c,v 1.40 2015/05/09 21:44:47 christos Exp $	*/
+/*	$NetBSD: rpc_main.c,v 1.41 2015/05/09 22:58:22 dholland Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_main.c,v 1.40 2015/05/09 21:44:47 christos Exp $);
+__RCSID($NetBSD: rpc_main.c,v 1.41 2015/05/09 22:58:22 dholland Exp $);
 #endif
 #endif
 
@@ -870,7 +870,8 @@ checkfiles(const char *infile, const cha
 		if (stat(outfile, buf)  0)
 			return;	/* file does not exist */
 		else {
-			errx(`%s' already exists and may be overwritten,
+			errx(EXIT_FAILURE,
+			`%s' already exists and may be overwritten,
 			outfile);
 		}
 	}



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:19:34 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_util.h

Log Message:
Use proper (enough) parentheses in macro expansion.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/rpcgen/rpc_util.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/rpcgen/rpc_util.h
diff -u src/usr.bin/rpcgen/rpc_util.h:1.9 src/usr.bin/rpcgen/rpc_util.h:1.10
--- src/usr.bin/rpcgen/rpc_util.h:1.9	Sat May  9 21:44:47 2015
+++ src/usr.bin/rpcgen/rpc_util.h	Sat May  9 23:19:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_util.h,v 1.9 2015/05/09 21:44:47 christos Exp $	*/
+/*	$NetBSD: rpc_util.h,v 1.10 2015/05/09 23:19:34 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -35,8 +35,8 @@
  * rpc_util.h, Useful definitions for the RPC protocol compiler 
  */
 
-#define alloc(size)		(void *)malloc((unsigned)(size))
-#define ALLOC(object)   (object *) malloc(sizeof(object))
+#define alloc(size)		((char *)malloc((size_t)(size)))
+#define ALLOC(object)		((object *)malloc(sizeof(object)))
 
 #define s_print	(void) sprintf
 #define f_print (void) fprintf



CVS commit: src/sys/dev/bluetooth

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 21:31:05 UTC 2015

Modified Files:
src/sys/dev/bluetooth: bthub.c

Log Message:
Coverity CID 975184: don't ignore pmf_device_register failure.
(XXX: unfortunately all we can do for the moment is print a warning)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/bluetooth/bthub.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/bluetooth/bthub.c
diff -u src/sys/dev/bluetooth/bthub.c:1.20 src/sys/dev/bluetooth/bthub.c:1.21
--- src/sys/dev/bluetooth/bthub.c:1.20	Fri Jul 25 08:10:36 2014
+++ src/sys/dev/bluetooth/bthub.c	Sat May  9 21:31:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bthub.c,v 1.20 2014/07/25 08:10:36 dholland Exp $	*/
+/*	$NetBSD: bthub.c,v 1.21 2015/05/09 21:31:05 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.20 2014/07/25 08:10:36 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.21 2015/05/09 21:31:05 dholland Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -121,7 +121,15 @@ bthub_attach(device_t parent, device_t s
 
 	aprint_normal(\n);
 
-	pmf_device_register(self, NULL, NULL);
+	if (!pmf_device_register(self, NULL, NULL)) {
+		/*
+		 * XXX this should not be allowed to happen, but
+		 * avoiding it needs a pretty big rearrangement of
+		 * device attachments.
+		 */
+		printf(bthub_attach: pmf_device_register failed -- 
+		   no power management for you!\n);
+	}
 }
 
 static int



CVS commit: src/sys/dev/pci

2015-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  9 21:57:56 UTC 2015

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

Log Message:
Defer to a callout in hifn_rng_get.  Fixes lock-against-self.

Still can't call rnd_add_data directly from an rndsource callback.

(Still plan to fix this with further rnd rototilling.)

XXX pullup netbsd-7


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/hifn7751.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/hifn7751.c
diff -u src/sys/dev/pci/hifn7751.c:1.59 src/sys/dev/pci/hifn7751.c:1.60
--- src/sys/dev/pci/hifn7751.c:1.59	Sat May  9 08:08:50 2015
+++ src/sys/dev/pci/hifn7751.c	Sat May  9 21:57:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.59 2015/05/09 08:08:50 mrg Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.60 2015/05/09 21:57:56 riastradh Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.59 2015/05/09 08:08:50 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.60 2015/05/09 21:57:56 riastradh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -538,8 +538,7 @@ hifn_rng_get(size_t bytes, void *priv)
 
 	mutex_enter(sc-sc_mtx);
 	sc-sc_rng_need = bytes;
-
-	hifn_rng_locked(sc);
+	callout_reset(sc-sc_rngto, 0, hifn_rng, sc);
 	mutex_exit(sc-sc_mtx);
 }
 



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:28:43 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_parse.c rpc_scan.c rpc_util.c rpc_util.h

Log Message:
Make error() printflike instead of using sprintf before calling it.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/rpcgen/rpc_parse.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rpcgen/rpc_scan.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/rpcgen/rpc_util.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/rpcgen/rpc_util.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/rpcgen/rpc_parse.c
diff -u src/usr.bin/rpcgen/rpc_parse.c:1.19 src/usr.bin/rpcgen/rpc_parse.c:1.20
--- src/usr.bin/rpcgen/rpc_parse.c:1.19	Sat May  9 23:12:57 2015
+++ src/usr.bin/rpcgen/rpc_parse.c	Sat May  9 23:28:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_parse.c,v 1.19 2015/05/09 23:12:57 dholland Exp $	*/
+/*	$NetBSD: rpc_parse.c,v 1.20 2015/05/09 23:28:43 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_parse.c,v 1.19 2015/05/09 23:12:57 dholland Exp $);
+__RCSID($NetBSD: rpc_parse.c,v 1.20 2015/05/09 23:28:43 dholland Exp $);
 #endif
 #endif
 
@@ -377,21 +377,16 @@ static void
 check_type_name(const char *name, int new_type)
 {
 	int i;
-	chartmp[100];
 
 	for (i = 0; reserved_words[i] != NULL; i++) {
 		if (strcmp(name, reserved_words[i]) == 0) {
-			sprintf(tmp,
-			Illegal (reserved) name '%s' in type definition, name);
-			error(tmp);
+			error(Illegal (reserved) name '%s' in type definition, name);
 		}
 	}
 	if (new_type) {
 		for (i = 0; reserved_types[i] != NULL; i++) {
 			if (strcmp(name, reserved_types[i]) == 0) {
-sprintf(tmp,
-Illegal (reserved) name '%s' in type definition, name);
-error(tmp);
+error(Illegal (reserved) name '%s' in type definition, name);
 			}
 		}
 	}

Index: src/usr.bin/rpcgen/rpc_scan.c
diff -u src/usr.bin/rpcgen/rpc_scan.c:1.14 src/usr.bin/rpcgen/rpc_scan.c:1.15
--- src/usr.bin/rpcgen/rpc_scan.c:1.14	Sat May  9 23:12:57 2015
+++ src/usr.bin/rpcgen/rpc_scan.c	Sat May  9 23:28:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_scan.c,v 1.14 2015/05/09 23:12:57 dholland Exp $	*/
+/*	$NetBSD: rpc_scan.c,v 1.15 2015/05/09 23:28:43 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_scan.c,v 1.14 2015/05/09 23:12:57 dholland Exp $);
+__RCSID($NetBSD: rpc_scan.c,v 1.15 2015/05/09 23:28:43 dholland Exp $);
 #endif
 #endif
 
@@ -283,17 +283,11 @@ get_token(token *tokp)
 
 	default:
 		if (!(isalpha((unsigned char)*where) || *where == '_')) {
-			charbuf[100];
-			char   *p;
-
-			s_print(buf, Illegal character in file: );
-			p = buf + strlen(buf);
 			if (isprint((unsigned char)*where)) {
-s_print(p, %c, *where);
+error(Illegal character '%c' in file, *where);
 			} else {
-s_print(p, %d, *where);
+error(Illegal character %d in file, *where);
 			}
-			error(buf);
 		}
 		findkind(where, tokp);
 		break;

Index: src/usr.bin/rpcgen/rpc_util.c
diff -u src/usr.bin/rpcgen/rpc_util.c:1.16 src/usr.bin/rpcgen/rpc_util.c:1.17
--- src/usr.bin/rpcgen/rpc_util.c:1.16	Sat May  9 23:16:51 2015
+++ src/usr.bin/rpcgen/rpc_util.c	Sat May  9 23:28:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_util.c,v 1.16 2015/05/09 23:16:51 dholland Exp $	*/
+/*	$NetBSD: rpc_util.c,v 1.17 2015/05/09 23:28:43 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_util.c,v 1.16 2015/05/09 23:16:51 dholland Exp $);
+__RCSID($NetBSD: rpc_util.c,v 1.17 2015/05/09 23:28:43 dholland Exp $);
 #endif
 #endif
 
@@ -254,11 +254,17 @@ pvname(const char *pname, const char *vn
 /*
  * print a useful (?) error message, and then die
  */
-void
-error(const char *msg)
+__printflike(1, 2) void
+error(const char *msg, ...)
 {
+	va_list ap;
+
 	printwhere();
-	f_print(stderr, %s:%d: %s, infilename, linenum, msg);
+	fprintf(stderr, %s:%d: , infilename, linenum);
+	va_start(ap, msg);
+	vfprintf(stderr, msg, ap);
+	va_end(ap);
+	fprintf(stderr, \n);
 	errx(EXIT_FAILURE, Cannot recover from this error);
 }
 /*
@@ -288,17 +294,13 @@ record_open(const char *file)
 	}
 }
 
-static char expectbuf[100];
-
 /*
  * error, token encountered was not the expected one
  */
 void
 expected1(tok_kind exp1)
 {
-	s_print(expectbuf, Expected '%s',
-	

CVS commit: src/sys/dev/pci

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 21:53:45 UTC 2015

Modified Files:
src/sys/dev/pci: if_rtk_pci.c pcidevs

Log Message:
PR/49889: Maxim Tsyplakov: support for D-Link DFE520TX


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_rtk_pci.c
cvs rdiff -u -r1.1222 -r1.1223 src/sys/dev/pci/pcidevs

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_rtk_pci.c
diff -u src/sys/dev/pci/if_rtk_pci.c:1.45 src/sys/dev/pci/if_rtk_pci.c:1.46
--- src/sys/dev/pci/if_rtk_pci.c:1.45	Sat Mar 29 15:28:25 2014
+++ src/sys/dev/pci/if_rtk_pci.c	Sat May  9 17:53:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rtk_pci.c,v 1.45 2014/03/29 19:28:25 christos Exp $	*/
+/*	$NetBSD: if_rtk_pci.c,v 1.46 2015/05/09 21:53:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -47,7 +47,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_rtk_pci.c,v 1.45 2014/03/29 19:28:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_rtk_pci.c,v 1.46 2015/05/09 21:53:45 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -104,6 +104,8 @@ static const struct rtk_type rtk_pci_dev
 		RTK_8139, Addtron Technology 8139 10/100BaseTX },
 	{ PCI_VENDOR_SEGA, PCI_PRODUCT_SEGA_BROADBAND,
 		RTK_8139, SEGA Broadband Adapter },
+	{ PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DFE520TX,
+		RTK_8139, D-Link Systems DFE 520TX }, 
 	{ PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DFE530TXPLUS,
 		RTK_8139, D-Link Systems DFE 530TX+ },
 	{ PCI_VENDOR_NORTEL, PCI_PRODUCT_NORTEL_BAYSTACK_21,

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1222 src/sys/dev/pci/pcidevs:1.1223
--- src/sys/dev/pci/pcidevs:1.1222	Mon May  4 17:18:22 2015
+++ src/sys/dev/pci/pcidevs	Sat May  9 17:53:45 2015
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1222 2015/05/04 21:18:22 ryo Exp $
+$NetBSD: pcidevs,v 1.1223 2015/05/09 21:53:45 christos Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2085,9 +2085,10 @@ product DIGI NEO8_PCIE	0x00f0	Neo 8-port
 product DLINK DL1002		0x1002	DL-1002 10/100 Ethernet
 product DLINK DFE530TXPLUS	0x1300	DFE-530TXPLUS 10/100 Ethernet
 product DLINK DFE690TXD		0x1340	DFE-690TXD 10/100 Ethernet
-product	DLINK DWL610		0x3300	DWL-610 802.11b WLAN
+product DLINK DWL610		0x3300	DWL-610 802.11b WLAN
 product DLINK DL4000		0x4000	DL-4000 Gigabit Ethernet
 product DLINK DGE550SX		0x4001	DGE-550SX
+product DLINK DFE520TX		0x4200	DFE-520TX 10/100 Ethernet
 product DLINK DGE528T		0x4300	DGE-528T Gigabit Ethernet
 product DLINK DGE560T		0x4b00	DGE-560T Gigabit Ethernet
 product DLINK DGE560T_2		0x4b01	DGE-560T_2 Gigabit Ethernet



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:12:57 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_cout.c rpc_hout.c rpc_main.c rpc_parse.c
rpc_scan.c rpc_util.c

Log Message:
Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/rpcgen/rpc_cout.c
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/rpcgen/rpc_hout.c
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/rpcgen/rpc_main.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rpcgen/rpc_parse.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rpcgen/rpc_scan.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rpcgen/rpc_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/usr.bin/rpcgen/rpc_cout.c
diff -u src/usr.bin/rpcgen/rpc_cout.c:1.33 src/usr.bin/rpcgen/rpc_cout.c:1.34
--- src/usr.bin/rpcgen/rpc_cout.c:1.33	Sun Dec 15 00:40:17 2013
+++ src/usr.bin/rpcgen/rpc_cout.c	Sat May  9 23:12:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_cout.c,v 1.33 2013/12/15 00:40:17 christos Exp $	*/
+/*	$NetBSD: rpc_cout.c,v 1.34 2015/05/09 23:12:57 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_cout.c,v 1.33 2013/12/15 00:40:17 christos Exp $);
+__RCSID($NetBSD: rpc_cout.c,v 1.34 2015/05/09 23:12:57 dholland Exp $);
 #endif
 #endif
 
@@ -112,7 +112,7 @@ emit(definition *def)
 		break;
 	case DEF_PROGRAM:
 	case DEF_CONST:
-		errx(1, Internal error %s, %d: Case %d not handled,
+		errx(1, Internal error at %s:%d: Case %d not handled,
 		__FILE__, __LINE__, def-def_kind);
 		break;
 	}
@@ -660,7 +660,7 @@ emit_inline(declaration *decl, int flag)
 		break;
 	case REL_ARRAY:
 	case REL_POINTER:
-		errx(1, Internal error %s, %d: Case %d not handled,
+		errx(1, Internal error at %s:%d: Case %d not handled,
 		__FILE__, __LINE__, decl-rel);
 	}
 }

Index: src/usr.bin/rpcgen/rpc_hout.c
diff -u src/usr.bin/rpcgen/rpc_hout.c:1.22 src/usr.bin/rpcgen/rpc_hout.c:1.23
--- src/usr.bin/rpcgen/rpc_hout.c:1.22	Sun Dec 15 00:40:17 2013
+++ src/usr.bin/rpcgen/rpc_hout.c	Sat May  9 23:12:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_hout.c,v 1.22 2013/12/15 00:40:17 christos Exp $	*/
+/*	$NetBSD: rpc_hout.c,v 1.23 2015/05/09 23:12:57 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_hout.c,v 1.22 2013/12/15 00:40:17 christos Exp $);
+__RCSID($NetBSD: rpc_hout.c,v 1.23 2015/05/09 23:12:57 dholland Exp $);
 #endif
 #endif
 
@@ -281,7 +281,7 @@ define_printed(proc_list *stop, version_
 }
 		}
 	}
-	errx(1, Internal error %s, %d: procedure not found,
+	errx(1, Internal error at %s:%d: procedure not found,
 	__FILE__, __LINE__);
 	/* NOTREACHED */
 }

Index: src/usr.bin/rpcgen/rpc_main.c
diff -u src/usr.bin/rpcgen/rpc_main.c:1.41 src/usr.bin/rpcgen/rpc_main.c:1.42
--- src/usr.bin/rpcgen/rpc_main.c:1.41	Sat May  9 22:58:22 2015
+++ src/usr.bin/rpcgen/rpc_main.c	Sat May  9 23:12:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_main.c,v 1.41 2015/05/09 22:58:22 dholland Exp $	*/
+/*	$NetBSD: rpc_main.c,v 1.42 2015/05/09 23:12:57 dholland Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_main.c,v 1.41 2015/05/09 22:58:22 dholland Exp $);
+__RCSID($NetBSD: rpc_main.c,v 1.42 2015/05/09 23:12:57 dholland Exp $);
 #endif
 #endif
 
@@ -300,11 +300,11 @@ open_output(const char *infile, const ch
 		return;
 	}
 	if (infile != NULL  streq(outfile, infile)) {
-		errx(EXIT_FAILURE, output would overwrite `%s', infile);
+		errx(EXIT_FAILURE, Output would overwrite `%s', infile);
 	}
 	fout = fopen(outfile, w);
 	if (fout == NULL) {
-		err(EXIT_FAILURE, Can't to open `%s', outfile);
+		err(EXIT_FAILURE, Can't open `%s', outfile);
 	}
 	record_open(outfile);
 
@@ -359,7 +359,7 @@ open_input(const char *infile, const cha
 
 		retval = spawnvp(P_WAIT, arglist[0], arglist);
 		if (retval != 0) {
-			err(EXIT_FAILURE, C PreProcessor failed);
+			err(EXIT_FAILURE, C preprocessor failed);
 		}
 		fnsplit(infile, drive, dir, name, ext);
 		fnmerge(cppfile, drive, dir, name, .i);
@@ -832,7 +832,7 @@ static void
 addarg(const char *cp)
 {
 	if (argcount = ARGLISTLEN) {
-		errx(EXIT_FAILURE, too many defines);
+		errx(EXIT_FAILURE, Internal error: too many defines);
 		/* NOTREACHED */
 	}
 	

CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 23:14:22 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_cout.c

Log Message:
one crash - errx Christos missed


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/rpcgen/rpc_cout.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/rpcgen/rpc_cout.c
diff -u src/usr.bin/rpcgen/rpc_cout.c:1.34 src/usr.bin/rpcgen/rpc_cout.c:1.35
--- src/usr.bin/rpcgen/rpc_cout.c:1.34	Sat May  9 23:12:57 2015
+++ src/usr.bin/rpcgen/rpc_cout.c	Sat May  9 23:14:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_cout.c,v 1.34 2015/05/09 23:12:57 dholland Exp $	*/
+/*	$NetBSD: rpc_cout.c,v 1.35 2015/05/09 23:14:22 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_cout.c,v 1.34 2015/05/09 23:12:57 dholland Exp $);
+__RCSID($NetBSD: rpc_cout.c,v 1.35 2015/05/09 23:14:22 dholland Exp $);
 #endif
 #endif
 
@@ -479,8 +479,7 @@ emit_struct(definition *def)
 		nsizestr = (char *) realloc(sizestr, strlen(sizestr) + strlen(ptemp) + 1);
 		if (nsizestr == NULL) {
 
-			f_print(stderr, Fatal error : no memory\n);
-			crash();
+			errx(EXIT_FAILURE, Out of memory);
 		}
 		sizestr = nsizestr;
 		sizestr = strcat(sizestr, ptemp);	/* build up length of



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

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:37:53 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: if_bge.c if_bgereg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #740):
sys/dev/pci/if_bge.c: revision 1.285
sys/dev/pci/if_bgereg.h: revision 1.90
Use another firmware command in bge_asf_driver_up(). Same as Lunux.
This change fixes a bug that watchdog timeout occurs every 25-30 minutes
on HP ML110 G6 reported enami@ in PR#49657.


To generate a diff of this commit:
cvs rdiff -u -r1.277.2.1 -r1.277.2.2 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.88 -r1.88.2.1 src/sys/dev/pci/if_bgereg.h

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

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.277.2.1 src/sys/dev/pci/if_bge.c:1.277.2.2
--- src/sys/dev/pci/if_bge.c:1.277.2.1	Tue Feb 17 14:48:10 2015
+++ src/sys/dev/pci/if_bge.c	Sat May  9 08:37:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.277.2.1 2015/02/17 14:48:10 martin Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.277.2.2 2015/05/09 08:37:53 snj Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.277.2.1 2015/02/17 14:48:10 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.277.2.2 2015/05/09 08:37:53 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -4723,7 +4723,7 @@ bge_asf_driver_up(struct bge_softc *sc)
 			bge_wait_for_event_ack(sc);
 
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
-			BGE_FW_CMD_DRV_ALIVE);
+			BGE_FW_CMD_DRV_ALIVE3);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB,
 			BGE_FW_HB_TIMEOUT_SEC);

Index: src/sys/dev/pci/if_bgereg.h
diff -u src/sys/dev/pci/if_bgereg.h:1.88 src/sys/dev/pci/if_bgereg.h:1.88.2.1
--- src/sys/dev/pci/if_bgereg.h:1.88	Tue Jun 17 17:37:08 2014
+++ src/sys/dev/pci/if_bgereg.h	Sat May  9 08:37:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgereg.h,v 1.88 2014/06/17 17:37:08 msaitoh Exp $	*/
+/*	$NetBSD: if_bgereg.h,v 1.88.2.1 2015/05/09 08:37:53 snj Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -100,6 +100,7 @@
 
 #define	BGE_FW_CMD_DRV_ALIVE		0x0001
 #define	BGE_FW_CMD_PAUSE		0x0002
+#define	BGE_FW_CMD_DRV_ALIVE3		0x000e
 
 #define	BGE_FW_HB_TIMEOUT_SEC		3
 



CVS commit: [netbsd-7] src

2015-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat May  9 08:37:32 UTC 2015

Modified Files:
src/distrib/evbarm/instkernel/sshramdisk [netbsd-7]: Makefile
src/sys/arch/evbarm/conf [netbsd-7]: RPI_INSTALL

Log Message:
Pull up following revision(s) (requested by snj in ticket #1957):

distrib/evbarm/instkernel/sshramdisk/Makefile   patch
sys/arch/evbarm/conf/RPI_INSTALLpatch

Increase ramdisk size to fix build break.


To generate a diff of this commit:
cvs rdiff -u -r1.3.6.1 -r1.3.6.2 \
src/distrib/evbarm/instkernel/sshramdisk/Makefile
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/arch/evbarm/conf/RPI_INSTALL

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

Modified files:

Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile
diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.3.6.1 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.3.6.2
--- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.3.6.1	Thu May  7 20:42:37 2015
+++ src/distrib/evbarm/instkernel/sshramdisk/Makefile	Sat May  9 08:37:32 2015
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.3.6.1 2015/05/07 20:42:37 riz Exp $
+#	$NetBSD: Makefile,v 1.3.6.2 2015/05/09 08:37:32 msaitoh Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		sshramdisk.fs
-IMAGESIZE=	4321k
+IMAGESIZE=	5000k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/evbarm/conf/RPI_INSTALL
diff -u src/sys/arch/evbarm/conf/RPI_INSTALL:1.3 src/sys/arch/evbarm/conf/RPI_INSTALL:1.3.4.1
--- src/sys/arch/evbarm/conf/RPI_INSTALL:1.3	Thu May  1 18:43:45 2014
+++ src/sys/arch/evbarm/conf/RPI_INSTALL	Sat May  9 08:37:32 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: RPI_INSTALL,v 1.3 2014/05/01 18:43:45 martin Exp $
+#	$NetBSD: RPI_INSTALL,v 1.3.4.1 2015/05/09 08:37:32 msaitoh Exp $
 #
 #	RPI_INSTALL -- RPI kernel with installation-sized
 #	ramdisk
@@ -7,5 +7,8 @@
 include arch/evbarm/conf/RPI
 include arch/evbarm/conf/INSTALL
 
+no options 	MEMORY_DISK_ROOT_SIZE
+options 	MEMORY_DISK_ROOT_SIZE=29696
+
 makeoptions	RAMDISKNAME=sshramdisk
 no makeoptions	DEBUG



CVS commit: [netbsd-7] src/doc

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:51:57 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
739-741, 743


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.282 -r1.1.2.283 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.282 src/doc/CHANGES-7.0:1.1.2.283
--- src/doc/CHANGES-7.0:1.1.2.282	Thu May  7 20:42:48 2015
+++ src/doc/CHANGES-7.0	Sat May  9 08:51:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.282 2015/05/07 20:42:48 riz Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.283 2015/05/09 08:51:57 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -22860,3 +22860,40 @@ distrib/evbarm/instkernel/sshramdisk/Mak
 	Bump ramdisk size.
 	[snj, ticket #738]
 
+sys/arch/x86/include/specialreg.h		1.82
+usr.sbin/cpuctl/arch/i386.c			1.66
+
+	From Intel SDM:
+	- Add the Silicon Debug bit in CPUID Fn0001 %ecx
+	- Add CPUID Fn_0007 %ecx bits
+	- Add comments.
+	Update some Intel CPU models (Sky Lake, Broadwell and Atom X[357]).
+	[msaitoh, ticket #739]
+
+sys/dev/pci/if_bge.c1.285
+sys/dev/pci/if_bgereg.h1.90
+
+	Avoid a watchdog timeout that occurs every 25-30 minutes
+	on HP ML110 G6.  PR#49657.
+	[msaitoh, ticket #740]
+
+sys/arch/aarch64/conf/std.aarch64		1.2
+sys/arch/amd64/conf/std.amd64			1.10
+sys/arch/evbarm/conf/std.evbarm			1.4
+sys/arch/evbarm64/conf/std.evbarm64		1.2
+sys/arch/i386/conf/std.i386			1.34
+sys/arch/sparc64/conf/std.sparc64		1.19
+
+	Bump CHILD_MAX and OPEN_MAX defaults to 1024 on several platforms.
+	[mrg, ticket #741]
+
+libexec/httpd/bozohttpd.8			1.51
+libexec/httpd/bozohttpd.c			1.64
+libexec/httpd/bozohttpd.h			1.35
+libexec/httpd/cgi-bozo.c			1.27
+libexec/httpd/content-bozo.c			1.12
+
+	Fix content type handling to not hard code (wrong) values for
+	length, but just call strlen() as needed.
+	[mrg, ticket #743]
+



CVS commit: src/sys/rump/kern/lib

2015-05-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat May  9 12:03:11 UTC 2015

Modified Files:
src/sys/rump/kern/lib: Makefile.sys
src/sys/rump/kern/lib/libsys_cygwin: Makefile
src/sys/rump/kern/lib/libsys_linux: Makefile
src/sys/rump/kern/lib/libsys_sunos: Makefile

Log Message:
Make the cool syscall autogeneration feature work with the
newfangled r/o src feature.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/Makefile.sys
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/kern/lib/libsys_cygwin/Makefile
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/kern/lib/libsys_linux/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/libsys_sunos/Makefile

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

Modified files:

Index: src/sys/rump/kern/lib/Makefile.sys
diff -u src/sys/rump/kern/lib/Makefile.sys:1.1 src/sys/rump/kern/lib/Makefile.sys:1.2
--- src/sys/rump/kern/lib/Makefile.sys:1.1	Sun Mar  8 15:22:02 2015
+++ src/sys/rump/kern/lib/Makefile.sys	Sat May  9 12:03:10 2015
@@ -1,8 +1,16 @@
-# $NetBSD: Makefile.sys,v 1.1 2015/03/08 15:22:02 christos Exp $
+# $NetBSD: Makefile.sys,v 1.2 2015/05/09 12:03:10 pooka Exp $
 
 SYS_MKSYSCALLS=${.CURDIR}/../../../../kern/makesyscalls.sh
-SYS_DST=${SYS_P}calls.c ${SYS_P}ent.c ${SYS_P}callargs.h ${SYS_P}call.h: 
-SYS_SRC=${SYS_MKSYSCALLS} syscalls.conf syscalls.master
+
+SYS_DST=  ${SYS_P}calls.c ${SYS_P}ent.c ${SYS_P}callargs.h ${SYS_P}call.h
+SYS_SRC=${SYS_MKSYSCALLS} ${.CURDIR}/syscalls.conf ${.CURDIR}/syscalls.master
 
 ${SYS_DST}: ${SYS_SRC}
-	cd ${.CURDIR}  ${HOST_SH} ${.ALLSRC}
+	cd ${.OBJDIR}  ${HOST_SH} ${.ALLSRC}
+
+CPPFLAGS+= -I${.OBJDIR}
+
+DPSRCS+= ${SYS_P}callargs.h
+SRCS+= ${SYS_P}ent.c
+
+CLEANFILES+= ${SYS_DST}

Index: src/sys/rump/kern/lib/libsys_cygwin/Makefile
diff -u src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.3 src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.4
--- src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.3	Sun Mar  8 15:19:40 2015
+++ src/sys/rump/kern/lib/libsys_cygwin/Makefile	Sat May  9 12:03:10 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile,v 1.3 2015/03/08 15:19:40 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2015/05/09 12:03:10 pooka Exp $
 #
 
 LIB=	rumpkern_sys_cygwin
 
-SRCS=	rump_cygwin_compat.c rump_cygwin_sysent.c
+SRCS=	rump_cygwin_compat.c
 SRCS+=	sys_cygwin_component.c
 
 # XXX
-CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
-
-.include bsd.lib.mk
-.include bsd.klinks.mk
+CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
 
 SYS_P=rump_cygwin_sys
 .include ../Makefile.sys
+
+.include bsd.lib.mk
+.include bsd.klinks.mk

Index: src/sys/rump/kern/lib/libsys_linux/Makefile
diff -u src/sys/rump/kern/lib/libsys_linux/Makefile:1.8 src/sys/rump/kern/lib/libsys_linux/Makefile:1.9
--- src/sys/rump/kern/lib/libsys_linux/Makefile:1.8	Sun Mar  8 15:20:07 2015
+++ src/sys/rump/kern/lib/libsys_linux/Makefile	Sat May  9 12:03:10 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2015/03/08 15:20:07 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2015/05/09 12:03:10 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../compat/linux/common
@@ -11,15 +11,15 @@ SRCS=	linux_blkio.c linux_cdrom.c linux_
 	linux_sysctl.c linux_termios.c linux_time.c linux_file64.c  \
 	linux_pipe.c
 
-SRCS+=	rump_linux_sysent.c linux_rump.c
+SRCS+=	linux_rump.c
 SRCS+=	sys_linux_component.c
 
 # XXX
-CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
+CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
 CPPFLAGS+= -DINET6
 
-.include bsd.lib.mk
-.include bsd.klinks.mk
-
 SYS_P=rump_linux_sys
 .include ../Makefile.sys
+
+.include bsd.lib.mk
+.include bsd.klinks.mk

Index: src/sys/rump/kern/lib/libsys_sunos/Makefile
diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.4 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.5
--- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.4	Sun Mar  8 15:21:20 2015
+++ src/sys/rump/kern/lib/libsys_sunos/Makefile	Sat May  9 12:03:11 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile,v 1.4 2015/03/08 15:21:20 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2015/05/09 12:03:11 pooka Exp $
 #
 
 LIB=	rumpkern_sys_sunos
 
-SRCS=	rump_sunos_compat.c rump_sunos_sysent.c
+SRCS=	rump_sunos_compat.c
 SRCS+=	sys_sunos_component.c
 
 # XXX
-CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
-
-.include bsd.lib.mk
-.include bsd.klinks.mk
+CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
 
 SYS_P=rump_sunos_sys
 .include ../Makefile.sys
+
+.include bsd.lib.mk
+.include bsd.klinks.mk



CVS commit: src/sys/rump/kern/lib

2015-05-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat May  9 12:03:35 UTC 2015

Removed Files:
src/sys/rump/kern/lib/libsys_cygwin: rump_cygwin_syscall.h
rump_cygwin_syscallargs.h rump_cygwin_syscalls.c
rump_cygwin_sysent.c
src/sys/rump/kern/lib/libsys_linux: rump_linux_syscall.h
rump_linux_syscallargs.h rump_linux_syscalls.c rump_linux_sysent.c
src/sys/rump/kern/lib/libsys_sunos: rump_sunos_syscall.h
rump_sunos_syscallargs.h rump_sunos_syscalls.c rump_sunos_sysent.c

Log Message:
remove files which are autogenerated in every build


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 \
src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_syscall.h \
src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_syscallargs.h \
src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_syscalls.c \
src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_sysent.c
cvs rdiff -u -r1.15 -r0 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h
cvs rdiff -u -r1.18 -r0 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c \
src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c
cvs rdiff -u -r1.3 -r0 \
src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h \
src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h \
src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c \
src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c

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



CVS commit: [netbsd-7] src/libexec/httpd

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:50:42 UTC 2015

Modified Files:
src/libexec/httpd [netbsd-7]: bozohttpd.8 bozohttpd.c bozohttpd.h
cgi-bozo.c content-bozo.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #743):
libexec/httpd/bozohttpd.8: revision 1.51
libexec/httpd/bozohttpd.c: revision 1.64
libexec/httpd/bozohttpd.h: revision 1.35
libexec/httpd/cgi-bozo.c: revision 1.27
libexec/httpd/content-bozo.c: revision 1.12
fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed.  call this 20150501.
reported by Jan Danielsson for .svg.


To generate a diff of this commit:
cvs rdiff -u -r1.46.4.3 -r1.46.4.4 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.56.2.3 -r1.56.2.4 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.33.2.1 -r1.33.2.2 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.25.2.1 -r1.25.2.2 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/libexec/httpd/content-bozo.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.46.4.3 src/libexec/httpd/bozohttpd.8:1.46.4.4
--- src/libexec/httpd/bozohttpd.8:1.46.4.3	Thu Apr 23 19:38:11 2015
+++ src/libexec/httpd/bozohttpd.8	Sat May  9 08:50:42 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: bozohttpd.8,v 1.46.4.3 2015/04/23 19:38:11 snj Exp $
+.\	$NetBSD: bozohttpd.8,v 1.46.4.4 2015/05/09 08:50:42 snj Exp $
 .\
 .\	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\
@@ -26,7 +26,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd April 15, 2015
+.Dd May 1, 2015
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -510,7 +510,7 @@ The focus has always been simplicity and
 and regular code audits.
 This manual documents
 .Nm
-version 20150320.
+version 20150501.
 .Sh AUTHORS
 .An -nosplit
 .Nm

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.56.2.3 src/libexec/httpd/bozohttpd.c:1.56.2.4
--- src/libexec/httpd/bozohttpd.c:1.56.2.3	Sun Apr 19 04:44:03 2015
+++ src/libexec/httpd/bozohttpd.c	Sat May  9 08:50:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.56.2.3 2015/04/19 04:44:03 msaitoh Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.56.2.4 2015/05/09 08:50:42 snj Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -109,7 +109,7 @@
 #define INDEX_HTML		index.html
 #endif
 #ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE		bozohttpd/20150320
+#define SERVER_SOFTWARE		bozohttpd/20150501
 #endif
 #ifndef DIRECT_ACCESS_FILE
 #define DIRECT_ACCESS_FILE	.bzdirect
@@ -1861,6 +1861,7 @@ static struct errors_map {
 	{ 404, 	404 Not Found,	This item has not been found, },
 	{ 408, 	408 Request Timeout,	This request took too long, },
 	{ 417,	417 Expectation Failed,Expectations not available, },
+	{ 420,	420 Enhance Your Calm,Chill, Winston, },
 	{ 500,	500 Internal Error,	An error occured on the server, },
 	{ 501,	501 Not Implemented,	This request is not available, },
 	{ 0,	NULL,			NULL, },

Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.33.2.1 src/libexec/httpd/bozohttpd.h:1.33.2.2
--- src/libexec/httpd/bozohttpd.h:1.33.2.1	Mon Jan 12 10:02:29 2015
+++ src/libexec/httpd/bozohttpd.h	Sat May  9 08:50:42 2015
@@ -1,9 +1,9 @@
-/*	$NetBSD: bozohttpd.h,v 1.33.2.1 2015/01/12 10:02:29 martin Exp $	*/
+/*	$NetBSD: bozohttpd.h,v 1.33.2.2 2015/05/09 08:50:42 snj Exp $	*/
 
 /*	$eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $	*/
 
 /*
- * Copyright (c) 1997-2014 Matthew R. Green
+ * Copyright (c) 1997-2015 Matthew R. Green
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,7 +68,6 @@ typedef struct lua_state_map {
 
 typedef struct bozo_content_map_t {
 	const char	*name;		/* postfix of file */
-	size_t	 	 namelen;	/* length of postfix */
 	const char	*type;		/* matching content-type */
 	const char	*encoding;	/* matching content-encoding */
 	const char	*encoding11;	/* matching content-encoding (HTTP/1.1) */

Index: src/libexec/httpd/cgi-bozo.c
diff -u src/libexec/httpd/cgi-bozo.c:1.25.2.1 src/libexec/httpd/cgi-bozo.c:1.25.2.2
--- src/libexec/httpd/cgi-bozo.c:1.25.2.1	Thu Apr 23 19:38:11 2015
+++ src/libexec/httpd/cgi-bozo.c	Sat May  9 08:50:42 2015
@@ -1,9 +1,9 @@
-/*	$NetBSD: cgi-bozo.c,v 1.25.2.1 2015/04/23 19:38:11 snj Exp $	*/
+/*	$NetBSD: cgi-bozo.c,v 1.25.2.2 2015/05/09 08:50:42 snj Exp $	*/
 
 /*	$eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $	*/
 
 /*
- * Copyright (c) 1997-2014 Matthew R. Green
+ * Copyright (c) 1997-2015 Matthew R. Green
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -515,7 +515,6 @@ bozo_add_content_map_cgi(bozohttpd_t *ht
 
 	map = bozo_get_content_map(httpd, arg);
 	map-name = arg;

CVS commit: [netbsd-7] src/doc

2015-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat May  9 08:59:12 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 742.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.283 -r1.1.2.284 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.283 src/doc/CHANGES-7.0:1.1.2.284
--- src/doc/CHANGES-7.0:1.1.2.283	Sat May  9 08:51:57 2015
+++ src/doc/CHANGES-7.0	Sat May  9 08:59:12 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.283 2015/05/09 08:51:57 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.284 2015/05/09 08:59:12 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -22887,6 +22887,12 @@ sys/arch/sparc64/conf/std.sparc64		1.19
 	Bump CHILD_MAX and OPEN_MAX defaults to 1024 on several platforms.
 	[mrg, ticket #741]
 
+distrib/evbarm/instkernel/sshramdisk/Makefile	patch
+sys/arch/evbarm/conf/RPI_INSTALL		patch
+
+	Increase ramdisk size.
+	[snj, ticket #742]
+
 libexec/httpd/bozohttpd.8			1.51
 libexec/httpd/bozohttpd.c			1.64
 libexec/httpd/bozohttpd.h			1.35
@@ -22896,4 +22902,3 @@ libexec/httpd/content-bozo.c			1.12
 	Fix content type handling to not hard code (wrong) values for
 	length, but just call strlen() as needed.
 	[mrg, ticket #743]
-



CVS commit: src/sys/kern

2015-05-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat May  9 10:57:04 UTC 2015

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
fix to work for syscalls.conf without sysautoload

reported by Justin('s buildbot)


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.152 src/sys/kern/makesyscalls.sh:1.153
--- src/sys/kern/makesyscalls.sh:1.152	Sat May  9 05:51:26 2015
+++ src/sys/kern/makesyscalls.sh	Sat May  9 10:57:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.152 2015/05/09 05:51:26 pgoyette Exp $
+#	$NetBSD: makesyscalls.sh,v 1.153 2015/05/09 10:57:04 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -63,6 +63,7 @@ esac
 sys_nosys=sys_nosys	# default is sys_nosys(), if not specified otherwise
 maxsysargs=8		# default limit is 8 (32bit) arguments
 systrace=/dev/null
+sysautoload=/dev/null
 rumpcalls=/dev/null
 rumpcallshdr=/dev/null
 rumpsysmap=/dev/null



CVS commit: src/sys/dev

2015-05-09 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  9 11:53:34 UTC 2015

Modified Files:
src/sys/dev: dksubr.c

Log Message:
CID 1297229: Memory - illegal accesses  (BUFFER_SIZE_WARNING)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/dksubr.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/dksubr.c
diff -u src/sys/dev/dksubr.c:1.61 src/sys/dev/dksubr.c:1.62
--- src/sys/dev/dksubr.c:1.61	Tue May  5 21:52:10 2015
+++ src/sys/dev/dksubr.c	Sat May  9 11:53:34 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.61 2015/05/05 21:52:10 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.61 2015/05/05 21:52:10 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -82,7 +82,7 @@ dk_init(struct dk_softc *dksc, device_t 
 	dksc-sc_dtype = dtype;
 	dksc-sc_dev = dev;
 
-	strncpy(dksc-sc_xname, device_xname(dev), DK_XNAME_SIZE);
+	strlcpy(dksc-sc_xname, device_xname(dev), DK_XNAME_SIZE);
 	dksc-sc_dkdev.dk_name = dksc-sc_xname;
 }
 



CVS commit: src/usr.sbin/sysinst

2015-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 12:06:31 UTC 2015

Modified Files:
src/usr.sbin/sysinst: defs.h disks.c partman.c

Log Message:
Add a new utility function update_wedges(), which triggers a scan
for wedges on the given disk. Call this after writing a disklabel.
This makes all auto-discovered wedges go away after we changed the
partitioning (and are not using GPT) and fixes PR 49665.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/partman.c

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.6 src/usr.sbin/sysinst/defs.h:1.7
--- src/usr.sbin/sysinst/defs.h:1.6	Fri Jan  2 19:43:13 2015
+++ src/usr.sbin/sysinst/defs.h	Sat May  9 12:06:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.6 2015/01/02 19:43:13 abs Exp $	*/
+/*	$NetBSD: defs.h,v 1.7 2015/05/09 12:06:31 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -598,6 +598,13 @@ int pm_cgd_edit(void *, part_entry_t *);
 int pm_gpt_convert(pm_devs_t *);
 void pm_wedges_fill(pm_devs_t *);
 void pm_make_bsd_partitions(pm_devs_t *);
+void update_wedges(const char *);
+
+/* flags whether to offer the respective options (depending on helper
+   programs available on install media */
+int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
+/* initialize above variables */
+void check_available_binaries(void);
 
 /* from bsddisklabel.c */
 int	make_bsd_partitions(void);

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.7 src/usr.sbin/sysinst/disks.c:1.8
--- src/usr.sbin/sysinst/disks.c:1.7	Fri Jan  2 19:43:13 2015
+++ src/usr.sbin/sysinst/disks.c	Sat May  9 12:06:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.7 2015/01/02 19:43:13 abs Exp $ */
+/*	$NetBSD: disks.c,v 1.8 2015/05/09 12:06:31 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -108,7 +108,6 @@ static int fsck_preen(const char *, int,
 static void fixsb(const char *, const char *, char);
 static bool is_gpt(const char *);
 static int incoregpt(pm_devs_t *, partinfo *);
-static bool have_gpt_binary(void);
 
 #ifndef DISK_NAMES
 #define DISK_NAMES wd, sd, ld, raid
@@ -577,26 +576,15 @@ find_disks(const char *doingwhat)
 	return numdisks;
 }
 
-static bool
-have_gpt_binary(void)
-{
-	static bool did_test = false;
-	static bool have_gpt;
-
-	if (!did_test) {
-		have_gpt = binary_available(gpt);
-		did_test = true;
-	}
-
-	return have_gpt;
-}
 
 void
 label_read(void)
 {
+	check_available_binaries();
+
 	/* Get existing/default label */
 	memset(pm-oldlabel, 0, sizeof pm-oldlabel);
-	if (!have_gpt_binary() || !pm-gpt)
+	if (!have_gpt || !pm-gpt)
 		incorelabel(pm-diskdev, pm-oldlabel);
 	else
 		incoregpt(pm, pm-oldlabel);
@@ -666,14 +654,16 @@ fmt_fspart(menudesc *m, int ptn, void *a
 int
 write_disklabel (void)
 {
+	int rv = 0;
 
 #ifdef DISKLABEL_CMD
 	/* disklabel the disk */
-	return run_program(RUN_DISPLAY, %s -f /tmp/disktab %s '%s',
+	rv = run_program(RUN_DISPLAY, %s -f /tmp/disktab %s '%s',
 	DISKLABEL_CMD, pm-diskdev, pm-bsddiskname);
-#else
-	return 0;
+	if (rv == 0)
+		update_wedges(pm-diskdev);
 #endif
+	return rv;
 }
 
 
@@ -1481,7 +1471,9 @@ incoregpt(pm_devs_t *pm_cur, partinfo *l
 static bool
 is_gpt(const char *dev)
 {
-	if (!have_gpt_binary())
+	check_available_binaries();
+
+	if (!have_gpt)
 		return false;
 
 	return !run_program(RUN_SILENT | RUN_ERROR_OK,

Index: src/usr.sbin/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.8 src/usr.sbin/sysinst/partman.c:1.9
--- src/usr.sbin/sysinst/partman.c:1.8	Fri Jan  2 19:43:13 2015
+++ src/usr.sbin/sysinst/partman.c	Sat May  9 12:06:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.8 2015/01/02 19:43:13 abs Exp $ */
+/*	$NetBSD: partman.c,v 1.9 2015/05/09 12:06:31 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -46,7 +46,7 @@
 
 /* flags whether to offer the respective options (depending on helper
programs available on install media */
-static int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
+int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
 
 /* XXX: replace all MAX_* defines with vars that depend on kernel settings */
 #define MAX_ENTRIES 96
@@ -2692,6 +2692,23 @@ pm_menuout(menudesc *m, void *arg)
 	cursel = m-cursel;
 }
 
+/* initialize have_* variables */
+void
+check_available_binaries()
+{
+	static int did_test = false;
+
+	if (did_test) return;
+	did_test = 1;
+
+	have_raid = binary_available(raidctl);
+	have_vnd = binary_available(vnconfig);
+	have_cgd = binary_available(cgdconfig);
+	have_lvm = binary_available(lvm);
+	have_gpt = binary_available(gpt);
+	have_dk = binary_available(dkctl);
+}
+
 /* Main partman function */
 int
 partman(void)
@@ -2702,12 

CVS commit: src/distrib/notes

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:13:35 UTC 2015

Modified Files:
src/distrib/notes/acorn32: legal prep prep.RISCOS
src/distrib/notes/amd64: contents
src/distrib/notes/cats: legal
src/distrib/notes/common: legal.common macros main postinstall sysinst
upgrade xfer
src/distrib/notes/evbarm: legal
src/distrib/notes/macppc: prep.OPENFIRMWARE
src/distrib/notes/shark: legal
src/distrib/notes/x68k: legal

Log Message:
first pass de-suckification for 2015. modernize content a bit, fix dirty
rotten lies, improve wording, sync legalese with reality, yada yada yada.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/acorn32/legal
cvs rdiff -u -r1.14 -r1.15 src/distrib/notes/acorn32/prep
cvs rdiff -u -r1.22 -r1.23 src/distrib/notes/acorn32/prep.RISCOS
cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/amd64/contents
cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/cats/legal
cvs rdiff -u -r1.92 -r1.93 src/distrib/notes/common/legal.common
cvs rdiff -u -r1.40 -r1.41 src/distrib/notes/common/macros
cvs rdiff -u -r1.518 -r1.519 src/distrib/notes/common/main
cvs rdiff -u -r1.79 -r1.80 src/distrib/notes/common/postinstall
cvs rdiff -u -r1.104 -r1.105 src/distrib/notes/common/sysinst
cvs rdiff -u -r1.29 -r1.30 src/distrib/notes/common/upgrade
cvs rdiff -u -r1.73 -r1.74 src/distrib/notes/common/xfer
cvs rdiff -u -r1.4 -r1.5 src/distrib/notes/evbarm/legal
cvs rdiff -u -r1.17 -r1.18 src/distrib/notes/macppc/prep.OPENFIRMWARE
cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/shark/legal
cvs rdiff -u -r1.6 -r1.7 src/distrib/notes/x68k/legal

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

Modified files:

Index: src/distrib/notes/acorn32/legal
diff -u src/distrib/notes/acorn32/legal:1.3 src/distrib/notes/acorn32/legal:1.4
--- src/distrib/notes/acorn32/legal:1.3	Fri Oct 23 04:51:36 2009
+++ src/distrib/notes/acorn32/legal	Sat May  9 08:13:34 2015
@@ -1,8 +1,6 @@
-.\	$NetBSD: legal,v 1.3 2009/10/23 04:51:36 snj Exp $
+.\	$NetBSD: legal,v 1.4 2015/05/09 08:13:34 snj Exp $
 .
 .It
-This product includes software developed by Advanced Risc Machines Ltd.
-.It
 This product includes software developed by the RiscBSD kernel team.
 .It
 This product includes software developed by Scott Stevens.

Index: src/distrib/notes/acorn32/prep
diff -u src/distrib/notes/acorn32/prep:1.14 src/distrib/notes/acorn32/prep:1.15
--- src/distrib/notes/acorn32/prep:1.14	Thu Apr 23 01:56:48 2009
+++ src/distrib/notes/acorn32/prep	Sat May  9 08:13:34 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: prep,v 1.14 2009/04/23 01:56:48 snj Exp $
+.\	$NetBSD: prep,v 1.15 2015/05/09 08:13:34 snj Exp $
 .
 First and foremost, before beginning the installation process,
 .Em make sure you have a reliable backup
@@ -14,7 +14,7 @@ We recommend that you get David Pilling'
 A self-extracting version of this
 can be found in the distribution directory at
 .Pa installation/misc/splug.bas
-or at David Pilling's web site:
+or at David Pilling's website:
 .Lk http://www.davidpilling.net/free.html
 .It
 A program to report your disk's geometry:

Index: src/distrib/notes/acorn32/prep.RISCOS
diff -u src/distrib/notes/acorn32/prep.RISCOS:1.22 src/distrib/notes/acorn32/prep.RISCOS:1.23
--- src/distrib/notes/acorn32/prep.RISCOS:1.22	Sun Apr 26 16:58:30 2009
+++ src/distrib/notes/acorn32/prep.RISCOS	Sat May  9 08:13:34 2015
@@ -1,4 +1,4 @@
-	$NetBSD: prep.RISCOS,v 1.22 2009/04/26 16:58:30 sborrill Exp $
+	$NetBSD: prep.RISCOS,v 1.23 2015/05/09 08:13:34 snj Exp $
 
 These instructions are specific to NetBSD/acorn32 on Acorn RISC OS platforms
 (RiscPC/A7000/A7000+/NC).
@@ -24,7 +24,7 @@ ought to help with the RISC OS installat
 
 1.1 Hardware
 
-Refer to the NetBSD installation notes and/or the web site
+Refer to the NetBSD installation notes and/or the website
 http://www.NetBSD.org/ports/acorn32/ for a list of supported hardware.
 
 
@@ -34,7 +34,7 @@ You will need the following RISC OS soft
 
 	A program that will unpack sparchives. We recommend that you
 	get David Pilling's !SparkPlug. A self-extracting version of this
-	can be found at David Pilling's web site
+	can be found at David Pilling's website
 	(http://www.davidpilling.net/free.html).
 
 	A program to report your disk's geometry:

Index: src/distrib/notes/amd64/contents
diff -u src/distrib/notes/amd64/contents:1.3 src/distrib/notes/amd64/contents:1.4
--- src/distrib/notes/amd64/contents:1.3	Sun Jan 11 04:03:47 2015
+++ src/distrib/notes/amd64/contents	Sat May  9 08:13:34 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: contents,v 1.3 2015/01/11 04:03:47 snj Exp $
+.\	$NetBSD: contents,v 1.4 2015/05/09 08:13:34 snj Exp $
 .\
 .\ Copyright (c) 1999-2005 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -57,9 +57,11 @@ kernel containing code for everything su
 .			It Pa netbsd-INSTALL.gz
 The installation kernel.
 .			It Pa netbsd-INSTALL_XEN3_DOMU.gz
+An installation 

CVS commit: src/lib/libc/sys

2015-05-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May  9 08:10:02 UTC 2015

Modified Files:
src/lib/libc/sys: modctl.2

Log Message:
Provide additional info on why ENOEXEC gets returned.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/sys/modctl.2

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/sys/modctl.2
diff -u src/lib/libc/sys/modctl.2:1.10 src/lib/libc/sys/modctl.2:1.11
--- src/lib/libc/sys/modctl.2:1.10	Tue Jul 15 18:24:44 2014
+++ src/lib/libc/sys/modctl.2	Sat May  9 08:10:01 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: modctl.2,v 1.10 2014/07/15 18:24:44 pgoyette Exp $
+.\	$NetBSD: modctl.2,v 1.11 2015/05/09 08:10:01 pgoyette Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ 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 July 15, 2014
+.Dd May 9, 2015
 .Dt MODCTL 2
 .Os
 .Sh NAME
@@ -272,6 +272,8 @@ The argument
 is
 .Dv MODCTL_LOAD
 and the module is not a valid object for the system.
+Most likely, one or more undefined symbols could not be resolved by the
+in-kernel linker.
 .It Bq Er ENOMEM
 There was not enough memory to perform the
 .Fa operation .



CVS commit: [netbsd-7] src/sys/arch

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:47:15 UTC 2015

Modified Files:
src/sys/arch/aarch64/conf [netbsd-7]: std.aarch64
src/sys/arch/amd64/conf [netbsd-7]: std.amd64
src/sys/arch/evbarm/conf [netbsd-7]: std.evbarm
src/sys/arch/evbarm64/conf [netbsd-7]: std.evbarm64
src/sys/arch/i386/conf [netbsd-7]: std.i386
src/sys/arch/sparc64/conf [netbsd-7]: std.sparc64

Log Message:
Pull up following revision(s) (requested by mrg in ticket #741):
sys/arch/aarch64/conf/std.aarch64: revision 1.2
sys/arch/amd64/conf/std.amd64: revision 1.10
sys/arch/evbarm/conf/std.evbarm: revision 1.4
sys/arch/evbarm64/conf/std.evbarm64: revision 1.2
sys/arch/i386/conf/std.i386: revision 1.34
sys/arch/sparc64/conf/std.sparc64: revision 1.19
bump CHILD_MAX and OPEN_MAX defaults on several platforms, both to 1024.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/arch/aarch64/conf/std.aarch64
cvs rdiff -u -r1.9 -r1.9.12.1 src/sys/arch/amd64/conf/std.amd64
cvs rdiff -u -r1.3 -r1.3.18.1 src/sys/arch/evbarm/conf/std.evbarm
cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/arch/evbarm64/conf/std.evbarm64
cvs rdiff -u -r1.33 -r1.33.12.1 src/sys/arch/i386/conf/std.i386
cvs rdiff -u -r1.18 -r1.18.40.1 src/sys/arch/sparc64/conf/std.sparc64

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/conf/std.aarch64
diff -u src/sys/arch/aarch64/conf/std.aarch64:1.1 src/sys/arch/aarch64/conf/std.aarch64:1.1.2.1
--- src/sys/arch/aarch64/conf/std.aarch64:1.1	Sun Aug 10 05:47:37 2014
+++ src/sys/arch/aarch64/conf/std.aarch64	Sat May  9 08:47:14 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: std.aarch64,v 1.1 2014/08/10 05:47:37 matt Exp $
+#	$NetBSD: std.aarch64,v 1.1.2.1 2015/05/09 08:47:14 snj Exp $
 #
 # standard NetBSD/aarch64 options
 
@@ -8,3 +8,6 @@ options 	MULTIPROCESSOR
 
 options 	EXEC_ELF64
 options 	EXEC_SCRIPT
+
+options 	CHILD_MAX=1024	# 160 is too few
+options 	OPEN_MAX=1024	# 128 is too few

Index: src/sys/arch/amd64/conf/std.amd64
diff -u src/sys/arch/amd64/conf/std.amd64:1.9 src/sys/arch/amd64/conf/std.amd64:1.9.12.1
--- src/sys/arch/amd64/conf/std.amd64:1.9	Thu Sep 27 18:28:55 2012
+++ src/sys/arch/amd64/conf/std.amd64	Sat May  9 08:47:14 2015
@@ -1,4 +1,4 @@
-# $NetBSD: std.amd64,v 1.9 2012/09/27 18:28:55 alnsn Exp $
+# $NetBSD: std.amd64,v 1.9.12.1 2015/05/09 08:47:14 snj Exp $
 #
 # standard, required NetBSD/amd64 'options'
 
@@ -11,6 +11,9 @@ options 	EXEC_SCRIPT	# exec #! scripts
 options 	MTRR
 options		MULTIPROCESSOR
 
+options 	CHILD_MAX=1024	# 160 is too few
+options 	OPEN_MAX=1024	# 128 is too few
+
 mainbus0 at root
 cpu* at mainbus?
 ioapic* at mainbus? apid ?

Index: src/sys/arch/evbarm/conf/std.evbarm
diff -u src/sys/arch/evbarm/conf/std.evbarm:1.3 src/sys/arch/evbarm/conf/std.evbarm:1.3.18.1
--- src/sys/arch/evbarm/conf/std.evbarm:1.3	Sun Dec 16 20:43:54 2012
+++ src/sys/arch/evbarm/conf/std.evbarm	Sat May  9 08:47:14 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: std.evbarm,v 1.3 2012/12/16 20:43:54 matt Exp $
+#	$NetBSD: std.evbarm,v 1.3.18.1 2015/05/09 08:47:14 snj Exp $
 
 include		conf/std
 include		arch/arm/conf/std.arm	# arch standard options
@@ -6,3 +6,6 @@ include		arch/arm/conf/std.arm	# arch 
 options 	EXEC_ELF32
 options 	EXEC_SCRIPT
 options 	ARM32
+
+options 	CHILD_MAX=1024	# 160 is too few
+options 	OPEN_MAX=1024	# 128 is too few

Index: src/sys/arch/evbarm64/conf/std.evbarm64
diff -u src/sys/arch/evbarm64/conf/std.evbarm64:1.1 src/sys/arch/evbarm64/conf/std.evbarm64:1.1.2.1
--- src/sys/arch/evbarm64/conf/std.evbarm64:1.1	Sun Aug 10 05:47:38 2014
+++ src/sys/arch/evbarm64/conf/std.evbarm64	Sat May  9 08:47:14 2015
@@ -1,4 +1,7 @@
-#	$NetBSD: std.evbarm64,v 1.1 2014/08/10 05:47:38 matt Exp $
+#	$NetBSD: std.evbarm64,v 1.1.2.1 2015/05/09 08:47:14 snj Exp $
 
 include		conf/std
 include		arch/aarch64/conf/std.aarch64	# arch standard options
+
+options 	CHILD_MAX=1024	# 160 is too few
+options 	OPEN_MAX=1024	# 128 is too few

Index: src/sys/arch/i386/conf/std.i386
diff -u src/sys/arch/i386/conf/std.i386:1.33 src/sys/arch/i386/conf/std.i386:1.33.12.1
--- src/sys/arch/i386/conf/std.i386:1.33	Thu Sep 27 18:28:55 2012
+++ src/sys/arch/i386/conf/std.i386	Sat May  9 08:47:14 2015
@@ -1,4 +1,4 @@
-# $NetBSD: std.i386,v 1.33 2012/09/27 18:28:55 alnsn Exp $
+# $NetBSD: std.i386,v 1.33.12.1 2015/05/09 08:47:14 snj Exp $
 #
 # standard, required NetBSD/i386 'options'
 
@@ -16,6 +16,9 @@ options 	EXEC_SCRIPT	# exec #! scripts
 options		MULTIPROCESSOR		# multiprocessor support
 options 	MPBIOS			# configure CPUs and APICs using MPBIOS
 
+options 	CHILD_MAX=1024	# 160 is too few
+options 	OPEN_MAX=1024	# 128 is too few
+
 mainbus0 at root
 cpu* at mainbus?
 ioapic* at mainbus?

Index: src/sys/arch/sparc64/conf/std.sparc64
diff -u src/sys/arch/sparc64/conf/std.sparc64:1.18 

CVS commit: [netbsd-7] src

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 08:35:10 UTC 2015

Modified Files:
src/sys/arch/x86/include [netbsd-7]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-7]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #739):
sys/arch/x86/include/specialreg.h: revision 1.82
usr.sbin/cpuctl/arch/i386.c: revision 1.66
From Intel SDM:
- Add the Silicon Debug bit in CPUID Fn0001 %ecx
- Add CPUID Fn_0007 %ecx bits
- Add comments.
--
Update some Intel CPU models (Sky Lake, Broadwell and Atom X[357]).


To generate a diff of this commit:
cvs rdiff -u -r1.78.4.2 -r1.78.4.3 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.58.2.3 -r1.58.2.4 src/usr.sbin/cpuctl/arch/i386.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/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.78.4.2 src/sys/arch/x86/include/specialreg.h:1.78.4.3
--- src/sys/arch/x86/include/specialreg.h:1.78.4.2	Fri Jan  9 10:33:07 2015
+++ src/sys/arch/x86/include/specialreg.h	Sat May  9 08:35:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.78.4.2 2015/01/09 10:33:07 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.78.4.3 2015/05/09 08:35:10 snj Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -189,7 +189,7 @@
 #define	CPUID2_TM2	0x0100	/* Thermal Monitor 2 */
 #define CPUID2_SSSE3	0x0200	/* Supplemental SSE3 */
 #define	CPUID2_CID	0x0400	/* Context ID */
-/* bit 11 unused	0x0800 */
+#define	CPUID2_SDBG	0x0800	/* Silicon Debug */
 #define	CPUID2_FMA	0x1000	/* has Fused Multiply Add */
 #define	CPUID2_CX16	0x2000	/* has CMPXCHG16B instruction */
 #define	CPUID2_xTPR	0x4000	/* Task Priority Messages disabled? */
@@ -214,7 +214,7 @@
 #define CPUID2_FLAGS1	\20 \
 	\1 SSE3	\2 PCLMULQDQ \3 DTES64	\4 MONITOR \
 	\5 DS-CPL	\6 VMX	\7 SMX	\10 EST \
-	\11 TM2	\12 SSSE3	\13 CID	\14 B11 \
+	\11 TM2	\12 SSSE3	\13 CID	\14 SDBG \
 	\15 FMA	\16 CX16	\17 xTPR	\20 PDCM \
 	\21 B16	\22 PCID	\23 DCA	\24 SSE41 \
 	\25 SSE42	\26 X2APIC	\27 MOVBE	\30 POPCNT \
@@ -300,9 +300,14 @@
 #define CPUID_DSPM_FLAGS1	\20 \1 HWF \4 EPB
 
 /*
- * Intel Structured Extended Feature leaf
- * Fn_0007 main leaf - %ebx.
+ * Intel Structured Extended Feature leaf Fn_0007
+ * %eax == 0: Subleaf 0
+ *	%eax: The Maximun input value for supported subleaf.
+ *	%ebx: Feature bits.
+ *	%ecx: Feature bits.
  */
+
+/* %ebx */
 #define CPUID_SEF_FSGSBASE	__BIT(0)
 #define CPUID_SEF_TSC_ADJUST	__BIT(1)
 #define CPUID_SEF_BMI1		__BIT(3)
@@ -337,17 +342,29 @@
 			\32 PT	\33 AVX512PF\34 AVX512ER\
 	\35 AVX512CD\36 SHA
 
+/* %ecx */
+#define CPUID_SEF_PREFETCHWT1	__BIT(0)
+#define CPUID_SEF_PKU		__BIT(3)
+#define CPUID_SEF_OSPKE		__BIT(4)
+
+#define CPUID_SEF_FLAGS1	\20 \
+	\1 PREFETCHWT1\4 PKU	\
+	\5 OSPKE
+
 /*
  * CPUID Processor extended state Enumeration Fn000d
  *
  * %ecx == 0: supported features info:
  *	%eax: Valid bits of lower 32bits of XCR0
- *	%ebx Save area size for features enabled in XCR0
- *	%ecx Maximim save area size for all cpu features
+ *	%ebx: Maximum save area size for features enabled in XCR0
+ *	%ecx: Maximim save area size for all cpu features
  *	%edx: Valid bits of upper 32bits of XCR0
  *
  * %ecx == 1:
  *	%eax: Bit 0 = xsaveopt instruction avalaible (sandy bridge onwards)
+ *	%ebx: Save area size for features enabled by XCR0 | IA32_XSS
+ *	%ecx: Valid bits of lower 32bits of IA32_XSS
+ *	%edx: Valid bits of upper 32bits of IA32_XSS
  *
  * %ecx = 2: Save area details for XCR0 bit n
  *	%eax: size of save area for this feature
@@ -356,6 +373,7 @@
  *	All of %eax, %ebx, %ecx and %edx are zero for unsupported features.
  */
 
+/* %ecx=1 %eax */
 #define	CPUID_PES1_XSAVEOPT	0x0001	/* xsaveopt instruction */
 #define	CPUID_PES1_XSAVEC	0x0002	/* xsavec  compacted XRSTOR */
 #define	CPUID_PES1_XGETBV	0x0004	/* xgetbv with ECX = 1 */

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.58.2.3 src/usr.sbin/cpuctl/arch/i386.c:1.58.2.4
--- src/usr.sbin/cpuctl/arch/i386.c:1.58.2.3	Sun Apr 19 16:42:19 2015
+++ src/usr.sbin/cpuctl/arch/i386.c	Sat May  9 08:35:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.58.2.3 2015/04/19 16:42:19 riz Exp $	*/
+/*	$NetBSD: i386.c,v 1.58.2.4 2015/05/09 08:35:10 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.58.2.3 2015/04/19 16:42:19 riz Exp $);
+__RCSID($NetBSD: i386.c,v 1.58.2.4 2015/05/09 08:35:10 snj Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -363,15 +363,17 @@ const struct cpu_cpuid_nameclass i386_cp
 	 (Haswell),
 [0x46] = 4th gen Core, Xeon E3-12xx v3 
 	 (Haswell),
+[0x47] = 5th gen Core (Broadwell),
 [0x4a] = Atom Z3400,
-[0x4c] 

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

2015-05-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  9 09:35:20 UTC 2015

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

Log Message:
Use NULL not 0 for pointer comparison


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.8 -r1.140.2.9 src/sys/dev/usb/uaudio.c
cvs rdiff -u -r1.126.2.8 -r1.126.2.9 src/sys/dev/usb/ugen.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.140.2.8 src/sys/dev/usb/uaudio.c:1.140.2.9
--- src/sys/dev/usb/uaudio.c:1.140.2.8	Mon Apr  6 15:18:13 2015
+++ src/sys/dev/usb/uaudio.c	Sat May  9 09:35:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.140.2.8 2015/04/06 15:18:13 skrll Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.140.2.9 2015/05/09 09:35:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uaudio.c,v 1.140.2.8 2015/04/06 15:18:13 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uaudio.c,v 1.140.2.9 2015/05/09 09:35:20 skrll Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_usb.h
@@ -2751,7 +2751,7 @@ uaudio_chan_alloc_buffers(struct uaudio_
 	size = (ch-bytes_per_frame + ch-sample_size) * UAUDIO_NFRAMES;
 	for (i = 0; i  UAUDIO_NCHANBUFS; i++) {
 		xfer = usbd_alloc_xfer(sc-sc_udev);
-		if (xfer == 0)
+		if (xfer == NULL)
 			goto bad;
 		ch-chanbufs[i].xfer = xfer;
 		tbuf = usbd_alloc_buffer(xfer, size);

Index: src/sys/dev/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.126.2.8 src/sys/dev/usb/ugen.c:1.126.2.9
--- src/sys/dev/usb/ugen.c:1.126.2.8	Sat Mar 21 11:33:37 2015
+++ src/sys/dev/usb/ugen.c	Sat May  9 09:35:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.126.2.8 2015/03/21 11:33:37 skrll Exp $	*/
+/*	$NetBSD: ugen.c,v 1.126.2.9 2015/05/09 09:35:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.126.2.8 2015/03/21 11:33:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.126.2.9 2015/05/09 09:35:20 skrll Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -464,7 +464,7 @@ ugenopen(dev_t dev, int flag, int mode, 
 			for(i = 0; i  UGEN_NISOREQS; ++i) {
 sce-isoreqs[i].sce = sce;
 xfer = usbd_alloc_xfer(sc-sc_udev);
-if (xfer == 0)
+if (xfer == NULL)
 	goto bad;
 sce-isoreqs[i].xfer = xfer;
 tbuf = usbd_alloc_buffer
@@ -720,7 +720,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 			break;
 		}
 		xfer = usbd_alloc_xfer(sc-sc_udev);
-		if (xfer == 0)
+		if (xfer == NULL)
 			return ENOMEM;
 		while ((n = min(UGEN_BBSIZE, uio-uio_resid)) != 0) {
 			DPRINTFN(1, (ugenread: start transfer %d bytes\n,n));
@@ -934,7 +934,7 @@ ugen_do_write(struct ugen_softc *sc, int
 			break;
 		}
 		xfer = usbd_alloc_xfer(sc-sc_udev);
-		if (xfer == 0)
+		if (xfer == NULL)
 			return EIO;
 		while ((n = min(UGEN_BBSIZE, uio-uio_resid)) != 0) {
 			error = uiomove(sc-sc_buffer, n, uio);
@@ -957,7 +957,7 @@ ugen_do_write(struct ugen_softc *sc, int
 		break;
 	case UE_INTERRUPT:
 		xfer = usbd_alloc_xfer(sc-sc_udev);
-		if (xfer == 0)
+		if (xfer == NULL)
 			return EIO;
 		while ((n = min(UGETW(sce-edesc-wMaxPacketSize),
 		uio-uio_resid)) != 0) {



CVS commit: src/sys/dev/pci

2015-05-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat May  9 08:08:50 UTC 2015

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

Log Message:
initialise sc_mtx slightly earlier, before it is used on systems with rng.

fixes problem reported by msaitoh@.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/hifn7751.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/hifn7751.c
diff -u src/sys/dev/pci/hifn7751.c:1.58 src/sys/dev/pci/hifn7751.c:1.59
--- src/sys/dev/pci/hifn7751.c:1.58	Mon Apr 27 17:38:01 2015
+++ src/sys/dev/pci/hifn7751.c	Sat May  9 08:08:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.58 2015/04/27 17:38:01 christos Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.59 2015/05/09 08:08:50 mrg Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.58 2015/04/27 17:38:01 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.59 2015/05/09 08:08:50 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -433,13 +433,13 @@ hifn_attach(device_t parent, device_t se
 	sc-sc_dmamap-dm_mapsize,
 	BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
+	mutex_init(sc-sc_mtx, MUTEX_DEFAULT, IPL_VM);
+
 	if (sc-sc_flags  (HIFN_HAS_PUBLIC | HIFN_HAS_RNG)) {
 		hifn_init_pubrng(sc);
 		sc-sc_rng_need = RND_POOLBITS / NBBY;
 	}
 
-	mutex_init(sc-sc_mtx, MUTEX_DEFAULT, IPL_VM);
-
 #ifdef	__OpenBSD__
 	timeout_set(sc-sc_tickto, hifn_tick, sc);
 	timeout_add(sc-sc_tickto, hz);



CVS commit: src/sys/arch/arm/nvidia

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 11:17:59 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_car.c tegra_carreg.h tegra_var.h

Log Message:
add tegra_car_pllu_rate


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_var.h

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

Modified files:

Index: src/sys/arch/arm/nvidia/tegra_car.c
diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.4 src/sys/arch/arm/nvidia/tegra_car.c:1.5
--- src/sys/arch/arm/nvidia/tegra_car.c:1.4	Sun May  3 16:40:12 2015
+++ src/sys/arch/arm/nvidia/tegra_car.c	Sat May  9 11:17:59 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_car.c,v 1.4 2015/05/03 16:40:12 jmcneill Exp $ */
+/* $NetBSD: tegra_car.c,v 1.5 2015/05/09 11:17:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.4 2015/05/03 16:40:12 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.5 2015/05/09 11:17:59 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -81,6 +81,8 @@ tegra_car_attach(device_t parent, device
 	aprint_normal(: CAR\n);
 
 	aprint_verbose_dev(self, PLLX = %u Hz\n, tegra_car_pllx_rate());
+	aprint_verbose_dev(self, PLLC = %u Hz\n, tegra_car_pllc_rate());
+	aprint_verbose_dev(self, PLLU = %u Hz\n, tegra_car_pllu_rate());
 	aprint_verbose_dev(self, PLLP0 = %u Hz\n, tegra_car_pllp0_rate());
 }
 
@@ -139,6 +141,26 @@ tegra_car_pllc_rate(void)
 }
 
 u_int
+tegra_car_pllu_rate(void)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+	uint64_t rate;
+
+	tegra_car_get_bs(bst, bsh);
+
+	rate = tegra_car_osc_rate();	
+	const uint32_t base = bus_space_read_4(bst, bsh, CAR_PLLU_BASE_REG);
+	const u_int divm = __SHIFTOUT(base, CAR_PLLU_BASE_DIVM);
+	const u_int divn = __SHIFTOUT(base, CAR_PLLU_BASE_DIVN);
+	const u_int divp = __SHIFTOUT(base, CAR_PLLU_BASE_VCO_FREQ) ? 0 : 1;
+
+	rate = (uint64_t)tegra_car_osc_rate() * divn;
+
+	return rate / (divm  divp);
+}
+
+u_int
 tegra_car_pllp0_rate(void)
 {
 	return tegra_car_pll_rate(CAR_PLLP_BASE_REG, CAR_PLLP_BASE_DIVM,

Index: src/sys/arch/arm/nvidia/tegra_carreg.h
diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.5 src/sys/arch/arm/nvidia/tegra_carreg.h:1.6
--- src/sys/arch/arm/nvidia/tegra_carreg.h:1.5	Wed May  6 21:27:05 2015
+++ src/sys/arch/arm/nvidia/tegra_carreg.h	Sat May  9 11:17:59 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_carreg.h,v 1.5 2015/05/06 21:27:05 skrll Exp $ */
+/* $NetBSD: tegra_carreg.h,v 1.6 2015/05/09 11:17:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -64,6 +64,20 @@
 #define CAR_PLLC_BASE_DIVN		__BITS(15,8)
 #define CAR_PLLC_BASE_DIVM		__BITS(7,0)
 
+#define CAR_PLLU_BASE_REG	0xc0
+#define CAR_PLLU_BASE_BYPASS		__BIT(31)
+#define CAR_PLLU_BASE_ENABLE		__BIT(30)
+#define CAR_PLLU_BASE_REF_DIS		__BIT(29)
+#define CAR_PLLU_BASE_LOCK		__BIT(27)
+#define CAR_PLLU_BASE_CLKENABLE_48M	__BIT(25)
+#define CAR_PLLU_BASE_OVERRIDE		__BIT(24)
+#define CAR_PLLU_BASE_CLKENABLE_ICUSB	__BIT(23)
+#define CAR_PLLU_BASE_CLKENABLE_HSIC	__BIT(22)
+#define CAR_PLLU_BASE_CLKENABLE_USB	__BIT(21)
+#define CAR_PLLU_BASE_VCO_FREQ		__BIT(20)
+#define CAR_PLLU_BASE_DIVN		__BITS(17,8)
+#define CAR_PLLU_BASE_DIVM		__BITS(4,0)
+
 #define CAR_PLLX_BASE_REG	0xe0
 #define CAR_PLLX_BASE_BYPASS		__BIT(31)
 #define CAR_PLLX_BASE_ENABLE		__BIT(30)

Index: src/sys/arch/arm/nvidia/tegra_var.h
diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.9 src/sys/arch/arm/nvidia/tegra_var.h:1.10
--- src/sys/arch/arm/nvidia/tegra_var.h:1.9	Thu May  7 23:55:11 2015
+++ src/sys/arch/arm/nvidia/tegra_var.h	Sat May  9 11:17:59 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.9 2015/05/07 23:55:11 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.10 2015/05/09 11:17:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -76,6 +76,7 @@ void	tegra_dma_bootstrap(psize_t);
 u_int	tegra_car_osc_rate(void);
 u_int	tegra_car_pllc_rate(void);
 u_int	tegra_car_pllx_rate(void);
+u_int	tegra_car_pllu_rate(void);
 u_int	tegra_car_pllp0_rate(void);
 u_int	tegra_car_uart_rate(u_int);
 u_int	tegra_car_periph_sdmmc_rate(u_int);



CVS commit: src/sys/arch/evbarm/tegra

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 12:08:30 UTC 2015

Modified Files:
src/sys/arch/evbarm/tegra: tegra_machdep.c

Log Message:
for Jetson TK1, GPIO N5 controls vbus vdd for USB2


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/tegra/tegra_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/tegra/tegra_machdep.c
diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.10 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.11
--- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.10	Sun May  3 17:24:45 2015
+++ src/sys/arch/evbarm/tegra/tegra_machdep.c	Sat May  9 12:08:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.10 2015/05/03 17:24:45 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.11 2015/05/09 12:08:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.10 2015/05/03 17:24:45 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.11 2015/05/09 12:08:30 jmcneill Exp $);
 
 #include opt_tegra.h
 #include opt_machdep.h
@@ -393,5 +393,15 @@ tegra_device_register(device_t self, voi
 			prop_dictionary_set_cstring(dict, wp-gpio, Q4);
 		}
 	}
+
+	if (device_is_a(self, ehci)
+	 device_is_a(device_parent(self), tegraio)) {
+		struct tegraio_attach_args * const tio = aux;
+		const struct tegra_locators * const loc = tio-tio_loc;
+
+		if (loc-loc_port == 2) {
+			prop_dictionary_set_cstring(dict, vbus-gpio, N5);
+		}
+	}
 #endif
 }



CVS commit: src/sys/arch/arm/nvidia

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 12:07:53 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_ehci.c

Log Message:
if vbus gpio pin is provided, use it to enable vdd


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_ehci.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/arm/nvidia/tegra_ehci.c
diff -u src/sys/arch/arm/nvidia/tegra_ehci.c:1.2 src/sys/arch/arm/nvidia/tegra_ehci.c:1.3
--- src/sys/arch/arm/nvidia/tegra_ehci.c:1.2	Sun Apr 26 17:14:24 2015
+++ src/sys/arch/arm/nvidia/tegra_ehci.c	Sat May  9 12:07:52 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $ */
+/* $NetBSD: tegra_ehci.c,v 1.3 2015/05/09 12:07:52 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.3 2015/05/09 12:07:52 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -55,6 +55,8 @@ static void	tegra_ehci_attach(device_t, 
 struct tegra_ehci_softc {
 	struct ehci_softc	sc;
 	void			*sc_ih;
+
+	struct tegra_gpio_pin	*sc_pin_vbus;
 };
 
 CFATTACH_DECL2_NEW(tegra_ehci, sizeof(struct tegra_ehci_softc),
@@ -73,6 +75,8 @@ tegra_ehci_attach(device_t parent, devic
 	struct tegra_ehci_softc * const sc = device_private(self);
 	struct tegraio_attach_args * const tio = aux;
 	const struct tegra_locators * const loc = tio-tio_loc;
+	prop_dictionary_t prop = device_properties(self);
+	const char *pin;
 	int error;
 
 	sc-sc.sc_dev = self;
@@ -91,6 +95,13 @@ tegra_ehci_attach(device_t parent, devic
 	aprint_naive(\n);
 	aprint_normal(: USB%d\n, loc-loc_port + 1);
 
+	if (prop_dictionary_get_cstring_nocopy(prop, vbus-gpio, pin)) {
+		sc-sc_pin_vbus = tegra_gpio_acquire(pin,
+		GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN);
+		if (sc-sc_pin_vbus)
+			tegra_gpio_write(sc-sc_pin_vbus, 1);
+}
+
 	sc-sc.sc_offs = EREAD1(sc-sc, EHCI_CAPLENGTH);
 
 	sc-sc_ih = intr_establish(loc-loc_intr, IPL_USB, IST_LEVEL,



CVS commit: src/sys/arch/arm/nvidia

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 12:07:11 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_gpio.c

Log Message:
tegra_gpio_acquire: if a pin is required and not in GPIO mode, switch 
configuration instead of bailing out


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_gpio.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/arm/nvidia/tegra_gpio.c
diff -u src/sys/arch/arm/nvidia/tegra_gpio.c:1.2 src/sys/arch/arm/nvidia/tegra_gpio.c:1.3
--- src/sys/arch/arm/nvidia/tegra_gpio.c:1.2	Sat May  2 17:06:53 2015
+++ src/sys/arch/arm/nvidia/tegra_gpio.c	Sat May  9 12:07:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_gpio.c,v 1.2 2015/05/02 17:06:53 jmcneill Exp $ */
+/* $NetBSD: tegra_gpio.c,v 1.3 2015/05/09 12:07:11 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_gpio.c,v 1.2 2015/05/02 17:06:53 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_gpio.c,v 1.3 2015/05/09 12:07:11 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -298,7 +298,7 @@ tegra_gpio_acquire(const char *pinname, 
 
 	const uint32_t cnf = GPIO_READ(bank, GPIO_CNF_REG);
 	if ((cnf  __BIT(pin)) == 0)
-		return NULL;
+		GPIO_WRITE(bank, GPIO_CNF_REG, cnf | __BIT(pin));
 
 	gpin = kmem_alloc(sizeof(*gpin), KM_SLEEP);
 	gpin-pin_bank = bank;



CVS commit: src/sys/external/bsd/acpica/dist/compiler

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:24:56 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslcompiler.h aslopcodes.c
aslutils.c

Log Message:
CID 1256503: Handle memory leak


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/acpica/dist/compiler/aslutils.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/external/bsd/acpica/dist/compiler/aslcompiler.h
diff -u src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.1.1.6 src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.2
--- src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h:1.1.1.6	Mon Apr 13 13:21:03 2015
+++ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h	Sat May  9 11:24:56 2015
@@ -945,6 +945,11 @@ UtLocalCalloc (
 UINT32  Size);
 
 void
+UtLocalFree (
+void		*Allocated,
+UINT32  Size);
+
+void
 UtPrintFormattedName (
 UINT16  ParseOpcode,
 UINT32  Level);

Index: src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c:1.1.1.5 src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c:1.2
--- src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c:1.1.1.5	Mon Apr 13 13:21:04 2015
+++ src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c	Sat May  9 11:24:56 2015
@@ -1358,6 +1358,7 @@ OpcDoPld (
 Node = Node-Asl.Next;
 }
 
+UtLocalFree (Buffer, ACPI_PLD_BUFFER_SIZE);
 Buffer = OpcEncodePldBuffer(PldInfo);
 
 /* Change Op to a Buffer */

Index: src/sys/external/bsd/acpica/dist/compiler/aslutils.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.10 src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.11
--- src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.10	Mon Apr 13 13:23:15 2015
+++ src/sys/external/bsd/acpica/dist/compiler/aslutils.c	Sat May  9 11:24:56 2015
@@ -178,6 +178,26 @@ UtLocalCalloc (
 return (Allocated);
 }
 
+/***
+ *
+ * FUNCTION:UtLocalFree
+ *
+ * PARAMETERS:  Allocated   - Pointer to be released
+ * PARAMETERS:  Size- Bytes to be released
+ *
+ * RETURN:  None
+ *
+ * DESCRIPTION: Free memory previously allocated
+ *
+ **/
+void 
+UtLocalFree (
+	void *Allocated, UINT32 Size)
+{
+ACPI_FREE (Allocated);
+TotalAllocations--;
+TotalAllocated -= Size;
+}
 
 /***
  *



CVS commit: src/external/public-domain/xz/dist/src/xz

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:28:25 UTC 2015

Modified Files:
src/external/public-domain/xz/dist/src/xz: args.c

Log Message:
CID 1268629: Don't deref NULL (can't happen unless count is incorrect;
code safety).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/public-domain/xz/dist/src/xz/args.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/public-domain/xz/dist/src/xz/args.c
diff -u src/external/public-domain/xz/dist/src/xz/args.c:1.1.1.2 src/external/public-domain/xz/dist/src/xz/args.c:1.2
--- src/external/public-domain/xz/dist/src/xz/args.c:1.1.1.2	Fri Apr 17 14:24:55 2015
+++ src/external/public-domain/xz/dist/src/xz/args.c	Sat May  9 11:28:25 2015
@@ -107,6 +107,8 @@ parse_block_list(char *str)
 			}
 		}
 
+		if (p == NULL)
+			break;
 		str = p + 1;
 	}
 



CVS commit: src/sys/external/bsd/acpica/dist/dispatcher

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:31:36 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/dispatcher: dsutils.c

Log Message:
CID 1292510: Check allocation


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/sys/external/bsd/acpica/dist/dispatcher/dsutils.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/external/bsd/acpica/dist/dispatcher/dsutils.c
diff -u src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.1.1.5 src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.2
--- src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.1.1.5	Mon Apr 13 13:21:07 2015
+++ src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c	Sat May  9 11:31:36 2015
@@ -604,10 +604,16 @@ AcpiDsCreateOperand (
 /* TBD: May only be temporary */
 
 ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
-
-ACPI_STRNCPY (ObjDesc-String.Pointer, NameString, NameLength);
-Status = AE_OK;
-}
+		if (ObjDesc)
+		{
+			ACPI_STRNCPY (ObjDesc-String.Pointer, NameString, NameLength);
+			Status = AE_OK;
+		}
+		else
+		{
+			Status = AE_NO_MEMORY;
+		}
+		}
 else
 {
 /*



CVS commit: src/include/ssp

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:41:47 UTC 2015

Modified Files:
src/include/ssp: ssp.h

Log Message:
add a macro to check overlapping pointers


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/include/ssp/ssp.h

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

Modified files:

Index: src/include/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.10 src/include/ssp/ssp.h:1.11
--- src/include/ssp/ssp.h:1.10	Wed Aug  8 16:23:32 2012
+++ src/include/ssp/ssp.h	Sat May  9 11:41:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.10 2012/08/08 20:23:32 joerg Exp $	*/
+/*	$NetBSD: ssp.h,v 1.11 2015/05/09 15:41:47 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
@@ -77,6 +77,9 @@ __ssp_inline rtype fun args { \
 #define __ssp_redirect0(rtype, fun, args, call) \
 __ssp_redirect_raw(rtype, fun, fun, args, call, __ssp_bos0)
 
+#define __ssp_overlap(a, b, l) \
+(((a) = (b)  (b) = (a) + (l)) || ((b) = (a)  (a) = (b) + (l)))
+
 __BEGIN_DECLS
 void __stack_chk_fail(void) __dead;
 void __chk_fail(void) __dead;



CVS commit: src/lib/libc/ssp

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:42:21 UTC 2015

Modified Files:
src/lib/libc/ssp: memcpy_chk.c stpcpy_chk.c stpncpy_chk.c strcpy_chk.c
strncpy_chk.c

Log Message:
add overlapping pointer checks


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/ssp/memcpy_chk.c \
src/lib/libc/ssp/stpcpy_chk.c src/lib/libc/ssp/strncpy_chk.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/ssp/stpncpy_chk.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/ssp/strcpy_chk.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/ssp/memcpy_chk.c
diff -u src/lib/libc/ssp/memcpy_chk.c:1.5 src/lib/libc/ssp/memcpy_chk.c:1.6
--- src/lib/libc/ssp/memcpy_chk.c:1.5	Tue Sep 16 20:39:28 2014
+++ src/lib/libc/ssp/memcpy_chk.c	Sat May  9 11:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: memcpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $	*/
+/*	$NetBSD: memcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: memcpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $);
+__RCSID($NetBSD: memcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $);
 
 /*LINTLIBRARY*/
 
@@ -46,5 +46,9 @@ __memcpy_chk(void * __restrict dst, cons
 {
 	if (len  slen)
 		__chk_fail();
+
+	if (__ssp_overlap(src, dst, len))
+		__chk_fail();
+
 	return memcpy(dst, src, len);
 }
Index: src/lib/libc/ssp/stpcpy_chk.c
diff -u src/lib/libc/ssp/stpcpy_chk.c:1.5 src/lib/libc/ssp/stpcpy_chk.c:1.6
--- src/lib/libc/ssp/stpcpy_chk.c:1.5	Sun Apr  6 15:29:25 2014
+++ src/lib/libc/ssp/stpcpy_chk.c	Sat May  9 11:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: stpcpy_chk.c,v 1.5 2014/04/06 19:29:25 christos Exp $	*/
+/*	$NetBSD: stpcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: stpcpy_chk.c,v 1.5 2014/04/06 19:29:25 christos Exp $);
+__RCSID($NetBSD: stpcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $);
 
 /*LINTLIBRARY*/
 
@@ -50,6 +50,9 @@ __stpcpy_chk(char * __restrict dst, cons
 	if (len = slen)
 		__chk_fail();
 
+	if (__ssp_overlap(src, dst, len))
+		__chk_fail();
+
 	(void)memcpy(dst, src, len + 1);
 	return dst + len;
 }
Index: src/lib/libc/ssp/strncpy_chk.c
diff -u src/lib/libc/ssp/strncpy_chk.c:1.5 src/lib/libc/ssp/strncpy_chk.c:1.6
--- src/lib/libc/ssp/strncpy_chk.c:1.5	Tue Sep 16 20:39:28 2014
+++ src/lib/libc/ssp/strncpy_chk.c	Sat May  9 11:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: strncpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $	*/
+/*	$NetBSD: strncpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: strncpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $);
+__RCSID($NetBSD: strncpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $);
 
 /*LINTLIBRARY*/
 
@@ -48,5 +48,8 @@ __strncpy_chk(char * __restrict dst, con
 	if (len  slen)
 		__chk_fail();
 
+	if (__ssp_overlap(src, dst, len))
+		__chk_fail();
+
 	return strncpy(dst, src, len);
 }

Index: src/lib/libc/ssp/stpncpy_chk.c
diff -u src/lib/libc/ssp/stpncpy_chk.c:1.2 src/lib/libc/ssp/stpncpy_chk.c:1.3
--- src/lib/libc/ssp/stpncpy_chk.c:1.2	Wed Nov  6 11:58:58 2013
+++ src/lib/libc/ssp/stpncpy_chk.c	Sat May  9 11:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: stpncpy_chk.c,v 1.2 2013/11/06 16:58:58 christos Exp $	*/
+/*	$NetBSD: stpncpy_chk.c,v 1.3 2015/05/09 15:42:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: stpncpy_chk.c,v 1.2 2013/11/06 16:58:58 christos Exp $);
+__RCSID($NetBSD: stpncpy_chk.c,v 1.3 2015/05/09 15:42:21 christos Exp $);
 
 /*LINTLIBRARY*/
 
@@ -49,5 +49,8 @@ __stpncpy_chk(char * __restrict dst, con
 	if (len  slen)
 		__chk_fail();
 
+	if (__ssp_overlap(src, dst, len))
+		__chk_fail();
+
 	return stpncpy(dst, src, len);
 }

Index: src/lib/libc/ssp/strcpy_chk.c
diff -u src/lib/libc/ssp/strcpy_chk.c:1.7 src/lib/libc/ssp/strcpy_chk.c:1.8
--- src/lib/libc/ssp/strcpy_chk.c:1.7	Tue Sep 16 20:39:28 2014
+++ src/lib/libc/ssp/strcpy_chk.c	Sat May  9 11:42:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: strcpy_chk.c,v 1.7 2014/09/17 00:39:28 joerg Exp $	*/
+/*	$NetBSD: strcpy_chk.c,v 1.8 2015/05/09 15:42:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: strcpy_chk.c,v 1.7 2014/09/17 00:39:28 joerg Exp $);
+__RCSID($NetBSD: strcpy_chk.c,v 1.8 2015/05/09 15:42:21 christos Exp $);
 
 /*LINTLIBRARY*/
 
@@ -48,5 +48,8 @@ __strcpy_chk(char * __restrict dst, cons
 	if (len  slen)
 		__chk_fail();
 

CVS commit: src/sys/dev/wsfont

2015-05-09 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  9 16:40:37 UTC 2015

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
When searching for a best font also allow fonts too wide for the
desired display columns but penalize these against all narrower ones.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/wsfont/wsfont.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/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.58 src/sys/dev/wsfont/wsfont.c:1.59
--- src/sys/dev/wsfont/wsfont.c:1.58	Sat Apr 18 11:23:58 2015
+++ src/sys/dev/wsfont/wsfont.c	Sat May  9 16:40:37 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $);
 
 #include opt_wsfont.h
 
@@ -570,7 +570,7 @@ int
 wsfont_matches(struct wsdisplay_font *font, const char *name,
 	   int width, int height, int stride, int flags)
 {
-	int score = 1;
+	int score = 2;
 
 	/* first weed out fonts the caller doesn't claim support for */
 	if (FONT_IS_ALPHA(font)) {
@@ -590,8 +590,9 @@ wsfont_matches(struct wsdisplay_font *fo
 return (0);
 		} else {
 			if (font-fontwidth  width)
-return (0);
-			score -= min(width - font-fontwidth, );
+score -= 1 + min(font-fontwidth - width, );
+			else
+score -= min(width - font-fontwidth, );
 		}
 	}
 



CVS commit: src/sys/external/bsd/acpica/dist/tables

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:34:13 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/tables: tbinstal.c

Log Message:
CID 1292512: Help coverity with offset NULL calculations


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/tables/tbinstal.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/external/bsd/acpica/dist/tables/tbinstal.c
diff -u src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.4 src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.5
--- src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.4	Mon Apr 13 13:23:16 2015
+++ src/sys/external/bsd/acpica/dist/tables/tbinstal.c	Sat May  9 11:34:13 2015
@@ -514,7 +514,11 @@ AcpiTbUninstallTable (
 if ((TableDesc-Flags  ACPI_TABLE_ORIGIN_MASK) ==
 ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
 {
-ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc-Address));
+	void *ptr = ACPI_PHYSADDR_TO_PTR (TableDesc-Address);
+	if (ptr)
+	{
+		ACPI_FREE (ptr);
+	}
 }
 
 TableDesc-Address = ACPI_PTR_TO_PHYSADDR (NULL);



CVS commit: src/sys/external/bsd/acpica/dist/common

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:36:15 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/common: dmtbdump.c

Log Message:
CID 1294266: Cast to void.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/sys/external/bsd/acpica/dist/common/dmtbdump.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/external/bsd/acpica/dist/common/dmtbdump.c
diff -u src/sys/external/bsd/acpica/dist/common/dmtbdump.c:1.1.1.6 src/sys/external/bsd/acpica/dist/common/dmtbdump.c:1.2
--- src/sys/external/bsd/acpica/dist/common/dmtbdump.c:1.1.1.6	Mon Apr 13 13:21:02 2015
+++ src/sys/external/bsd/acpica/dist/common/dmtbdump.c	Sat May  9 11:36:15 2015
@@ -2538,7 +2538,7 @@ void
 AcpiDmDumpSlic (
 ACPI_TABLE_HEADER   *Table)
 {
-AcpiDmDumpTable (Table-Length, sizeof (ACPI_TABLE_HEADER), Table,
+(void)AcpiDmDumpTable (Table-Length, sizeof (ACPI_TABLE_HEADER), Table,
 Table-Length - sizeof (*Table), AcpiDmTableInfoSlic);
 }
 



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

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:08:26 UTC 2015

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

Log Message:
remove unreachable code.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.29 src/sys/dev/pci/ixgbe/ixgbe.c:1.30
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.29	Wed May  6 05:21:22 2015
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Sat May  9 09:08:26 2015
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.c 250108 2013-04-30 16:18:29Z luigi $*/
-/*$NetBSD: ixgbe.c,v 1.29 2015/05/06 09:21:22 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.30 2015/05/09 13:08:26 christos Exp $*/
 
 #include opt_inet.h
 #include opt_inet6.h
@@ -1977,8 +1977,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 		default:
 			adapter-other_tx_dma_setup.ev_count++;
 			return error;
-		case 0:
-			break;
 		}
 	}
 



CVS commit: src/gnu/lib/libmalloc

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:32:30 UTC 2015

Modified Files:
src/gnu/lib/libmalloc: mem-limits.h

Log Message:
CID 1225079: check getrlimit return


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/lib/libmalloc/mem-limits.h

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

Modified files:

Index: src/gnu/lib/libmalloc/mem-limits.h
diff -u src/gnu/lib/libmalloc/mem-limits.h:1.3 src/gnu/lib/libmalloc/mem-limits.h:1.4
--- src/gnu/lib/libmalloc/mem-limits.h:1.3	Fri Jan  5 03:30:45 1996
+++ src/gnu/lib/libmalloc/mem-limits.h	Sat May  9 09:32:30 2015
@@ -121,7 +121,8 @@ get_lim_data ()
 {
   struct rlimit XXrlimit;
 
-  getrlimit (RLIMIT_DATA, XXrlimit);
+  if (getrlimit (RLIMIT_DATA, XXrlimit) == -1)
+	XXrlimit.rlim_cur = -1;
 #ifdef RLIM_INFINITY
   lim_data = XXrlimit.rlim_cur  RLIM_INFINITY; /* soft limit */
 #else



CVS commit: [netbsd-7] src/usr.sbin/sysinst

2015-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat May  9 13:50:15 UTC 2015

Modified Files:
src/usr.sbin/sysinst [netbsd-7]: defs.h disks.c partman.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #744):
usr.sbin/sysinst/defs.h: revision 1.7
usr.sbin/sysinst/disks.c: revision 1.8
usr.sbin/sysinst/partman.c: revision 1.9
Add a new utility function update_wedges(), which triggers a scan
for wedges on the given disk. Call this after writing a disklabel.
This makes all auto-discovered wedges go away after we changed the
partitioning (and are not using GPT) and fixes PR 49665.


To generate a diff of this commit:
cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.4.4.3 -r1.4.4.4 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/usr.sbin/sysinst/partman.c

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.3.4.2 src/usr.sbin/sysinst/defs.h:1.3.4.3
--- src/usr.sbin/sysinst/defs.h:1.3.4.2	Fri Feb 27 11:29:44 2015
+++ src/usr.sbin/sysinst/defs.h	Sat May  9 13:50:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.3.4.2 2015/02/27 11:29:44 martin Exp $	*/
+/*	$NetBSD: defs.h,v 1.3.4.3 2015/05/09 13:50:15 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -598,6 +598,13 @@ int pm_cgd_edit(void *, part_entry_t *);
 int pm_gpt_convert(pm_devs_t *);
 void pm_wedges_fill(pm_devs_t *);
 void pm_make_bsd_partitions(pm_devs_t *);
+void update_wedges(const char *);
+
+/* flags whether to offer the respective options (depending on helper
+   programs available on install media */
+int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
+/* initialize above variables */
+void check_available_binaries(void);
 
 /* from bsddisklabel.c */
 int	make_bsd_partitions(void);

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.4.4.3 src/usr.sbin/sysinst/disks.c:1.4.4.4
--- src/usr.sbin/sysinst/disks.c:1.4.4.3	Sun Jan 11 04:32:38 2015
+++ src/usr.sbin/sysinst/disks.c	Sat May  9 13:50:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.4.4.3 2015/01/11 04:32:38 snj Exp $ */
+/*	$NetBSD: disks.c,v 1.4.4.4 2015/05/09 13:50:15 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -108,7 +108,6 @@ static int fsck_preen(const char *, int,
 static void fixsb(const char *, const char *, char);
 static bool is_gpt(const char *);
 static int incoregpt(pm_devs_t *, partinfo *);
-static bool have_gpt_binary(void);
 
 #ifndef DISK_NAMES
 #define DISK_NAMES wd, sd, ld, raid
@@ -577,26 +576,15 @@ find_disks(const char *doingwhat)
 	return numdisks;
 }
 
-static bool
-have_gpt_binary(void)
-{
-	static bool did_test = false;
-	static bool have_gpt;
-
-	if (!did_test) {
-		have_gpt = binary_available(gpt);
-		did_test = true;
-	}
-
-	return have_gpt;
-}
 
 void
 label_read(void)
 {
+	check_available_binaries();
+
 	/* Get existing/default label */
 	memset(pm-oldlabel, 0, sizeof pm-oldlabel);
-	if (!have_gpt_binary() || !pm-gpt)
+	if (!have_gpt || !pm-gpt)
 		incorelabel(pm-diskdev, pm-oldlabel);
 	else
 		incoregpt(pm, pm-oldlabel);
@@ -666,14 +654,16 @@ fmt_fspart(menudesc *m, int ptn, void *a
 int
 write_disklabel (void)
 {
+	int rv = 0;
 
 #ifdef DISKLABEL_CMD
 	/* disklabel the disk */
-	return run_program(RUN_DISPLAY, %s -f /tmp/disktab %s '%s',
+	rv = run_program(RUN_DISPLAY, %s -f /tmp/disktab %s '%s',
 	DISKLABEL_CMD, pm-diskdev, pm-bsddiskname);
-#else
-	return 0;
+	if (rv == 0)
+		update_wedges(pm-diskdev);
 #endif
+	return rv;
 }
 
 
@@ -1481,7 +1471,9 @@ incoregpt(pm_devs_t *pm_cur, partinfo *l
 static bool
 is_gpt(const char *dev)
 {
-	if (!have_gpt_binary())
+	check_available_binaries();
+
+	if (!have_gpt)
 		return false;
 
 	return !run_program(RUN_SILENT | RUN_ERROR_OK,

Index: src/usr.sbin/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.4.4.2 src/usr.sbin/sysinst/partman.c:1.4.4.3
--- src/usr.sbin/sysinst/partman.c:1.4.4.2	Sun Jan 11 04:32:38 2015
+++ src/usr.sbin/sysinst/partman.c	Sat May  9 13:50:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.4.4.2 2015/01/11 04:32:38 snj Exp $ */
+/*	$NetBSD: partman.c,v 1.4.4.3 2015/05/09 13:50:15 msaitoh Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -46,7 +46,7 @@
 
 /* flags whether to offer the respective options (depending on helper
programs available on install media */
-static int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
+int have_raid, have_vnd, have_cgd, have_lvm, have_gpt, have_dk;
 
 /* XXX: replace all MAX_* defines with vars that depend on kernel settings */
 #define MAX_ENTRIES 96
@@ -2692,6 +2692,23 @@ pm_menuout(menudesc *m, void *arg)
 	cursel = m-cursel;
 }
 
+/* initialize have_* variables */
+void
+check_available_binaries()
+{
+	static int did_test = false;
+
+	if (did_test) return;
+	

CVS commit: src/sys/external/bsd/acpica/dist/disassembler

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:14:45 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/disassembler: dmwalk.c

Log Message:
CID 1256502: missing lint fallthrough comment


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/sys/external/bsd/acpica/dist/disassembler/dmwalk.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/external/bsd/acpica/dist/disassembler/dmwalk.c
diff -u src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.1.1.5 src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.2
--- src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.1.1.5	Mon Apr 13 13:21:07 2015
+++ src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c	Sat May  9 11:14:45 2015
@@ -313,6 +313,8 @@ AcpiDmBlockType (
 return (BLOCK_NONE);
 }
 
+/*lint -fallthrough */
+
 default:
 
 OpInfo = AcpiPsGetOpcodeInfo (Op-Common.AmlOpcode);



CVS commit: src/sys/external/bsd/sljit/dist/test_src

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:16:42 UTC 2015

Modified Files:
src/sys/external/bsd/sljit/dist/test_src: sljitTest.c

Log Message:
CID 976986: NULL deref.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/sljit/dist/test_src/sljitTest.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/external/bsd/sljit/dist/test_src/sljitTest.c
diff -u src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.5 src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.6
--- src/sys/external/bsd/sljit/dist/test_src/sljitTest.c:1.5	Mon Feb 16 08:30:15 2015
+++ src/sys/external/bsd/sljit/dist/test_src/sljitTest.c	Sat May  9 09:16:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljitTest.c,v 1.5 2015/02/16 13:30:15 alnsn Exp $	*/
+/*	$NetBSD: sljitTest.c,v 1.6 2015/05/09 13:16:42 christos Exp $	*/
 
 /*
  *Stack-less Just-In-Time compiler
@@ -65,11 +65,18 @@ static sljit_si silent = 0;
 	}
 
 #define CHECK(compiler) \
-	if (sljit_get_compiler_error(compiler) != SLJIT_ERR_COMPILED) { \
-		printf(Compiler error: %d\n, sljit_get_compiler_error(compiler)); \
-		sljit_free_compiler(compiler); \
-		return; \
-	}
+	do { \
+		if (compiler == NULL) { \
+			printf(Can't create compiler\n); \
+			return; \
+		} \
+		if (sljit_get_compiler_error(compiler) != SLJIT_ERR_COMPILED) { \
+			printf(Compiler error: %d\n, \
+			sljit_get_compiler_error(compiler)); \
+			sljit_free_compiler(compiler); \
+			return; \
+		} \
+	} while (/*CONSTCOND*/0)
 
 static void cond_set(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_si type)
 {



CVS commit: src/sys/external/bsd/drm2/dist/drm/via

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:19:22 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/via: via_mm.c

Log Message:
CID 710492: dev_priv was dereferenced in via_release_futex, no point in
checking again.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/sys/external/bsd/drm2/dist/drm/via/via_mm.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/external/bsd/drm2/dist/drm/via/via_mm.c
diff -u src/sys/external/bsd/drm2/dist/drm/via/via_mm.c:1.1.1.2 src/sys/external/bsd/drm2/dist/drm/via/via_mm.c:1.2
--- src/sys/external/bsd/drm2/dist/drm/via/via_mm.c:1.1.1.2	Wed Jul 16 15:35:29 2014
+++ src/sys/external/bsd/drm2/dist/drm/via/via_mm.c	Sat May  9 09:19:22 2015
@@ -79,7 +79,7 @@ int via_final_context(struct drm_device 
 
 	/* Linux specific until context tracking code gets ported to BSD */
 	/* Last context, perform cleanup */
-	if (list_is_singular(dev-ctxlist)  dev-dev_private) {
+	if (list_is_singular(dev-ctxlist)) {
 		DRM_DEBUG(Last Context\n);
 		drm_irq_uninstall(dev);
 		via_cleanup_futex(dev_priv);



CVS commit: src/bin/ksh

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:26:06 UTC 2015

Modified Files:
src/bin/ksh: c_ulimit.c

Log Message:
CID 1225088: check return of getrlimit


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/c_ulimit.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/ksh/c_ulimit.c
diff -u src/bin/ksh/c_ulimit.c:1.11 src/bin/ksh/c_ulimit.c:1.12
--- src/bin/ksh/c_ulimit.c:1.11	Sat May  9 09:22:37 2015
+++ src/bin/ksh/c_ulimit.c	Sat May  9 09:26:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ulimit.c,v 1.11 2015/05/09 13:22:37 christos Exp $	*/
+/*	$NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $	*/
 
 /*
 	ulimit -- handle ulimit builtin
@@ -20,7 +20,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: c_ulimit.c,v 1.11 2015/05/09 13:22:37 christos Exp $);
+__RCSID($NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $);
 #endif
 
 
@@ -203,9 +203,12 @@ c_ulimit(wp)
 		for (l = limits; l-name; l++) {
 #ifdef HAVE_SETRLIMIT
 			if (l-which == RLIMIT) {
-if (getrlimit(l-gcmd, limit) == -1)
-	val = RLIM_INFINITY;
-else if (how  SOFT)
+if (getrlimit(l-gcmd, limit) == -1) {
+	bi_errorf(can't get limit: %s,
+	strerror(errno));
+	return 1;
+}
+if (how  SOFT)
 	val = limit.rlim_cur;
 else if (how  HARD)
 	val = limit.rlim_max;
@@ -233,7 +236,10 @@ c_ulimit(wp)
 	}
 #ifdef HAVE_SETRLIMIT
 	if (l-which == RLIMIT) {
-		getrlimit(l-gcmd, limit);
+		if (getrlimit(l-gcmd, limit) == -1) {
+			bi_errorf(can't get limit: %s, strerror(errno));
+			return 1;
+		}
 		if (set) {
 			if (how  SOFT)
 limit.rlim_cur = val;



CVS commit: src/sys/modules

2015-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat May  9 14:19:13 UTC 2015

Modified Files:
src/sys/modules: Makefile

Log Message:
Build compat_netbsd32.kmod for arm and mips64


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/modules/Makefile

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

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.150 src/sys/modules/Makefile:1.151
--- src/sys/modules/Makefile:1.150	Sun May  3 02:54:07 2015
+++ src/sys/modules/Makefile	Sat May  9 14:19:13 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.150 2015/05/03 02:54:07 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.151 2015/05/09 14:19:13 matt Exp $
 
 .include bsd.own.mk
 
@@ -204,6 +204,10 @@ SUBDIR+=	wmihp
 SUBDIR+=	wmimsi
 .endif
 
+.if ${MACHINE_CPU} == arm || !empty(MACHINE_ARCH:Mmips64*)
+SUBDIR+=	compat_netbsd32
+.endif
+
 .if ${MACHINE_ARCH} == x86_64
 SUBDIR+=	compat_linux32
 SUBDIR+=	compat_netbsd32



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

2015-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat May  9 14:22:34 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: ad.mips

Log Message:
Add compat_netbsd32.kmod if arch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/modules/ad.mips

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/modules/ad.mips
diff -u src/distrib/sets/lists/modules/ad.mips:1.3 src/distrib/sets/lists/modules/ad.mips:1.4
--- src/distrib/sets/lists/modules/ad.mips:1.3	Sun Aug 10 11:51:40 2014
+++ src/distrib/sets/lists/modules/ad.mips	Sat May  9 14:22:34 2015
@@ -1,3 +1,5 @@
-# $NetBSD: ad.mips,v 1.3 2014/08/10 11:51:40 bad Exp $
+# $NetBSD: ad.mips,v 1.4 2015/05/09 14:22:34 matt Exp $
+./@MODULEDIR@/compat_netbsd32			base-kernel-modules	kmod,arch64
+./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod	base-kernel-modules	kmod,arch64
 ./@MODULEDIR@/exec_elf32			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod	base-kernel-modules	kmod



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 15:12:12 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_svcout.c

Log Message:
CID 1225082: Check getrlimit() return


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/rpcgen/rpc_svcout.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/rpcgen/rpc_svcout.c
diff -u src/usr.bin/rpcgen/rpc_svcout.c:1.26 src/usr.bin/rpcgen/rpc_svcout.c:1.27
--- src/usr.bin/rpcgen/rpc_svcout.c:1.26	Sun Dec 15 01:07:39 2013
+++ src/usr.bin/rpcgen/rpc_svcout.c	Sat May  9 11:12:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_svcout.c,v 1.26 2013/12/15 06:07:39 christos Exp $	*/
+/*	$NetBSD: rpc_svcout.c,v 1.27 2015/05/09 15:12:12 christos Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_svcout.c,v 1.26 2013/12/15 06:07:39 christos Exp $);
+__RCSID($NetBSD: rpc_svcout.c,v 1.27 2015/05/09 15:12:12 christos Exp $);
 #endif
 #endif
 
@@ -646,7 +646,7 @@ write_timeout_func(void)
 	f_print(fout, static void closedown(void);\n);
 	f_print(fout, \n);
 	f_print(fout, static void\n);
-	f_print(fout, closedown()\n);
+	f_print(fout, closedown(void)\n);
 	f_print(fout, {\n);
 	f_print(fout, \tif (_rpcsvcdirty == 0) {\n);
 	f_print(fout, \t\textern fd_set svc_fdset;\n);
@@ -663,7 +663,8 @@ write_timeout_func(void)
 	if (tirpcflag) {
 		f_print(fout, \t\t\tstruct rlimit rl;\n\n);
 		f_print(fout, \t\t\trl.rlim_max = 0;\n);
-		f_print(fout, \t\t\tgetrlimit(RLIMIT_NOFILE, rl);\n);
+		f_print(fout, \t\t\tif (getrlimit(RLIMIT_NOFILE, rl) == -1)\n);
+		f_print(fout, \t\t\t\treturn;\n);
 		f_print(fout, \t\t\tif ((size = rl.rlim_max) == 0)\n);
 		f_print(fout, \t\t\t\treturn;\n);
 	} else {



CVS commit: src/usr.sbin/sysinst

2015-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 12:55:06 UTC 2015

Modified Files:
src/usr.sbin/sysinst: menus.mi

Log Message:
When exiting from the ftpsource menu, explicitly set yesno to -1 (again),
to avoid a retry loop because a submenu action has changed this global.
Fixes PR 49440.


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

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

Modified files:

Index: src/usr.sbin/sysinst/menus.mi
diff -u src/usr.sbin/sysinst/menus.mi:1.7 src/usr.sbin/sysinst/menus.mi:1.8
--- src/usr.sbin/sysinst/menus.mi:1.7	Wed Oct 15 21:38:39 2014
+++ src/usr.sbin/sysinst/menus.mi	Sat May  9 12:55:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: menus.mi,v 1.7 2014/10/15 21:38:39 snj Exp $	*/
+/*	$NetBSD: menus.mi,v 1.8 2015/05/09 12:55:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -391,6 +391,7 @@ menu ftpsource, y=-4, x=0, w=70, no box,
 			config_network();
 		};
 	option MSG_exit_menu_generic, exit, action { yesno = SET_RETRY; };
+	exit action { yesno = -1; };
 
 
 menu nfssource, y=-4, x=0, w=70, no box, no clear,



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

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:05:51 UTC 2015

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

Log Message:
CID 1297228: Use strlcpy


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/x86/x86/intr.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/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.83 src/sys/arch/x86/x86/intr.c:1.84
--- src/sys/arch/x86/x86/intr.c:1.83	Thu May  7 08:52:46 2015
+++ src/sys/arch/x86/x86/intr.c	Sat May  9 09:05:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.83 2015/05/07 12:52:46 martin Exp $	*/
+/*	$NetBSD: intr.c,v 1.84 2015/05/09 13:05:51 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.83 2015/05/07 12:52:46 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.84 2015/05/09 13:05:51 christos Exp $);
 
 #include opt_intrdebug.h
 #include opt_multiprocessor.h
@@ -560,7 +560,7 @@ intr_allocate_io_intrsource(const char *
 		pep-cpuid = ci-ci_cpuid;
 		pep++;
 	}
-	strncpy(isp-is_intrid, intrid, sizeof(isp-is_intrid));
+	strlcpy(isp-is_intrid, intrid, sizeof(isp-is_intrid));
 
 	SIMPLEQ_INSERT_TAIL(io_interrupt_sources, isp, is_list);
 



CVS commit: src/sys/dev

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:07:20 UTC 2015

Modified Files:
src/sys/dev: dksubr.c

Log Message:
CID 1297229: use strlcpy


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/dksubr.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/dksubr.c
diff -u src/sys/dev/dksubr.c:1.62 src/sys/dev/dksubr.c:1.63
--- src/sys/dev/dksubr.c:1.62	Sat May  9 07:53:34 2015
+++ src/sys/dev/dksubr.c	Sat May  9 09:07:20 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.63 2015/05/09 13:07:20 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.63 2015/05/09 13:07:20 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -583,8 +583,7 @@ dk_dump(struct dk_softc *dksc, dev_t dev
 
 /* ARGSUSED */
 void
-dk_getdefaultlabel(struct dk_softc *dksc,
-		  struct disklabel *lp)
+dk_getdefaultlabel(struct dk_softc *dksc, struct disklabel *lp)
 {
 	struct disk_geom *dg = dksc-sc_dkdev.dk_geom;
 
@@ -600,9 +599,9 @@ dk_getdefaultlabel(struct dk_softc *dksc
 	lp-d_ncylinders = dg-dg_ncylinders;
 	lp-d_secpercyl = lp-d_ntracks * lp-d_nsectors;
 
-	strncpy(lp-d_typename, dksc-sc_xname, sizeof(lp-d_typename));
+	strlcpy(lp-d_typename, dksc-sc_xname, sizeof(lp-d_typename));
 	lp-d_type = dksc-sc_dtype;
-	strncpy(lp-d_packname, fictitious, sizeof(lp-d_packname));
+	strlcpy(lp-d_packname, fictitious, sizeof(lp-d_packname));
 	lp-d_rpm = 3600;
 	lp-d_interleave = 1;
 	lp-d_flags = 0;
@@ -669,7 +668,7 @@ dk_makedisklabel(struct dk_softc *dksc)
 	struct	disklabel *lp = dksc-sc_dkdev.dk_label;
 
 	lp-d_partitions[RAW_PART].p_fstype = FS_BSDFFS;
-	strncpy(lp-d_packname, default label, sizeof(lp-d_packname));
+	strlcpy(lp-d_packname, default label, sizeof(lp-d_packname));
 	lp-d_checksum = dkcksum(lp);
 }
 



CVS commit: src/usr.sbin/rpcbind

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:10:50 UTC 2015

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

Log Message:
CID 1009289: Check getrlimit


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

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

Modified files:

Index: src/usr.sbin/rpcbind/rpcbind.c
diff -u src/usr.sbin/rpcbind/rpcbind.c:1.19 src/usr.sbin/rpcbind/rpcbind.c:1.20
--- src/usr.sbin/rpcbind/rpcbind.c:1.19	Sat Oct 19 13:16:38 2013
+++ src/usr.sbin/rpcbind/rpcbind.c	Sat May  9 09:10:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcbind.c,v 1.19 2013/10/19 17:16:38 christos Exp $	*/
+/*	$NetBSD: rpcbind.c,v 1.20 2015/05/09 13:10:50 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -118,8 +118,7 @@ main(int argc, char *argv[])
 
 	parseargs(argc, argv);
 
-	getrlimit(RLIMIT_NOFILE, rl);
-	if (rl.rlim_cur  128) {
+	if (getrlimit(RLIMIT_NOFILE, rl) != -1  rl.rlim_cur  128) {
 		if (rl.rlim_max = 128)
 			rl.rlim_cur = rl.rlim_max;
 		else



CVS commit: src/bin/ksh

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:22:37 UTC 2015

Modified Files:
src/bin/ksh: c_ulimit.c

Log Message:
CID 1225077: check getrlimit return


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/c_ulimit.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/ksh/c_ulimit.c
diff -u src/bin/ksh/c_ulimit.c:1.10 src/bin/ksh/c_ulimit.c:1.11
--- src/bin/ksh/c_ulimit.c:1.10	Fri Jun  8 22:51:50 2012
+++ src/bin/ksh/c_ulimit.c	Sat May  9 09:22:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_ulimit.c,v 1.10 2012/06/09 02:51:50 christos Exp $	*/
+/*	$NetBSD: c_ulimit.c,v 1.11 2015/05/09 13:22:37 christos Exp $	*/
 
 /*
 	ulimit -- handle ulimit builtin
@@ -20,7 +20,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: c_ulimit.c,v 1.10 2012/06/09 02:51:50 christos Exp $);
+__RCSID($NetBSD: c_ulimit.c,v 1.11 2015/05/09 13:22:37 christos Exp $);
 #endif
 
 
@@ -203,8 +203,9 @@ c_ulimit(wp)
 		for (l = limits; l-name; l++) {
 #ifdef HAVE_SETRLIMIT
 			if (l-which == RLIMIT) {
-getrlimit(l-gcmd, limit);
-if (how  SOFT)
+if (getrlimit(l-gcmd, limit) == -1)
+	val = RLIM_INFINITY;
+else if (how  SOFT)
 	val = limit.rlim_cur;
 else if (how  HARD)
 	val = limit.rlim_max;



CVS commit: src/bin/sh

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 13:28:55 UTC 2015

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

Log Message:
CID 1225078: check getrlimit return


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/sh/miscbltin.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/miscbltin.c
diff -u src/bin/sh/miscbltin.c:1.42 src/bin/sh/miscbltin.c:1.43
--- src/bin/sh/miscbltin.c:1.42	Mon Jun 11 14:28:10 2012
+++ src/bin/sh/miscbltin.c	Sat May  9 09:28:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: miscbltin.c,v 1.42 2012/06/11 18:28:10 njoly Exp $	*/
+/*	$NetBSD: miscbltin.c,v 1.43 2015/05/09 13:28:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)miscbltin.c	8.4 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: miscbltin.c,v 1.42 2012/06/11 18:28:10 njoly Exp $);
+__RCSID($NetBSD: miscbltin.c,v 1.43 2015/05/09 13:28:55 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -427,7 +427,8 @@ ulimitcmd(int argc, char **argv)
 		return 0;
 	}
 
-	getrlimit(l-cmd, limit);
+	if (getrlimit(l-cmd, limit) == -1)
+		error(error getting limit (%s), strerror(errno));
 	if (set) {
 		if (how  HARD)
 			limit.rlim_max = val;



CVS commit: src/sys/arch/vax/vax

2015-05-09 Thread Anders Magnusson
Module Name:src
Committed By:   ragge
Date:   Sat May  9 13:43:45 UTC 2015

Modified Files:
src/sys/arch/vax/vax: ka660.c

Log Message:
PR port-vax/49884
Fixes bug introduced in earlier cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/vax/vax/ka660.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/vax/vax/ka660.c
diff -u src/sys/arch/vax/vax/ka660.c:1.10 src/sys/arch/vax/vax/ka660.c:1.11
--- src/sys/arch/vax/vax/ka660.c:1.10	Tue Dec 14 23:44:49 2010
+++ src/sys/arch/vax/vax/ka660.c	Sat May  9 13:43:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ka660.c,v 1.10 2010/12/14 23:44:49 matt Exp $	*/
+/*	$NetBSD: ka660.c,v 1.11 2015/05/09 13:43:45 ragge Exp $	*/
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ka660.c,v 1.10 2010/12/14 23:44:49 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ka660.c,v 1.11 2015/05/09 13:43:45 ragge Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,7 +61,7 @@ static void ka660_cache_enable(void);
 static void ka660_attach_cpu(device_t);
 static int ka660_mchk(void *);
 
-static const char * const ka660_devs[] = { cpu, sgec, vsbus, NULL };
+static const char * const ka660_devs[] = { cpu, sgec, shac, uba, NULL };
 
 /* 
  * Declaration of 660-specific calls.
@@ -92,7 +92,7 @@ void
 ka660_attach_cpu(device_t self)
 {
 	aprint_normal(
-	: %s, Rigel (ucode rev. %d), 2KB L1 cache, 128KB L2 cache\n,
+	: %s, SOC (ucode rev. %d), 6KB L1 cache\n,
 	KA660,
 	vax_cpudata  0377);
 }



CVS commit: [netbsd-7] src/usr.sbin/sysinst

2015-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat May  9 13:52:37 UTC 2015

Modified Files:
src/usr.sbin/sysinst [netbsd-7]: menus.mi

Log Message:
Pull up following revision(s) (requested by martin in ticket #745):
usr.sbin/sysinst/menus.mi: revision 1.8
When exiting from the ftpsource menu, explicitly set yesno to -1 (again),
to avoid a retry loop because a submenu action has changed this global.
Fixes PR 49440.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/usr.sbin/sysinst/menus.mi

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

Modified files:

Index: src/usr.sbin/sysinst/menus.mi
diff -u src/usr.sbin/sysinst/menus.mi:1.4.4.1 src/usr.sbin/sysinst/menus.mi:1.4.4.2
--- src/usr.sbin/sysinst/menus.mi:1.4.4.1	Sun Oct 19 09:14:51 2014
+++ src/usr.sbin/sysinst/menus.mi	Sat May  9 13:52:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: menus.mi,v 1.4.4.1 2014/10/19 09:14:51 martin Exp $	*/
+/*	$NetBSD: menus.mi,v 1.4.4.2 2015/05/09 13:52:37 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -391,6 +391,7 @@ menu ftpsource, y=-4, x=0, w=70, no box,
 			config_network();
 		};
 	option MSG_exit_menu_generic, exit, action { yesno = SET_RETRY; };
+	exit action { yesno = -1; };
 
 
 menu nfssource, y=-4, x=0, w=70, no box, no clear,



CVS commit: [netbsd-7] src/doc

2015-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat May  9 13:56:41 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #744 and #745.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.284 -r1.1.2.285 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.284 src/doc/CHANGES-7.0:1.1.2.285
--- src/doc/CHANGES-7.0:1.1.2.284	Sat May  9 08:59:12 2015
+++ src/doc/CHANGES-7.0	Sat May  9 13:56:41 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.284 2015/05/09 08:59:12 msaitoh Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.285 2015/05/09 13:56:41 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -22902,3 +22902,17 @@ libexec/httpd/content-bozo.c			1.12
 	Fix content type handling to not hard code (wrong) values for
 	length, but just call strlen() as needed.
 	[mrg, ticket #743]
+
+usr.sbin/sysinst/defs.h1.7
+usr.sbin/sysinst/disks.c			1.8
+usr.sbin/sysinst/partman.c			1.9
+
+	All auto-discovered wedges go away after we changed the
+	partitioning (and are not using GPT). Fixes PR#49665.
+	[martin, ticket #744]
+
+usr.sbin/sysinst/menus.mi			1.8
+
+	Fix a bug that a loop occured when we select get the distribution.
+	Fixes PR#49440.
+	[martin, ticket #745]



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

2015-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat May  9 14:21:07 UTC 2015

Modified Files:
src/distrib/sets/lists/modules: ad.arm

Log Message:
Update set lists for compat_netbsd32.kmod


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/modules/ad.arm

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/modules/ad.arm
diff -u src/distrib/sets/lists/modules/ad.arm:1.4 src/distrib/sets/lists/modules/ad.arm:1.5
--- src/distrib/sets/lists/modules/ad.arm:1.4	Sun Aug 10 11:51:40 2014
+++ src/distrib/sets/lists/modules/ad.arm	Sat May  9 14:21:07 2015
@@ -1,4 +1,6 @@
-# $NetBSD: ad.arm,v 1.4 2014/08/10 11:51:40 bad Exp $
+# $NetBSD: ad.arm,v 1.5 2015/05/09 14:21:07 matt Exp $
 
+./@MODULEDIR@/compat_netbsd32			base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod	base-kernel-modules	kmod



CVS commit: xsrc/external/mit/xorg-server/dist/os

2015-05-09 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Sat May  9 15:07:49 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/os: utils.c

Log Message:
CID 1225080: check getrlimit return.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/os/utils.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/xorg-server/dist/os/utils.c
diff -u xsrc/external/mit/xorg-server/dist/os/utils.c:1.6 xsrc/external/mit/xorg-server/dist/os/utils.c:1.7
--- xsrc/external/mit/xorg-server/dist/os/utils.c:1.6	Mon Jun  3 03:38:41 2013
+++ xsrc/external/mit/xorg-server/dist/os/utils.c	Sat May  9 11:07:49 2015
@@ -655,9 +655,10 @@ ProcessCommandLine(int argc, char *argv[
 	{
 #if !defined(WIN32) || !defined(__MINGW32__)
 	struct rlimit   core_limit;
-	getrlimit (RLIMIT_CORE, core_limit);
-	core_limit.rlim_cur = core_limit.rlim_max;
-	setrlimit (RLIMIT_CORE, core_limit);
+	if (getrlimit (RLIMIT_CORE, core_limit) != -1) {
+		core_limit.rlim_cur = core_limit.rlim_max;
+		setrlimit (RLIMIT_CORE, core_limit);
+	}
 #endif
 	CoreDump = TRUE;
 	}



CVS commit: src/sys

2015-05-09 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat May  9 15:22:47 UTC 2015

Modified Files:
src/sys/kern: uipc_socket.c uipc_syscalls.c
src/sys/nfs: nfs_boot.c nfs_socket.c
src/sys/sys: param.h socketvar.h

Log Message:
change sosend() to accept sockaddr * instead of mbuf * for nam.

bump to 7.99.16


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.177 -r1.178 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.83 -r1.84 src/sys/nfs/nfs_boot.c
cvs rdiff -u -r1.195 -r1.196 src/sys/nfs/nfs_socket.c
cvs rdiff -u -r1.477 -r1.478 src/sys/sys/param.h
cvs rdiff -u -r1.138 -r1.139 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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.244 src/sys/kern/uipc_socket.c:1.245
--- src/sys/kern/uipc_socket.c:1.244	Sun May  3 04:18:45 2015
+++ src/sys/kern/uipc_socket.c	Sat May  9 15:22:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.244 2015/05/03 04:18:45 rtr Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.245 2015/05/09 15:22:47 rtr Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.244 2015/05/03 04:18:45 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.245 2015/05/09 15:22:47 rtr Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_sock_counters.h
@@ -883,8 +883,8 @@ sodisconnect(struct socket *so)
  * Data and control buffers are freed on return.
  */
 int
-sosend(struct socket *so, struct mbuf *addr, struct uio *uio, struct mbuf *top,
-	struct mbuf *control, int flags, struct lwp *l)
+sosend(struct socket *so, struct sockaddr *addr, struct uio *uio,
+	struct mbuf *top, struct mbuf *control, int flags, struct lwp *l)
 {
 	struct mbuf	**mp, *m;
 	long		space, len, resid, clen, mlen;
@@ -1059,12 +1059,8 @@ sosend(struct socket *so, struct mbuf *a
 error = (*so-so_proto-pr_usrreqs-pr_sendoob)(so,
 top, control);
 			} else {
-struct sockaddr *sin = NULL;
-if (addr) {
-	sin = mtod(addr, struct sockaddr *);
-}
 error = (*so-so_proto-pr_usrreqs-pr_send)(so,
-top, sin, control, l);
+top, addr, control, l);
 			}
 			if (dontroute)
 so-so_options = ~SO_DONTROUTE;

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.177 src/sys/kern/uipc_syscalls.c:1.178
--- src/sys/kern/uipc_syscalls.c:1.177	Sat May  2 17:18:03 2015
+++ src/sys/kern/uipc_syscalls.c	Sat May  9 15:22:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.177 2015/05/02 17:18:03 rtr Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.178 2015/05/09 15:22:47 rtr Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.177 2015/05/02 17:18:03 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.178 2015/05/09 15:22:47 rtr Exp $);
 
 #include opt_pipe.h
 
@@ -532,6 +532,7 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 {
 
 	struct iovec	aiov[UIO_SMALLIOV], *iov = aiov, *tiov, *ktriov = NULL;
+	struct sockaddr *sa = NULL;
 	struct mbuf	*to, *control;
 	struct uio	auio;
 	size_t		len, iovsz;
@@ -611,8 +612,12 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 	if (mp-msg_control)
 		MCLAIM(control, so-so_mowner);
 
+	if (to) {
+		sa = mtod(to, struct sockaddr *);
+	}
+
 	len = auio.uio_resid;
-	error = (*so-so_send)(so, to, auio, NULL, control, flags, l);
+	error = (*so-so_send)(so, sa, auio, NULL, control, flags, l);
 	/* Protocol is responsible for freeing 'control' */
 	control = NULL;
 

Index: src/sys/nfs/nfs_boot.c
diff -u src/sys/nfs/nfs_boot.c:1.83 src/sys/nfs/nfs_boot.c:1.84
--- src/sys/nfs/nfs_boot.c:1.83	Fri Apr  3 20:01:07 2015
+++ src/sys/nfs/nfs_boot.c	Sat May  9 15:22:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_boot.c,v 1.83 2015/04/03 20:01:07 rtr Exp $	*/
+/*	$NetBSD: nfs_boot.c,v 1.84 2015/05/09 15:22:47 rtr Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_boot.c,v 1.83 2015/04/03 20:01:07 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_boot.c,v 1.84 2015/05/09 15:22:47 rtr Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -468,7 +468,8 @@ send_again:
 		error = ENOBUFS;
 		goto out;
 	}
-	error = (*so-so_send)(so, nam, NULL, m, NULL, 0, lwp);
+	error = (*so-so_send)(so, mtod(nam, struct sockaddr *), NULL,
+	m, NULL, 0, lwp);
 	if (error) {
 		printf(nfs_boot: sosend: %d\n, error);
 		goto out;

Index: src/sys/nfs/nfs_socket.c
diff -u src/sys/nfs/nfs_socket.c:1.195 src/sys/nfs/nfs_socket.c:1.196
--- src/sys/nfs/nfs_socket.c:1.195	Sat May  2 17:18:04 2015
+++ src/sys/nfs/nfs_socket.c	Sat May  9 15:22:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_socket.c,v 1.195 2015/05/02 17:18:04 rtr Exp $	

CVS commit: src/distrib/notes/x68k

2015-05-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat May  9 17:49:33 UTC 2015

Modified Files:
src/distrib/notes/x68k: legal

Log Message:
This product includes software developed by Yasushi Yamasaki.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/notes/x68k/legal

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

Modified files:

Index: src/distrib/notes/x68k/legal
diff -u src/distrib/notes/x68k/legal:1.7 src/distrib/notes/x68k/legal:1.8
--- src/distrib/notes/x68k/legal:1.7	Sat May  9 08:13:35 2015
+++ src/distrib/notes/x68k/legal	Sat May  9 17:49:33 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: legal,v 1.7 2015/05/09 08:13:35 snj Exp $
+.\	$NetBSD: legal,v 1.8 2015/05/09 17:49:33 snj Exp $
 .
 .It
 This product includes software developed by Masaru Oki.
@@ -13,4 +13,6 @@ This product includes software developed
 .It
 This product includes software developed by MINOURA Makoto.
 .It
+This product includes software developed by Yasushi Yamasaki.
+.It
 This product includes software developed by ITOH Yasufumi.



CVS commit: src/sys/nfs

2015-05-09 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat May  9 18:12:19 UTC 2015

Modified Files:
src/sys/nfs: krpc_subr.c nfs_bootdhcp.c

Log Message:
when calling nfs_boot_sendrecv pass NULL for pointers instead of 0


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/nfs/krpc_subr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/nfs/nfs_bootdhcp.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/nfs/krpc_subr.c
diff -u src/sys/nfs/krpc_subr.c:1.39 src/sys/nfs/krpc_subr.c:1.40
--- src/sys/nfs/krpc_subr.c:1.39	Fri Mar 27 07:18:11 2015
+++ src/sys/nfs/krpc_subr.c	Sat May  9 18:12:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: krpc_subr.c,v 1.39 2015/03/27 07:18:11 hikaru Exp $	*/
+/*	$NetBSD: krpc_subr.c,v 1.40 2015/05/09 18:12:19 rtr Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon Ross, Adam Glass
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: krpc_subr.c,v 1.39 2015/03/27 07:18:11 hikaru Exp $);
+__KERNEL_RCSID(0, $NetBSD: krpc_subr.c,v 1.40 2015/05/09 18:12:19 rtr Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -314,7 +314,7 @@ krpc_call(struct sockaddr_in *sa, u_int 
 	mhead-m_pkthdr.len = len;
 	mhead-m_pkthdr.rcvif = NULL;
 
-	error = nfs_boot_sendrecv(so, nam, 0, mhead, krpccheck, m, from,
+	error = nfs_boot_sendrecv(so, nam, NULL, mhead, krpccheck, m, from,
 	xid, l);
 	if (error)
 		goto out;

Index: src/sys/nfs/nfs_bootdhcp.c
diff -u src/sys/nfs/nfs_bootdhcp.c:1.53 src/sys/nfs/nfs_bootdhcp.c:1.54
--- src/sys/nfs/nfs_bootdhcp.c:1.53	Fri Mar 27 07:18:11 2015
+++ src/sys/nfs/nfs_bootdhcp.c	Sat May  9 18:12:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bootdhcp.c,v 1.53 2015/03/27 07:18:11 hikaru Exp $	*/
+/*	$NetBSD: nfs_bootdhcp.c,v 1.54 2015/05/09 18:12:19 rtr Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_bootdhcp.c,v 1.53 2015/03/27 07:18:11 hikaru Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_bootdhcp.c,v 1.54 2015/05/09 18:12:19 rtr Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs_boot.h
@@ -636,7 +636,7 @@ bootpc_call(struct nfs_diskless *nd, str
 #endif
 
 	error = nfs_boot_sendrecv(so, nam, bootpset, m,
-  bootpcheck, 0, 0, bpc, lwp);
+  bootpcheck, NULL, NULL, bpc, lwp);
 	if (error)
 		goto out;
 
@@ -663,7 +663,7 @@ bootpc_call(struct nfs_diskless *nd, str
 		bpc.expected_dhcpmsgtype = DHCPACK;
 
 		error = nfs_boot_sendrecv(so, nam, bootpset, m,
-	  bootpcheck, 0, 0, bpc, lwp);
+	  bootpcheck, NULL, NULL, bpc, lwp);
 		if (error)
 			goto out;
 	}



CVS commit: src/share/misc

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 18:18:32 UTC 2015

Modified Files:
src/share/misc: acronyms

Log Message:
ICYMI


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/share/misc/acronyms

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
diff -u src/share/misc/acronyms:1.235 src/share/misc/acronyms:1.236
--- src/share/misc/acronyms:1.235	Fri Apr 24 18:03:38 2015
+++ src/share/misc/acronyms	Sat May  9 18:18:32 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.235 2015/04/24 18:03:38 riastradh Exp $
+$NetBSD: acronyms,v 1.236 2015/05/09 18:18:32 dholland Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -212,6 +212,7 @@ IC	I see
 ICBW	I could be {worse,wrong}
 ICCL	I couldn't care less
 ICUR	I see you are
+ICYMI	in case you missed it
 IDC	I don't care
 IDGI	I don't get it
 IDGW	in a good way



CVS commit: src/external/gpl3/binutils/dist/bfd

2015-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat May  9 17:43:24 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/bfd: elf32-arm.c

Log Message:
Fix TEXTREL message to print out the section name


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/bfd/elf32-arm.c

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

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/elf32-arm.c
diff -u src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.5 src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.6
--- src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.5	Thu Jun 26 22:55:23 2014
+++ src/external/gpl3/binutils/dist/bfd/elf32-arm.c	Sat May  9 17:43:23 2015
@@ -13477,8 +13477,8 @@ elf32_arm_readonly_dynrelocs (struct elf
 
   if (info-warn_shared_textrel)
 (*_bfd_error_handler)
-  (_(warning: dynamic relocation in readonly section `%s'),
-  h-root.root.string);
+  (_(warning: dynamic relocation to `%s' in readonly section `%s'),
+  h-root.root.string, s-name);
 	  info-flags |= DF_TEXTREL;
 
 	  /* Not an error, just cut short the traversal.  */



CVS commit: src/usr.sbin/rpcbind

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 18:22:37 UTC 2015

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

Log Message:
check setrlimit too


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/rpcbind/rpcbind.c

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

Modified files:

Index: src/usr.sbin/rpcbind/rpcbind.c
diff -u src/usr.sbin/rpcbind/rpcbind.c:1.20 src/usr.sbin/rpcbind/rpcbind.c:1.21
--- src/usr.sbin/rpcbind/rpcbind.c:1.20	Sat May  9 13:10:50 2015
+++ src/usr.sbin/rpcbind/rpcbind.c	Sat May  9 18:22:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcbind.c,v 1.20 2015/05/09 13:10:50 christos Exp $	*/
+/*	$NetBSD: rpcbind.c,v 1.21 2015/05/09 18:22:37 dholland Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -123,7 +123,9 @@ main(int argc, char *argv[])
 			rl.rlim_cur = rl.rlim_max;
 		else
 			rl.rlim_cur = 128;
-		setrlimit(RLIMIT_NOFILE, rl);
+		if (setrlimit(RLIMIT_NOFILE, rl)  0) {
+			err(EXIT_FAILURE, setrlimit(RLIMIT_NOFILE));
+		}
 	}
 	nc_handle = setnetconfig(); 	/* open netconfig file */
 	if (nc_handle == NULL)



CVS commit: src/usr.sbin/rpcbind

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 18:32:04 UTC 2015

Modified Files:
src/usr.sbin/rpcbind: util.c

Log Message:
perror - warn


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/rpcbind/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/usr.sbin/rpcbind/util.c
diff -u src/usr.sbin/rpcbind/util.c:1.18 src/usr.sbin/rpcbind/util.c:1.19
--- src/usr.sbin/rpcbind/util.c:1.18	Wed Mar 11 15:57:12 2015
+++ src/usr.sbin/rpcbind/util.c	Sat May  9 18:32:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.18 2015/03/11 15:57:12 christos Exp $	*/
+/*	$NetBSD: util.c,v 1.19 2015/05/09 18:32:04 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -46,6 +46,7 @@
 #include netconfig.h
 #include stdio.h
 #include arpa/inet.h
+#include err.h
 
 #include rpcbind.h
 
@@ -358,7 +359,7 @@ network_init()
 		if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, mreq6,
 		sizeof mreq6)  0)
 			if (debugging)
-perror(setsockopt v6 multicast);
+warn(setsockopt v6 multicast);
 	}
 	freeifaddrs(ifp);
 #endif



CVS commit: src/sys/netinet

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 18:46:25 UTC 2015

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

Log Message:
assign sin only when it is needed


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/netinet/ip_icmp.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_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.138 src/sys/netinet/ip_icmp.c:1.139
--- src/sys/netinet/ip_icmp.c:1.138	Sat May  2 10:41:32 2015
+++ src/sys/netinet/ip_icmp.c	Sat May  9 14:46:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.c,v 1.138 2015/05/02 14:41:32 roy Exp $	*/
+/*	$NetBSD: ip_icmp.c,v 1.139 2015/05/09 18:46:25 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.138 2015/05/02 14:41:32 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.139 2015/05/09 18:46:25 christos Exp $);
 
 #include opt_ipsec.h
 
@@ -680,7 +680,7 @@ icmp_reflect(struct mbuf *m)
 	struct ip *ip = mtod(m, struct ip *);
 	struct in_ifaddr *ia;
 	struct ifaddr *ifa;
-	struct sockaddr_in *sin = NULL;
+	struct sockaddr_in *sin;
 	struct in_addr t;
 	struct mbuf *opts = NULL;
 	int optlen = (ip-ip_hl  2) - sizeof(struct ip);
@@ -721,8 +721,7 @@ icmp_reflect(struct mbuf *m)
 		}
 	}
 
-	if (ia)
-		sin = ia-ia_addr;
+	sin = ia ? ia-ia_addr : NULL;
 
 	icmpdst.sin_addr = t;
 



CVS commit: src/usr.bin/rpcgen

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 18:48:14 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_svcout.c

Log Message:
Also check the other emitted getrlimit call for failure.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/rpcgen/rpc_svcout.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/rpcgen/rpc_svcout.c
diff -u src/usr.bin/rpcgen/rpc_svcout.c:1.27 src/usr.bin/rpcgen/rpc_svcout.c:1.28
--- src/usr.bin/rpcgen/rpc_svcout.c:1.27	Sat May  9 15:12:12 2015
+++ src/usr.bin/rpcgen/rpc_svcout.c	Sat May  9 18:48:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_svcout.c,v 1.27 2015/05/09 15:12:12 christos Exp $	*/
+/*	$NetBSD: rpc_svcout.c,v 1.28 2015/05/09 18:48:14 dholland Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI;
 #else
-__RCSID($NetBSD: rpc_svcout.c,v 1.27 2015/05/09 15:12:12 christos Exp $);
+__RCSID($NetBSD: rpc_svcout.c,v 1.28 2015/05/09 18:48:14 dholland Exp $);
 #endif
 #endif
 
@@ -820,7 +820,11 @@ write_rpc_svc_fg(char *infile, const cha
 	/* get number of file descriptors */
 	if (tirpcflag) {
 		f_print(fout, %srl.rlim_max = 0;\n, sp);
-		f_print(fout, %sgetrlimit(RLIMIT_NOFILE, rl);\n, sp);
+		f_print(fout, %sif (getrlimit(RLIMIT_NOFILE, rl) == -1) {\n,
+			sp);
+		f_print(fout, %s\tperror(\getrlimit\);\n, sp);
+		f_print(fout, %s\texit(1);\n, sp);
+		f_print(fout, %s}\n, sp);
 		f_print(fout, %sif ((size = rl.rlim_max) == 0)\n, sp);
 		f_print(fout, %s\texit(1);\n, sp);
 	} else {



CVS commit: src/sys/netinet

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 18:47:26 UTC 2015

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

Log Message:
if no address was found, don't check if it is tentative (hi Roy)


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/netinet/ip_icmp.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_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.139 src/sys/netinet/ip_icmp.c:1.140
--- src/sys/netinet/ip_icmp.c:1.139	Sat May  9 14:46:25 2015
+++ src/sys/netinet/ip_icmp.c	Sat May  9 14:47:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.c,v 1.139 2015/05/09 18:46:25 christos Exp $	*/
+/*	$NetBSD: ip_icmp.c,v 1.140 2015/05/09 18:47:26 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.139 2015/05/09 18:46:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.140 2015/05/09 18:47:26 christos Exp $);
 
 #include opt_ipsec.h
 
@@ -703,7 +703,7 @@ icmp_reflect(struct mbuf *m)
 
 	/* Look for packet addressed to us */
 	INADDR_TO_IA(t, ia);
-	if (ia-ia4_flags  IN_IFF_NOTREADY)
+	if (ia  (ia-ia4_flags  IN_IFF_NOTREADY))
 		ia = NULL;
 
 	/* look for packet sent to broadcast address */



CVS commit: src/sys/lib/libkern

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 18:49:36 UTC 2015

Modified Files:
src/sys/lib/libkern: libkern.h

Log Message:
tricks with sizeof() make coverity complain.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/lib/libkern/libkern.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/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.118 src/sys/lib/libkern/libkern.h:1.119
--- src/sys/lib/libkern/libkern.h:1.118	Mon Apr 20 11:22:17 2015
+++ src/sys/lib/libkern/libkern.h	Sat May  9 14:49:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.118 2015/04/20 15:22:17 riastradh Exp $	*/
+/*	$NetBSD: libkern.h,v 1.119 2015/05/09 18:49:36 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -329,12 +329,19 @@ tolower(int ch)
  *
  * The 0*sizeof((PTR) - ...) causes the compiler to warn if the type of
  * *fp does not match the type of struct bar::b_foo.
+ * We skip the validation for coverity runs to avoid warnings.
  */
+#ifdef __COVERITY__
+#define __validate_container_of(PTR, TYPE, FIELD) 0
+#else
+#define __validate_container_of(PTR, TYPE, FIELD)			\
+(0 * sizeof((PTR) - ((TYPE *)(((char *)(PTR)) -			\
+offsetof(TYPE, FIELD)))-FIELD))
+#endif
+
 #define	container_of(PTR, TYPE, FIELD)	\
-	((TYPE *)(((char *)(PTR)) - offsetof(TYPE, FIELD) +		\
-	0*sizeof((PTR) -		\
-		((TYPE *)(((char *)(PTR)) -\
-			offsetof(TYPE, FIELD)))-FIELD)))
+((TYPE *)(((char *)(PTR)) - offsetof(TYPE, FIELD))			\
+	+ __validate_container_of(PTR, TYPE, FIELD))
 
 #define	MTPRNG_RLEN		624
 struct mtprng_state {



CVS commit: src/sys/arch/arm/nvidia

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 18:56:51 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_car.c tegra_carreg.h tegra_ehci.c
tegra_var.h
Added Files:
src/sys/arch/arm/nvidia: tegra_ehcireg.h

Log Message:
Tegra USB PHY support


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_ehci.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_ehcireg.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_var.h

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

Modified files:

Index: src/sys/arch/arm/nvidia/tegra_car.c
diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.5 src/sys/arch/arm/nvidia/tegra_car.c:1.6
--- src/sys/arch/arm/nvidia/tegra_car.c:1.5	Sat May  9 11:17:59 2015
+++ src/sys/arch/arm/nvidia/tegra_car.c	Sat May  9 18:56:51 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_car.c,v 1.5 2015/05/09 11:17:59 jmcneill Exp $ */
+/* $NetBSD: tegra_car.c,v 1.6 2015/05/09 18:56:51 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.5 2015/05/09 11:17:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.6 2015/05/09 18:56:51 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -283,3 +283,91 @@ tegra_car_periph_sdmmc_set_div(u_int por
 
 	return 0;
 }
+
+int
+tegra_car_periph_usb_enable(u_int port)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+	bus_size_t rst_reg, enb_reg;
+	uint32_t dev_bit;
+
+	tegra_car_get_bs(bst, bsh);
+	switch (port) {
+	case 0:
+		rst_reg = CAR_RST_DEV_L_SET_REG;
+		enb_reg = CAR_CLK_ENB_L_SET_REG;
+		dev_bit = CAR_DEV_L_USBD;
+		break;
+	case 1:
+		rst_reg = CAR_RST_DEV_H_SET_REG;
+		enb_reg = CAR_CLK_ENB_H_SET_REG;
+		dev_bit = CAR_DEV_H_USB2;
+		break;
+	case 2:
+		rst_reg = CAR_RST_DEV_H_SET_REG;
+		enb_reg = CAR_CLK_ENB_H_SET_REG;
+		dev_bit = CAR_DEV_H_USB3;
+		break;
+	default:
+		return EINVAL;
+	}
+
+	/* enter reset */
+	bus_space_write_4(bst, bsh, rst_reg, dev_bit);
+	/* enable clk */
+	bus_space_write_4(bst, bsh, enb_reg, dev_bit);
+
+	/* leave reset */
+	bus_space_write_4(bst, bsh, rst_reg+4, dev_bit);
+
+	return 0;
+}
+
+void
+tegra_car_utmip_init(void)
+{
+	const u_int enable_dly_count = 0x02;
+	const u_int stable_count = 0x33;
+	const u_int active_dly_count = 0x09;
+	const u_int xtal_freq_count = 0x7f;
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+
+	tegra_car_get_bs(bst, bsh);
+
+	tegra_reg_set_clear(bst, bsh, CAR_UTMIP_PLL_CFG2_REG,
+	__SHIFTIN(stable_count, CAR_UTMIP_PLL_CFG2_STABLE_COUNT) |
+	__SHIFTIN(active_dly_count, CAR_UTMIP_PLL_CFG2_ACTIVE_DLY_COUNT),
+	CAR_UTMIP_PLL_CFG2_STABLE_COUNT |
+	CAR_UTMIP_PLL_CFG2_ACTIVE_DLY_COUNT);
+
+	tegra_reg_set_clear(bst, bsh, CAR_UTMIP_PLL_CFG1_REG,
+	__SHIFTIN(enable_dly_count, CAR_UTMIP_PLL_CFG1_ENABLE_DLY_COUNT) |
+	__SHIFTIN(xtal_freq_count, CAR_UTMIP_PLL_CFG1_XTAL_FREQ_COUNT),
+	CAR_UTMIP_PLL_CFG1_ENABLE_DLY_COUNT |
+	CAR_UTMIP_PLL_CFG1_XTAL_FREQ_COUNT);
+
+	tegra_reg_set_clear(bst, bsh, CAR_UTMIP_PLL_CFG1_REG,
+	0,
+	CAR_UTMIP_PLL_CFG1_PLLU_POWERDOWN |
+	CAR_UTMIP_PLL_CFG1_PLL_ENABLE_POWERDOWN);
+}
+
+void
+tegra_car_utmip_enable(u_int port)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+	uint32_t bit = 0;
+
+	tegra_car_get_bs(bst, bsh);
+
+	switch (port) {
+	case 0:	bit = CAR_UTMIP_PLL_CFG2_PD_SAMP_A_POWERDOWN; break;
+	case 1:	bit = CAR_UTMIP_PLL_CFG2_PD_SAMP_B_POWERDOWN; break;
+	case 2:	bit = CAR_UTMIP_PLL_CFG2_PD_SAMP_C_POWERDOWN; break;
+	}
+
+	tegra_reg_set_clear(bst, bsh, CAR_UTMIP_PLL_CFG2_REG, 0, bit);
+}

Index: src/sys/arch/arm/nvidia/tegra_carreg.h
diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.6 src/sys/arch/arm/nvidia/tegra_carreg.h:1.7
--- src/sys/arch/arm/nvidia/tegra_carreg.h:1.6	Sat May  9 11:17:59 2015
+++ src/sys/arch/arm/nvidia/tegra_carreg.h	Sat May  9 18:56:51 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_carreg.h,v 1.6 2015/05/09 11:17:59 jmcneill Exp $ */
+/* $NetBSD: tegra_carreg.h,v 1.7 2015/05/09 18:56:51 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -213,4 +213,24 @@
 #define CAR_DEV_H_AHBDMA		__BIT(1)
 #define CAR_DEV_H_MEM			__BIT(0)
 
+#define CAR_UTMIP_PLL_CFG0_REG		0x480
+
+#define CAR_UTMIP_PLL_CFG1_REG		0x484
+#define CAR_UTMIP_PLL_CFG1_ENABLE_DLY_COUNT	__BITS(31,27)
+#define CAR_UTMIP_PLL_CFG1_PLLU_POWERUP		__BIT(17)
+#define CAR_UTMIP_PLL_CFG1_PLLU_POWERDOWN	__BIT(16)
+#define CAR_UTMIP_PLL_CFG1_PLL_ENABLE_POWERUP 	__BIT(15)
+#define CAR_UTMIP_PLL_CFG1_PLL_ENABLE_POWERDOWN	__BIT(14)
+#define CAR_UTMIP_PLL_CFG1_XTAL_FREQ_COUNT	__BITS(11,0)
+
+#define CAR_UTMIP_PLL_CFG2_REG		0x488
+#define CAR_UTMIP_PLL_CFG2_ACTIVE_DLY_COUNT	__BITS(23,18)

CVS commit: src/sys/arch/evbarm/tegra

2015-05-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat May  9 18:57:30 UTC 2015

Modified Files:
src/sys/arch/evbarm/tegra: tegra_machdep.c

Log Message:
Jetson TK1: USB1 VBUS power is controlled by GPIO N4


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/tegra/tegra_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/tegra/tegra_machdep.c
diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.11 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.12
--- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.11	Sat May  9 12:08:30 2015
+++ src/sys/arch/evbarm/tegra/tegra_machdep.c	Sat May  9 18:57:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.11 2015/05/09 12:08:30 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.12 2015/05/09 18:57:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.11 2015/05/09 12:08:30 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_machdep.c,v 1.12 2015/05/09 18:57:30 jmcneill Exp $);
 
 #include opt_tegra.h
 #include opt_machdep.h
@@ -399,7 +399,9 @@ tegra_device_register(device_t self, voi
 		struct tegraio_attach_args * const tio = aux;
 		const struct tegra_locators * const loc = tio-tio_loc;
 
-		if (loc-loc_port == 2) {
+		if (loc-loc_port == 0) {
+			prop_dictionary_set_cstring(dict, vbus-gpio, N4);
+		} else if (loc-loc_port == 2) {
 			prop_dictionary_set_cstring(dict, vbus-gpio, N5);
 		}
 	}



CVS commit: src/lib/libc/string

2015-05-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May  9 19:01:53 UTC 2015

Modified Files:
src/lib/libc/string: strerror.3

Log Message:
Update HISTORY from OpenBSD: strerror from 4.3 Reno, perror from v4.
(this page was claiming both were from 4.4, which is clearly rubbish)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/string/strerror.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/string/strerror.3
diff -u src/lib/libc/string/strerror.3:1.17 src/lib/libc/string/strerror.3:1.18
--- src/lib/libc/string/strerror.3:1.17	Mon Oct 25 07:37:11 2010
+++ src/lib/libc/string/strerror.3	Sat May  9 19:01:53 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: strerror.3,v 1.17 2010/10/25 07:37:11 wiz Exp $
+.\ $NetBSD: strerror.3,v 1.18 2015/05/09 19:01:53 dholland Exp $
 .\
 .\ Copyright (c) 1980, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ @(#)strerror.3	8.1 (Berkeley) 6/9/93
-.Dd October 24, 2010
+.Dd May 9, 2015
 .Dt STRERROR 3
 .Os
 .Sh NAME
@@ -171,11 +171,13 @@ function conforms to
 .St -p1003.1-2001 .
 .Sh HISTORY
 The
-.Fn strerror
-and
 .Fn perror
-functions first appeared in
-.Bx 4.4 .
+function first appeared in
+.At v4 .
+The
+.Fn strerror
+function first appeared in
+.Bx 4.3 Reno .
 The
 .Fn strerror_r
 function first appeared in



CVS commit: src/external/bsd/wpa/dist/src/wps

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:33:47 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/wps: httpread.c

Log Message:
strtoul() return value may end up overflowing the int h-chunk_size and
resulting in a negative value to be stored as the chunk_size. This could
result in the following memcpy operation using a very large length
argument which would result in a buffer overflow and segmentation fault.

This could have been used to cause a denial service by any device that
has been authorized for network access (either wireless or wired). This
would affect both the WPS UPnP functionality in a WPS AP (hostapd with
upnp_iface parameter set in the configuration) and WPS ER
(wpa_supplicant with WPS_ER_START control interface command used).

Validate the parsed chunk length value to avoid this. In addition to
rejecting negative values, we can also reject chunk size that would be
larger than the maximum configured body length.

Thanks to Kostya Kortchinsky of Google security team for discovering and
reporting this issue.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/wpa/dist/src/wps/httpread.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/bsd/wpa/dist/src/wps/httpread.c
diff -u src/external/bsd/wpa/dist/src/wps/httpread.c:1.1.1.3 src/external/bsd/wpa/dist/src/wps/httpread.c:1.2
--- src/external/bsd/wpa/dist/src/wps/httpread.c:1.1.1.3	Thu Oct 16 15:16:09 2014
+++ src/external/bsd/wpa/dist/src/wps/httpread.c	Sat May  9 15:33:47 2015
@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd
 	if (!isxdigit(*cbp))
 		goto bad;
 	h-chunk_size = strtoul(cbp, NULL, 16);
+	if (h-chunk_size  0 ||
+	h-chunk_size  h-max_bytes) {
+		wpa_printf(MSG_DEBUG,
+			   httpread: Invalid chunk size %d,
+			   h-chunk_size);
+		goto bad;
+	}
 	/* throw away chunk header
 	 * so we have only real data
 	 */



CVS commit: src/external/bsd/wpa/dist/src/ap

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:35:15 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/ap: wmm.c

Log Message:
The length of the WMM Action frame was not properly validated and the
length of the information elements (int left) could end up being
negative. This would result in reading significantly past the stack
buffer while parsing the IEs in ieee802_11_parse_elems() and while doing
so, resulting in segmentation fault.

This can result in an invalid frame being used for a denial of service
attack (hostapd process killed) against an AP with a driver that uses
hostapd for management frame processing (e.g., all mac80211-based
drivers).

Thanks to Kostya Kortchinsky of Google security team for discovering and
reporting this issue.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/wpa/dist/src/ap/wmm.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/bsd/wpa/dist/src/ap/wmm.c
diff -u src/external/bsd/wpa/dist/src/ap/wmm.c:1.1.1.4 src/external/bsd/wpa/dist/src/ap/wmm.c:1.2
--- src/external/bsd/wpa/dist/src/ap/wmm.c:1.1.1.4	Thu Oct 16 15:16:06 2014
+++ src/external/bsd/wpa/dist/src/ap/wmm.c	Sat May  9 15:35:15 2015
@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_d
 		return;
 	}
 
+	if (left  0)
+		return; /* not a valid WMM Action frame */
+
 	/* extract the tspec info element */
 	if (ieee802_11_parse_elems(pos, left, elems, 1) == ParseFailed) {
 		hostapd_logger(hapd, mgmt-sa, HOSTAPD_MODULE_IEEE80211,



CVS commit: src/external/bsd/wpa/dist/src/eap_peer

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:46:01 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/eap_peer: eap_pwd.c

Log Message:
The length of the received Commit and Confirm message payloads was not
checked before reading them. This could result in a buffer read
overflow when processing an invalid message.

Fix this by verifying that the payload is of expected length before
processing it. In addition, enforce correct state transition sequence to
make sure there is no unexpected behavior if receiving a Commit/Confirm
message before the previous exchanges have been completed.

Thanks to Kostya Kortchinsky of Google security team for discovering and
reporting this issue.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.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/bsd/wpa/dist/src/eap_peer/eap_pwd.c
diff -u src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.1.1.4 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.2
--- src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.1.1.4	Wed Apr  1 15:24:45 2015
+++ src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c	Sat May  9 15:46:01 2015
@@ -301,6 +301,23 @@ eap_pwd_perform_commit_exchange(struct e
 	BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL;
 	u16 offset;
 	u8 *ptr, *scalar = NULL, *element = NULL;
+	size_t prime_len, order_len;
+
+	if (data-state != PWD_Commit_Req) {
+		ret-ignore = TRUE;
+		goto fin;
+	}
+
+	prime_len = BN_num_bytes(data-grp-prime);
+	order_len = BN_num_bytes(data-grp-order);
+
+	if (payload_len != 2 * prime_len + order_len) {
+		wpa_printf(MSG_INFO,
+			   EAP-pwd: Unexpected Commit payload length %u (expected %u),
+			   (unsigned int) payload_len,
+			   (unsigned int) (2 * prime_len + order_len));
+		goto fin;
+	}
 
 	if (((data-private_value = BN_new()) == NULL) ||
 	((data-my_element = EC_POINT_new(data-grp-group)) == NULL) ||



CVS commit: src/external/bsd/wpa/dist/src/eap_server

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:47:35 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/eap_server: eap_server_pwd.c

Log Message:
The length of the received Commit and Confirm message payloads was not
checked before reading them. This could result in a buffer read
overflow when processing an invalid message.

Fix this by verifying that the payload is of expected length before
processing it. In addition, enforce correct state transition sequence to
make sure there is no unexpected behavior if receiving a Commit/Confirm
message before the previous exchanges have been completed.

Thanks to Kostya Kortchinsky of Google security team for discovering and
reporting this issue.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.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/bsd/wpa/dist/src/eap_server/eap_server_pwd.c
diff -u src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.1.1.4 src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.2
--- src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.1.1.4	Wed Apr  1 15:24:46 2015
+++ src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c	Sat May  9 15:47:35 2015
@@ -634,9 +634,21 @@ eap_pwd_process_commit_resp(struct eap_s
 	BIGNUM *x = NULL, *y = NULL, *cofactor = NULL;
 	EC_POINT *K = NULL, *point = NULL;
 	int res = 0;
+	size_t prime_len, order_len;
 
 	wpa_printf(MSG_DEBUG, EAP-pwd: Received commit response);
 
+	prime_len = BN_num_bytes(data-grp-prime);
+	order_len = BN_num_bytes(data-grp-order);
+
+	if (payload_len != 2 * prime_len + order_len) {
+		wpa_printf(MSG_INFO,
+			   EAP-pwd: Unexpected Commit payload length %u (expected %u),
+			   (unsigned int) payload_len,
+			   (unsigned int) (2 * prime_len + order_len));
+		goto fin;
+	}
+
 	if (((data-peer_scalar = BN_new()) == NULL) ||
 	((data-k = BN_new()) == NULL) ||
 	((cofactor = BN_new()) == NULL) ||



CVS commit: src/external/bsd/wpa/dist/src/eap_peer

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:49:28 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/eap_peer: eap_pwd.c

Log Message:
The remaining number of bytes in the message could be smaller than the
Total-Length field size, so the length needs to be explicitly checked
prior to reading the field and decrementing the len variable. This could
have resulted in the remaining length becoming negative and interpreted
as a huge positive integer.

In addition, check that there is no already started fragment in progress
before allocating a new buffer for reassembling fragments. This avoid a
potential memory leak when processing invalid message.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.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/bsd/wpa/dist/src/eap_peer/eap_pwd.c
diff -u src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.2 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.3
--- src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.2	Sat May  9 15:46:01 2015
+++ src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c	Sat May  9 15:49:28 2015
@@ -800,11 +800,23 @@ eap_pwd_process(struct eap_sm *sm, void 
 	 * if it's the first fragment there'll be a length field
 	 */
 	if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
+		if (len  2) {
+			wpa_printf(MSG_DEBUG,
+   EAP-pwd: Frame too short to contain Total-Length field);
+			ret-ignore = TRUE;
+			return NULL;
+		}
 		tot_len = WPA_GET_BE16(pos);
 		wpa_printf(MSG_DEBUG, EAP-pwd: Incoming fragments whose 
 			   total length = %d, tot_len);
 		if (tot_len  15000)
 			return NULL;
+		if (data-inbuf) {
+			wpa_printf(MSG_DEBUG,
+   EAP-pwd: Unexpected new fragment start when previous fragment is still in use);
+			ret-ignore = TRUE;
+			return NULL;
+		}
 		data-inbuf = wpabuf_alloc(tot_len);
 		if (data-inbuf == NULL) {
 			wpa_printf(MSG_INFO, Out of memory to buffer 



CVS commit: src/external/bsd/wpa/dist/src/eap_server

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:50:41 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/eap_server: eap_server_pwd.c

Log Message:
The remaining number of bytes in the message could be smaller than the
Total-Length field size, so the length needs to be explicitly checked
prior to reading the field and decrementing the len variable. This could
have resulted in the remaining length becoming negative and interpreted
as a huge positive integer.

In addition, check that there is no already started fragment in progress
before allocating a new buffer for reassembling fragments. This avoid a
potential memory leak when processing invalid message.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.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/bsd/wpa/dist/src/eap_server/eap_server_pwd.c
diff -u src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.2 src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.3
--- src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c:1.2	Sat May  9 15:47:35 2015
+++ src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c	Sat May  9 15:50:41 2015
@@ -913,11 +913,21 @@ static void eap_pwd_process(struct eap_s
 	 * the first fragment has a total length
 	 */
 	if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
+		if (len  2) {
+			wpa_printf(MSG_DEBUG,
+   EAP-pwd: Frame too short to contain Total-Length field);
+			return;
+		}
 		tot_len = WPA_GET_BE16(pos);
 		wpa_printf(MSG_DEBUG, EAP-pwd: Incoming fragments, total 
 			   length = %d, tot_len);
 		if (tot_len  15000)
 			return;
+		if (data-inbuf) {
+			wpa_printf(MSG_DEBUG,
+   EAP-pwd: Unexpected new fragment start when previous fragment is still in use);
+			return;
+		}
 		data-inbuf = wpabuf_alloc(tot_len);
 		if (data-inbuf == NULL) {
 			wpa_printf(MSG_INFO, EAP-pwd: Out of memory to 



CVS commit: src/external/bsd/wpa/dist/src/eap_peer

2015-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  9 19:51:43 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/eap_peer: eap_pwd.c

Log Message:
The L (Length) and M (More) flags needs to be cleared before deciding
whether the locally generated response requires fragmentation. This
fixes an issue where these flags from the server could have been invalid
for the following message. In some cases, this could have resulted in
triggering the wpabuf security check that would terminate the process
due to invalid buffer allocation.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.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/bsd/wpa/dist/src/eap_peer/eap_pwd.c
diff -u src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.3 src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.4
--- src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c:1.3	Sat May  9 15:49:28 2015
+++ src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c	Sat May  9 15:51:43 2015
@@ -903,6 +903,7 @@ eap_pwd_process(struct eap_sm *sm, void 
 	 * we have output! Do we need to fragment it?
 	 */
 	len = wpabuf_len(data-outbuf);
+	lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch);
 	if ((len + EAP_PWD_HDR_SIZE)  data-mtu) {
 		resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data-mtu,
  EAP_CODE_RESPONSE, eap_get_id(reqData));



CVS commit: src/sys/kern

2015-05-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May  9 06:04:13 UTC 2015

Modified Files:
src/sys/kern: syscalls.master

Log Message:
Remove extraneous word 'compat' on header line


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/sys/kern/syscalls.master

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/syscalls.master
diff -u src/sys/kern/syscalls.master:1.274 src/sys/kern/syscalls.master:1.275
--- src/sys/kern/syscalls.master:1.274	Sat May  9 05:51:26 2015
+++ src/sys/kern/syscalls.master	Sat May  9 06:04:13 2015
@@ -1,4 +1,4 @@
-	compat $NetBSD: syscalls.master,v 1.274 2015/05/09 05:51:26 pgoyette Exp $
+	$NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 



CVS commit: src/usr.sbin/sysinst

2015-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 06:15:42 UTC 2015

Modified Files:
src/usr.sbin/sysinst: Makefile.inc

Log Message:
Make gcc generate better debug info when building with DEBUG set.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/Makefile.inc

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

Modified files:

Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.5 src/usr.sbin/sysinst/Makefile.inc:1.6
--- src/usr.sbin/sysinst/Makefile.inc:1.5	Wed Aug  6 12:16:12 2014
+++ src/usr.sbin/sysinst/Makefile.inc	Sat May  9 06:15:42 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2014/08/06 12:16:12 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2015/05/09 06:15:42 martin Exp $
 #
 # Makefile for sysinst
 
@@ -55,7 +55,12 @@ CPPFLAGS+=	-I. -I${.CURDIR}/../.. -I${.C
 		-DCATALOG_DIR=\${CATALOGDIR}\
 
 .if (defined(DEBUG))
-CPPFLAGS+=-DDEBUG -g -O0
+.if ${ACTIVE_CC} == gcc
+# make gcc run additional passes for better debug info (only needed
+# when compiling with -O0)
+O0TRACKING=	-fvar-tracking-assignments -fvar-tracking
+.endif
+CPPFLAGS+=-DDEBUG -g -O0 ${O0TRACKING}
 .endif
 
 .if (!defined(SMALLPROG) || defined(SMALLPROG_INET6))  (${USE_INET6} != no)



CVS commit: src/sys

2015-05-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May  9 06:06:14 UTC 2015

Modified Files:
src/sys/kern: init_sysent.c syscalls.c syscalls_autoload.c
systrace_args.c
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
Regen again, this time without the extra word in the generated from line.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/syscalls.c
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/syscalls_autoload.c
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/systrace_args.c
cvs rdiff -u -r1.84 -r1.85 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.109 -r1.110 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.278 -r1.279 src/sys/sys/syscall.h
cvs rdiff -u -r1.262 -r1.263 src/sys/sys/syscallargs.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/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.294 src/sys/kern/init_sysent.c:1.295
--- src/sys/kern/init_sysent.c:1.294	Sat May  9 05:55:43 2015
+++ src/sys/kern/init_sysent.c	Sat May  9 06:06:14 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.294 2015/05/09 05:55:43 pgoyette Exp $ */
+/* $NetBSD: init_sysent.c,v 1.295 2015/05/09 06:06:14 pgoyette Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	compat NetBSD: syscalls.master,v 1.274 2015/05/09 05:51:26 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.294 2015/05/09 05:55:43 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.295 2015/05/09 06:06:14 pgoyette Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.283 src/sys/kern/syscalls.c:1.284
--- src/sys/kern/syscalls.c:1.283	Sat May  9 05:58:53 2015
+++ src/sys/kern/syscalls.c	Sat May  9 06:06:14 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.283 2015/05/09 05:58:53 pgoyette Exp $ */
+/* $NetBSD: syscalls.c,v 1.284 2015/05/09 06:06:14 pgoyette Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	compat NetBSD: syscalls.master,v 1.274 2015/05/09 05:51:26 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.283 2015/05/09 05:58:53 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.284 2015/05/09 06:06:14 pgoyette Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/kern/syscalls_autoload.c
diff -u src/sys/kern/syscalls_autoload.c:1.1 src/sys/kern/syscalls_autoload.c:1.2
--- src/sys/kern/syscalls_autoload.c:1.1	Sat May  9 05:55:43 2015
+++ src/sys/kern/syscalls_autoload.c	Sat May  9 06:06:14 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls_autoload.c,v 1.1 2015/05/09 05:55:43 pgoyette Exp $ */
+/* $NetBSD: syscalls_autoload.c,v 1.2 2015/05/09 06:06:14 pgoyette Exp $ */
 
 /*
  * System call autoload table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	compat NetBSD: syscalls.master,v 1.274 2015/05/09 05:51:26 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.1 2015/05/09 05:55:43 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.2 2015/05/09 06:06:14 pgoyette Exp $);
 
 static struct {
 	u_int		al_code;

Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.3 src/sys/kern/systrace_args.c:1.4
--- src/sys/kern/systrace_args.c:1.3	Sat May  9 05:55:43 2015
+++ src/sys/kern/systrace_args.c	Sat May  9 06:06:14 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.3 2015/05/09 05:55:43 pgoyette Exp $ */
+/* $NetBSD: systrace_args.c,v 1.4 2015/05/09 06:06:14 pgoyette Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.84 src/sys/rump/include/rump/rump_syscalls.h:1.85
--- src/sys/rump/include/rump/rump_syscalls.h:1.84	Sat May  9 05:55:43 2015
+++ src/sys/rump/include/rump/rump_syscalls.h	Sat May  9 06:06:14 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_syscalls.h,v 1.84 2015/05/09 05:55:43 pgoyette Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.85 2015/05/09 06:06:14 pgoyette Exp $ */
 
 /*
  * System call protos in rump namespace.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	compat NetBSD: syscalls.master,v 1.274 2015/05/09 05:51:26 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13