CVS commit: src/sys/dev/adb

2013-11-18 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Nov 18 11:02:34 UTC 2013

Modified Files:
src/sys/dev/adb: adb_kbd.c adb_ms.c

Log Message:
minor tweaks to shut gcc4.8 warning off.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/adb/adb_kbd.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/adb/adb_ms.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/adb/adb_kbd.c
diff -u src/sys/dev/adb/adb_kbd.c:1.21 src/sys/dev/adb/adb_kbd.c:1.22
--- src/sys/dev/adb/adb_kbd.c:1.21	Wed Sep 19 04:55:06 2012
+++ src/sys/dev/adb/adb_kbd.c	Mon Nov 18 11:02:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb_kbd.c,v 1.21 2012/09/19 04:55:06 macallan Exp $	*/
+/*	$NetBSD: adb_kbd.c,v 1.22 2013/11/18 11:02:34 nisimura Exp $	*/
 
 /*
  * Copyright (C) 1998	Colin Wood
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.21 2012/09/19 04:55:06 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: adb_kbd.c,v 1.22 2013/11/18 11:02:34 nisimura Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -814,6 +814,8 @@ adbkbd_setup_sysctl(struct adbkbd_softc 
 		me-sysctl_num, CTL_CREATE, CTL_EOL);
 	}
 #endif /* NWSMOUSE  0 */
+
+	(void)ret;
 }
 
 SYSCTL_SETUP(sysctl_adbkbdtrans_setup, adbkbd translator setup)

Index: src/sys/dev/adb/adb_ms.c
diff -u src/sys/dev/adb/adb_ms.c:1.14 src/sys/dev/adb/adb_ms.c:1.15
--- src/sys/dev/adb/adb_ms.c:1.14	Sat Oct 27 17:18:14 2012
+++ src/sys/dev/adb/adb_ms.c	Mon Nov 18 11:02:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb_ms.c,v 1.14 2012/10/27 17:18:14 chs Exp $	*/
+/*	$NetBSD: adb_ms.c,v 1.15 2013/11/18 11:02:34 nisimura Exp $	*/
 
 /*
  * Copyright (C) 1998	Colin Wood
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adb_ms.c,v 1.14 2012/10/27 17:18:14 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: adb_ms.c,v 1.15 2013/11/18 11:02:34 nisimura Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -743,6 +743,8 @@ init_trackpad(struct adbms_softc *sc)
 	CTLTYPE_INT, tapping, tapping the pad causes button events,
 	sysctl_adbms_tap, 1, (void *)sc, 0,
 	CTL_MACHDEP, me-sysctl_num, CTL_CREATE, CTL_EOL);
+
+	(void)ret;
 }
 
 static int



CVS commit: src/sys/arch/sh3/sh3

2013-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov 18 15:34:06 UTC 2013

Modified Files:
src/sys/arch/sh3/sh3: cache.c

Log Message:
Really remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sh3/sh3/cache.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/sh3/sh3/cache.c
diff -u src/sys/arch/sh3/sh3/cache.c:1.18 src/sys/arch/sh3/sh3/cache.c:1.19
--- src/sys/arch/sh3/sh3/cache.c:1.18	Thu Nov 14 13:54:08 2013
+++ src/sys/arch/sh3/sh3/cache.c	Mon Nov 18 15:34:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.c,v 1.18 2013/11/14 13:54:08 skrll Exp $	*/
+/*	$NetBSD: cache.c,v 1.19 2013/11/18 15:34:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.18 2013/11/14 13:54:08 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.19 2013/11/18 15:34:06 skrll Exp $);
 
 #include opt_cache.h
 #include opt_memsize.h	/* IOM_RAM_BEGIN */
@@ -166,7 +166,6 @@ __cache_flush(void)
 		(void)*p;
 		p += 4;	/* next line index (16B) */
 	}
-	__USE(d);
 
 	/* Flush I-Cache */
 	/*



CVS commit: src

2013-11-18 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Mon Nov 18 16:23:47 UTC 2013

Modified Files:
src/distrib/sets/lists/modules: md.evbppc mi
src/sys/modules: Makefile

Log Message:
ubsec is not a MI buildable module. disable it for now.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/modules/md.evbppc
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.126 -r1.127 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/distrib/sets/lists/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.35 src/distrib/sets/lists/modules/md.evbppc:1.36
--- src/distrib/sets/lists/modules/md.evbppc:1.35	Sun Nov 17 17:16:24 2013
+++ src/distrib/sets/lists/modules/md.evbppc	Mon Nov 18 16:23:47 2013
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.35 2013/11/17 17:16:24 bad Exp $
+# $NetBSD: md.evbppc,v 1.36 2013/11/18 16:23:47 bad Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -188,8 +188,6 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tprof/tprof.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/uatpbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/uatp/uatp.kmod			base-kernel-modules	kmod,compatmodules
-./stand/powerpc-4xx/@OSRELEASE@/modules/ubsecbase-kernel-modules	kmod,compatmodules
-./stand/powerpc-4xx/@OSRELEASE@/modules/ubsec/ubsec.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udfbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/udf/udf.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/umapbase-kernel-modules	kmod,compatmodules
@@ -395,8 +393,6 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/tprof/tprof.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/uatpbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/uatp/uatp.kmod		base-kernel-modules	kmod,compatmodules
-./stand/powerpc-booke/@OSRELEASE@/modules/ubsecbase-kernel-modules	kmod,compatmodules
-./stand/powerpc-booke/@OSRELEASE@/modules/ubsec/ubsec.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udfbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/udf/udf.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/umapbase-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.58 src/distrib/sets/lists/modules/mi:1.59
--- src/distrib/sets/lists/modules/mi:1.58	Sun Nov 17 17:16:24 2013
+++ src/distrib/sets/lists/modules/mi	Mon Nov 18 16:23:47 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.58 2013/11/17 17:16:24 bad Exp $
+# $NetBSD: mi,v 1.59 2013/11/18 16:23:47 bad Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -194,8 +194,6 @@
 ./@MODULEDIR@/tprof/tprof.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/uatpbase-kernel-modules	kmod
 ./@MODULEDIR@/uatp/uatp.kmod			base-kernel-modules	kmod
-./@MODULEDIR@/ubsecbase-kernel-modules	kmod
-./@MODULEDIR@/ubsec/ubsec.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/udfbase-kernel-modules	kmod
 ./@MODULEDIR@/udf/udf.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/umapbase-kernel-modules	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.126 src/sys/modules/Makefile:1.127
--- src/sys/modules/Makefile:1.126	Sun Nov 17 18:58:28 2013
+++ src/sys/modules/Makefile	Mon Nov 18 16:23:47 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.126 2013/11/17 18:58:28 alnsn Exp $
+#	$NetBSD: Makefile,v 1.127 2013/11/18 16:23:47 bad Exp $
 
 .include bsd.own.mk
 
@@ -82,7 +82,6 @@ SUBDIR+=	suser
 SUBDIR+=	swsensor
 SUBDIR+=	tmpfs
 SUBDIR+=	uatp
-SUBDIR+=	ubsec
 SUBDIR+=	udf
 SUBDIR+=	umap
 SUBDIR+=	union



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

2013-11-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Nov 18 18:02:01 UTC 2013

Modified Files:
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Before checking for an exception, make sure we own the VFP.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.26 src/sys/arch/arm/vfp/vfp_init.c:1.27
--- src/sys/arch/arm/vfp/vfp_init.c:1.26	Fri Aug 23 18:11:47 2013
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Nov 18 18:02:01 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.26 2013/08/23 18:11:47 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.27 2013/11/18 18:02:01 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -374,9 +374,21 @@ vfp_handler(u_int address, u_int insn, t
 	if (fault_code != FAULT_USER)
 		panic(VFP fault at %#x in non-user mode, frame-tf_pc);
 
-	if (ci-ci_vfp_id == 0)
+	if (ci-ci_vfp_id == 0) {
 		/* No VFP detected, just fault.  */
 		return 1;
+	}
+
+	/*
+	 * If we are just changing/fetching FPSCR, don't bother loading it.
+	 */
+	if (!vfp_fpscr_handler(address, insn, frame, fault_code))
+		return 0;
+
+	/*
+	 * Make sure we own the FP.
+	 */
+	pcu_load(arm_vfp_ops);
 
 	uint32_t fpexc = armreg_fpexc_read();
 	if (fpexc  VFP_FPEXC_EX) {
@@ -411,14 +423,6 @@ vfp_handler(u_int address, u_int insn, t
 		return 0;
 	}
 
-	/*
-	 * If we are just changing/fetching FPSCR, don't bother loading it.
-	 */
-	if (!vfp_fpscr_handler(address, insn, frame, fault_code))
-		return 0;
-
-	pcu_load(arm_vfp_ops);
-
 	/* Need to restart the faulted instruction.  */
 //	frame-tf_pc -= INSN_SIZE;
 	return 0;



CVS commit: src/gnu/dist/gkermit

2013-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 18:17:19 UTC 2013

Modified Files:
src/gnu/dist/gkermit: gkermit.c

Log Message:
NUL != NULL, so use correct literal here.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gkermit/gkermit.c

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

Modified files:

Index: src/gnu/dist/gkermit/gkermit.c
diff -u src/gnu/dist/gkermit/gkermit.c:1.3 src/gnu/dist/gkermit/gkermit.c:1.4
--- src/gnu/dist/gkermit/gkermit.c:1.3	Sun May 15 14:30:08 2011
+++ src/gnu/dist/gkermit/gkermit.c	Mon Nov 18 18:17:19 2013
@@ -131,8 +131,8 @@ char spadc = 0,/* Padding character 
 rcvpkt[MAXRP+16], 			/* Packet most recently received */
 *rdatap,/* Pointer to data field of rcvpkt */
 xxdata[MAXRP+16],			/* Packet data buffer */
-*isp = NUL,/* Input string pointer */
-*osp = NUL,/* Output string pointer */
+*isp = NULL,			/* Input string pointer */
+*osp = NULL,			/* Output string pointer */
 smark = '\1',			/* Outbound packet-start character */
 rmark = '\1';			/* Incoming packet-start character */
 



CVS commit: src/sys/rump/librump/rumpkern

2013-11-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Nov 18 18:45:29 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Do lwp0 initialisation as early as possible, right after
rumpuser_init(). This makes rump applications work again when
RUMP_LOCKDEBUG is enabled.

ok pooka.


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/sys/rump/librump/rumpkern/rump.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/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.275 src/sys/rump/librump/rumpkern/rump.c:1.276
--- src/sys/rump/librump/rumpkern/rump.c:1.275	Mon Sep  9 19:18:08 2013
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Nov 18 18:45:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.275 2013/09/09 19:18:08 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.276 2013/11/18 18:45:29 njoly Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.275 2013/09/09 19:18:08 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.276 2013/11/18 18:45:29 njoly Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -268,6 +268,16 @@ rump_init(void)
 		return EINVAL;
 	}
 
+	/* init minimal lwp/cpu context */
+	l = lwp0;
+	l-l_lid = 1;
+	l-l_cpu = l-l_target_cpu = rump_cpu;
+	l-l_fd = filedesc0;
+
+	/* lwp0 isn't created like other threads, so notify hypervisor here */
+	rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
+	rumpuser_curlwpop(RUMPUSER_LWP_SET, l);
+
 	/* retrieve env vars which affect the early stage of bootstrap */
 	if (rumpuser_getparam(RUMP_THREADS, buf, sizeof(buf)) == 0) {
 		rump_threads = *buf != '0';
@@ -297,16 +307,6 @@ rump_init(void)
 
 	rump_intr_init(numcpu);
 
-	/* init minimal lwp/cpu context */
-	l = lwp0;
-	l-l_lid = 1;
-	l-l_cpu = l-l_target_cpu = rump_cpu;
-	l-l_fd = filedesc0;
-
-	/* lwp0 isn't created like other threads, so notify hypervisor here */
-	rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
-	rumpuser_curlwpop(RUMPUSER_LWP_SET, l);
-
 	rump_tsleep_init();
 
 	rumpuser_mutex_init(rump_giantlock, RUMPUSER_MTX_SPIN);



CVS commit: src/sys/compat/linux32/arch/amd64

2013-11-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 18 19:23:35 UTC 2013

Modified Files:
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.69 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.70
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.69	Sun Nov 17 20:36:35 2013
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Mon Nov 18 14:23:35 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.69 2013/11/18 01:36:35 chs Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.70 2013/11/18 19:23:35 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.64 2013/11/18 01:32:52 chs Exp
+ * created from	NetBSD: syscalls.master,v 1.65 2013/11/18 19:23:27 christos Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -564,41 +564,41 @@
 /* syscall: gettid ret: pid_t args: */
 #define	LINUX32_SYS_gettid	224
 
-/* syscall: setxattr ret: int args: char * char * void * size_t int */
-#define	LINUX32_SYS_setxattr	226
+/* syscall: netbsd32_setxattr ret: int args: netbsd32_charp netbsd32_charp netbsd32_voidp netbsd32_size_t int */
+#define	LINUX32_SYS_netbsd32_setxattr	226
 
-/* syscall: lsetxattr ret: int args: char * char * void * size_t int */
-#define	LINUX32_SYS_lsetxattr	227
+/* syscall: netbsd32_lsetxattr ret: int args: netbsd32_charp netbsd32_charp netbsd32_voidp netbsd32_size_t int */
+#define	LINUX32_SYS_netbsd32_lsetxattr	227
 
-/* syscall: fsetxattr ret: int args: int char * void * size_t int */
-#define	LINUX32_SYS_fsetxattr	228
+/* syscall: netbsd32_fsetxattr ret: int args: int netbsd32_charp netbsd32_voidp netbsd32_size_t int */
+#define	LINUX32_SYS_netbsd32_fsetxattr	228
 
-/* syscall: getxattr ret: ssize_t args: char * char * void * size_t */
-#define	LINUX32_SYS_getxattr	229
+/* syscall: netbsd32_getxattr ret: ssize_t args: netbsd32_charp netbsd32_charp netbsd32_voidp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_getxattr	229
 
-/* syscall: lgetxattr ret: ssize_t args: char * char * void * size_t */
-#define	LINUX32_SYS_lgetxattr	230
+/* syscall: netbsd32_lgetxattr ret: ssize_t args: netbsd32_charp netbsd32_charp netbsd32_voidp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_lgetxattr	230
 
-/* syscall: fgetxattr ret: ssize_t args: int char * void * size_t */
-#define	LINUX32_SYS_fgetxattr	231
+/* syscall: netbsd32_fgetxattr ret: ssize_t args: int netbsd32_charp netbsd32_voidp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_fgetxattr	231
 
-/* syscall: listxattr ret: ssize_t args: char * char * size_t */
-#define	LINUX32_SYS_listxattr	232
+/* syscall: netbsd32_listxattr ret: ssize_t args: netbsd32_charp netbsd32_charp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_listxattr	232
 
-/* syscall: llistxattr ret: ssize_t args: char * char * size_t */
-#define	LINUX32_SYS_llistxattr	233
+/* syscall: netbsd32_llistxattr ret: ssize_t args: netbsd32_charp netbsd32_charp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_llistxattr	233
 
-/* syscall: flistxattr ret: ssize_t args: int char * size_t */
-#define	LINUX32_SYS_flistxattr	234
+/* syscall: netbsd32_flistxattr ret: ssize_t args: int netbsd32_charp netbsd32_size_t */
+#define	LINUX32_SYS_netbsd32_flistxattr	234
 
-/* syscall: removexattr ret: int args: char * char * */
-#define	LINUX32_SYS_removexattr	235
+/* syscall: netbsd32_removexattr ret: int args: netbsd32_charp netbsd32_charp */
+#define	LINUX32_SYS_netbsd32_removexattr	235
 
-/* syscall: lremovexattr ret: int args: char * char * */
-#define	LINUX32_SYS_lremovexattr	236
+/* syscall: netbsd32_lremovexattr ret: int args: netbsd32_charp netbsd32_charp */
+#define	LINUX32_SYS_netbsd32_lremovexattr	236
 
-/* syscall: fremovexattr ret: int args: int char * */
-#define	LINUX32_SYS_fremovexattr	237
+/* syscall: netbsd32_fremovexattr ret: int args: int netbsd32_charp */
+#define	LINUX32_SYS_netbsd32_fremovexattr	237
 
 /* syscall: tkill ret: int args: int int */
 #define	LINUX32_SYS_tkill	238
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.69 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.70
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.69	Sun Nov 17 20:36:35 2013
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Mon Nov 18 

CVS commit: src/sys/compat/linux32/arch/amd64

2013-11-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 18 19:23:27 UTC 2013

Modified Files:
src/sys/compat/linux32/arch/amd64: syscalls.master

Log Message:
Fix extended attribute syscalls to use the proper types and call their netbsd32
counterparts for now.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux32/arch/amd64/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/compat/linux32/arch/amd64/syscalls.master
diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.64 src/sys/compat/linux32/arch/amd64/syscalls.master:1.65
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.64	Sun Nov 17 20:32:52 2013
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Mon Nov 18 14:23:27 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.64 2013/11/18 01:32:52 chs Exp $
+	$NetBSD: syscalls.master,v 1.65 2013/11/18 19:23:27 christos Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number master file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -401,27 +401,33 @@
 223	UNIMPL	/*	unused	*/
 224	NOARGS	{ pid_t|linux_sys||gettid(void); }
 225	UNIMPL	readahead
-226	NOARGS	{ int|linux_sys||setxattr(char *path, char *name, \
-		void *value, size_t size, int flags); }
-227	NOARGS	{ int|linux_sys||lsetxattr(char *path, char *name, \
-		void *value, size_t size, int flags); }
-228	NOARGS	{ int|linux_sys||fsetxattr(int fd, char *name, \
-		void *value, size_t size, int flags); }
-229	NOARGS	{ ssize_t|linux_sys||getxattr(char *path, char *name, \
-		void *value, size_t size); }
-230	NOARGS	{ ssize_t|linux_sys||lgetxattr(char *path, char *name, \
-		void *value, size_t size); }
-231	NOARGS	{ ssize_t|linux_sys||fgetxattr(int fd, char *name, \
-		void *value, size_t size); }
-232	NOARGS	{ ssize_t|linux_sys||listxattr(char *path, char *list, \
-		size_t size); }
-233	NOARGS	{ ssize_t|linux_sys||llistxattr(char *path, char *list, \
-		size_t size); }
-234	NOARGS	{ ssize_t|linux_sys||flistxattr(int fd, char *list, \
-		size_t size); }
-235	NOARGS	{ int|linux_sys||removexattr(char *path, char *name); }
-236	NOARGS	{ int|linux_sys||lremovexattr(char *path, char *name); }
-237	NOARGS	{ int|linux_sys||fremovexattr(int fd, char *name); }
+226	NOARGS	{ int|netbsd32||setxattr(netbsd32_charp path, \
+		netbsd32_charp name, netbsd32_voidp value, \
+		netbsd32_size_t size, int flags); }
+227	NOARGS	{ int|netbsd32||lsetxattr(netbsd32_charp path, \
+		netbsd32_charp name,  netbsd32_voidp value, \
+		netbsd32_size_t size, int flags); }
+228	NOARGS	{ int|netbsd32||fsetxattr(int fd, netbsd32_charp name, \
+		netbsd32_voidp value, netbsd32_size_t size, int flags); }
+229	NOARGS	{ ssize_t|netbsd32||getxattr(netbsd32_charp path, \
+		netbsd32_charp name, netbsd32_voidp value, \
+		netbsd32_size_t size); }
+230	NOARGS	{ ssize_t|netbsd32||lgetxattr(netbsd32_charp path, \
+		netbsd32_charp name, netbsd32_voidp value, \
+		netbsd32_size_t size); }
+231	NOARGS	{ ssize_t|netbsd32||fgetxattr(int fd, netbsd32_charp name, \
+		netbsd32_voidp value, netbsd32_size_t size); }
+232	NOARGS	{ ssize_t|netbsd32||listxattr(netbsd32_charp path, \
+		netbsd32_charp list, netbsd32_size_t size); }
+233	NOARGS	{ ssize_t|netbsd32||llistxattr(netbsd32_charp path, \
+		netbsd32_charp list, netbsd32_size_t size); }
+234	NOARGS	{ ssize_t|netbsd32||flistxattr(int fd, netbsd32_charp list, \
+		netbsd32_size_t size); }
+235	NOARGS	{ int|netbsd32||removexattr(netbsd32_charp path, \
+		netbsd32_charp name); }
+236	NOARGS	{ int|netbsd32||lremovexattr(netbsd32_charp path, \
+		netbsd32_charp name); }
+237	NOARGS	{ int|netbsd32||fremovexattr(int fd, netbsd32_charp name); }
 238	STD	{ int|linux32_sys||tkill(int tid, int sig); }
 239	UNIMPL	sendfile64
 240	STD	{ int|linux32_sys||futex(linux32_intp_t uaddr, int op, int val, \



CVS commit: src/external/bsd/dhcpcd/dist

2013-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 19:55:29 UTC 2013

Modified Files:
src/external/bsd/dhcpcd/dist: script.c

Log Message:
NUL != NULL, so use the correct literal


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcpcd/dist/script.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/dhcpcd/dist/script.c
diff -u src/external/bsd/dhcpcd/dist/script.c:1.1.1.2 src/external/bsd/dhcpcd/dist/script.c:1.2
--- src/external/bsd/dhcpcd/dist/script.c:1.1.1.2	Fri Sep 20 10:51:29 2013
+++ src/external/bsd/dhcpcd/dist/script.c	Mon Nov 18 19:55:29 2013
@@ -1,5 +1,5 @@
 #include sys/cdefs.h
- __RCSID($NetBSD: script.c,v 1.1.1.2 2013/09/20 10:51:29 roy Exp $);
+ __RCSID($NetBSD: script.c,v 1.2 2013/11/18 19:55:29 joerg Exp $);
 
 /*
  * dhcpcd - DHCP client daemon
@@ -424,7 +424,7 @@ dumplease:
 		}
 		elen += e;
 	}
-	env[elen] = '\0';
+	env[elen] = NULL;
 
 	*argv = env;
 	return elen;
@@ -556,7 +556,7 @@ script_runreason(const struct interface 
 			goto out;
 		}
 	}
-	env[++elen] = '\0';
+	env[++elen] = NULL;
 
 	pid = exec_script(argv, env);
 	if (pid == -1)



CVS commit: src/usr.bin/spell/spellprog

2013-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 19:55:59 UTC 2013

Modified Files:
src/usr.bin/spell/spellprog: spellprog.c

Log Message:
Spell NULL pointer as NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/spell/spellprog/spellprog.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/spell/spellprog/spellprog.c
diff -u src/usr.bin/spell/spellprog/spellprog.c:1.8 src/usr.bin/spell/spellprog/spellprog.c:1.9
--- src/usr.bin/spell/spellprog/spellprog.c:1.8	Sat Dec 15 19:44:53 2007
+++ src/usr.bin/spell/spellprog/spellprog.c	Mon Nov 18 19:55:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: spellprog.c,v 1.8 2007/12/15 19:44:53 perry Exp $	*/
+/*	$NetBSD: spellprog.c,v 1.9 2013/11/18 19:55:59 joerg Exp $	*/
 
 /* derived from OpenBSD: spellprog.c,v 1.4 2003/06/03 02:56:16 millert Exp */
 
@@ -455,7 +455,7 @@ suffix(char *ep, size_t lev)
 		if ((*t-p1)(ep - t-n1, t-d1, t-a1, lev + 1))
 			return 1;
 		if (t-p2 != NULL) {
-			deriv.buf[lev] = deriv.buf[lev + 1] = '\0';
+			deriv.buf[lev] = deriv.buf[lev + 1] = NULL;
 			return (*t-p2)(ep - t-n2, t-d2, t-a2, lev);
 		}
 		return 0;
@@ -724,7 +724,7 @@ trypref(char *ep, const char *a, size_t 
 		if (pp - space = sizeof(space))
 			return 0;
 	}
-	deriv.buf[lev + 1] = deriv.buf[lev + 2] = '\0';
+	deriv.buf[lev + 1] = deriv.buf[lev + 2] = NULL;
 	return val;
 }
 



CVS commit: src/dist/nvi/common

2013-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 20:03:02 UTC 2013

Modified Files:
src/dist/nvi/common: api.c

Log Message:
Change content of string, don't overwrite the newly allocated pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/api.c

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

Modified files:

Index: src/dist/nvi/common/api.c
diff -u src/dist/nvi/common/api.c:1.2 src/dist/nvi/common/api.c:1.3
--- src/dist/nvi/common/api.c:1.2	Fri Dec  5 22:51:42 2008
+++ src/dist/nvi/common/api.c	Mon Nov 18 20:03:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: api.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */
+/*	$NetBSD: api.c,v 1.3 2013/11/18 20:03:02 joerg Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -438,7 +438,7 @@ api_opts_get(SCR *sp, const CHAR_T *name
 	case OPT_STR:
 		if (O_STR(sp, offset) == NULL) {
 			MALLOC_RET(sp, *value, char *, 2);
-			value[0] = '\0';
+			value[0][0] = '\0';
 		} else {
 			MALLOC_RET(sp,
 			*value, char *, strlen(O_STR(sp, offset)) + 1);



CVS commit: src/lib/libterminfo

2013-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 20:51:03 UTC 2013

Modified Files:
src/lib/libterminfo: curterm.c

Log Message:
Use an empty string, not a null pointer for nullname.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libterminfo/curterm.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/libterminfo/curterm.c
diff -u src/lib/libterminfo/curterm.c:1.9 src/lib/libterminfo/curterm.c:1.10
--- src/lib/libterminfo/curterm.c:1.9	Fri Jun  7 13:16:18 2013
+++ src/lib/libterminfo/curterm.c	Mon Nov 18 20:51:03 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: curterm.c,v 1.9 2013/06/07 13:16:18 roy Exp $ */
+/* $NetBSD: curterm.c,v 1.10 2013/11/18 20:51:03 joerg Exp $ */
 
 /*
  * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: curterm.c,v 1.9 2013/06/07 13:16:18 roy Exp $);
+__RCSID($NetBSD: curterm.c,v 1.10 2013/11/18 20:51:03 joerg Exp $);
 
 #include assert.h
 #include stdlib.h
@@ -151,7 +151,7 @@ termname(void)
 	return __UNCONST(cur_term-name);
 }
 
-static const char * nullname = '\0';
+static const char * nullname = ;
 
 char *
 longname(void)



CVS commit: src/usr.sbin/npf/npfctl

2013-11-18 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Nov 18 21:39:03 UTC 2013

Modified Files:
src/usr.sbin/npf/npfctl: npf_parse.y npf_scan.l

Log Message:
Rename some tokens, use more accurate names (the current ones are incorrect
or missleading) and add few comments in the parser code.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/npf/npfctl/npf_parse.y
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/npf/npfctl/npf_scan.l

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/npf/npfctl/npf_parse.y
diff -u src/usr.sbin/npf/npfctl/npf_parse.y:1.27 src/usr.sbin/npf/npfctl/npf_parse.y:1.28
--- src/usr.sbin/npf/npfctl/npf_parse.y:1.27	Fri Nov  8 00:38:26 2013
+++ src/usr.sbin/npf/npfctl/npf_parse.y	Mon Nov 18 21:39:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_parse.y,v 1.27 2013/11/08 00:38:26 rmind Exp $	*/
+/*	$NetBSD: npf_parse.y,v 1.28 2013/11/18 21:39:03 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@ yyerror(const char *fmt, ...)
 %token	str		TABLE_ID
 %token	str		VAR_ID
 
-%type	str		addr, some_name, list_elem, table_store, string
+%type	str		addr, some_name, element, table_store, string
 %type	str		proc_param_val, opt_apply, ifname, on_ifname
 %type	num		port, opt_final, number, afamily, opt_family
 %type	num		block_or_pass, rule_dir, group_dir, block_opts
@@ -192,7 +192,7 @@ lines
 	;
 
 line
-	: def
+	: vardef
 	| table
 	| map
 	| group
@@ -201,33 +201,45 @@ line
 	|
 	;
 
-def
+alg
+	: ALG STRING
+	{
+		npfctl_build_alg($2);
+	}
+	;
+
+/*
+ * A value - an element or a list of elements.
+ * Can be assigned to a variable or used inline.
+ */
+
+vardef
 	: VAR_ID
 	{
 		cvar = npfvar_create($1);
 		npfvar_add(cvar);
 	}
-	  EQ definition
+	  EQ value
 	{
 		cvar = NULL;
 	}
 	;
 
-definition
-	: list_elem
-	| listdef
+value
+	: element
+	| list
 	;
 
-listdef
+list
 	: CURLY_OPEN list_elems CURLY_CLOSE
 	;
 
 list_elems
-	: list_elem COMMA list_elems
-	| list_elem
+	: element COMMA list_elems
+	| element
 	;
 
-list_elem
+element
 	: IDENTIFIER
 	{
 		npfvar_t *vp = npfvar_create(.identifier);
@@ -267,6 +279,10 @@ list_elem
 	}
 	;
 
+/*
+ * Table definition.
+ */
+
 table
 	: TABLE TABLE_ID TYPE table_type table_store
 	{
@@ -284,6 +300,10 @@ table_store
 	| TFILE STRING	{ $$ = $2; }
 	;
 
+/*
+ * Map definition.
+ */
+
 map_sd
 	: TSTATIC	{ $$ = NPFCTL_NAT_STATIC; }
 	| TDYNAMIC	{ $$ = NPFCTL_NAT_DYNAMIC; }
@@ -319,6 +339,10 @@ map
 	}
 	;
 
+/*
+ * Rule procedure definition and its parameters.
+ */
+
 rproc
 	: PROCEDURE STRING CURLY_OPEN procs CURLY_CLOSE
 	{
@@ -326,13 +350,6 @@ rproc
 	}
 	;
 
-alg
-	: ALG STRING
-	{
-		npfctl_build_alg($2);
-	}
-	;
-
 procs
 	: proc_call SEPLINE procs
 	{
@@ -383,6 +400,10 @@ proc_param_val
 	|		{ $$ = NULL; }
 	;
 
+/*
+ * Group and dynamic ruleset definition.
+ */
+
 group
 	: GROUP group_opts
 	{
@@ -443,6 +464,10 @@ rule_group
 	|
 	;
 
+/*
+ * Rule and misc.
+ */
+
 rule
 	: block_or_pass opt_stateful rule_dir opt_final on_ifname
 	  opt_family opt_proto all_or_filt_opts opt_apply

Index: src/usr.sbin/npf/npfctl/npf_scan.l
diff -u src/usr.sbin/npf/npfctl/npf_scan.l:1.14 src/usr.sbin/npf/npfctl/npf_scan.l:1.15
--- src/usr.sbin/npf/npfctl/npf_scan.l:1.14	Tue Nov 12 00:46:34 2013
+++ src/usr.sbin/npf/npfctl/npf_scan.l	Mon Nov 18 21:39:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_scan.l,v 1.14 2013/11/12 00:46:34 rmind Exp $	*/
+/*	$NetBSD: npf_scan.l,v 1.15 2013/11/18 21:39:03 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -186,7 +186,7 @@ any			return ANY;
 			return TABLE_ID;
 		}
 
-${ID}	{
+${ID}		{
 			yylval.str = estrndup(yytext + 1, yyleng - 1);
 			return VAR_ID;
 		}



CVS commit: src/usr.sbin/npf/npfctl

2013-11-18 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Nov 19 00:28:41 UTC 2013

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5 npf_build.c npf_data.c npf_parse.y
npf_scan.l npf_show.c npf_var.c npf_var.h

Log Message:
Simplify parsing of npf.conf elements, create the npfvar_t when a value is
parsed (to be used as a general structured for variables and inlined values),
few misc improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/npf/npfctl/npf.conf.5
cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/npf/npfctl/npf_data.c
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/npf/npfctl/npf_parse.y
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/npf/npfctl/npf_scan.l
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/npf/npfctl/npf_show.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/npf/npfctl/npf_var.c \
src/usr.sbin/npf/npfctl/npf_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/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.34 src/usr.sbin/npf/npfctl/npf.conf.5:1.35
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.34	Tue Nov 12 06:07:30 2013
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Tue Nov 19 00:28:41 2013
@@ -1,4 +1,4 @@
-.\$NetBSD: npf.conf.5,v 1.34 2013/11/12 06:07:30 wiz Exp $
+.\$NetBSD: npf.conf.5,v 1.35 2013/11/19 00:28:41 rmind Exp $
 .\
 .\ Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 10, 2013
+.Dd November 18, 2013
 .Dt NPF.CONF 5
 .Os
 .Sh NAME
@@ -99,7 +99,7 @@ Tables of type hash can only contain I
 Interfaces can be specified as the values of the variables:
 .Pp
 .Bd -literal
-$pub_if_list = { ifnet(wm0), ifnet(wm1) }
+$pub_if_list = { inet4(wm0), inet4(wm1) }
 .Ed
 .Pp
 In the context of filtering, an interface provides a list of its
@@ -107,7 +107,7 @@ all IP addresses, including IPv4 and IPv
 Specific interface addresses can be selected by the family, e.g.:
 .Bd -literal
 $pub_if4 = inet4(wm0)
-$pub_if6 = { inet6(wm0) }
+$pub_if46 = { inet4(wm0), inet6(wm0) }
 .Ed
 .Ss Groups
 Groups may have the following options: name, interface, and direction.
@@ -281,8 +281,8 @@ directory containing further examples
 .\ -
 .Sh EXAMPLES
 .Bd -literal
-$ext_if = ifnet(wm0)
-$int_if = ifnet(wm1)
+$ext_if = { inet4(wm0), inet6(wm0) }
+$int_if = { inet4(wm1), inet6(wm1) }
 
 table black type hash file /etc/npf_blacklist
 table limited type tree dynamic

Index: src/usr.sbin/npf/npfctl/npf_build.c
diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.29 src/usr.sbin/npf/npfctl/npf_build.c:1.30
--- src/usr.sbin/npf/npfctl/npf_build.c:1.29	Tue Nov 12 00:46:34 2013
+++ src/usr.sbin/npf/npfctl/npf_build.c	Tue Nov 19 00:28:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_build.c,v 1.29 2013/11/12 00:46:34 rmind Exp $	*/
+/*	$NetBSD: npf_build.c,v 1.30 2013/11/19 00:28:41 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_build.c,v 1.29 2013/11/12 00:46:34 rmind Exp $);
+__RCSID($NetBSD: npf_build.c,v 1.30 2013/11/19 00:28:41 rmind Exp $);
 
 #include sys/types.h
 #include sys/ioctl.h
@@ -171,25 +171,25 @@ npfctl_build_fam(npf_bpf_t *ctx, sa_fami
 		}
 		return false;
 	}
+
 	family = fam-fam_family;
+	if (family != AF_INET  family != AF_INET6) {
+		yyerror(family %d is not supported, family);
+	}
 
 	/*
 	 * Optimise 0.0.0.0/0 case to be NOP.  Otherwise, address with
 	 * zero mask would never match and therefore is not valid.
 	 */
 	if (fam-fam_mask == 0) {
-		npf_addr_t zero;
+		static const npf_addr_t zero; /* must be static */
 
-		memset(zero, 0, sizeof(npf_addr_t));
 		if (memcmp(fam-fam_addr, zero, sizeof(npf_addr_t))) {
 			yyerror(filter criterion would never match);
 		}
 		return false;
 	}
 
-	if (family != AF_INET  family != AF_INET6) {
-		yyerror(family %d is not supported, family);
-	}
 	npfctl_bpf_cidr(ctx, opts, family, fam-fam_addr, fam-fam_mask);
 	return true;
 }

Index: src/usr.sbin/npf/npfctl/npf_data.c
diff -u src/usr.sbin/npf/npfctl/npf_data.c:1.21 src/usr.sbin/npf/npfctl/npf_data.c:1.22
--- src/usr.sbin/npf/npfctl/npf_data.c:1.21	Fri Nov  8 00:38:26 2013
+++ src/usr.sbin/npf/npfctl/npf_data.c	Tue Nov 19 00:28:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_data.c,v 1.21 2013/11/08 00:38:26 rmind Exp $	*/
+/*	$NetBSD: npf_data.c,v 1.22 2013/11/19 00:28:41 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: npf_data.c,v 1.21 2013/11/08 00:38:26 rmind Exp $);
+__RCSID($NetBSD: npf_data.c,v 1.22 2013/11/19 00:28:41 rmind Exp $);
 
 #include sys/types.h
 #include sys/null.h
@@ -201,13 +201,12 @@ npfvar_t *
 npfctl_parse_fam_addr_mask(const char 

CVS commit: src/sys/compat/linux/arch

2013-11-18 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 19 03:52:07 UTC 2013

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master

Log Message:
add the *at() syscalls.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/mips/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/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.79 src/sys/compat/linux/arch/alpha/syscalls.master:1.80
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.79	Tue Sep 24 13:27:49 2013
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Tue Nov 19 03:52:07 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.79 2013/09/24 13:27:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.80 2013/11/19 03:52:07 chs Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -698,19 +698,31 @@
 447	UNIMPL		fdatasync
 448	UNIMPL		kexec_load
 449	UNIMPL		migrate_pages
-450	UNIMPL		openat
-451	UNIMPL		mkdirat
-452	UNIMPL		mknodat
-453	UNIMPL		fchownat
+450	STD 		{ int|linux_sys||openat(int fd, const char *path, \
+			int flags, ... linux_umode_t mode); }
+451	NOARGS		{ int|sys||mkdirat(int fd, const char *path, \
+			linux_umode_t mode); }
+452	STD		{ int|linux_sys||mknodat(int fd, const char *path, \
+			linux_umode_t mode, unsigned dev); }
+453	STD		{ int|linux_sys||fchownat(int fd, const char *path, \
+			uid_t owner, gid_t group, int flag); }
 454	UNIMPL		futimesat
-455	UNIMPL		fstatat64
-456	UNIMPL		unlinkat
-457	UNIMPL		renameat
-458	UNIMPL		linkat
-459	UNIMPL		symlinkat
-460	UNIMPL		readlinkat
-461	UNIMPL		fchmodat
-462	UNIMPL		faccessat
+455	UNIMPL		{ int|linux_sys||fstatat64(int fd, const char *path, \
+			struct linux_stat64 *sp, int flag); }
+456	STD		{ int|linux_sys||unlinkat(int fd, const char *path, \
+			int flag); }
+457	NOARGS		{ int|sys||renameat(int fromfd, const char *from, \
+			int tofd, const char *to); }
+458	STD		{ int|linux_sys||linkat(int fd1, const char *name1, \
+			int fd2, const char *name2, int flags); }
+459	NOARGS		{ int|sys||symlinkat(const char *path1, int fd, \
+			const char *path2); }
+460	NOARGS		{ int|sys||readlinkat(int fd, const char *path, \
+			char *buf, size_t bufsize); }
+461	STD		{ int|linux_sys||fchmodat(int fd, const char *path, \
+			linux_umode_t mode); }
+462	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
+			int amode); }
 463	UNIMPL		pselect6
 464	STD		{ int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 			struct linux_timespec *timeout, \

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.52 src/sys/compat/linux/arch/arm/syscalls.master:1.53
--- src/sys/compat/linux/arch/arm/syscalls.master:1.52	Thu Nov  7 19:37:18 2013
+++ src/sys/compat/linux/arch/arm/syscalls.master	Tue Nov 19 03:52:07 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.52 2013/11/07 19:37:18 njoly Exp $
+	$NetBSD: syscalls.master,v 1.53 2013/11/19 03:52:07 chs Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -503,19 +503,31 @@
 319	UNIMPL		mbind
 320	UNIMPL		get_mempolicy
 321	UNIMPL		set_mempolicy
-322	UNIMPL		openat
-323	UNIMPL		mkdirat
-324	UNIMPL		mknodat
-325	UNIMPL		fchownat
+322	STD 		{ int|linux_sys||openat(int fd, const char *path, \
+			int flags, ... linux_umode_t mode); }
+323	NOARGS		{ int|sys||mkdirat(int fd, const char *path, \
+			linux_umode_t mode); }
+324	STD		{ int|linux_sys||mknodat(int fd, const char *path, \
+			linux_umode_t mode, unsigned dev); }
+325	STD		{ int|linux_sys||fchownat(int fd, const char *path, \
+			uid_t owner, gid_t group, int flag); }
 326	UNIMPL		futimesat
-327	UNIMPL		fstatat64
-328	UNIMPL		unlinkat
-329	UNIMPL		renameat
-330	UNIMPL		linkat
-331	UNIMPL		symlinkat
-332	UNIMPL		readlinkat
-333	UNIMPL		fchmodat
-334	UNIMPL		faccessat
+327	STD		{ int|linux_sys||fstatat64(int fd, const char *path, \
+			struct linux_stat64 *sp, int flag); }
+328	STD		{ int|linux_sys||unlinkat(int fd, const char *path, \
+			int flag); }
+329	NOARGS		{ int|sys||renameat(int fromfd, const char *from, \
+			int tofd, const char *to); }
+330	STD		{ int|linux_sys||linkat(int fd1, const char *name1, \
+			int fd2, const char *name2, int flags); }
+331	NOARGS		{ int|sys||symlinkat(const char *path1, int fd, \
+			const char *path2); }
+332	NOARGS		{ int|sys||readlinkat(int fd, const 

CVS commit: src/sys/compat/linux/arch

2013-11-18 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 19 03:53:09 UTC 2013

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.84 -r1.85 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c

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

Modified files:

Index: src/sys/compat/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.85 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.86
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.85	Tue Sep 24 13:28:50 2013
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Tue Nov 19 03:53:09 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.85 2013/09/24 13:28:50 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.86 2013/11/19 03:53:09 chs Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.79 2013/09/24 13:27:49 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.80 2013/11/19 03:52:07 chs Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -594,6 +594,39 @@
 /* syscall: tgkill ret: int args: int int int */
 #define	LINUX_SYS_tgkill	424
 
+/* syscall: openat ret: int args: int const char * int ... */
+#define	LINUX_SYS_openat	450
+
+/* syscall: mkdirat ret: int args: int const char * linux_umode_t */
+#define	LINUX_SYS_mkdirat	451
+
+/* syscall: mknodat ret: int args: int const char * linux_umode_t unsigned */
+#define	LINUX_SYS_mknodat	452
+
+/* syscall: fchownat ret: int args: int const char * uid_t gid_t int */
+#define	LINUX_SYS_fchownat	453
+
+/* syscall: unlinkat ret: int args: int const char * int */
+#define	LINUX_SYS_unlinkat	456
+
+/* syscall: renameat ret: int args: int const char * int const char * */
+#define	LINUX_SYS_renameat	457
+
+/* syscall: linkat ret: int args: int const char * int const char * int */
+#define	LINUX_SYS_linkat	458
+
+/* syscall: symlinkat ret: int args: const char * int const char * */
+#define	LINUX_SYS_symlinkat	459
+
+/* syscall: readlinkat ret: int args: int const char * char * size_t */
+#define	LINUX_SYS_readlinkat	460
+
+/* syscall: fchmodat ret: int args: int const char * linux_umode_t */
+#define	LINUX_SYS_fchmodat	461
+
+/* syscall: faccessat ret: int args: int const char * int */
+#define	LINUX_SYS_faccessat	462
+
 /* syscall: ppoll ret: int args: struct pollfd * int struct linux_timespec * linux_sigset_t * */
 #define	LINUX_SYS_ppoll	464
 
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.85 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.86
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.85	Tue Sep 24 13:28:50 2013
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Tue Nov 19 03:53:09 2013
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.85 2013/09/24 13:28:50 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.86 2013/11/19 03:53:09 chs Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.79 2013/09/24 13:27:49 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.80 2013/11/19 03:52:07 chs Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.85 2013/09/24 13:28:50 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.86 2013/11/19 03:53:09 chs Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -970,32 +970,32 @@ struct sysent linux_sysent[] = {
 	

CVS commit: src/sbin/gpt

2013-11-18 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Tue Nov 19 05:03:41 UTC 2013

Modified Files:
src/sbin/gpt: add.c gpt.8 gpt.c map.c map.h

Log Message:
 Add two new options to the add subcommand:

-a alignment -- attempt to align the start and size of the partition
-l label -- supply a label for the partition

These options were inspired by FreeBSD's gpart(8) command, but the
code was written by me.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sbin/gpt/add.c src/sbin/gpt/gpt.8
cvs rdiff -u -r1.20 -r1.21 src/sbin/gpt/gpt.c
cvs rdiff -u -r1.3 -r1.4 src/sbin/gpt/map.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sbin/gpt/map.h

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

Modified files:

Index: src/sbin/gpt/add.c
diff -u src/sbin/gpt/add.c:1.14 src/sbin/gpt/add.c:1.15
--- src/sbin/gpt/add.c:1.14	Sun May 26 21:26:17 2013
+++ src/sbin/gpt/add.c	Tue Nov 19 05:03:41 2013
@@ -29,7 +29,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: add.c,v 1.14 2013/05/26 21:26:17 wiz Exp $);
+__RCSID($NetBSD: add.c,v 1.15 2013/11/19 05:03:41 jnemeth Exp $);
 #endif
 
 #include sys/types.h
@@ -46,19 +46,21 @@ __RCSID($NetBSD: add.c,v 1.14 2013/05/2
 #include gpt.h
 
 static uuid_t type;
-static off_t block, size;
+static off_t alignment, block, size;
 static unsigned int entry;
+static uint8_t *name;
 
-const char addmsg[] = add [-b lba] [-i index] [-s lba] [-t type] 
-	device ...;
+const char addmsg1[] = add [-a alignment] [-b lba] [-i index] [-l label];
+const char addmsg2[] = [-s lba] [-t type] device ...;
 
 __dead static void
 usage_add(void)
 {
 
 	fprintf(stderr,
-	usage: %s %s\n,
-	getprogname(), addmsg);
+	usage: %s %s\n
+	   %*s %s\n, getprogname(), addmsg1,
+	(int)strlen(getprogname()), , addmsg2);
 	exit(1);
 }
 
@@ -72,6 +74,8 @@ add(int fd)
 	struct gpt_hdr *hdr;
 	struct gpt_ent *ent;
 	unsigned int i;
+	off_t alignsecs;
+	
 
 	gpt = map_find(MAP_TYPE_PRI_GPT_HDR);
 	ent = NULL;
@@ -128,15 +132,30 @@ add(int fd)
 		}
 	}
 
-	map = map_alloc(block, size);
-	if (map == NULL) {
-		warnx(%s: error: not enough space available on device, device_name);
-		return;
+	if (alignment  0) {
+		alignsecs = alignment / secsz;
+		map = map_alloc(block, size, alignsecs);
+		if (map == NULL) {
+			warnx(%s: error: not enough space available on device for an aligned partition, device_name);
+			map = map_alloc(block, size, 0);
+			if (map == NULL) {
+warnx(%s: error: not enough available on device, device_name);
+return;
+			}
+		}
+	} else {
+		map = map_alloc(block, size, 0);
+		if (map == NULL) {
+			warnx(%s: error: not enough space available on device, device_name);
+			return;
+		}
 	}
 
 	le_uuid_enc(ent-ent_type, type);
 	ent-ent_lba_start = htole64(map-map_start);
 	ent-ent_lba_end = htole64(map-map_start + map-map_size - 1LL);
+	if (name != NULL)
+		utf8_to_utf16(name, ent-ent_name, 36);
 
 	hdr-hdr_crc_table = htole32(crc32(tbl-map_data,
 	le32toh(hdr-hdr_entries) * le32toh(hdr-hdr_entsz)));
@@ -177,10 +196,18 @@ cmd_add(int argc, char *argv[])
 {
 	char *p;
 	int ch, fd;
+	int64_t human_num;
 
 	/* Get the migrate options */
-	while ((ch = getopt(argc, argv, b:i:s:t:)) != -1) {
+	while ((ch = getopt(argc, argv, a:b:i:l:s:t:)) != -1) {
 		switch(ch) {
+		case 'a':
+			if (alignment  0)
+usage_add();
+			if (dehumanize_number(optarg, human_num)  0)
+usage_add();
+			alignment = human_num;
+			break;
 		case 'b':
 			if (block  0)
 usage_add();
@@ -195,6 +222,11 @@ cmd_add(int argc, char *argv[])
 			if (*p != 0 || entry  1)
 usage_add();
 			break;
+		case 'l':
+			if (name != NULL)
+usage_add();
+			name = (uint8_t *)strdup(optarg);
+			break;
 		case 's':
 			if (size  0)
 usage_add();
@@ -229,6 +261,13 @@ cmd_add(int argc, char *argv[])
 			continue;
 		}
 
+		if (alignment % secsz != 0) {
+			warnx(Alignment must be a multiple of sector size; );
+			warnx(the sector size for %s is %d bytes.,
+			device_name, secsz);
+			continue;
+		}
+
 		add(fd);
 
 		gpt_close(fd);
Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.14 src/sbin/gpt/gpt.8:1.15
--- src/sbin/gpt/gpt.8:1.14	Thu Oct 24 06:59:03 2013
+++ src/sbin/gpt/gpt.8	Tue Nov 19 05:03:41 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: gpt.8,v 1.14 2013/10/24 06:59:03 jnemeth Exp $
+.\ $NetBSD: gpt.8,v 1.15 2013/11/19 05:03:41 jnemeth Exp $
 .\
 .\ Copyright (c) 2002 Marcel Moolenaar
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $
 .\
-.Dd October 23, 2013
+.Dd November 18, 2013
 .Dt GPT 8
 .Os
 .Sh NAME
@@ -104,6 +104,14 @@ of an unused disk space.
 The command-specific options can be used to control this behaviour.
 .Pp
 The
+.Fl a Ar alignment
+option allows the user to specify an alignment for the start and size.
+The alignment may have a suffix to indicate 

CVS commit: src/sbin/gpt

2013-11-18 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Tue Nov 19 05:07:40 UTC 2013

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

Log Message:
update synopsis for add subcommand


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/gpt/gpt.8

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

Modified files:

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.15 src/sbin/gpt/gpt.8:1.16
--- src/sbin/gpt/gpt.8:1.15	Tue Nov 19 05:03:41 2013
+++ src/sbin/gpt/gpt.8	Tue Nov 19 05:07:40 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: gpt.8,v 1.15 2013/11/19 05:03:41 jnemeth Exp $
+.\ $NetBSD: gpt.8,v 1.16 2013/11/19 05:07:40 jnemeth Exp $
 .\
 .\ Copyright (c) 2002 Marcel Moolenaar
 .\ All rights reserved.
@@ -94,7 +94,8 @@ There is no formalized definition of the
 .Ss Commands
 .Bl -tag -width indent
 .\  add 
-.It Nm Ic add Oo Fl b Ar number Oc Oo Fl i Ar index Oc Oo Fl s Ar count Oc \
+.It Nm Ic add Oo Fl a Ar alignment Oc Oo Fl b Ar number Oc \
+Oo Fl i Ar index Oc Oo Fl l Ar label Oc Oo Fl s Ar count Oc \
 Oo Fl t Ar type Oc Ar device ...
 The
 .Ic add



CVS commit: src/sys/dev/pci

2013-11-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 19 06:37:42 UTC 2013

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

Log Message:
(hopefully) shut up warnings about set-but-unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/voodoofb.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/voodoofb.c
diff -u src/sys/dev/pci/voodoofb.c:1.46 src/sys/dev/pci/voodoofb.c:1.47
--- src/sys/dev/pci/voodoofb.c:1.46	Wed Oct  9 17:18:23 2013
+++ src/sys/dev/pci/voodoofb.c	Tue Nov 19 06:37:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: voodoofb.c,v 1.46 2013/10/09 17:18:23 macallan Exp $	*/
+/*	$NetBSD: voodoofb.c,v 1.47 2013/11/19 06:37:42 macallan Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2012 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.46 2013/10/09 17:18:23 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.47 2013/11/19 06:37:42 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -296,10 +296,9 @@ voodoo3_write_gra(struct voodoofb_softc 
 static inline void
 voodoo3_write_attr(struct voodoofb_softc *sc, uint8_t reg, uint8_t val)
 {
-	volatile uint8_t junk;
 	uint8_t index;
 	
-	junk = bus_space_read_1(sc-sc_ioregt, sc-sc_ioregh, IS1_R - 0x300);
+	(void)bus_space_read_1(sc-sc_ioregt, sc-sc_ioregh, IS1_R - 0x300);
 	index = bus_space_read_1(sc-sc_ioregt, sc-sc_ioregh, ATT_IW - 0x300);
 	bus_space_write_1(sc-sc_ioregt, sc-sc_ioregh, ATT_IW - 0x300, reg);
 	bus_space_write_1(sc-sc_ioregt, sc-sc_ioregh, ATT_IW - 0x300, val);
@@ -363,7 +362,7 @@ voodoofb_attach(device_t parent, device_
 	const char *intrstr;
 #endif
 	ulong defattr;
-	int console, width, height, i, j;
+	int console, width, height, i;
 	prop_dictionary_t dict;
 	int linebytes, depth, flags;
 	uint32_t bg, fg, ul;
@@ -479,7 +478,6 @@ voodoofb_attach(device_t parent, device_
 	printf(fb: %08lx\n, (ulong)ri-ri_bits);
 #endif
 	
-	j = 0;
 	if (sc-sc_bits_per_pixel == 8) {
 		uint8_t tmp;
 		for (i = 0; i  256; i++) {
@@ -1029,9 +1027,8 @@ static void
 voodoofb_rectfill(struct voodoofb_softc *sc, int x, int y, int width, 
 int height, int colour) 
 {
-	uint32_t fmt, col;
+	uint32_t fmt;
 	
-	col = (colour  24) | (colour  16) | (colour  8) | colour;
 	fmt = sc-sc_linebytes | ((sc-sc_bits_per_pixel + 
 	((sc-sc_bits_per_pixel == 8) ? 0 : 8))  13);
 
@@ -1542,7 +1539,7 @@ voodoofb_set_videomode(struct voodoofb_s
 {
 	uint32_t miscinit0 = 0;
 	int vidpll, fout;
-	uint32_t vp, vidproc = VIDPROCDEFAULT;
+	uint32_t vidproc = VIDPROCDEFAULT;
 	uint32_t bpp = 1;	/* for now */
 	uint32_t bytes_per_row = vm-hdisplay * bpp;
 
@@ -1552,7 +1549,6 @@ voodoofb_set_videomode(struct voodoofb_s
 	sc-sc_linebytes = bytes_per_row;
 	
 	voodoofb_setup_monitor(sc, vm);
-	vp = voodoo3_read32(sc, VIDPROCCFG);
 	
 	vidproc = ~(0x1c); /* clear bits 18 to 20, bpp in vidproccfg */
 	/* enable bits 18 to 20 to the required bpp */
@@ -1561,6 +1557,8 @@ voodoofb_set_videomode(struct voodoofb_s
 	vidpll = voodoofb_calc_pll(vm-dot_clock, fout, 0);
 
 #ifdef VOODOOFB_DEBUG
+	uint32_t vp;
+	vp = voodoo3_read32(sc, VIDPROCCFG);
 	printf(old vidproc: %08x\n, vp);
 	printf(pll: %08x %d\n, vidpll, fout);
 #endif



CVS commit: src/sys/external/bsd/dwc2

2013-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 19 07:45:42 UTC 2013

Modified Files:
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Use PRIxBUSADDR in DPRINTF. Problem pointed out by kiyohara.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/dwc2/dwc2.c

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.17 src/sys/external/bsd/dwc2/dwc2.c:1.18
--- src/sys/external/bsd/dwc2/dwc2.c:1.17	Thu Nov 14 12:41:14 2013
+++ src/sys/external/bsd/dwc2/dwc2.c	Tue Nov 19 07:45:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.17 2013/11/14 12:41:14 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.18 2013/11/19 07:45:42 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.17 2013/11/14 12:41:14 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.18 2013/11/19 07:45:42 skrll Exp $);
 
 #include opt_usb.h
 
@@ -1279,7 +1279,7 @@ dwc2_device_start(usbd_xfer_handle xfer)
 			dir = UE_DIR_OUT;
 		}
 
-		DPRINTFN(3, req = %p dma = %lx len %d dir %s\n,
+		DPRINTFN(3, req = %p dma = % PRIxBUSADDR  len %d dir %s\n,
 		KERNADDR(dpipe-req_dma, 0), DMAADDR(dpipe-req_dma, 0),
 		len, dir == UE_DIR_IN ? in : out);
 	} else {



CVS commit: src/sys/external/bsd/dwc2

2013-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 19 07:50:01 UTC 2013

Modified Files:
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Correct the interval assignment for isoc and intr transfers.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/dwc2/dwc2.c

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.18 src/sys/external/bsd/dwc2/dwc2.c:1.19
--- src/sys/external/bsd/dwc2/dwc2.c:1.18	Tue Nov 19 07:45:42 2013
+++ src/sys/external/bsd/dwc2/dwc2.c	Tue Nov 19 07:50:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.18 2013/11/19 07:45:42 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.19 2013/11/19 07:50:01 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.18 2013/11/19 07:45:42 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.19 2013/11/19 07:50:01 skrll Exp $);
 
 #include opt_usb.h
 
@@ -1324,13 +1324,38 @@ dwc2_device_start(usbd_xfer_handle xfer)
 	dwc2_urb-status = -EINPROGRESS;
 	dwc2_urb-packet_count = xfer-nframes;
 
-	if (xfertype == UE_INTERRUPT) {
-		if (dpipe-pipe.interval == USBD_DEFAULT_INTERVAL)
-			dwc2_urb-interval = ed-bInterval;
-		else
-			dwc2_urb-interval = dpipe-pipe.interval;
-	} else if (xfertype == UE_ISOCHRONOUS)
-		dwc2_urb-interval = ed-bInterval;
+	if (xfertype == UE_INTERRUPT ||
+	xfertype == UE_ISOCHRONOUS) {
+		uint16_t ival;
+
+		if (xfertype == UE_INTERRUPT 
+		dpipe-pipe.interval != USBD_DEFAULT_INTERVAL) {
+			ival = dpipe-pipe.interval;
+		} else {
+			ival = ed-bInterval;
+		}
+
+		if (ival  1) {
+			retval = -ENODEV;
+			goto fail;
+		}
+		if (dev-speed == USB_SPEED_HIGH ||
+		   (dev-speed == USB_SPEED_FULL  xfertype == UE_ISOCHRONOUS)) {
+			if (ival  16) {
+/*
+ * illegal with HS/FS, but there were
+ * documentation bugs in the spec
+ */
+ival = 256;
+			} else {
+ival = (1  (ival - 1));
+			}
+		} else {
+			if (xfertype == UE_INTERRUPT  ival  10)
+ival = 10;
+		}
+		dwc2_urb-interval = ival;
+	}
 
 	/* XXXNH bring down from callers?? */
 // 	mutex_enter(sc-sc_lock);



CVS commit: src/libexec/httpd

2013-11-18 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Tue Nov 19 07:51:56 UTC 2013

Modified Files:
src/libexec/httpd: lua-bozo.c

Log Message:
fix bad free


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/libexec/httpd/lua-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/lua-bozo.c
diff -u src/libexec/httpd/lua-bozo.c:1.7 src/libexec/httpd/lua-bozo.c:1.8
--- src/libexec/httpd/lua-bozo.c:1.7	Wed Nov 13 21:46:22 2013
+++ src/libexec/httpd/lua-bozo.c	Tue Nov 19 07:51:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: lua-bozo.c,v 1.7 2013/11/13 21:46:22 christos Exp $	*/
+/*	$NetBSD: lua-bozo.c,v 1.8 2013/11/19 07:51:56 mbalmer Exp $	*/
 
 /*
  * Copyright (c) 2013 Marc Balmer m...@msys.ch
@@ -445,7 +445,6 @@ out:
 	free(uri);
 	free(info);
 	free(query);
-	free(command);
 	free(file);
 	return rv;
 }