CVS commit: src/common/lib/libprop

2017-03-07 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Mar  7 19:10:07 UTC 2017

Modified Files:
src/common/lib/libprop: prop_copyin_ioctl.9

Log Message:
Fix commas in NAME section.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libprop/prop_copyin_ioctl.9

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

Modified files:

Index: src/common/lib/libprop/prop_copyin_ioctl.9
diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.14 src/common/lib/libprop/prop_copyin_ioctl.9:1.15
--- src/common/lib/libprop/prop_copyin_ioctl.9:1.14	Sun Feb  5 00:47:33 2017
+++ src/common/lib/libprop/prop_copyin_ioctl.9	Tue Mar  7 19:10:07 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_copyin_ioctl.9,v 1.14 2017/02/05 00:47:33 pgoyette Exp $
+.\"	$NetBSD: prop_copyin_ioctl.9,v 1.15 2017/03/07 19:10:07 njoly Exp $
 .\"
 .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -41,8 +41,8 @@
 .Nm prop_dictionary_copyin_size ,
 .Nm prop_dictionary_copyin_ioctl ,
 .Nm prop_dictionary_copyin_ioctl_size ,
-.Nm prop_dictionary_copyout
-.Nm prop_dictionary_copyout_ioctl ,
+.Nm prop_dictionary_copyout ,
+.Nm prop_dictionary_copyout_ioctl
 .Nd Copy property lists to and from kernel space
 .Sh SYNOPSIS
 .In prop/proplib.h



CVS commit: src/lib

2017-03-05 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar  5 18:42:51 UTC 2017

Modified Files:
src/lib/libc/sys: clock_getcpuclockid2.2
src/lib/libpthread: pthread_getcpuclockid.3

Log Message:
Fix man page ERRORS section for (clock,pthread}_getcpuclockid to match
reality.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/clock_getcpuclockid2.2
cvs rdiff -u -r1.4 -r1.5 src/lib/libpthread/pthread_getcpuclockid.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/sys/clock_getcpuclockid2.2
diff -u src/lib/libc/sys/clock_getcpuclockid2.2:1.3 src/lib/libc/sys/clock_getcpuclockid2.2:1.4
--- src/lib/libc/sys/clock_getcpuclockid2.2:1.3	Sat Mar  4 11:16:33 2017
+++ src/lib/libc/sys/clock_getcpuclockid2.2	Sun Mar  5 18:42:51 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: clock_getcpuclockid2.2,v 1.3 2017/03/04 11:16:33 njoly Exp $
+.\"	$NetBSD: clock_getcpuclockid2.2,v 1.4 2017/03/05 18:42:51 njoly Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 3, 2017
+.Dd March 5, 2017
 .Dt CLOCK_GETCPUCLOCKID2 2
 .Os
 .Sh NAME
@@ -90,6 +90,15 @@ Otherwise an error number will be return
 .Sh ERRORS
 These functions fail if:
 .Bl -tag -width Er
+.It Bq Er EFAULT
+.Fa clock_id
+points outside the process's allocated address space.
+.El
+.Pp
+In addition
+.Fn clock_getcpuclockid2
+will fail if:
+.Bl -tag -width Er
 .It Bq Er EINVAL
 An unsupported
 .Fa idtype

Index: src/lib/libpthread/pthread_getcpuclockid.3
diff -u src/lib/libpthread/pthread_getcpuclockid.3:1.4 src/lib/libpthread/pthread_getcpuclockid.3:1.5
--- src/lib/libpthread/pthread_getcpuclockid.3:1.4	Sat Mar  4 11:16:33 2017
+++ src/lib/libpthread/pthread_getcpuclockid.3	Sun Mar  5 18:42:51 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pthread_getcpuclockid.3,v 1.4 2017/03/04 11:16:33 njoly Exp $
+.\"	$NetBSD: pthread_getcpuclockid.3,v 1.5 2017/03/05 18:42:51 njoly Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 3, 2017
+.Dd March 5, 2017
 .Dt PTHREAD_GETCPUCLOCKID 3
 .Os
 .Sh NAME
@@ -62,8 +62,9 @@ Otherwise an error number will be return
 .Sh ERRORS
 These functions fail if:
 .Bl -tag -width Er
-.It Bq Er ESRCH
-No thread with this id was found.
+.It Bq Er EFAULT
+.Fa clock_id
+points outside the process's allocated address space.
 .El
 .Sh SEE ALSO
 .Xr clock_getcpuclockid2 2 ,



CVS commit: src/lib

2017-03-04 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Mar  4 11:16:33 UTC 2017

Modified Files:
src/lib/libc/sys: clock_getcpuclockid.c clock_getcpuclockid2.2
src/lib/libpthread: pthread_getcpuclockid.3 pthread_getcpuclockid.c

Log Message:
Fix {clock,pthread}_getcpuclockid to return an error number on
failure, to match OpenGroup specifications.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/clock_getcpuclockid.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/clock_getcpuclockid2.2
cvs rdiff -u -r1.3 -r1.4 src/lib/libpthread/pthread_getcpuclockid.3
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_getcpuclockid.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/sys/clock_getcpuclockid.c
diff -u src/lib/libc/sys/clock_getcpuclockid.c:1.1 src/lib/libc/sys/clock_getcpuclockid.c:1.2
--- src/lib/libc/sys/clock_getcpuclockid.c:1.1	Sat Apr 23 23:11:31 2016
+++ src/lib/libc/sys/clock_getcpuclockid.c	Sat Mar  4 11:16:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_getcpuclockid.c,v 1.1 2016/04/23 23:11:31 christos Exp $	*/
+/*	$NetBSD: clock_getcpuclockid.c,v 1.2 2017/03/04 11:16:33 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,14 +30,22 @@
  */
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: clock_getcpuclockid.c,v 1.1 2016/04/23 23:11:31 christos Exp $");
+__RCSID("$NetBSD: clock_getcpuclockid.c,v 1.2 2017/03/04 11:16:33 njoly Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
+#include 
 #include 
 
 int
 clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
 {
-	return clock_getcpuclockid2(P_PID, (id_t)pid, clock_id);
+	int error = 0, saved_errno;
+
+	saved_errno = errno;
+	if (clock_getcpuclockid2(P_PID, (id_t)pid, clock_id) == -1)
+		error = errno;
+	errno = saved_errno;
+
+	return error;
 }

Index: src/lib/libc/sys/clock_getcpuclockid2.2
diff -u src/lib/libc/sys/clock_getcpuclockid2.2:1.2 src/lib/libc/sys/clock_getcpuclockid2.2:1.3
--- src/lib/libc/sys/clock_getcpuclockid2.2:1.2	Sun Apr 24 08:59:30 2016
+++ src/lib/libc/sys/clock_getcpuclockid2.2	Sat Mar  4 11:16:33 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: clock_getcpuclockid2.2,v 1.2 2016/04/24 08:59:30 wiz Exp $
+.\"	$NetBSD: clock_getcpuclockid2.2,v 1.3 2017/03/04 11:16:33 njoly Exp $
 .\"
 .\" Copyright (c) 2016 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 April 23, 2016
+.Dd March 3, 2017
 .Dt CLOCK_GETCPUCLOCKID2 2
 .Os
 .Sh NAME
@@ -81,17 +81,12 @@ function can be used with the returned
 .Fa clock_id
 to retrieve process and LWP times.
 .Sh RETURN VALUES
-The
+.Rv -std clock_getcpuclockid2
+.Pp
+If successful, the
 .Fn clock_getcpuclockid
-and
-.Fn clock_getcpuclockid2
-functions succeed and return 0, placing the requested
-.Fa clock_id
-in the argument.
-On error, the value \-1 is returned
-and the value of
-.Va errno
-is set to reflect what went wrong.
+function will return 0.
+Otherwise an error number will be returned.
 .Sh ERRORS
 These functions fail if:
 .Bl -tag -width Er

Index: src/lib/libpthread/pthread_getcpuclockid.3
diff -u src/lib/libpthread/pthread_getcpuclockid.3:1.3 src/lib/libpthread/pthread_getcpuclockid.3:1.4
--- src/lib/libpthread/pthread_getcpuclockid.3:1.3	Sun Apr 24 09:01:45 2016
+++ src/lib/libpthread/pthread_getcpuclockid.3	Sat Mar  4 11:16:33 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pthread_getcpuclockid.3,v 1.3 2016/04/24 09:01:45 wiz Exp $
+.\"	$NetBSD: pthread_getcpuclockid.3,v 1.4 2017/03/04 11:16:33 njoly Exp $
 .\"
 .\" Copyright (c) 2016 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 April 23, 2016
+.Dd March 3, 2017
 .Dt PTHREAD_GETCPUCLOCKID 3
 .Os
 .Sh NAME
@@ -58,10 +58,7 @@ On success the
 function returns 0, placing the requested
 .Fa clock_id
 in the argument.
-On error, the value \-1 is returned
-and the value of
-.Va errno
-is set to reflect what went wrong.
+Otherwise an error number will be returned.
 .Sh ERRORS
 These functions fail if:
 .Bl -tag -width Er

Index: src/lib/libpthread/pthread_getcpuclockid.c
diff -u src/lib/libpthread/pthread_getcpuclockid.c:1.1 src/lib/libpthread/pthread_getcpuclockid.c:1.2
--- src/lib/libpthread/pthread_getcpuclockid.c:1.1	Sat Apr 23 23:12:19 2016
+++ src/lib/libpthread/pthread_getcpuclockid.c	Sat Mar  4 11:16:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_getcpuclockid.c,v 1.1 2016/04/23 23:12:19 christos Exp $	*/
+/*	$NetBSD: pthread_getcpuclockid.c,v 1.2 2017/03/04 11:16:33 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: pthread_getcpuclockid.c,v 1.1 2016/04/23 

CVS commit: src/sys/compat/netbsd32

2017-02-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb 26 10:26:19 UTC 2017

Modified Files:
src/sys/compat/netbsd32: netbsd32_time.c

Log Message:
Apply fix from natuve clock_nanosleep(2) to not copyout remaining time
struct if TIMER_ABSTIME flag is set.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/netbsd32_time.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_time.c
diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.48 src/sys/compat/netbsd32/netbsd32_time.c:1.49
--- src/sys/compat/netbsd32/netbsd32_time.c:1.48	Fri Sep 23 14:16:32 2016
+++ src/sys/compat/netbsd32/netbsd32_time.c	Sun Feb 26 10:26:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $	*/
+/*	$NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -453,7 +453,8 @@ netbsd32_clock_nanosleep(struct lwp *l, 
 		goto out;
 
 	netbsd32_from_timespec(, );
-	if ((error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0)
+	if ((SCARG(uap, flags) & TIMER_ABSTIME) == 0 &&
+	(error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0)
 		error = error1;
 out:
 	*retval = error;



CVS commit: src/lib/libpthread

2017-02-02 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Feb  2 10:48:22 UTC 2017

Modified Files:
src/lib/libpthread: pthread_mutexattr.3

Log Message:
Fix a typo : pthread_mutexaddr_init -> pthread_mutexattr_init.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libpthread/pthread_mutexattr.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/libpthread/pthread_mutexattr.3
diff -u src/lib/libpthread/pthread_mutexattr.3:1.13 src/lib/libpthread/pthread_mutexattr.3:1.14
--- src/lib/libpthread/pthread_mutexattr.3:1.13	Tue Jul  5 10:04:17 2016
+++ src/lib/libpthread/pthread_mutexattr.3	Thu Feb  2 10:48:22 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_mutexattr.3,v 1.13 2016/07/05 10:04:17 wiz Exp $
+.\" $NetBSD: pthread_mutexattr.3,v 1.14 2017/02/02 10:48:22 njoly Exp $
 .\"
 .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -173,7 +173,7 @@ Attempts to unlock an already unlocked
 mutex will result in undefined behavior.
 .Pp
 This is the default mutex type for
-.Fn pthread_mutexaddr_init .
+.Fn pthread_mutexattr_init .
 .El
 .Pp
 The



CVS commit: src/share/man/man9

2017-01-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 16 12:54:25 UTC 2017

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

Log Message:
Last Nm macro line must not end with a comma.


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

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

Modified files:

Index: src/share/man/man9/sockopt.9
diff -u src/share/man/man9/sockopt.9:1.9 src/share/man/man9/sockopt.9:1.10
--- src/share/man/man9/sockopt.9:1.9	Mon Jan 16 12:50:14 2017
+++ src/share/man/man9/sockopt.9	Mon Jan 16 12:54:25 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sockopt.9,v 1.9 2017/01/16 12:50:14 njoly Exp $
+.\"	$NetBSD: sockopt.9,v 1.10 2017/01/16 12:54:25 njoly Exp $
 .\"
 .\" Copyright (c) 2008 Iain Hibbert
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .Nm sockopt_get ,
 .Nm sockopt_getint ,
 .Nm sockopt_set ,
-.Nm sockopt_setint ,
+.Nm sockopt_setint
 .Nd socket options handling
 .Sh SYNOPSIS
 .In sys/socketvar.h



CVS commit: src/share/man/man9

2017-01-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 16 12:50:14 UTC 2017

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

Log Message:
Add missing comma in NAME section.


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

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

Modified files:

Index: src/share/man/man9/sockopt.9
diff -u src/share/man/man9/sockopt.9:1.8 src/share/man/man9/sockopt.9:1.9
--- src/share/man/man9/sockopt.9:1.8	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/sockopt.9	Mon Jan 16 12:50:14 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sockopt.9,v 1.8 2010/12/02 12:54:13 wiz Exp $
+.\"	$NetBSD: sockopt.9,v 1.9 2017/01/16 12:50:14 njoly Exp $
 .\"
 .\" Copyright (c) 2008 Iain Hibbert
 .\" All rights reserved.
@@ -30,7 +30,7 @@
 .Nm sockopt_init ,
 .Nm sockopt_destroy ,
 .Nm sockopt_get ,
-.Nm sockopt_getint
+.Nm sockopt_getint ,
 .Nm sockopt_set ,
 .Nm sockopt_setint ,
 .Nd socket options handling



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

2016-11-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 26 11:36:38 UTC 2016

Modified Files:
src/distrib/sets/lists/debug: shl.mi

Log Message:
+librumpnet_vlan.so.0.0.debug


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.150 src/distrib/sets/lists/debug/shl.mi:1.151
--- src/distrib/sets/lists/debug/shl.mi:1.150	Tue Nov  1 14:04:49 2016
+++ src/distrib/sets/lists/debug/shl.mi	Sat Nov 26 11:36:38 2016
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.150 2016/11/01 14:04:49 christos Exp $
+# $NetBSD: shl.mi,v 1.151 2016/11/26 11:36:38 njoly Exp $
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libc.so.12.205.debug			comp-sys-debug	debug,dynamicroot
@@ -252,6 +252,7 @@
 ./usr/libdata/debug/usr/lib/librumpnet_tap.so.0.0.debug		comp-rump-debug	debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_tun.so.0.0.debug		comp-rump-debug	debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_virtif.so.0.0.debug	comp-rump-debug	debug,rump
+./usr/libdata/debug/usr/lib/librumpnet_vlan.so.0.0.debug	comp-rump-debug	debug,rump
 ./usr/libdata/debug/usr/lib/librumpuser.so.0.1.debug		comp-rump-debug	debug,compatfile,rump
 ./usr/libdata/debug/usr/lib/librumpvfs.so.0.0.debug		comp-rump-debug	debug,compatfile,rump
 ./usr/libdata/debug/usr/lib/librumpvfs_aio.so.0.0.debug		comp-rump-debug	debug,rump



CVS commit: src/sys/rump/net/lib/libvlan

2016-11-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 26 11:20:09 UTC 2016

Modified Files:
src/sys/rump/net/lib/libvlan: Makefile

Log Message:
Fix NetBSD keyword expansion.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libvlan/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/net/lib/libvlan/Makefile
diff -u src/sys/rump/net/lib/libvlan/Makefile:1.1 src/sys/rump/net/lib/libvlan/Makefile:1.2
--- src/sys/rump/net/lib/libvlan/Makefile:1.1	Sat Nov 26 03:17:58 2016
+++ src/sys/rump/net/lib/libvlan/Makefile	Sat Nov 26 11:20:09 2016
@@ -1,4 +1,4 @@
-#	$NetBSD $
+#	$NetBSD: Makefile,v 1.2 2016/11/26 11:20:09 njoly Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../net



CVS commit: src/sys/net

2016-11-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 19 14:44:00 UTC 2016

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

Log Message:
Make fstat(2) work on AF_LINK socket descriptors.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/net/link_proto.c

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

Modified files:

Index: src/sys/net/link_proto.c
diff -u src/sys/net/link_proto.c:1.31 src/sys/net/link_proto.c:1.32
--- src/sys/net/link_proto.c:1.31	Thu Jul  7 09:32:02 2016
+++ src/sys/net/link_proto.c	Sat Nov 19 14:44:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: link_proto.c,v 1.31 2016/07/07 09:32:02 ozaki-r Exp $	*/
+/*	$NetBSD: link_proto.c,v 1.32 2016/11/19 14:44:00 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.31 2016/07/07 09:32:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.32 2016/11/19 14:44:00 njoly Exp $");
 
 #include 
 #include 
@@ -337,7 +337,7 @@ link_stat(struct socket *so, struct stat
 {
 	KASSERT(solocked(so));
 
-	return EOPNOTSUPP;
+	return 0;
 }
 
 static int



CVS commit: src/sys/kern

2016-11-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Nov 11 15:29:37 UTC 2016

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

Log Message:
Adjust clock_nanosleep(2) to not copyout remaining time struct if
TIMER_ABSTIME flag is set.

Ok Christos.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/kern/kern_time.c

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

Modified files:

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.188 src/sys/kern/kern_time.c:1.189
--- src/sys/kern/kern_time.c:1.188	Thu Jul  7 06:55:43 2016
+++ src/sys/kern/kern_time.c	Fri Nov 11 15:29:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.188 2016/07/07 06:55:43 msaitoh Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.189 2016/11/11 15:29:36 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.188 2016/07/07 06:55:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.189 2016/11/11 15:29:36 njoly Exp $");
 
 #include 
 #include 
@@ -319,7 +319,8 @@ sys_clock_nanosleep(struct lwp *l, const
 	if (SCARG(uap, rmtp) == NULL || (error != 0 && error != EINTR))
 		goto out;
 
-	if ((error1 = copyout(, SCARG(uap, rmtp), sizeof(rmt))) != 0)
+	if ((SCARG(uap, flags) & TIMER_ABSTIME) == 0 &&
+	(error1 = copyout(, SCARG(uap, rmtp), sizeof(rmt))) != 0)
 		error = error1;
 out:
 	*retval = error;



CVS commit: src

2016-11-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Nov 11 15:30:44 UTC 2016

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/sys: Makefile
Added Files:
src/tests/lib/libc/sys: t_clock_nanosleep.c

Log Message:
New clock_nanosleep(2) testcase.


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.698 -r1.699 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.44 -r1.45 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_clock_nanosleep.c

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.175 src/distrib/sets/lists/debug/mi:1.176
--- src/distrib/sets/lists/debug/mi:1.175	Fri Nov 11 07:39:58 2016
+++ src/distrib/sets/lists/debug/mi	Fri Nov 11 15:30:44 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.175 2016/11/11 07:39:58 alnsn Exp $
+# $NetBSD: mi,v 1.176 2016/11/11 15:30:44 njoly Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2014,6 +2014,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_cerror.debug		tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_chroot.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_clock_gettime.debug	tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_clock_nanosleep.debug	tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_clone.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_connect.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_context.debug		tests-obsolete		obsolete,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.698 src/distrib/sets/lists/tests/mi:1.699
--- src/distrib/sets/lists/tests/mi:1.698	Fri Nov 11 07:39:58 2016
+++ src/distrib/sets/lists/tests/mi	Fri Nov 11 15:30:44 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.698 2016/11/11 07:39:58 alnsn Exp $
+# $NetBSD: mi,v 1.699 2016/11/11 15:30:44 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2685,6 +2685,7 @@
 ./usr/tests/lib/libc/sys/t_cerror		tests-obsolete		obsolete
 ./usr/tests/lib/libc/sys/t_chroot		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_clock_gettime	tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libc/sys/t_clock_nanosleep	tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_clone		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_connect		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_context		tests-obsolete		obsolete

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.44 src/tests/lib/libc/sys/Makefile:1.45
--- src/tests/lib/libc/sys/Makefile:1.44	Sun Nov  6 15:04:14 2016
+++ src/tests/lib/libc/sys/Makefile	Fri Nov 11 15:30:44 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2016/11/06 15:04:14 kamil Exp $
+# $NetBSD: Makefile,v 1.45 2016/11/11 15:30:44 njoly Exp $
 
 MKMAN=	no
 
@@ -12,6 +12,7 @@ TESTS_C+=		t_access
 TESTS_C+=		t_bind
 TESTS_C+=		t_chroot
 TESTS_C+=		t_clock_gettime
+TESTS_C+=		t_clock_nanosleep
 TESTS_C+=		t_clone
 TESTS_C+=		t_connect
 TESTS_C+=		t_dup

Added files:

Index: src/tests/lib/libc/sys/t_clock_nanosleep.c
diff -u /dev/null src/tests/lib/libc/sys/t_clock_nanosleep.c:1.1
--- /dev/null	Fri Nov 11 15:30:44 2016
+++ src/tests/lib/libc/sys/t_clock_nanosleep.c	Fri Nov 11 15:30:44 2016
@@ -0,0 +1,63 @@
+/* $NetBSD: t_clock_nanosleep.c,v 1.1 2016/11/11 15:30:44 njoly Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 

CVS commit: src/lib/librt

2016-09-15 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Sep 15 07:53:59 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Fix function name macro.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librt/sched.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/librt/sched.3
diff -u src/lib/librt/sched.3:1.17 src/lib/librt/sched.3:1.18
--- src/lib/librt/sched.3:1.17	Fri Aug  5 13:03:13 2016
+++ src/lib/librt/sched.3	Thu Sep 15 07:53:59 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.17 2016/08/05 13:03:13 christos Exp $
+.\"	$NetBSD: sched.3,v 1.18 2016/09/15 07:53:59 njoly Exp $
 .\"
 .\" Copyright (c) 2008, 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,9 +64,9 @@
 .Ft int
 .Fn sched_yield "void"
 .Ft int
-.fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
 .Ft int
-.fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
 .Ft int
 .Fn sched_protect "int priority"
 .Sh DESCRIPTION



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

2016-08-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Aug 31 08:12:44 UTC 2016

Modified Files:
src/sys/compat/linux/common: linux_misc.c linux_misc.h

Log Message:
Teach wait4 about WCONTINUED.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/linux/common/linux_misc.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/compat/linux/common/linux_misc.c
diff -u src/sys/compat/linux/common/linux_misc.c:1.231 src/sys/compat/linux/common/linux_misc.c:1.232
--- src/sys/compat/linux/common/linux_misc.c:1.231	Sat Mar 14 08:32:08 2015
+++ src/sys/compat/linux/common/linux_misc.c	Wed Aug 31 08:12:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $	*/
+/*	$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $");
 
 #include 
 #include 
@@ -231,6 +231,8 @@ linux_sys_wait4(struct lwp *l, const str
 		options |= WNOHANG;
 	if (linux_options & LINUX_WAIT4_WUNTRACED)
 		options |= WUNTRACED;
+	if (linux_options & LINUX_WAIT4_WCONTINUED)
+		options |= WCONTINUED;
 	if (linux_options & LINUX_WAIT4_WALL)
 		options |= WALLSIG;
 	if (linux_options & LINUX_WAIT4_WCLONE)

Index: src/sys/compat/linux/common/linux_misc.h
diff -u src/sys/compat/linux/common/linux_misc.h:1.24 src/sys/compat/linux/common/linux_misc.h:1.25
--- src/sys/compat/linux/common/linux_misc.h:1.24	Mon Nov 18 01:32:52 2013
+++ src/sys/compat/linux/common/linux_misc.h	Wed Aug 31 08:12:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc.h,v 1.24 2013/11/18 01:32:52 chs Exp $	*/
+/*	$NetBSD: linux_misc.h,v 1.25 2016/08/31 08:12:44 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,14 +35,16 @@
 /*
  * Options passed to the Linux wait4() system call.
  */
-#define LINUX_WAIT4_WNOHANG   0x0001
-#define LINUX_WAIT4_WUNTRACED 0x0002
-#define LINUX_WAIT4_WNOTHREAD 0x2000
-#define LINUX_WAIT4_WALL  0x4000
-#define LINUX_WAIT4_WCLONE0x8000
+#define LINUX_WAIT4_WNOHANG	0x0001
+#define LINUX_WAIT4_WUNTRACED	0x0002
+#define LINUX_WAIT4_WCONTINUED	0x0008
+#define LINUX_WAIT4_WNOTHREAD	0x2000
+#define LINUX_WAIT4_WALL	0x4000
+#define LINUX_WAIT4_WCLONE	0x8000
 
 #define LINUX_WAIT4_KNOWNFLAGS (LINUX_WAIT4_WNOHANG | \
 LINUX_WAIT4_WUNTRACED | \
+LINUX_WAIT4_WCONTINUED | \
 LINUX_WAIT4_WNOTHREAD | \
 LINUX_WAIT4_WALL | \
 LINUX_WAIT4_WCLONE)



CVS commit: src/lib/libc/sys

2016-07-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 30 11:10:40 UTC 2016

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

Log Message:
Remove obsolete BUGS section. getsockname(2) report sensible values
for bound UNIX domain sockets.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/getsockname.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/getsockname.2
diff -u src/lib/libc/sys/getsockname.2:1.24 src/lib/libc/sys/getsockname.2:1.25
--- src/lib/libc/sys/getsockname.2:1.24	Mon Jul  9 21:22:21 2012
+++ src/lib/libc/sys/getsockname.2	Sat Jul 30 11:10:40 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getsockname.2,v 1.24 2012/07/09 21:22:21 jdf Exp $
+.\"	$NetBSD: getsockname.2,v 1.25 2016/07/30 11:10:40 njoly Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)getsockname.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd July 9, 2012
+.Dd July 30, 2016
 .Dt GETSOCKNAME 2
 .Os
 .Sh NAME
@@ -149,9 +149,3 @@ The
 .Fn getsockname
 function call appeared in
 .Bx 4.2 .
-.Sh BUGS
-Names bound to sockets in the
-.Ux
-domain are inaccessible;
-.Fn getsockname
-returns a zero length name.



CVS commit: src

2016-07-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 30 11:03:54 UTC 2016

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/sys: Makefile
Added Files:
src/tests/lib/libc/sys: t_getsockname.c

Log Message:
New getsockname(2) testcase for UNIX domain sockets.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.679 -r1.680 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.42 -r1.43 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_getsockname.c

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.160 src/distrib/sets/lists/debug/mi:1.161
--- src/distrib/sets/lists/debug/mi:1.160	Sat Jul  2 15:40:51 2016
+++ src/distrib/sets/lists/debug/mi	Sat Jul 30 11:03:54 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.160 2016/07/02 15:40:51 christos Exp $
+# $NetBSD: mi,v 1.161 2016/07/30 11:03:54 njoly Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2007,6 +2007,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getpid.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getrusage.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getsid.debug		tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_getsockname.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_gettimeofday.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_issetugid.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_kevent.debug		tests-lib-debug		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.679 src/distrib/sets/lists/tests/mi:1.680
--- src/distrib/sets/lists/tests/mi:1.679	Fri Jul 29 07:02:24 2016
+++ src/distrib/sets/lists/tests/mi	Sat Jul 30 11:03:54 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.679 2016/07/29 07:02:24 pgoyette Exp $
+# $NetBSD: mi,v 1.680 2016/07/30 11:03:54 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2682,6 +2682,7 @@
 ./usr/tests/lib/libc/sys/t_getpid		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_getrusage		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_getsid		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libc/sys/t_getsockname		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_gettimeofday		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_issetugid		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/sys/t_kevent		tests-lib-tests		compattestfile,atf

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.42 src/tests/lib/libc/sys/Makefile:1.43
--- src/tests/lib/libc/sys/Makefile:1.42	Wed Apr  6 00:45:53 2016
+++ src/tests/lib/libc/sys/Makefile	Sat Jul 30 11:03:54 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2016/04/06 00:45:53 christos Exp $
+# $NetBSD: Makefile,v 1.43 2016/07/30 11:03:54 njoly Exp $
 
 MKMAN=	no
 
@@ -23,6 +23,7 @@ TESTS_C+=		t_getlogin
 TESTS_C+=		t_getpid
 TESTS_C+=		t_getrusage
 TESTS_C+=		t_getsid
+TESTS_C+=		t_getsockname
 TESTS_C+=		t_gettimeofday
 TESTS_C+=		t_issetugid
 TESTS_C+=		t_kevent

Added files:

Index: src/tests/lib/libc/sys/t_getsockname.c
diff -u /dev/null src/tests/lib/libc/sys/t_getsockname.c:1.1
--- /dev/null	Sat Jul 30 11:03:55 2016
+++ src/tests/lib/libc/sys/t_getsockname.c	Sat Jul 30 11:03:54 2016
@@ -0,0 +1,82 @@
+/*	$NetBSD: t_getsockname.c,v 1.1 2016/07/30 11:03:54 njoly Exp $	*/
+/*
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
+ * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 

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

2016-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Jul 24 13:23:25 UTC 2016

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/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for readlink/readlinkat signatures.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.97 -r1.98 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.99 -r1.100 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.68 -r1.69 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.1 -r1.2 src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.107 -r1.108 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.97 -r1.98 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.96 -r1.97 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.65 -r1.66 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
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.74 -r1.75 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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.98 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.99
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.98	Sun Oct 25 15:55:58 2015
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sun Jul 24 13:23:25 2016
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.98 2015/10/25 15:55:58 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.99 2016/07/24 13:23:25 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -111,7 +111,7 @@
 /* syscall: "symlink" ret: "int" args: "const char *" "const char *" */
 #define	LINUX_SYS_symlink	57
 
-/* syscall: "readlink" ret: "int" args: "const char *" "char *" "int" */
+/* syscall: "readlink" ret: "ssize_t" args: "const char *" "char *" "int" */
 #define	LINUX_SYS_readlink	58
 
 /* syscall: "execve" ret: "int" args: "const char *" "char **" "char **" */
@@ -630,7 +630,7 @@
 /* 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" */
+/* syscall: "readlinkat" ret: "ssize_t" args: "int" "const char *" "char *" "size_t" */
 #define	LINUX_SYS_readlinkat	460
 
 /* syscall: "fchmodat" ret: "int" args: "int" "const char *" "linux_umode_t" */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.98 

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

2016-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Jul 24 13:22:01 UTC 2016

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

Log Message:
Small cleanup. Adjust readlink/readlinkat signatures to reduce diffs with
native.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/arch/powerpc/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.90 src/sys/compat/linux/arch/alpha/syscalls.master:1.91
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.90	Sun Oct 25 15:55:05 2015
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp $
+	$NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -155,7 +155,7 @@
 55	UNIMPL
 56	UNIMPL
 57	NOARGS		{ int|sys||symlink(const char *path, const char *to); }
-58	NOARGS		{ int|sys||readlink(const char *name, char *buf, \
+58	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 59	NOARGS		{ int|sys||execve(const char *path, char **argp, \
 			char **envp); }
@@ -725,7 +725,7 @@
 			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, \
+460	NOARGS		{ ssize_t|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); }

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.56 src/sys/compat/linux/arch/amd64/syscalls.master:1.57
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.56	Tue Oct 27 07:15:38 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp $
+	$NetBSD: syscalls.master,v 1.57 2016/07/24 13:22:01 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -235,7 +235,7 @@
 86	NOARGS		{ int|sys||link(const char *path, const char *link); }
 87	STD		{ int|linux_sys||unlink(const char *path); }
 88	NOARGS		{ int|sys||symlink(const char *path, const char *link); }
-89	NOARGS		{ int|sys||readlink(const char *path, char *buf, \
+89	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 90	NOARGS		{ int|sys||chmod(const char *path, linux_umode_t mode); }
 91	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
@@ -483,7 +483,7 @@
 			int fd2, const char *name2, int flags); }
 266	NOARGS		{ int|sys||symlinkat(const char *path1, int fd, \
 			const char *path2); }
-267	NOARGS		{ int|sys||readlinkat(int fd, const char *path, \
+267	NOARGS		{ ssize_t|sys||readlinkat(int fd, const char *path, \
 			char *buf, size_t bufsize); }
 268	STD		{ int|linux_sys||fchmodat(int fd, const char *path, \
 			linux_umode_t mode); }

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.63 src/sys/compat/linux/arch/arm/syscalls.master:1.64
--- src/sys/compat/linux/arch/arm/syscalls.master:1.63	Mon Mar 23 07:50:03 2015
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sun Jul 24 13:22:01 2016
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.63 2015/03/23 07:50:03 ozaki-r Exp $
+	$NetBSD: syscalls.master,v 1.64 2016/07/24 13:22:01 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -164,7 +164,7 @@
 83	NOARGS		{ int|sys||symlink(const char *path, const char *link); }
 84	NOARGS		{ int|compat_43_sys||lstat(const char *path, \
 			struct stat43 *ub); } oolstat
-85	NOARGS		{ int|sys||readlink(const char *path, char *buf, \
+85	NOARGS		{ ssize_t|sys||readlink(const char *path, char *buf, \
 			int count); }
 #ifdef EXEC_AOUT
 86	STD		{ 

CVS commit: src

2016-07-21 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Jul 21 16:01:59 UTC 2016

Modified Files:
src/include: limits.h
src/sys/sys: unistd.h

Log Message:
According to Opengroup online specifications[1], _POSIX_CPUTIME and
_POSIX_THREAD_CPUTIME options should be present in unistd.h not
limits.h. Move them with other options.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/include/limits.h
cvs rdiff -u -r1.59 -r1.60 src/sys/sys/unistd.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/limits.h
diff -u src/include/limits.h:1.38 src/include/limits.h:1.39
--- src/include/limits.h:1.38	Fri Jun 10 23:29:20 2016
+++ src/include/limits.h	Thu Jul 21 16:01:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.38 2016/06/10 23:29:20 christos Exp $	*/
+/*	$NetBSD: limits.h,v 1.39 2016/07/21 16:01:58 njoly Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -94,8 +94,6 @@
 
 #define	_POSIX_TIMER_MAX	32
 #define	_POSIX_SEM_NSEMS_MAX	256
-#define	_POSIX_CPUTIME		200112L
-#define	_POSIX_THREAD_CPUTIME	200112L
 #define	_POSIX_DELAYTIMER_MAX	32
 #define	_POSIX_TTY_NAME_MAX	9
 #define	_POSIX_TZNAME_MAX	6

Index: src/sys/sys/unistd.h
diff -u src/sys/sys/unistd.h:1.59 src/sys/sys/unistd.h:1.60
--- src/sys/sys/unistd.h:1.59	Sun Jul  3 14:24:59 2016
+++ src/sys/sys/unistd.h	Thu Jul 21 16:01:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.59 2016/07/03 14:24:59 christos Exp $	*/
+/*	$NetBSD: unistd.h,v 1.60 2016/07/21 16:01:59 njoly Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -93,6 +93,8 @@
 #define	_POSIX_CHOWN_RESTRICTED		1
 	/* clock selection */
 #define	_POSIX_CLOCK_SELECTION		-1
+	/* cputime clock */
+#define	_POSIX_CPUTIME			200112L
 	/* CPU type */
 #undef	_POSIX_CPUTYPE
 	/* file synchronization is available */
@@ -145,6 +147,8 @@
 #define	_POSIX_THREAD_ATTR_STACKSIZE	200112L
 	/* pthread_attr for stack address */
 #define	_POSIX_THREAD_ATTR_STACKADDR	200112L
+	/* thread cputime clock */
+#define	_POSIX_THREAD_CPUTIME		200112L
 	/* _r functions */
 #define	_POSIX_THREAD_PRIO_PROTECT	200112L
 	/* PTHREAD_PRIO_PROTECT */



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

2016-07-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jul 13 09:53:16 UTC 2016

Modified Files:
src/tests/lib/libc/sys: t_setrlimit.c

Log Message:
Add testcase that ensure that stack hard limit is never smaller than
soft limit.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_setrlimit.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_setrlimit.c
diff -u src/tests/lib/libc/sys/t_setrlimit.c:1.4 src/tests/lib/libc/sys/t_setrlimit.c:1.5
--- src/tests/lib/libc/sys/t_setrlimit.c:1.4	Tue Jun 12 23:56:19 2012
+++ src/tests/lib/libc/sys/t_setrlimit.c	Wed Jul 13 09:53:16 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.4 2012/06/12 23:56:19 christos Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_setrlimit.c,v 1.4 2012/06/12 23:56:19 christos Exp $");
+__RCSID("$NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $");
 
 #include 
 #include 
@@ -504,6 +504,25 @@ ATF_TC_BODY(setrlimit_perm, tc)
 	}
 }
 
+ATF_TC(setrlimit_stack);
+ATF_TC_HEAD(setrlimit_stack, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test setrlimit(2), RLIMIT_STACK");
+	atf_tc_set_md_var(tc, "require.user", "unprivileged");
+}
+
+ATF_TC_BODY(setrlimit_stack, tc)
+{
+	struct rlimit res;
+
+	/* Ensure soft limit is not bigger than hard limit */
+	res.rlim_cur = res.rlim_max = 4192256;
+	ATF_REQUIRE(setrlimit(RLIMIT_STACK, ) == 0);
+	ATF_REQUIRE(getrlimit(RLIMIT_STACK, ) == 0);
+	ATF_CHECK(res.rlim_cur <= res.rlim_max);
+
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
@@ -517,6 +536,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, setrlimit_nproc);
 	ATF_TP_ADD_TC(tp, setrlimit_perm);
 	ATF_TP_ADD_TC(tp, setrlimit_nthr);
+	ATF_TP_ADD_TC(tp, setrlimit_stack);
 
 	return atf_no_error();
 }



CVS commit: src/sys/kern

2016-07-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jul 13 09:52:00 UTC 2016

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

Log Message:
In dosetrlimit() round stack hard limit just like soft one.
Avoid cases where hard limit becomes smaller than soft limit.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/kern/kern_resource.c

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

Modified files:

Index: src/sys/kern/kern_resource.c
diff -u src/sys/kern/kern_resource.c:1.174 src/sys/kern/kern_resource.c:1.175
--- src/sys/kern/kern_resource.c:1.174	Sat Oct 18 08:33:29 2014
+++ src/sys/kern/kern_resource.c	Wed Jul 13 09:52:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_resource.c,v 1.174 2014/10/18 08:33:29 snj Exp $	*/
+/*	$NetBSD: kern_resource.c,v 1.175 2016/07/13 09:52:00 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.174 2014/10/18 08:33:29 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.175 2016/07/13 09:52:00 njoly Exp $");
 
 #include 
 #include 
@@ -404,6 +404,7 @@ dosetrlimit(struct lwp *l, struct proc *
 		 * overlap).  If stack limit is going up make more
 		 * accessible, if going down make inaccessible.
 		 */
+		limp->rlim_max = round_page(limp->rlim_max);
 		limp->rlim_cur = round_page(limp->rlim_cur);
 		if (limp->rlim_cur != alimp->rlim_cur) {
 			vaddr_t addr;



CVS commit: src/sys/compat/netbsd32

2015-10-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 31 17:04:39 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_time.c

Log Message:
Adjust compat netbsd32 clock_nanosleep(2) to match recent native
changes that return error number.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/netbsd32/netbsd32_time.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_time.c
diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.45 src/sys/compat/netbsd32/netbsd32_time.c:1.46
--- src/sys/compat/netbsd32/netbsd32_time.c:1.45	Wed Jul 22 14:06:26 2015
+++ src/sys/compat/netbsd32/netbsd32_time.c	Sat Oct 31 17:04:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_time.c,v 1.45 2015/07/22 14:06:26 maxv Exp $	*/
+/*	$NetBSD: netbsd32_time.c,v 1.46 2015/10/31 17:04:39 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.45 2015/07/22 14:06:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.46 2015/10/31 17:04:39 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -433,8 +433,8 @@ int
 netbsd32_clock_nanosleep(struct lwp *l, const struct netbsd32_clock_nanosleep_args *uap, register_t *retval)
 {
 	/* {
-		clockid_t clock_id;
-		int flags;
+		syscallarg(clockid_t) clock_id;
+		syscallarg(int) flags;
 		syscallarg(const netbsd32_timespecp_t) rqtp;
 		syscallarg(netbsd32_timespecp_t) rmtp;
 	} */
@@ -444,17 +444,20 @@ netbsd32_clock_nanosleep(struct lwp *l, 
 
 	error = copyin(SCARG_P32(uap, rqtp), , sizeof(ts32));
 	if (error)
-		return (error);
+		goto out;
 	netbsd32_to_timespec(, );
 
 	error = nanosleep1(l, SCARG(uap, clock_id), SCARG(uap, flags),
 	, SCARG_P32(uap, rmtp) ?  : NULL);
 	if (SCARG_P32(uap, rmtp) == NULL || (error != 0 && error != EINTR))
-		return error;
+		goto out;
 
 	netbsd32_from_timespec(, );
-	error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32));
-	return error1 ? error1 : error;
+	if ((error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0)
+		error = error1;
+out:
+	*retval = error;
+	return 0;
 }
 
 static int



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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 07:16:00 UTC 2015

Modified Files:
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/compat/linux/arch/amd64/linux_systrace_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/sys/compat/linux/arch/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Tue Oct 27 07:16:00 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -333,10 +333,10 @@
 /* syscall: "getgid" ret: "gid_t" args: */
 #define	LINUX_SYS_getgid	104
 
-/* syscall: "setuid" ret: "void" args: "uid_t" */
+/* syscall: "setuid" ret: "int" args: "uid_t" */
 #define	LINUX_SYS_setuid	105
 
-/* syscall: "setgid" ret: "void" args: "gid_t" */
+/* syscall: "setgid" ret: "int" args: "gid_t" */
 #define	LINUX_SYS_setgid	106
 
 /* syscall: "geteuid" ret: "uid_t" args: */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Tue Oct 27 07:16:00 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.59
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Tue Oct 27 07:16:00 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.59
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58	Thu Sep 24 14:42:45 2015
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Tue Oct 27 07:16:00 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"

Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.4
--- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3	Thu Sep 24 

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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 07:15:38 UTC 2015

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

Log Message:
Fix setuid/setgid return type (void -> int) to match native.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/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/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.55 src/sys/compat/linux/arch/amd64/syscalls.master:1.56
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.55	Sun May 31 10:49:27 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Tue Oct 27 07:15:38 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp $
+	$NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -259,8 +259,8 @@
 102	NOARGS		{ uid_t|sys||getuid(void); }
 103	UNIMPL		syslog
 104	NOARGS		{ gid_t|sys||getgid(void); }
-105	NOARGS		{ void|sys||setuid(uid_t uid); }
-106	NOARGS		{ void|sys||setgid(gid_t gid); }
+105	NOARGS		{ int|sys||setuid(uid_t uid); }
+106	NOARGS		{ int|sys||setgid(gid_t gid); }
 107	NOARGS		{ uid_t|sys||geteuid(void); }
 108	NOARGS		{ gid_t|sys||getegid(void); }
 109	NOARGS		{ int|sys||setpgid(int pid, int pgid); }



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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 06:30:10 UTC 2015

Modified Files:
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: 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.65 -r1.66 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.64 -r1.65 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
cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.73 -r1.74 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/mips/linux_syscall.h
diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.65 src/sys/compat/linux/arch/mips/linux_syscall.h:1.66
--- src/sys/compat/linux/arch/mips/linux_syscall.h:1.65	Sun Oct 25 15:55:58 2015
+++ src/sys/compat/linux/arch/mips/linux_syscall.h	Tue Oct 27 06:30:10 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.65 2015/10/25 15:55:58 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.66 2015/10/27 06:30:10 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp  
+ * created from	NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -253,7 +253,7 @@
 /* syscall: "fchmod" ret: "int" args: "int" "linux_umode_t" */
 #define	LINUX_SYS_fchmod	94
 
-/* syscall: "__posix_fchown" ret: "int" args: "int" "uid_t" "uid_t" */
+/* syscall: "__posix_fchown" ret: "int" args: "int" "uid_t" "gid_t" */
 #define	LINUX_SYS___posix_fchown	95
 
 /* syscall: "getpriority" ret: "int" args: "int" "int" */

Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.64 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.65
--- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.64	Sun Oct 25 15:55:58 2015
+++ src/sys/compat/linux/arch/mips/linux_syscallargs.h	Tue Oct 27 06:30:10 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.64 2015/10/25 15:55:58 njoly Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.65 2015/10/27 06:30:10 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp  
+ * created from	NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp  
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/mips/linux_syscalls.c
diff -u src/sys/compat/linux/arch/mips/linux_syscalls.c:1.64 src/sys/compat/linux/arch/mips/linux_syscalls.c:1.65
--- src/sys/compat/linux/arch/mips/linux_syscalls.c:1.64	Sun Oct 25 15:55:58 2015
+++ src/sys/compat/linux/arch/mips/linux_syscalls.c	Tue Oct 27 06:30:10 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.64 2015/10/25 15:55:58 njoly Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.65 2015/10/27 06:30:10 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp  
+ * created from	NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp  
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.64 2015/10/25 15:55:58 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.65 2015/10/27 06:30:10 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
@@ -25,6 +25,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal
 #include 
 #include 
 #define linux_sys_mmap2_args linux_sys_mmap_args
+#else /* _KERNEL_OPT */
+#include 
 #endif /* _KERNEL_OPT */
 
 const char *const linux_syscallnames[] = {
@@ -541,3 +543,520 @@ const char *const linux_syscallnames[] =
 	/* 510 */	"# filler",
 	/* 511 */	"# filler",
 };
+
+
+/* libc style syscall names */
+const char *const altlinux_syscallnames[] = {
+	/*   0 */	"nosys",
+	/*   1 */	NULL, /* exit */
+	/*   2 */	NULL, /* fork */
+	/*   3 */	NULL, /* read */
+	/*   4 */	NULL, /* write */
+	/*   5 */	NULL, /* open */
+	/*   6 */	NULL, /* close */
+	/*   7 */	NULL, /* waitpid */
+	/*   8 */	NULL, /* creat */
+	/*   9 */	NULL, /* link */
+	/*  10 */	NULL, /* unlink */
+	/*  11 */	NULL, /* execve */
+	/*  12 */	NULL, /* chdir */
+	/*  13 */	NULL, /* time */
+	/*  14 */	NULL, /* mknod */
+	/*  15 */	NULL, /* chmod */
+	/*  16 */	NULL, /* __posix_lchown */
+	/*  17 */	NULL, /* unimplemented */
+	/*  18 */	NULL, /* obsolete 

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

2015-10-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Oct 27 06:29:35 UTC 2015

Modified Files:
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Fix wrong gid types from previous.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/powerpc/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/mips/syscalls.master
diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.58 src/sys/compat/linux/arch/mips/syscalls.master:1.59
--- src/sys/compat/linux/arch/mips/syscalls.master:1.58	Sun Oct 25 15:55:05 2015
+++ src/sys/compat/linux/arch/mips/syscalls.master	Tue Oct 27 06:29:35 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp $  
+	$NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -181,7 +181,7 @@
 93	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); }
 94	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
 95 	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
-			uid_t gid); }
+			gid_t gid); }
 96	STD		{ int|linux_sys||getpriority(int which, int who); }
 97	NOARGS		{ int|sys||setpriority(int which, int who, int prio); }
 98	UNIMPL

Index: src/sys/compat/linux/arch/powerpc/syscalls.master
diff -u src/sys/compat/linux/arch/powerpc/syscalls.master:1.67 src/sys/compat/linux/arch/powerpc/syscalls.master:1.68
--- src/sys/compat/linux/arch/powerpc/syscalls.master:1.67	Sun Oct 25 15:55:05 2015
+++ src/sys/compat/linux/arch/powerpc/syscalls.master	Tue Oct 27 06:29:35 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.67 2015/10/25 15:55:05 njoly Exp $  
+	$NetBSD: syscalls.master,v 1.68 2015/10/27 06:29:35 njoly Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -209,7 +209,7 @@
 93	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); }
 94	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
 95	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
-			uid_t gid); }
+			gid_t gid); }
 96	STD		{ int|linux_sys||getpriority(int which, int who); }
 97	NOARGS		{ int|sys||setpriority(int which, int who, int prio); }
 98	NOARGS		{ int|sys||profil(void *samples, u_int size, \



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

2015-10-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Oct 25 15:55:05 UTC 2015

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

Log Message:
Cleanup posix chown family syscalls to match native (alpha, mips and
powerpc).


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/powerpc/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.89 src/sys/compat/linux/arch/alpha/syscalls.master:1.90
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.89	Sat Nov 22 13:18:45 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sun Oct 25 15:55:05 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp $
+	$NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -101,7 +101,8 @@
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
 			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
-16	NOARGS		{ int|sys||__posix_chown(const char *path, int uid, int gid); }
+16	NOARGS		{ int|sys||__posix_chown(const char *path, uid_t uid, \
+			gid_t gid); }
 ;17	ALIAS		osf1_sys_brk
 17	STD		{ int|linux_sys||brk(char *nsize); }
 18	UNIMPL
@@ -254,7 +255,8 @@
 int iovcnt); }
 122	NODEF		{ int|osf1_sys||settimeofday(struct osf1_timeval *tv, \
 			struct osf1_timezone *tzp); }
-123	NOARGS		{ int|sys||__posix_fchown(int fd, int uid, int gid); }
+123	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
+			gid_t gid); }
 124	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
 125	STD		{ int|linux_sys||recvfrom(int s, void *buf, int len, \
 int flags, struct osockaddr *from, \
@@ -380,7 +382,8 @@
 #endif
 ;207	ALIAS		osf1_sys_utsname
 207	STD		{ int|linux_sys||olduname(struct linux_old_utsname *up); }
-208	NOARGS		{ int|sys||__posix_lchown(const char *path, int uid, int gid); }
+208	NOARGS		{ int|sys||__posix_lchown(const char *path, uid_t uid, \
+			gid_t gid); }
 #ifdef SYSVSHM
 209	NOARGS		{ int|linux_sys||shmat(int shmid, void *shmaddr, \
 			int shmflg, u_long *raddr); }

Index: src/sys/compat/linux/arch/mips/syscalls.master
diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.57 src/sys/compat/linux/arch/mips/syscalls.master:1.58
--- src/sys/compat/linux/arch/mips/syscalls.master:1.57	Sat Nov 22 13:18:45 2014
+++ src/sys/compat/linux/arch/mips/syscalls.master	Sun Oct 25 15:55:05 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.57 2014/11/22 13:18:45 njoly Exp $  
+	$NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -77,8 +77,8 @@
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
 			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
-16	NOARGS		{ int|sys||__posix_lchown(const char *path, int uid, \
-			int gid); }
+16	NOARGS		{ int|sys||__posix_lchown(const char *path, uid_t uid, \
+			gid_t gid); }
 17	UNIMPL
 18	OBSOL		ostat
 19	NOARGS		{ long|compat_43_sys||lseek(int fd, long offset, \
@@ -180,7 +180,8 @@
 			long length); }
 93	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); }
 94	NOARGS		{ int|sys||fchmod(int fd, linux_umode_t mode); }
-95 	NOARGS		{ int|sys||__posix_fchown(int fd, int uid, int gid); }
+95 	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
+			uid_t gid); }
 96	STD		{ int|linux_sys||getpriority(int which, int who); }
 97	NOARGS		{ int|sys||setpriority(int which, int who, int prio); }
 98	UNIMPL
@@ -354,8 +355,8 @@
 			size_t nbyte, off_t offset); }
 201	STD		{ int|linux_sys||pwrite(int fd, char *buf, \
 			size_t nbyte, off_t offset); }
-202	NOARGS		{ int|sys||__posix_chown(const char *path, \
-			int uid, int gid); }
+202	NOARGS		{ int|sys||__posix_chown(const char *path, uid_t uid, \
+			gid_t gid); }
 203	NOARGS		{ int|sys||__getcwd(char *bufp, size_t length); }
 204	UNIMPL		capget
 205	UNIMPL		capset

Index: src/sys/compat/linux/arch/powerpc/syscalls.master
diff -u src/sys/compat/linux/arch/powerpc/syscalls.master:1.66 src/sys/compat/linux/arch/powerpc/syscalls.master:1.67
--- src/sys/compat/linux/arch/powerpc/syscalls.master:1.66	Sat Nov 22 13:18:45 2014
+++ src/sys/compat/linux/arch/powerpc/syscalls.master	Sun Oct 25 15:55:05 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.66 2014/11/22 13:18:45 njoly Exp $  
+	$NetBSD: syscalls.master,v 1.67 2015/10/25 15:55:05 njoly Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93

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

2015-10-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Oct 25 15:55:58 UTC 2015

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/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for posix chown family cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.96 -r1.97 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.98 -r1.99 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.63 -r1.64 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
cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.72 -r1.73 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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.97 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.98
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.97	Thu Sep 24 14:42:44 2015
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sun Oct 25 15:55:58 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.97 2015/09/24 14:42:44 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.98 2015/10/25 15:55:58 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -51,7 +51,7 @@
 /* syscall: "chmod" ret: "int" args: "const char *" "int" */
 #define	LINUX_SYS_chmod	15
 
-/* syscall: "__posix_chown" ret: "int" args: "const char *" "int" "int" */
+/* syscall: "__posix_chown" ret: "int" args: "const char *" "uid_t" "gid_t" */
 #define	LINUX_SYS___posix_chown	16
 
 /* syscall: "brk" ret: "int" args: "char *" */
@@ -231,7 +231,7 @@
 /* syscall: "writev" ret: "ssize_t" args: "int" "const struct iovec *" "int" */
 #define	LINUX_SYS_writev	121
 
-/* syscall: "__posix_fchown" ret: "int" args: "int" "int" "int" */
+/* syscall: "__posix_fchown" ret: "int" args: "int" "uid_t" "gid_t" */
 #define	LINUX_SYS___posix_fchown	123
 
 /* syscall: "fchmod" ret: "int" args: "int" "linux_umode_t" */
@@ -336,7 +336,7 @@
 /* syscall: "olduname" ret: "int" args: "struct linux_old_utsname *" */
 #define	LINUX_SYS_olduname	207
 
-/* syscall: "__posix_lchown" ret: "int" args: "const char *" "int" "int" */
+/* syscall: "__posix_lchown" ret: "int" args: "const char *" "uid_t" "gid_t" */
 #define	LINUX_SYS___posix_lchown	208
 
 #ifdef SYSVSHM
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.97 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.98
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.97	Thu Sep 24 14:42:44 2015
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Sun Oct 25 15:55:58 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.97 2015/09/24 14:42:44 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.98 2015/10/25 15:55:58 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.90 2015/10/25 15:55:05 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.97 2015/09/24 14:42:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.98 2015/10/25 15:55:58 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.96 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.97
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.96	Thu Sep 24 14:42:44 2015
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Sun Oct 25 15:55:58 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.96 2015/09/24 14:42:44 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.97 2015/10/25 15:55:58 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 

CVS commit: src/sys/compat/common

2015-07-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 11 07:43:32 UTC 2015

Modified Files:
src/sys/compat/common: if_43.c

Log Message:
Handle case where compat_ifioctl() is called with ocmd != cmd, as found in
compat Linux. Do not crash by ensuring that oifr is correctly set.

Fix crash reported by Robert Swindells on tech-kern@.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/compat/common/if_43.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/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.10 src/sys/compat/common/if_43.c:1.11
--- src/sys/compat/common/if_43.c:1.10	Tue May 12 20:42:46 2015
+++ src/sys/compat/common/if_43.c	Sat Jul 11 07:43:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.10 2015/05/12 20:42:46 christos Exp $	*/
+/*	$NetBSD: if_43.c,v 1.11 2015/07/11 07:43:32 njoly Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_43.c,v 1.10 2015/05/12 20:42:46 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_43.c,v 1.11 2015/07/11 07:43:32 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -231,11 +231,11 @@ compat_ifioctl(struct socket *so, u_long
 	 */
 	if (cmd == ocmd) {
 		cmd = compat_cvtcmd(ocmd);
-		if (cmd != ocmd) {
-			oifr = data;
-			data = ifr = ifrb;
-			ifreqo2n(oifr, ifr);
-		}
+	}
+	if (cmd != ocmd) {
+		oifr = data;
+		data = ifr = ifrb;
+		ifreqo2n(oifr, ifr);
 	}
 
 	switch (ocmd) {



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

2015-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 31 10:50:04 UTC 2015

Modified Files:
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c

Log Message:
Regen for write(2) size argument fix.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.1 -r1.2 \
src/sys/compat/linux/arch/amd64/linux_systrace_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/sys/compat/linux/arch/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.56 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Sun May 31 10:50:04 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -15,7 +15,7 @@
 /* syscall: read ret: ssize_t args: int void * size_t */
 #define	LINUX_SYS_read	0
 
-/* syscall: write ret: ssize_t args: int const void * int */
+/* syscall: write ret: ssize_t args: int const void * size_t */
 #define	LINUX_SYS_write	1
 
 /* syscall: open ret: int args: const char * int linux_umode_t */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.56 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Sun May 31 10:50:04 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.56 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.57
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Sun May 31 10:50:04 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_syscalls.c,v 1.56 2015/03/07 16:41:53 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_syscalls.c,v 1.57 2015/05/31 10:50:04 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.56 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.57
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.56	Sat Mar  7 16:41:53 2015
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Sun May 31 10:50:04 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.56 2015/03/07 16:41:53 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.57 2015/05/31 10:50:04 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.56 2015/03/07 16:41:53 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.57 2015/05/31 10:50:04 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -36,1070 +36,1928 @@ __KERNEL_RCSID(0, $NetBSD: linux_sysent
 
 #define	s(type)	sizeof(type)
 #define	n(type)	(sizeof(type)/sizeof (register_t))
-#define	ns(type)	n(type), s(type)
+#define	ns(type)	.sy_narg = n(type), .sy_argsize = s(type)
 
 struct sysent linux_sysent[] = {
-	{ 

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

2015-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 31 10:49:28 UTC 2015

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

Log Message:
Fix write(2) size argument (int - size_t).


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/linux/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/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.54 src/sys/compat/linux/arch/amd64/syscalls.master:1.55
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.54	Sat Mar  7 03:25:19 2015
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sun May 31 10:49:27 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.54 2015/03/07 03:25:19 christos Exp $
+	$NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -66,7 +66,7 @@
 
 0	NOARGS		{ ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
 1	NOARGS		{ ssize_t|sys||write(int fd, const void *buf, \
-			int nbyte); }
+			size_t nbyte); }
 2	STD		{ int|linux_sys||open(const char *path, int flags, \
 			linux_umode_t mode); }
 3	NOARGS		{ int|sys||close(int fd); }



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

2015-04-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Apr 16 15:17:17 UTC 2015

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

Log Message:
Always output 2 digits for the cpu frequency decimal part.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/procfs_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/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.6 src/sys/arch/x86/x86/procfs_machdep.c:1.7
--- src/sys/arch/x86/x86/procfs_machdep.c:1.6	Sat Apr  5 18:43:09 2014
+++ src/sys/arch/x86/x86/procfs_machdep.c	Thu Apr 16 15:17:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.6 2014/04/05 18:43:09 christos Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.7 2015/04/16 15:17:17 njoly Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.6 2014/04/05 18:43:09 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.7 2015/04/16 15:17:17 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -196,7 +196,7 @@ procfs_getonecpu(int xcpu, struct cpu_in
 
 		freq = (ci-ci_data.cpu_cc_freq + 4999) / 100;
 		fraq = ((ci-ci_data.cpu_cc_freq + 4999) / 1) % 100;
-		l = snprintf(p, left, cpu MHz\t\t: % PRIu64 .% PRIu64 \n,
+		l = snprintf(p, left, cpu MHz\t\t: % PRIu64 .%02 PRIu64 \n,
 		freq, fraq);
 	} else
 		l = snprintf(p, left, cpu MHz\t\t: unknown\n);



CVS commit: src/sys/compat/linux

2015-03-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Mar 14 08:32:08 UTC 2015

Modified Files:
src/sys/compat/linux/arch/alpha: linux_mmap.h
src/sys/compat/linux/arch/amd64: linux_mmap.h
src/sys/compat/linux/arch/arm: linux_mmap.h
src/sys/compat/linux/arch/i386: linux_mmap.h
src/sys/compat/linux/arch/m68k: linux_mmap.h
src/sys/compat/linux/arch/mips: linux_mmap.h
src/sys/compat/linux/arch/powerpc: linux_mmap.h
src/sys/compat/linux/arch/sparc: linux_mmap.h
src/sys/compat/linux/common: linux_misc.c

Log Message:
Support Linux MAP_LOCKED mmap flag.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/alpha/linux_mmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux/arch/amd64/linux_mmap.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/arm/linux_mmap.h
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/i386/linux_mmap.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/m68k/linux_mmap.h
cvs rdiff -u -r1.8 -r1.9 src/sys/compat/linux/arch/mips/linux_mmap.h
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/arch/powerpc/linux_mmap.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/sparc/linux_mmap.h
cvs rdiff -u -r1.230 -r1.231 src/sys/compat/linux/common/linux_misc.c

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

Modified files:

Index: src/sys/compat/linux/arch/alpha/linux_mmap.h
diff -u src/sys/compat/linux/arch/alpha/linux_mmap.h:1.4 src/sys/compat/linux/arch/alpha/linux_mmap.h:1.5
--- src/sys/compat/linux/arch/alpha/linux_mmap.h:1.4	Mon Apr 28 20:23:42 2008
+++ src/sys/compat/linux/arch/alpha/linux_mmap.h	Sat Mar 14 08:32:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:42 martin Exp $	*/
+/*	$NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:07 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -36,8 +36,9 @@
 
 /* LINUX_MAP_SHARED/PRIVATE defined in common/linux_mmap.h */
 
-#define LINUX_MAP_ANON		0x0010
-#define LINUX_MAP_FIXED		0x0100
+#define LINUX_MAP_ANON		0x00010
+#define LINUX_MAP_FIXED		0x00100
+#define LINUX_MAP_LOCKED	0x08000
 
 /* the following flags are silently ignored */
 
@@ -48,7 +49,6 @@
 #define LINUX_MAP_GROWSDOWN	0x01000
 #define LINUX_MAP_DENYWRITE	0x02000
 #define	LINUX_MAP_EXECUTABLE	0x04000
-#define LINUX_MAP_LOCKED	0x08000
 
 #define LINUX_MAP_NORESERVE	0x1
 

Index: src/sys/compat/linux/arch/amd64/linux_mmap.h
diff -u src/sys/compat/linux/arch/amd64/linux_mmap.h:1.2 src/sys/compat/linux/arch/amd64/linux_mmap.h:1.3
--- src/sys/compat/linux/arch/amd64/linux_mmap.h:1.2	Sun Dec 11 12:20:14 2005
+++ src/sys/compat/linux/arch/amd64/linux_mmap.h	Sat Mar 14 08:32:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mmap.h,v 1.2 2005/12/11 12:20:14 christos Exp $ */
+/*	$NetBSD: linux_mmap.h,v 1.3 2015/03/14 08:32:07 njoly Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -34,12 +34,9 @@
 #ifndef _AMD64_LINUX_MMAP_H
 #define _AMD64_LINUX_MMAP_H
 
-#define LINUX_MAP_FIXED		0x10
-#define LINUX_MAP_ANON		0x20
+#define LINUX_MAP_FIXED		0x0010
+#define LINUX_MAP_ANON		0x0020
 #define LINUX_MAP_GROWSDOWN	0x0100
-
-
-
-
+#define LINUX_MAP_LOCKED	0x2000
 
 #endif /* !_AMD64_LINUX_MMAP_H */

Index: src/sys/compat/linux/arch/arm/linux_mmap.h
diff -u src/sys/compat/linux/arch/arm/linux_mmap.h:1.4 src/sys/compat/linux/arch/arm/linux_mmap.h:1.5
--- src/sys/compat/linux/arch/arm/linux_mmap.h:1.4	Mon Apr 28 20:23:42 2008
+++ src/sys/compat/linux/arch/arm/linux_mmap.h	Sat Mar 14 08:32:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:42 martin Exp $	*/
+/*	$NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:07 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,13 +38,13 @@
 
 #define LINUX_MAP_FIXED		0x0010
 #define LINUX_MAP_ANON		0x0020
+#define LINUX_MAP_LOCKED	0x2000
 
 /* the following flags are silently ignored */
 
 #define LINUX_MAP_GROWSDOWN	0x0100
 #define LINUX_MAP_DENYWRITE	0x0800
 #define LINUX_MAP_EXECUTABLE	0x1000
-#define LINUX_MAP_LOCKED	0x2000
 #define LINUX_MAP_NORESERVE	0x4000
 
 #endif /* !_ARM_LINUX_MMAP_H */

Index: src/sys/compat/linux/arch/i386/linux_mmap.h
diff -u src/sys/compat/linux/arch/i386/linux_mmap.h:1.6 src/sys/compat/linux/arch/i386/linux_mmap.h:1.7
--- src/sys/compat/linux/arch/i386/linux_mmap.h:1.6	Mon Apr 28 20:23:42 2008
+++ src/sys/compat/linux/arch/i386/linux_mmap.h	Sat Mar 14 08:32:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mmap.h,v 1.6 2008/04/28 20:23:42 martin Exp $	*/
+/*	$NetBSD: linux_mmap.h,v 1.7 2015/03/14 08:32:08 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,13 +38,13 @@
 
 #define LINUX_MAP_FIXED		0x0010
 #define LINUX_MAP_ANON		0x0020
+#define LINUX_MAP_LOCKED	0x2000
 
 /* the following flags are silently ignored */
 
 #define LINUX_MAP_GROWSDOWN	0x0100
 #define LINUX_MAP_DENYWRITE	0x0800
 #define 

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

2015-03-01 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Mar  1 13:19:39 UTC 2015

Modified Files:
src/sys/compat/linux/common: linux_fcntl.h linux_file.c

Log Message:
Add Linux specific fcntl(2) commands. Support F_DUPFD_CLOEXEC.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux/common/linux_fcntl.h
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/common/linux_file.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/common/linux_fcntl.h
diff -u src/sys/compat/linux/common/linux_fcntl.h:1.16 src/sys/compat/linux/common/linux_fcntl.h:1.17
--- src/sys/compat/linux/common/linux_fcntl.h:1.16	Sun Jun  1 13:42:12 2014
+++ src/sys/compat/linux/common/linux_fcntl.h	Sun Mar  1 13:19:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.16 2014/06/01 13:42:12 njoly Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.17 2015/03/01 13:19:39 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -87,6 +87,16 @@ struct linux_flock64 {
 #error Undefined linux_fcntl.h machine type.
 #endif
 
+/* Linux specific fcntl(2) commands */
+#define	LINUX_F_SPECIFIC_BASE 	1024
+#define	LINUX_F_SETLEASE 	(LINUX_F_SPECIFIC_BASE + 0)
+#define	LINUX_F_GETLEASE 	(LINUX_F_SPECIFIC_BASE + 1)
+#define	LINUX_F_NOTIFY 		(LINUX_F_SPECIFIC_BASE + 2)
+#define	LINUX_F_CANCELLK 	(LINUX_F_SPECIFIC_BASE + 5)
+#define	LINUX_F_DUPFD_CLOEXEC 	(LINUX_F_SPECIFIC_BASE + 6)
+#define	LINUX_F_SETPIPE_SZ 	(LINUX_F_SPECIFIC_BASE + 7)
+#define	LINUX_F_GETPIPE_SZ 	(LINUX_F_SPECIFIC_BASE + 8)
+
 /*
  * We have to have 4 copies of the code that converts linux fcntl() file
  * locking to native form because there are 4 layouts for the structures.

Index: src/sys/compat/linux/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.114 src/sys/compat/linux/common/linux_file.c:1.115
--- src/sys/compat/linux/common/linux_file.c:1.114	Sun Nov  9 17:48:08 2014
+++ src/sys/compat/linux/common/linux_file.c	Sun Mar  1 13:19:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.114 2014/11/09 17:48:08 maxv Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.114 2014/11/09 17:48:08 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -417,6 +417,10 @@ linux_sys_fcntl(struct lwp *l, const str
 		mutex_exit(proc_lock);
 		return 0;
 
+	case LINUX_F_DUPFD_CLOEXEC:
+		cmd = F_DUPFD_CLOEXEC;
+		break;
+
 	default:
 		return EOPNOTSUPP;
 	}



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

2015-02-28 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Feb 28 13:08:00 UTC 2015

Modified Files:
src/sys/compat/linux/common: linux_limit.h

Log Message:
When converting limits from linux32 (int32_t) to native (uint64_t),
cast it to unsigned first to avoid bad side effect for negative
values.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux/common/linux_limit.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/compat/linux/common/linux_limit.h
diff -u src/sys/compat/linux/common/linux_limit.h:1.6 src/sys/compat/linux/common/linux_limit.h:1.7
--- src/sys/compat/linux/common/linux_limit.h:1.6	Sat Sep 22 22:34:02 2012
+++ src/sys/compat/linux/common/linux_limit.h	Sat Feb 28 13:08:00 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: linux_limit.h,v 1.6 2012/09/22 22:34:02 joerg Exp $ */
+/* 	$NetBSD: linux_limit.h,v 1.7 2015/02/28 13:08:00 njoly Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@ static int linux_to_bsd_limit(int);
 linux_to_bsd_rlimit1(b, l, rlim_max)
 
 #define linux32_to_bsd_rlimit1(b, l, f) \
-(b)-f = (l)-f == LINUX32_RLIM_INFINITY ? RLIM_INFINITY : (l)-f
+(b)-f = (l)-f == LINUX32_RLIM_INFINITY ? RLIM_INFINITY : (uint32_t)(l)-f
 #define linux32_to_bsd_rlimit(b, l) \
 linux32_to_bsd_rlimit1(b, l, rlim_cur); \
 linux32_to_bsd_rlimit1(b, l, rlim_max)



CVS commit: src/lib/libc/sys

2015-02-08 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb  8 11:27:43 UTC 2015

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

Log Message:
The length argument is of an unsigned type (size_t) and cannot be
negative. Remove wrong statements in ERRORS section.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/mlock.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/mlock.2
diff -u src/lib/libc/sys/mlock.2:1.20 src/lib/libc/sys/mlock.2:1.21
--- src/lib/libc/sys/mlock.2:1.20	Mon Feb 28 07:17:02 2011
+++ src/lib/libc/sys/mlock.2	Sun Feb  8 11:27:43 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: mlock.2,v 1.20 2011/02/28 07:17:02 wiz Exp $
+.\	$NetBSD: mlock.2,v 1.21 2015/02/08 11:27:43 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)mlock.2	8.2 (Berkeley) 12/11/93
 .\
-.Dd February 28, 2011
+.Dd February 8, 2014
 .Dt MLOCK 2
 .Os
 .Sh NAME
@@ -116,8 +116,8 @@ will fail if:
 Locking the indicated range would exceed either the system or per-process
 limit for locked memory.
 .It Bq Er EINVAL
-The length is negative; or the address or length given is not page
-aligned and the implementation does not round.
+The address or length given is not page aligned and the implementation does
+not round.
 .It Bq Er ENOMEM
 Some portion of the indicated address range is not allocated.
 There was an error faulting/mapping a page.
@@ -131,8 +131,8 @@ is not implemented.
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
-The length is negative; or the address or length given is not page
-aligned and the implementation does not round.
+The address or length given is not page aligned and the implementation does
+not round.
 .It Bq Er ENOMEM
 Some portion of the indicated address range is not allocated.
 Some portion of the indicated address range is not locked.



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

2015-02-01 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb  1 10:19:00 UTC 2015

Modified Files:
src/external/bsd/libevent/dist: evutil_rand.c

Log Message:
void functions should not return values.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/evutil_rand.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/libevent/dist/evutil_rand.c
diff -u src/external/bsd/libevent/dist/evutil_rand.c:1.3 src/external/bsd/libevent/dist/evutil_rand.c:1.4
--- src/external/bsd/libevent/dist/evutil_rand.c:1.3	Thu Jan 29 07:26:02 2015
+++ src/external/bsd/libevent/dist/evutil_rand.c	Sun Feb  1 10:19:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: evutil_rand.c,v 1.3 2015/01/29 07:26:02 spz Exp $	*/
+/*	$NetBSD: evutil_rand.c,v 1.4 2015/02/01 10:19:00 njoly Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -35,7 +35,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: evutil_rand.c,v 1.3 2015/01/29 07:26:02 spz Exp $);
+__RCSID($NetBSD: evutil_rand.c,v 1.4 2015/02/01 10:19:00 njoly Exp $);
 
 #include limits.h
 
@@ -70,7 +70,8 @@ static void
 ev_arc4random_buf(void *buf, size_t n)
 {
 #if defined(_EVENT_HAVE_ARC4RANDOM_BUF)  !defined(__APPLE__)
-	return arc4random_buf(buf, n);
+	arc4random_buf(buf, n);
+	return;
 #else
 	unsigned char *b = buf;
 
@@ -85,7 +86,8 @@ ev_arc4random_buf(void *buf, size_t n)
 		void (*tptr)(void *,size_t) =
 		(void (*)(void*,size_t))arc4random_buf;
 		if (tptr != NULL) {
-			return arc4random_buf(buf, n);
+			arc4random_buf(buf, n);
+			return;
 		}
 	}
 #endif



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

2015-01-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 19 14:32:08 UTC 2015

Modified Files:
src/sys/dev/pci/hdaudio: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
Regen for Realtek ALC280.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/hdaudio/hdaudiodevs.h \
src/sys/dev/pci/hdaudio/hdaudiodevs_data.h

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

Modified files:

Index: src/sys/dev/pci/hdaudio/hdaudiodevs.h
diff -u src/sys/dev/pci/hdaudio/hdaudiodevs.h:1.2 src/sys/dev/pci/hdaudio/hdaudiodevs.h:1.3
--- src/sys/dev/pci/hdaudio/hdaudiodevs.h:1.2	Sun Sep 21 14:31:03 2014
+++ src/sys/dev/pci/hdaudio/hdaudiodevs.h	Mon Jan 19 14:32:08 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs.h,v 1.2 2014/09/21 14:31:03 christos Exp $	*/
+/*	$NetBSD: hdaudiodevs.h,v 1.3 2015/01/19 14:32:08 njoly Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.1 2014/09/19 17:23:35 christos Exp
+ *	NetBSD: hdaudiodevs,v 1.2 2015/01/19 14:31:32 njoly Exp
  */
 
 /*
@@ -77,6 +77,7 @@
 #define	HDAUDIO_PRODUCT_REALTEK_ALC270	0x0270		/* ALC270 */
 #define	HDAUDIO_PRODUCT_REALTEK_ALC272	0x0272		/* ALC272 */
 #define	HDAUDIO_PRODUCT_REALTEK_ALC275	0x0275		/* ALC275 */
+#define	HDAUDIO_PRODUCT_REALTEK_ALC280	0x0280		/* ALC280 */
 #define	HDAUDIO_PRODUCT_REALTEK_ALC660_VD	0x0660		/* ALC660-VD */
 #define	HDAUDIO_PRODUCT_REALTEK_ALC662	0x0662		/* ALC662 */
 #define	HDAUDIO_PRODUCT_REALTEK_ALC663	0x0663		/* ALC663 */
Index: src/sys/dev/pci/hdaudio/hdaudiodevs_data.h
diff -u src/sys/dev/pci/hdaudio/hdaudiodevs_data.h:1.2 src/sys/dev/pci/hdaudio/hdaudiodevs_data.h:1.3
--- src/sys/dev/pci/hdaudio/hdaudiodevs_data.h:1.2	Sun Sep 21 14:31:03 2014
+++ src/sys/dev/pci/hdaudio/hdaudiodevs_data.h	Mon Jan 19 14:32:08 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs_data.h,v 1.2 2014/09/21 14:31:03 christos Exp $	*/
+/*	$NetBSD: hdaudiodevs_data.h,v 1.3 2015/01/19 14:32:08 njoly Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.1 2014/09/19 17:23:35 christos Exp
+ *	NetBSD: hdaudiodevs,v 1.2 2015/01/19 14:31:32 njoly Exp
  */
 
 /*
@@ -98,320 +98,322 @@ static const uint16_t hdaudio_products[]
 	274, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC275, 
 	281, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC660_VD, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC280, 
 	288, 0,
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC660_VD, 
+	295, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC662, 
-	298, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC663, 
 	305, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC670, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC663, 
 	312, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC861, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC670, 
 	319, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC861_VD, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC861, 
 	326, 0,
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC861_VD, 
+	333, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC880, 
-	336, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC882, 
 	343, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC883, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC882, 
 	350, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC885, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC883, 
 	357, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC887, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC885, 
 	364, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC888, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC887, 
 	371, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC889, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC888, 
 	378, 0,
-	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC892, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC889, 
 	385, 0,
-	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT1708, 
+	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC892, 
 	392, 0,
+	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT1708, 
+	399, 0,
 	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT1709, 
-	392, 0,
+	399, 0,
 	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT170A, 
-	392, 0,
+	399, 0,
 	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT170B, 
-	392, 0,
+	399, 0,
 	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT1709_10CH_0, 
-	399, 406, 0,
+	406, 413, 0,
 	HDAUDIO_VENDOR_VIATECH, HDAUDIO_PRODUCT_VIATECH_VT1709_10CH_1, 
-	399, 406, 0,
+	406, 

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

2015-01-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 19 14:31:32 UTC 2015

Modified Files:
src/sys/dev/pci/hdaudio: hdaudiodevs

Log Message:
Add Realtek ALC280.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/hdaudio/hdaudiodevs

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/hdaudio/hdaudiodevs
diff -u src/sys/dev/pci/hdaudio/hdaudiodevs:1.1 src/sys/dev/pci/hdaudio/hdaudiodevs:1.2
--- src/sys/dev/pci/hdaudio/hdaudiodevs:1.1	Fri Sep 19 17:23:35 2014
+++ src/sys/dev/pci/hdaudio/hdaudiodevs	Mon Jan 19 14:31:32 2015
@@ -1,4 +1,4 @@
-$NetBSD: hdaudiodevs,v 1.1 2014/09/19 17:23:35 christos Exp $
+$NetBSD: hdaudiodevs,v 1.2 2015/01/19 14:31:32 njoly Exp $
 
 /*
  * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca
@@ -70,6 +70,7 @@ product	REALTEK		ALC269		0x0269	ALC269
 product	REALTEK		ALC270		0x0270	ALC270
 product	REALTEK		ALC272		0x0272	ALC272
 product	REALTEK		ALC275		0x0275	ALC275
+product	REALTEK		ALC280		0x0280	ALC280
 product	REALTEK		ALC660_VD	0x0660	ALC660-VD
 product	REALTEK		ALC662		0x0662	ALC662
 product	REALTEK		ALC663		0x0663	ALC663



CVS commit: src/sys/compat/linux32

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 13:12:22 UTC 2014

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

Log Message:
Add ppoll(2) for compat linux32.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/linux32/common/linux32_misc.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/syscalls.master
diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.67 src/sys/compat/linux32/arch/amd64/syscalls.master:1.68
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.67	Thu May 29 10:47:00 2014
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Sat Nov 22 13:12:22 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp $
+	$NetBSD: syscalls.master,v 1.68 2014/11/22 13:12:22 njoly Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number master file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -524,7 +524,8 @@
 307	STD	{ int|linux32_sys||faccessat(int fd, netbsd32_charp path, \
 		int amode); }
 308	UNIMPL	pselect6
-309	UNIMPL	ppoll
+309	STD	{ int|linux32_sys||ppoll(netbsd32_pollfdp_t fds, u_int nfds, \
+		linux32_timespecp_t timeout, linux32_sigsetp_t sigset); }
 310	UNIMPL	unshare
 311	STD	{ int|linux32_sys||set_robust_list( \
 		linux32_robust_list_headp_t head, linux32_size_t len); }

Index: src/sys/compat/linux32/common/linux32_misc.c
diff -u src/sys/compat/linux32/common/linux32_misc.c:1.24 src/sys/compat/linux32/common/linux32_misc.c:1.25
--- src/sys/compat/linux32/common/linux32_misc.c:1.24	Sun Nov  9 17:48:08 2014
+++ src/sys/compat/linux32/common/linux32_misc.c	Sat Nov 22 13:12:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_misc.c,v 1.24 2014/11/09 17:48:08 maxv Exp $	*/
+/*	$NetBSD: linux32_misc.c,v 1.25 2014/11/22 13:12:22 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_misc.c,v 1.24 2014/11/09 17:48:08 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_misc.c,v 1.25 2014/11/22 13:12:22 njoly Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -42,6 +42,7 @@ __KERNEL_RCSID(0, $NetBSD: linux32_misc
 #include sys/vfs_syscalls.h
 #include sys/ptrace.h
 #include sys/syscall.h
+#include sys/poll.h
 
 #include compat/netbsd32/netbsd32.h
 #include compat/netbsd32/netbsd32_syscallargs.h
@@ -347,3 +348,39 @@ linux32_sys_setdomainname(struct lwp *l,
 	NETBSD32TO64_UAP(len);
 	return linux_sys_setdomainname(l, ua, retval);
 }
+
+int
+linux32_sys_ppoll(struct lwp *l, const struct linux32_sys_ppoll_args *uap,
+register_t *retval)
+{
+	/* {
+		syscallarg(netbsd32_pollfdp_t) fds;
+		syscallarg(u_int) nfds;
+		syscallarg(linux32_timespecp_t) timeout;
+		syscallarg(linux32_sigsetp_t) sigset;
+	} */
+	struct linux32_timespec lts0, *lts;
+	struct timespec ts0, *ts = NULL;
+	linux32_sigset_t lsigmask0, *lsigmask;
+	sigset_t sigmask0, *sigmask = NULL;
+	int error;
+
+	lts = SCARG_P32(uap, timeout);
+	if (lts) {
+		if ((error = copyin(lts, lts0, sizeof(lts0))) != 0)
+			return error;
+		linux32_to_native_timespec(ts0, lts0);
+		ts = ts0;
+	}
+
+	lsigmask = SCARG_P32(uap, sigset);
+	if (lsigmask) {
+		if ((error = copyin(lsigmask, lsigmask0, sizeof(lsigmask0
+			return error;
+		linux32_to_native_sigset(sigmask0, lsigmask0);
+		sigmask = sigmask0;
+	}
+
+	return pollcommon(retval, SCARG_P32(uap, fds), SCARG(uap, nfds),
+	ts, sigmask);
+}



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

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 13:13:10 UTC 2014

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

Log Message:
Regen for ppoll(2)


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 \
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.72 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.73
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.72	Thu May 29 10:47:23 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Sat Nov 22 13:13:10 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.73 2014/11/22 13:13:10 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2014/11/22 13:12:22 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -690,6 +690,9 @@
 /* syscall: faccessat ret: int args: int netbsd32_charp int */
 #define	LINUX32_SYS_faccessat	307
 
+/* syscall: ppoll ret: int args: netbsd32_pollfdp_t u_int linux32_timespecp_t linux32_sigsetp_t */
+#define	LINUX32_SYS_ppoll	309
+
 /* syscall: set_robust_list ret: int args: linux32_robust_list_headp_t linux32_size_t */
 #define	LINUX32_SYS_set_robust_list	311
 
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.72 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.73
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.72	Thu May 29 10:47:23 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Sat Nov 22 13:13:10 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.73 2014/11/22 13:13:10 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2014/11/22 13:12:22 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALLARGS_H_
@@ -981,6 +981,14 @@ struct linux32_sys_faccessat_args {
 };
 check_syscall_args(linux32_sys_faccessat)
 
+struct linux32_sys_ppoll_args {
+	syscallarg(netbsd32_pollfdp_t) fds;
+	syscallarg(u_int) nfds;
+	syscallarg(linux32_timespecp_t) timeout;
+	syscallarg(linux32_sigsetp_t) sigset;
+};
+check_syscall_args(linux32_sys_ppoll)
+
 struct linux32_sys_set_robust_list_args {
 	syscallarg(linux32_robust_list_headp_t) head;
 	syscallarg(linux32_size_t) len;
@@ -1449,6 +1457,8 @@ int	linux32_sys_fchmodat(struct lwp *, c
 
 int	linux32_sys_faccessat(struct lwp *, const struct linux32_sys_faccessat_args *, register_t *);
 
+int	linux32_sys_ppoll(struct lwp *, const struct linux32_sys_ppoll_args *, register_t *);
+
 int	linux32_sys_set_robust_list(struct lwp *, const struct linux32_sys_set_robust_list_args *, register_t *);
 
 int	linux32_sys_get_robust_list(struct lwp *, const struct linux32_sys_get_robust_list_args *, register_t *);
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.72 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.73
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.72	Thu May 29 10:47:23 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Sat Nov 22 13:13:10 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.73 2014/11/22 13:13:10 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.68 2014/11/22 13:12:22 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.73 2014/11/22 13:13:10 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include sys/param.h
@@ -346,7 +346,7 @@ const char *const linux32_syscallnames[]
 	/* 306 */	fchmodat,
 	/* 307 */	faccessat,
 	/* 308 */	#308 (unimplemented pselect6),
-	/* 309 */	#309 (unimplemented ppoll),
+	/* 309 */	ppoll,
 	/* 310 */	#310 (unimplemented unshare),
 	/* 311 */	set_robust_list,
 	/* 312 */	get_robust_list,
Index: 

CVS commit: src/sys/compat/linux

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 13:18:45 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_misc.c

Log Message:
Fix ppoll signature (int -u_int)


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.118 -r1.119 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.229 -r1.230 src/sys/compat/linux/common/linux_misc.c

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

Modified files:

Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.88 src/sys/compat/linux/arch/alpha/syscalls.master:1.89
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.88	Thu May 29 10:35:26 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sat Nov 22 13:18:45 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp $
+	$NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -729,7 +729,7 @@
 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, \
+464	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }
 465	UNIMPL		unshare

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.52 src/sys/compat/linux/arch/amd64/syscalls.master:1.53
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.52	Sat May 31 08:51:19 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sat Nov 22 13:18:45 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.52 2014/05/31 08:51:19 njoly Exp $
+	$NetBSD: syscalls.master,v 1.53 2014/11/22 13:18:45 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -490,7 +490,7 @@
 269	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
 270	UNIMPL		pselect6
-271	STD		{ int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
+271	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }
 272	UNIMPL		unshare

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.61 src/sys/compat/linux/arch/arm/syscalls.master:1.62
--- src/sys/compat/linux/arch/arm/syscalls.master:1.61	Sat May 31 08:51:19 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sat Nov 22 13:18:45 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.61 2014/05/31 08:51:19 njoly Exp $
+	$NetBSD: syscalls.master,v 1.62 2014/11/22 13:18:45 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -531,7 +531,7 @@
 334	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
 335	UNIMPL		pselect6
-336	STD		{ int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
+336	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }
 337	UNIMPL		unshare

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.118 src/sys/compat/linux/arch/i386/syscalls.master:1.119
--- src/sys/compat/linux/arch/i386/syscalls.master:1.118	Sat May 31 08:51:19 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Sat Nov 22 13:18:45 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.118 2014/05/31 08:51:19 njoly Exp $
+	$NetBSD: syscalls.master,v 1.119 2014/11/22 13:18:45 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -504,7 +504,7 @@
 307	STD		{ int|linux_sys||faccessat(int fd, const char *path, \
 			int amode); }
 308	UNIMPL		pselect6
-309	STD		{ int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
+309	STD		{ int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
 			struct linux_timespec *timeout, \
 			linux_sigset_t *sigset); }
 310	UNIMPL		unshare

Index: 

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

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 13:20:35 UTC 2014

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/amd64: 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/i386: 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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for ppoll signature fix


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.93 -r1.94 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.64 -r1.65 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.103 -r1.104 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.94 -r1.95 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.93 -r1.94 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.60 -r1.61 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
cvs rdiff -u -r1.70 -r1.71 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.69 -r1.70 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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.94 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.95
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.94	Thu May 29 10:36:31 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sat Nov 22 13:20:35 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.95 2014/11/22 13:20:35 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -639,7 +639,7 @@
 /* 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 * */
+/* syscall: ppoll ret: int args: struct pollfd * u_int struct linux_timespec * linux_sigset_t * */
 #define	LINUX_SYS_ppoll	464
 
 /* syscall: set_robust_list ret: int args: struct linux_robust_list_head * size_t */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.94 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.95
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.94	Thu May 29 10:36:31 2014
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Sat Nov 22 13:20:35 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.95 2014/11/22 13:20:35 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.89 2014/11/22 13:18:45 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.94 

CVS commit: src/sys/dev/usb

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 14:30:57 UTC 2014

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

Log Message:
Add Atheros AR3012


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.683 src/sys/dev/usb/usbdevs:1.684
--- src/sys/dev/usb/usbdevs:1.683	Sun Oct  5 03:46:56 2014
+++ src/sys/dev/usb/usbdevs	Sat Nov 22 14:30:57 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.683 2014/10/05 03:46:56 nonaka Exp $
+$NetBSD: usbdevs,v 1.684 2014/11/22 14:30:57 njoly Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -934,6 +934,7 @@ product ATHEROS2 AR9271_1	0x1006	AR9271
 product ATHEROS2 3CRUSBN275	0x1010	3CRUSBN275
 product ATHEROS2 WN612		0x1011	WN612
 product ATHEROS2 AR3011		0x3000	AR3011
+product ATHEROS2 AR3012		0x3004	AR3012
 product ATHEROS2 AR9280		0x7010	AR9280+AR7010
 product ATHEROS2 AR9287		0x7015	AR9287+AR7010
 product ATHEROS2 AR9170		0x9170	AR9170



CVS commit: src/sys/dev/usb

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 14:31:53 UTC 2014

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

Log Message:
Regen for Atheros AR3012


To generate a diff of this commit:
cvs rdiff -u -r1.675 -r1.676 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.676 -r1.677 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.675 src/sys/dev/usb/usbdevs.h:1.676
--- src/sys/dev/usb/usbdevs.h:1.675	Sun Oct  5 03:47:17 2014
+++ src/sys/dev/usb/usbdevs.h	Sat Nov 22 14:31:53 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.675 2014/10/05 03:47:17 nonaka Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.676 2014/11/22 14:31:53 njoly Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.683 2014/10/05 03:46:56 nonaka Exp
+ *	NetBSD: usbdevs,v 1.684 2014/11/22 14:30:57 njoly Exp
  */
 
 /*
@@ -941,6 +941,7 @@
 #define	USB_PRODUCT_ATHEROS2_3CRUSBN275	0x1010		/* 3CRUSBN275 */
 #define	USB_PRODUCT_ATHEROS2_WN612	0x1011		/* WN612 */
 #define	USB_PRODUCT_ATHEROS2_AR3011	0x3000		/* AR3011 */
+#define	USB_PRODUCT_ATHEROS2_AR3012	0x3004		/* AR3012 */
 #define	USB_PRODUCT_ATHEROS2_AR9280	0x7010		/* AR9280+AR7010 */
 #define	USB_PRODUCT_ATHEROS2_AR9287	0x7015		/* AR9287+AR7010 */
 #define	USB_PRODUCT_ATHEROS2_AR9170	0x9170		/* AR9170 */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.676 src/sys/dev/usb/usbdevs_data.h:1.677
--- src/sys/dev/usb/usbdevs_data.h:1.676	Sun Oct  5 03:47:17 2014
+++ src/sys/dev/usb/usbdevs_data.h	Sat Nov 22 14:31:53 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.676 2014/10/05 03:47:17 nonaka Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.677 2014/11/22 14:31:53 njoly Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.683 2014/10/05 03:46:56 nonaka Exp
+ *	NetBSD: usbdevs,v 1.684 2014/11/22 14:30:57 njoly Exp
  */
 
 /*
@@ -1063,12 +1063,14 @@ static const uint16_t usb_products[] = {
 	6601, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR3011, 
 	6607, 0,
+	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR3012, 
+	6614, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR9280, 
 	5119, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR9287, 
 	5270, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR9170, 
-	6614, 0,
+	6621, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR9271_2, 
 	6583, 0,
 	USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR9271_3, 
@@ -1076,39 +1078,39 @@ static const uint16_t usb_products[] = {
 	USB_VENDOR_ATI2, USB_PRODUCT_ATI2_205, 
 	4638, 2544, 5369, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_UHB124, 
-	6621, 6628, 0,
+	6628, 6635, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_WN210, 
-	6632, 6641, 0,
+	6639, 6648, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_DWL900AP, 
-	6647, 3658, 6657, 6664, 0,
+	6654, 3658, 6664, 6671, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_SAM_BA, 
-	6670, 6674, 6681, 6693, 0,
+	6677, 6681, 6688, 6700, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_DWL120, 
-	6698, 3658, 4677, 0,
+	6705, 3658, 4677, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C503I1, 
-	6706, 6715, 6725, 6730, 0,
+	6713, 6722, 6732, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C503I2, 
-	6706, 6715, 6737, 6730, 0,
+	6713, 6722, 6744, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C503RFMD, 
-	6706, 6742, 6730, 0,
+	6713, 6749, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C505RFMD, 
-	6748, 6742, 6730, 0,
+	6755, 6749, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C505RFMD2958, 
-	6748, 6742, 6757, 6730, 0,
+	6755, 6749, 6764, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C505A, 
-	6762, 6742, 6757, 6730, 0,
+	6769, 6749, 6764, 6737, 0,
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_AT76C505AS, 
-	6772, 6742, 6757, 6730, 0,
+	6779, 6749, 6764, 6737, 0,
 	USB_VENDOR_AUDIOTECHNICA, USB_PRODUCT_AUDIOTECHNICA_ATCHA4USB, 
-	6783, 4638, 6794, 0,
+	6790, 4638, 6801, 0,
 	USB_VENDOR_AVANCELOGIC, USB_PRODUCT_AVANCELOGIC_USBAUDIO, 
-	4638, 6804, 6810, 0,
+	4638, 6811, 6817, 0,
 	USB_VENDOR_AVERATEC, USB_PRODUCT_AVERATEC_USBWLAN, 
 	5068, 0,
 	USB_VENDOR_AVISION, USB_PRODUCT_AVISION_1200U, 
-	6818, 6824, 0,
+	6825, 6831, 0,
 	USB_VENDOR_AVM, USB_PRODUCT_AVM_FRITZWLAN, 
-	6832, 6843, 0,
+	6839, 6850, 0,
 	USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1, 
 	4864, 0,
 	USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2, 
@@ -1148,227 +1150,227 @@ static const uint16_t usb_products[] = {
 	USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RTL8188CU, 
 	4995, 0,
 	

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

2014-11-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov 22 15:47:42 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_errno.h

Log Message:
Do not define LINUX_EDEADLK more than once.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux/common/linux_errno.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/compat/linux/common/linux_errno.h
diff -u src/sys/compat/linux/common/linux_errno.h:1.14 src/sys/compat/linux/common/linux_errno.h:1.15
--- src/sys/compat/linux/common/linux_errno.h:1.14	Tue Dec 17 22:14:24 2013
+++ src/sys/compat/linux/common/linux_errno.h	Sat Nov 22 15:47:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_errno.h,v 1.14 2013/12/17 22:14:24 njoly Exp $	*/
+/*	$NetBSD: linux_errno.h,v 1.15 2014/11/22 15:47:42 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -66,7 +66,6 @@
 #define LINUX_EPIPE		32
 #define LINUX_EDOM		33
 #define LINUX_ERANGE		34
-#define LINUX_EDEADLK		35
 
 
 /* Error numbers after here vary wildly*/



CVS commit: src/lib/libc/sys

2014-11-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Nov 11 08:10:02 UTC 2014

Modified Files:
src/lib/libc/sys: extattr_get_file.2 ktrace.2 revoke.2 undelete.2

Log Message:
Do not hardcode values for ENAMETOOLONG, use symblic constants.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/extattr_get_file.2
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/sys/ktrace.2
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/sys/revoke.2 \
src/lib/libc/sys/undelete.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/extattr_get_file.2
diff -u src/lib/libc/sys/extattr_get_file.2:1.5 src/lib/libc/sys/extattr_get_file.2:1.6
--- src/lib/libc/sys/extattr_get_file.2:1.5	Wed Aug  3 09:48:12 2011
+++ src/lib/libc/sys/extattr_get_file.2	Tue Nov 11 08:10:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: extattr_get_file.2,v 1.5 2011/08/03 09:48:12 wiz Exp $
+.\	$NetBSD: extattr_get_file.2,v 1.6 2014/11/11 08:10:02 njoly Exp $
 .\
 .\ Copyright (c) 2001 Dima Dorfman d...@unixfreak.org
 .\ Copyright (c) 2003 Robert Watson rwat...@freebsd.org
@@ -231,8 +231,12 @@ calls may also fail due to the following
 .It Bq Er EACCES
 Search permission is denied for a component of the path prefix.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters,
+or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 A component of the path name that must exist does not exist.
 .It Bq Er ENOTDIR

Index: src/lib/libc/sys/ktrace.2
diff -u src/lib/libc/sys/ktrace.2:1.17 src/lib/libc/sys/ktrace.2:1.18
--- src/lib/libc/sys/ktrace.2:1.17	Thu May 13 10:20:58 2004
+++ src/lib/libc/sys/ktrace.2	Tue Nov 11 08:10:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: ktrace.2,v 1.17 2004/05/13 10:20:58 wiz Exp $
+.\	$NetBSD: ktrace.2,v 1.18 2014/11/11 08:10:02 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -152,8 +152,12 @@ A component of the path prefix is not a 
 .It Bq Er EINVAL
 The pathname contains a character with the high-order bit set.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters,
+or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 The named tracefile does not exist.
 .It Bq Er EACCES

Index: src/lib/libc/sys/revoke.2
diff -u src/lib/libc/sys/revoke.2:1.15 src/lib/libc/sys/revoke.2:1.16
--- src/lib/libc/sys/revoke.2:1.15	Fri Jul  8 19:26:19 2011
+++ src/lib/libc/sys/revoke.2	Tue Nov 11 08:10:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: revoke.2,v 1.15 2011/07/08 19:26:19 wiz Exp $
+.\	$NetBSD: revoke.2,v 1.16 2014/11/11 08:10:02 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -84,8 +84,12 @@ points outside the process's allocated a
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1024 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters,
+or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 The named file or a component of the path name does not exist.
 .It Bq Er ENOTDIR
Index: src/lib/libc/sys/undelete.2
diff -u src/lib/libc/sys/undelete.2:1.15 src/lib/libc/sys/undelete.2:1.16
--- src/lib/libc/sys/undelete.2:1.15	Sun Jan 11 02:46:30 2009
+++ src/lib/libc/sys/undelete.2	Tue Nov 11 08:10:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: undelete.2,v 1.15 2009/01/11 02:46:30 christos Exp $
+.\	$NetBSD: undelete.2,v 1.16 2014/11/11 08:10:02 njoly Exp $
 .\
 .\ Copyright (c) 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -106,8 +106,12 @@ An I/O error occurred while updating the
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters,
+or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 The named whiteout does not exist.
 .It Bq Er ENOTDIR



CVS commit: src/lib/libc/sys

2014-11-02 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Nov  2 11:28:03 UTC 2014

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

Log Message:
Use more markups in AUTHORS section.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/sys/swapctl.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/swapctl.2
diff -u src/lib/libc/sys/swapctl.2:1.38 src/lib/libc/sys/swapctl.2:1.39
--- src/lib/libc/sys/swapctl.2:1.38	Thu Apr 28 11:58:50 2011
+++ src/lib/libc/sys/swapctl.2	Sun Nov  2 11:28:03 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: swapctl.2,v 1.38 2011/04/28 11:58:50 wiz Exp $
+.\	$NetBSD: swapctl.2,v 1.39 2014/11/02 11:28:03 njoly Exp $
 .\
 .\ Copyright (c) 1997 Matthew R. Green
 .\ All rights reserved.
@@ -273,12 +273,12 @@ when the header file was also moved from
 to its current location in
 .In sys/swap.h .
 .Sh AUTHORS
+.An -nosplit
 The current swap system was designed and implemented by
-Matthew Green
-.Aq m...@eterna.com.au ,
-with help from Paul Kranenburg
-.Aq p...@netbsd.org
-and Leo Weppelman
-.Aq l...@netbsd.org ,
-and insights from Jason R. Thorpe
-.Aq thor...@netbsd.org .
+.An Matthew Green Aq Mt m...@eterna.com.au ,
+with help from
+.An Paul Kranenburg Aq Mt p...@netbsd.org
+and
+.An Leo Weppelman Aq Mt l...@netbsd.org ,
+and insights from
+.An Jason R. Thorpe Aq Mt thor...@netbsd.org .



CVS commit: src/sys/ufs/ffs

2014-10-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Oct 24 13:18:51 UTC 2014

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
One semicolon is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.299 -r1.300 src/sys/ufs/ffs/ffs_vfsops.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/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.299 src/sys/ufs/ffs/ffs_vfsops.c:1.300
--- src/sys/ufs/ffs/ffs_vfsops.c:1.299	Sat May 24 16:34:04 2014
+++ src/sys/ufs/ffs/ffs_vfsops.c	Fri Oct 24 13:18:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.299 2014/05/24 16:34:04 christos Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.300 2014/10/24 13:18:51 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.299 2014/05/24 16:34:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.300 2014/10/24 13:18:51 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -180,7 +180,7 @@ ffs_snapshot_cb(kauth_cred_t cred, kauth
 void *arg0, void *arg1, void *arg2, void *arg3)
 {
 	vnode_t *vp = arg2;
-	int result = KAUTH_RESULT_DEFER;;
+	int result = KAUTH_RESULT_DEFER;
 
 	if (action != KAUTH_SYSTEM_FS_SNAPSHOT)
 		return result;



CVS commit: src/lib/libc/gen

2014-10-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Oct 19 16:47:51 UTC 2014

Modified Files:
src/lib/libc/gen: utime.3

Log Message:
Do not use hard-coded values with ENAMETOOLONG, use symbolic constants
instead.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/gen/utime.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/gen/utime.3
diff -u src/lib/libc/gen/utime.3:1.21 src/lib/libc/gen/utime.3:1.22
--- src/lib/libc/gen/utime.3:1.21	Thu Apr 29 17:07:00 2010
+++ src/lib/libc/gen/utime.3	Sun Oct 19 16:47:51 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: utime.3,v 1.21 2010/04/29 17:07:00 jruoho Exp $
+.\	$NetBSD: utime.3,v 1.22 2014/10/19 16:47:51 njoly Exp $
 .\
 .\ Copyright (c) 1980, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -111,8 +111,12 @@ An I/O error occurred while reading or w
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters,
+or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 The named file does not exist.
 .It Bq Er ENOTDIR



CVS commit: src/sys/external/bsd/drm2/include/linux

2014-10-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 18 11:39:54 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux: io-mapping.h

Log Message:
A void function should not return a value from another void function.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/include/linux/io-mapping.h

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

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/io-mapping.h
diff -u src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.3 src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.4
--- src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.3	Thu Aug 28 13:45:59 2014
+++ src/sys/external/bsd/drm2/include/linux/io-mapping.h	Sat Oct 18 11:39:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: io-mapping.h,v 1.3 2014/08/28 13:45:59 riastradh Exp $	*/
+/*	$NetBSD: io-mapping.h,v 1.4 2014/10/18 11:39:54 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@ static inline void
 io_mapping_unmap_atomic(struct io_mapping *mapping, void *ptr)
 {
 
-	return io_mapping_unmap(mapping, ptr);
+	io_mapping_unmap(mapping, ptr);
 }
 
 #endif  /* _LINUX_IO_MAPPING_H_ */



CVS commit: src/lib/libc/sys

2014-10-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 11 11:50:11 UTC 2014

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

Log Message:
Use '.Rv -std' for RETURN VALUES, sort ERRORS.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/rmdir.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/rmdir.2
diff -u src/lib/libc/sys/rmdir.2:1.20 src/lib/libc/sys/rmdir.2:1.21
--- src/lib/libc/sys/rmdir.2:1.20	Mon May 31 12:16:20 2010
+++ src/lib/libc/sys/rmdir.2	Sat Oct 11 11:50:11 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: rmdir.2,v 1.20 2010/05/31 12:16:20 njoly Exp $
+.\	$NetBSD: rmdir.2,v 1.21 2014/10/11 11:50:11 njoly Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -52,14 +52,25 @@ than
 and
 .Ql \.. .
 .Sh RETURN VALUES
-A 0 is returned if the remove succeeds; otherwise a \-1 is
-returned and an error code is stored in the global location
-.Va errno .
+.Rv -std
 .Sh ERRORS
 The named file is removed unless:
 .Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path is not a directory.
+.It Bq Er EACCES
+Search permission is denied for a component of the path prefix, or
+write permission is denied on the directory containing the link
+to be removed.
+.It Bq Er EBUSY
+The directory to be removed is the mount point
+for a mounted file system.
+.It Bq Er EFAULT
+.Fa path
+points outside the process's allocated address space.
+.It Bq Er EIO
+An I/O error occurred while deleting the directory entry
+or deallocating the inode.
+.It Bq Er ELOOP
+Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
 A component of a pathname exceeded
 .Brq Dv NAME_MAX
@@ -68,33 +79,20 @@ characters, or an entire path name excee
 characters.
 .It Bq Er ENOENT
 The named directory does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
+.It Bq Er ENOTDIR
+A component of the path is not a directory.
 .It Bq Er ENOTEMPTY
 The named directory contains files other than
 .Ql \.
 and
 .Ql \..
 in it.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix, or
-write permission is denied on the directory containing the link
-to be removed.
 .It Bq Er EPERM
 The directory containing the directory to be removed is marked sticky,
 and neither the containing directory nor the directory to be removed
 are owned by the effective user ID.
-.It Bq Er EBUSY
-The directory to be removed is the mount point
-for a mounted file system.
-.It Bq Er EIO
-An I/O error occurred while deleting the directory entry
-or deallocating the inode.
 .It Bq Er EROFS
 The directory entry to be removed resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa path
-points outside the process's allocated address space.
 .El
 .Sh SEE ALSO
 .Xr mkdir 2 ,



CVS commit: src/lib/libc/sys

2014-10-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 11 12:06:58 UTC 2014

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

Log Message:
Note that rmdir(2) fails with EINVAL when the path last component is
`.' (dot).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/rmdir.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/rmdir.2
diff -u src/lib/libc/sys/rmdir.2:1.21 src/lib/libc/sys/rmdir.2:1.22
--- src/lib/libc/sys/rmdir.2:1.21	Sat Oct 11 11:50:11 2014
+++ src/lib/libc/sys/rmdir.2	Sat Oct 11 12:06:58 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: rmdir.2,v 1.21 2014/10/11 11:50:11 njoly Exp $
+.\	$NetBSD: rmdir.2,v 1.22 2014/10/11 12:06:58 njoly Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)rmdir.2	8.1 (Berkeley) 6/4/93
 .\
-.Dd June 4, 1993
+.Dd October 11, 2014
 .Dt RMDIR 2
 .Os
 .Sh NAME
@@ -66,6 +66,9 @@ for a mounted file system.
 .It Bq Er EFAULT
 .Fa path
 points outside the process's allocated address space.
+.It Bq Er EINVAL
+The last component of the path is
+.Ql \. .
 .It Bq Er EIO
 An I/O error occurred while deleting the directory entry
 or deallocating the inode.



CVS commit: src/lib/libc/sys

2014-09-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Sep 27 12:11:13 UTC 2014

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

Log Message:
Fix synopsis, remove unneeded Pp macro before display block and add one
before prototype. While here, use Rv -std for RETURN VALUES.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/sys/sigaltstack.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/sigaltstack.2
diff -u src/lib/libc/sys/sigaltstack.2:1.23 src/lib/libc/sys/sigaltstack.2:1.24
--- src/lib/libc/sys/sigaltstack.2:1.23	Fri Mar  2 18:07:17 2012
+++ src/lib/libc/sys/sigaltstack.2	Sat Sep 27 12:11:13 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: sigaltstack.2,v 1.23 2012/03/02 18:07:17 joerg Exp $
+.\	$NetBSD: sigaltstack.2,v 1.24 2014/09/27 12:11:13 njoly Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1992, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -39,7 +39,6 @@
 .Lb libc
 .Sh SYNOPSIS
 .In signal.h
-.Pp
 .Bd -literal
 typedef struct sigaltstack {
 	void   *ss_sp;
@@ -47,6 +46,7 @@ typedef struct sigaltstack {
 	int ss_flags;
 } stack_t;
 .Ed
+.Pp
 .Ft int
 .Fn sigaltstack const stack_t * restrict ss stack_t * restrict oss
 .Sh DESCRIPTION
@@ -132,10 +132,7 @@ are not ``grown'' automatically as is do
 If the stack overflows and this space is not protected
 unpredictable results may occur.
 .Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std
 .Sh ERRORS
 .Fn sigaltstack
 will fail and the signal stack context will remain unchanged



CVS commit: src/distrib/sets/lists

2014-09-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Sep 23 15:05:25 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/man: mi

Log Message:
Add some missing cat pages: hdestroy_r.0 and dnssec-importkey.0


To generate a diff of this commit:
cvs rdiff -u -r1.1911 -r1.1912 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1486 -r1.1487 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1911 src/distrib/sets/lists/comp/mi:1.1912
--- src/distrib/sets/lists/comp/mi:1.1911	Mon Aug 25 18:44:03 2014
+++ src/distrib/sets/lists/comp/mi	Tue Sep 23 15:05:25 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1911 2014/08/25 18:44:03 pooka Exp $
+#	$NetBSD: mi,v 1.1912 2014/09/23 15:05:25 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -6907,6 +6907,7 @@
 ./usr/share/man/cat3/hdestroy.0			comp-c-catman		.cat
 ./usr/share/man/cat3/hdestroy1.0		comp-c-catman		.cat
 ./usr/share/man/cat3/hdestroy1_r.0		comp-c-catman		.cat
+./usr/share/man/cat3/hdestroy_r.0		comp-c-catman		.cat
 ./usr/share/man/cat3/heapsort.0			comp-c-catman		.cat
 ./usr/share/man/cat3/herror.0			comp-c-catman		.cat
 ./usr/share/man/cat3/hesiod.0			comp-c-catman		hesiod,.cat

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1486 src/distrib/sets/lists/man/mi:1.1487
--- src/distrib/sets/lists/man/mi:1.1486	Mon Aug 25 12:49:22 2014
+++ src/distrib/sets/lists/man/mi	Tue Sep 23 15:05:25 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1486 2014/08/25 12:49:22 tsutsui Exp $
+# $NetBSD: mi,v 1.1487 2014/09/23 15:05:25 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2390,6 +2390,7 @@
 ./usr/share/man/cat8/dmsetup.0			man-lvm-catman		lvm,.cat
 ./usr/share/man/cat8/dnsblog.0			man-postfix-catman	postfix,.cat
 ./usr/share/man/cat8/dnssec-dsfromkey.0		man-bind-catman		.cat
+./usr/share/man/cat8/dnssec-importkey.0		man-bind-catman		.cat
 ./usr/share/man/cat8/dnssec-keyfromlabel.0	man-bind-catman		.cat
 ./usr/share/man/cat8/dnssec-keygen.0		man-bind-catman		.cat
 ./usr/share/man/cat8/dnssec-makekeyset.0	man-obsolete		obsolete



CVS commit: src/share/man/man4

2014-07-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 18 11:14:18 UTC 2014

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

Log Message:
Add missing end list (El) macro.


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

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

Modified files:

Index: src/share/man/man4/asus.4
diff -u src/share/man/man4/asus.4:1.2 src/share/man/man4/asus.4:1.3
--- src/share/man/man4/asus.4:1.2	Sun Jul 13 12:04:07 2014
+++ src/share/man/man4/asus.4	Fri Jul 18 11:14:18 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: asus.4,v 1.2 2014/07/13 12:04:07 wiz Exp $
+.\ $NetBSD: asus.4,v 1.3 2014/07/18 11:14:18 njoly Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -53,6 +53,7 @@ Toggle audio
 Volume down
 .It \Fn + F9
 Volume up
+.El
 .Sh SEE ALSO
 .Xr acpi 4 ,
 .Xr powerd 8



CVS commit: src/share/man/man7

2014-07-17 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Jul 17 13:42:02 UTC 2014

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Add hw.ncpuonline documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/share/man/man7/sysctl.7

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.83 src/share/man/man7/sysctl.7:1.84
--- src/share/man/man7/sysctl.7:1.83	Fri Jun 13 22:06:00 2014
+++ src/share/man/man7/sysctl.7	Thu Jul 17 13:42:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.83 2014/06/13 22:06:00 wiz Exp $
+.\	$NetBSD: sysctl.7,v 1.84 2014/07/17 13:42:02 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\
-.Dd June 13, 2014
+.Dd July 17, 2014
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -198,6 +198,7 @@ privilege may change the value.
 .It hw.machine_arch	string	no
 .It hw.model	string	no
 .It hw.ncpu	integer	no
+.It hw.ncpuonline	integer	no
 .It hw.pagesize	integer	no
 .It hw.physmem	integer	no
 .It hw.physmem64	quad	no
@@ -249,7 +250,9 @@ The machine CPU class.
 .It Li hw.model ( HW_MODEL )
 The machine model.
 .It Li hw.ncpu ( HW_NCPU )
-The number of CPUs.
+The number of CPUs configured.
+.It Li hw.ncpuonline ( HW_NCPUONLINE )
+The number of CPUs online.
 .It Li hw.pagesize ( HW_PAGESIZE )
 The software page size.
 .It Li hw.physmem ( HW_PHYSMEM )



CVS commit: src/sys

2014-07-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 12 09:57:25 UTC 2014

Modified Files:
src/sys/kern: kern_proc.c
src/sys/sys: sysctl.h

Log Message:
Allow fill_kproc2() to be used by more than sysctl.


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.212 -r1.213 src/sys/sys/sysctl.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/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.192 src/sys/kern/kern_proc.c:1.193
--- src/sys/kern/kern_proc.c:1.192	Tue Feb 25 18:30:11 2014
+++ src/sys/kern/kern_proc.c	Sat Jul 12 09:57:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.192 2014/02/25 18:30:11 pooka Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.193 2014/07/12 09:57:25 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.192 2014/02/25 18:30:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.193 2014/07/12 09:57:25 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_kstack.h
@@ -212,7 +212,6 @@ static const int	maxuprc	= MAXUPRC;
 
 static int sysctl_doeproc(SYSCTLFN_PROTO);
 static int sysctl_kern_proc_args(SYSCTLFN_PROTO);
-static void fill_kproc2(struct proc *, struct kinfo_proc2 *, bool);
 
 /*
  * The process list descriptors, used during pid allocation and
@@ -2200,7 +2199,7 @@ fill_eproc(struct proc *p, struct eproc 
 /*
  * Fill in a kinfo_proc2 structure for the specified process.
  */
-static void
+void
 fill_kproc2(struct proc *p, struct kinfo_proc2 *ki, bool zombie)
 {
 	struct tty *tp;

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.212 src/sys/sys/sysctl.h:1.213
--- src/sys/sys/sysctl.h:1.212	Fri Jun 13 15:45:05 2014
+++ src/sys/sys/sysctl.h	Sat Jul 12 09:57:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.212 2014/06/13 15:45:05 joerg Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.213 2014/07/12 09:57:25 njoly Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -1143,6 +1143,7 @@ typedef int (*sysctlfn)(SYSCTLFN_PROTO);
  * used in more than just sysctl
  */
 void	fill_eproc(struct proc *, struct eproc *, bool);
+void	fill_kproc2(struct proc *, struct kinfo_proc2 *, bool);
 
 /*
  * subsystem setup



CVS commit: src/sys/miscfs/procfs

2014-07-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 12 09:58:39 UTC 2014

Modified Files:
src/sys/miscfs/procfs: procfs_linux.c

Log Message:
Use kproc2 to provide sensible informations for /proc/pid/stat.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/miscfs/procfs/procfs_linux.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/miscfs/procfs/procfs_linux.c
diff -u src/sys/miscfs/procfs/procfs_linux.c:1.68 src/sys/miscfs/procfs/procfs_linux.c:1.69
--- src/sys/miscfs/procfs/procfs_linux.c:1.68	Mon Jun 30 14:58:59 2014
+++ src/sys/miscfs/procfs/procfs_linux.c	Sat Jul 12 09:58:39 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $  */
+/*  $NetBSD: procfs_linux.c,v 1.69 2014/07/12 09:58:39 njoly Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.69 2014/07/12 09:58:39 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -400,7 +400,7 @@ out:
 	return error;
 }
 
-#define USEC_2_TICKS(x)		((x) / 1)
+#define UTIME2TICKS(s,u)	(((uint64_t)(s) * 100 + (u)) / 1)
 
 /*
  * Linux compatible /proc/pid/stat. Only active when the -o linux
@@ -413,12 +413,11 @@ procfs_do_pid_stat(struct lwp *curl, str
 	char *bf;
 	struct proc *p = l-l_proc;
 	int len;
-	struct tty *tty = p-p_session-s_ttyp;
-	struct rusage *ru = p-p_stats-p_ru;
 	struct rusage *cru = p-p_stats-p_cru;
 	unsigned long stext = 0, etext = 0, sstack = 0;
 	struct timeval rt;
 	struct vmspace	*vm;
+	struct kinfo_proc2 ki;
 	int error = 0;
 
 	bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
@@ -432,65 +431,67 @@ procfs_do_pid_stat(struct lwp *curl, str
 	mutex_enter(proc_lock);
 	mutex_enter(p-p_lock);
 
+	fill_kproc2(p, ki, false);
 	calcru(p, NULL, NULL, NULL, rt);
 
 	len = snprintf(bf, LBFSZ,
-	%d (%s) %c %d %d %d %lld %d 
+	%d (%s) %c %d %d %d %u %d 
 	%u 
-	%lu %lu %lu %lu %lu %lu %lu %lu 
-	%d %d %d 
-	%lld %lld %lu %lu % PRIu64  
+	%PRIu64 %lu %PRIu64 %lu %PRIu64 %PRIu64 %PRIu64 %PRIu64 
+	%d %d %PRIu64 
+	%lld %PRIu64 %PRId64 %lu %PRIu64 
 	%lu %lu %lu 
 	%u %u 
 	%u %u %u %u 
-	%lu %lu %lu %d %d\n,
+	%PRIu64 %PRIu64 %PRIu64 %d %PRIu64\n,
 
-	p-p_pid,
-	p-p_comm,
-	0IR3SZD[(p-p_stat  6) ? 0 : (int)p-p_stat],
-	(p-p_pptr != NULL) ? p-p_pptr-p_pid : 0,
+	ki.p_pid,		/* 1 pid */
+	ki.p_comm,		/* 2 tcomm */
+	0RRSTZXR8[(ki.p_stat  8) ? 0 : (int)ki.p_stat],	/* 3 state */
+	ki.p_ppid,		/* 4 ppid */
+	ki.p__pgid,		/* 5 pgrp */
+	ki.p_sid,		/* 6 sid */
+	(ki.p_tdev != (uint32_t)NODEV) ? ki.p_tdev : 0,	/* 7 tty_nr */
+	ki.p_tpgid,		/* 8 tty_pgrp */
 
-	p-p_pgid,
-	p-p_session-s_sid,
-	(unsigned long long)(tty ? tty-t_dev : 0),
-	(tty  tty-t_pgrp) ? tty-t_pgrp-pg_id : 0,
+	ki.p_flag,		/* 9 flags */
 
-	p-p_flag,
-
-	ru-ru_minflt,
+	ki.p_uru_minflt,	/* 10 min_flt */
 	cru-ru_minflt,
-	ru-ru_majflt,
+	ki.p_uru_majflt,	/* 12 maj_flt */
 	cru-ru_majflt,
-	(long)USEC_2_TICKS(ru-ru_utime.tv_usec),
-	(long)USEC_2_TICKS(ru-ru_stime.tv_usec),
-	(long)USEC_2_TICKS(cru-ru_utime.tv_usec),
-	(long)USEC_2_TICKS(cru-ru_stime.tv_usec),
-
-	l-l_priority,/* XXX: priority */
-	p-p_nice - NZERO,
-	0,
+	UTIME2TICKS(ki.p_uutime_sec, ki.p_uutime_usec),	/* 14 utime */
+	UTIME2TICKS(ki.p_ustime_sec, ki.p_ustime_usec),	/* 15 stime */
+	UTIME2TICKS(cru-ru_utime.tv_sec, cru-ru_utime.tv_usec), /* 16 cutime */
+	UTIME2TICKS(cru-ru_stime.tv_sec, cru-ru_stime.tv_usec), /* 17 cstime */
+
+	ki.p_priority,/* XXX: 18 priority */
+	ki.p_nice - NZERO,/* 19 nice */
+	ki.p_nlwps,	/* 20 num_threads */
 
 	(long long)rt.tv_sec,
-	(long long)p-p_stats-p_start.tv_sec,
-	(unsigned long)(vm-vm_tsize + vm-vm_dsize + vm-vm_ssize), /* size */
-	(unsigned long)(vm-vm_rssize),	/* resident */
-	p-p_rlimit[RLIMIT_RSS].rlim_cur,
-
-	stext,	/* start code */
-	etext,	/* end code */
-	sstack,	/* mm start stack */
-	0,		/* XXX: pc */
-	0,		/* XXX: sp */
-	p-p_sigpend.sp_set.__bits[0],		/* XXX: pending */
-	0,		/* XXX: held */
-	p-p_sigctx.ps_sigignore.__bits[0],		/* ignored */
-	p-p_sigctx.ps_sigcatch.__bits[0],		/* caught */
-
-	(unsigned long)(intptr_t)l-l_wchan,
-	ru-ru_nvcsw,
-	ru-ru_nivcsw,
-	p-p_exitsig,
-	0);		/* XXX: processor */
+	UTIME2TICKS(ki.p_ustart_sec, ki.p_ustart_usec), /* 22 start_time */
+	ki.p_vm_msize,/* 23 vsize */
+	PGTOKB(ki.p_vm_rssize),			/* 24 rss */
+	p-p_rlimit[RLIMIT_RSS].rlim_cur,		/* 25 rsslim */
+
+	stext,	/* 26 

CVS commit: src/sys/miscfs/procfs

2014-06-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jun 30 14:58:59 UTC 2014

Modified Files:
src/sys/miscfs/procfs: procfs_linux.c

Log Message:
Use NZERO instead of hard-coded 20 value.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/miscfs/procfs/procfs_linux.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/miscfs/procfs/procfs_linux.c
diff -u src/sys/miscfs/procfs/procfs_linux.c:1.67 src/sys/miscfs/procfs/procfs_linux.c:1.68
--- src/sys/miscfs/procfs/procfs_linux.c:1.67	Sat Apr  5 18:42:32 2014
+++ src/sys/miscfs/procfs/procfs_linux.c	Mon Jun 30 14:58:59 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: procfs_linux.c,v 1.67 2014/04/05 18:42:32 christos Exp $  */
+/*  $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.67 2014/04/05 18:42:32 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -467,7 +467,7 @@ procfs_do_pid_stat(struct lwp *curl, str
 	(long)USEC_2_TICKS(cru-ru_stime.tv_usec),
 
 	l-l_priority,/* XXX: priority */
-	p-p_nice - 20,
+	p-p_nice - NZERO,
 	0,
 
 	(long long)rt.tv_sec,



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

2014-06-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 25 16:30:42 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: linux_fcntl.h
src/sys/compat/linux/arch/amd64: linux_fcntl.h
src/sys/compat/linux/arch/arm: linux_fcntl.h
src/sys/compat/linux/arch/i386: linux_fcntl.h
src/sys/compat/linux/arch/m68k: linux_fcntl.h
src/sys/compat/linux/arch/mips: linux_fcntl.h
src/sys/compat/linux/arch/powerpc: linux_fcntl.h

Log Message:
Add a few missing open(2) flags (LINUX_O_*). Fix alpha wrong values.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/alpha/linux_fcntl.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/amd64/linux_fcntl.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/arm/linux_fcntl.h
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/arch/i386/linux_fcntl.h
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/m68k/linux_fcntl.h
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/arch/mips/linux_fcntl.h
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux/arch/powerpc/linux_fcntl.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/compat/linux/arch/alpha/linux_fcntl.h
diff -u src/sys/compat/linux/arch/alpha/linux_fcntl.h:1.4 src/sys/compat/linux/arch/alpha/linux_fcntl.h:1.5
--- src/sys/compat/linux/arch/alpha/linux_fcntl.h:1.4	Tue Nov  2 18:01:25 2010
+++ src/sys/compat/linux/arch/alpha/linux_fcntl.h	Wed Jun 25 16:30:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.5 2014/06/25 16:30:42 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -45,10 +45,14 @@
 #define LINUX_O_TRUNC		0x000400
 #define LINUX_O_EXCL		0x000800
 #define LINUX_O_NDELAY		LINUX_O_NONBLOCK
+#define LINUX_O_NOCTTY		0x001000
 #define LINUX_FASYNC		0x002000
 #define LINUX_O_SYNC		0x004000
-#define LINUX_O_NOCTTY		0x008000
-#define LINUX_O_DIRECTORY	0x04
+#define LINUX_O_DIRECTORY	0x008000
+#define LINUX_O_NOFOLLOW	0x01
+#define LINUX_O_LARGEFILE	0x02
+#define LINUX_O_DIRECT		0x08
+#define LINUX_O_NOATIME		0x10
 #define LINUX_O_CLOEXEC		0x20
 
 /* fcntl(2) operations */

Index: src/sys/compat/linux/arch/amd64/linux_fcntl.h
diff -u src/sys/compat/linux/arch/amd64/linux_fcntl.h:1.4 src/sys/compat/linux/arch/amd64/linux_fcntl.h:1.5
--- src/sys/compat/linux/arch/amd64/linux_fcntl.h:1.4	Tue Nov  2 18:01:25 2010
+++ src/sys/compat/linux/arch/amd64/linux_fcntl.h	Wed Jun 25 16:30:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $ */
+/*	$NetBSD: linux_fcntl.h,v 1.5 2014/06/25 16:30:42 njoly Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -50,7 +50,11 @@
 #define LINUX_O_NDELAY		LINUX_O_NONBLOCK
 #define LINUX_O_SYNC		0x01000
 #define LINUX_FASYNC		0x02000
+#define LINUX_O_DIRECT		0x04000
+#define LINUX_O_LARGEFILE	0x08000
 #define LINUX_O_DIRECTORY	0x1
+#define LINUX_O_NOFOLLOW	0x2
+#define LINUX_O_NOATIME		0x4
 #define LINUX_O_CLOEXEC		0x8
 
 /* fcntl(2) operations */

Index: src/sys/compat/linux/arch/arm/linux_fcntl.h
diff -u src/sys/compat/linux/arch/arm/linux_fcntl.h:1.4 src/sys/compat/linux/arch/arm/linux_fcntl.h:1.5
--- src/sys/compat/linux/arch/arm/linux_fcntl.h:1.4	Tue Nov  2 18:01:25 2010
+++ src/sys/compat/linux/arch/arm/linux_fcntl.h	Wed Jun 25 16:30:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.5 2014/06/25 16:30:42 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -49,6 +49,10 @@
 #define LINUX_O_SYNC		0x01000
 #define LINUX_FASYNC		0x02000
 #define LINUX_O_DIRECTORY	0x04000
+#define LINUX_O_NOFOLLOW	0x08000
+#define LINUX_O_DIRECT		0x1
+#define LINUX_O_LARGEFILE	0x2
+#define LINUX_O_NOATIME		0x4
 #define LINUX_O_CLOEXEC		0x8
 
 /* fcntl(2) operations */

Index: src/sys/compat/linux/arch/i386/linux_fcntl.h
diff -u src/sys/compat/linux/arch/i386/linux_fcntl.h:1.7 src/sys/compat/linux/arch/i386/linux_fcntl.h:1.8
--- src/sys/compat/linux/arch/i386/linux_fcntl.h:1.7	Tue Nov  2 18:01:26 2010
+++ src/sys/compat/linux/arch/i386/linux_fcntl.h	Wed Jun 25 16:30:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.7 2010/11/02 18:01:26 chs Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.8 2014/06/25 16:30:42 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,11 @@
 #define LINUX_O_NDELAY		LINUX_O_NONBLOCK
 #define LINUX_O_SYNC		0x01000
 #define LINUX_FASYNC		0x02000
+#define LINUX_O_DIRECT		0x04000
+#define LINUX_O_LARGEFILE	0x08000
 #define LINUX_O_DIRECTORY	0x1
+#define LINUX_O_NOFOLLOW	0x2
+#define LINUX_O_NOATIME		0x4
 #define LINUX_O_CLOEXEC		0x8
 
 /* fcntl(2) operations */

Index: src/sys/compat/linux/arch/m68k/linux_fcntl.h
diff -u 

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

2014-06-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 25 16:38:53 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_file.c

Log Message:
Add support for more open flags that have a native equivalent
(O_NONBLOCK, O_DIRECT and O_NOFOLLOW).
Translate native EFTYPE error (missing on Linux) to expected ELOOP;
when opening symlinks with flag O_NOFOLLOW.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/compat/linux/common/linux_file.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/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.112 src/sys/compat/linux/common/linux_file.c:1.113
--- src/sys/compat/linux/common/linux_file.c:1.112	Sun Jun  1 13:42:12 2014
+++ src/sys/compat/linux/common/linux_file.c	Wed Jun 25 16:38:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.112 2014/06/01 13:42:12 njoly Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.113 2014/06/25 16:38:53 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.112 2014/06/01 13:42:12 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.113 2014/06/25 16:38:53 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -93,15 +93,19 @@ linux_to_bsd_ioflags(int lflags)
 	res |= cvtto_bsd_mask(lflags, LINUX_O_WRONLY, O_WRONLY);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_RDONLY, O_RDONLY);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_RDWR, O_RDWR);
+
 	res |= cvtto_bsd_mask(lflags, LINUX_O_CREAT, O_CREAT);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_EXCL, O_EXCL);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_NOCTTY, O_NOCTTY);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_TRUNC, O_TRUNC);
+	res |= cvtto_bsd_mask(lflags, LINUX_O_APPEND, O_APPEND);
+	res |= cvtto_bsd_mask(lflags, LINUX_O_NONBLOCK, O_NONBLOCK);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_NDELAY, O_NDELAY);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_SYNC, O_FSYNC);
 	res |= cvtto_bsd_mask(lflags, LINUX_FASYNC, O_ASYNC);
-	res |= cvtto_bsd_mask(lflags, LINUX_O_APPEND, O_APPEND);
+	res |= cvtto_bsd_mask(lflags, LINUX_O_DIRECT, O_DIRECT);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_DIRECTORY, O_DIRECTORY);
+	res |= cvtto_bsd_mask(lflags, LINUX_O_NOFOLLOW, O_NOFOLLOW);
 	res |= cvtto_bsd_mask(lflags, LINUX_O_CLOEXEC, O_CLOEXEC);
 
 	return res;
@@ -115,15 +119,19 @@ bsd_to_linux_ioflags(int bflags)
 	res |= cvtto_linux_mask(bflags, O_WRONLY, LINUX_O_WRONLY);
 	res |= cvtto_linux_mask(bflags, O_RDONLY, LINUX_O_RDONLY);
 	res |= cvtto_linux_mask(bflags, O_RDWR, LINUX_O_RDWR);
+
 	res |= cvtto_linux_mask(bflags, O_CREAT, LINUX_O_CREAT);
 	res |= cvtto_linux_mask(bflags, O_EXCL, LINUX_O_EXCL);
 	res |= cvtto_linux_mask(bflags, O_NOCTTY, LINUX_O_NOCTTY);
 	res |= cvtto_linux_mask(bflags, O_TRUNC, LINUX_O_TRUNC);
+	res |= cvtto_linux_mask(bflags, O_APPEND, LINUX_O_APPEND);
+	res |= cvtto_linux_mask(bflags, O_NONBLOCK, LINUX_O_NONBLOCK);
 	res |= cvtto_linux_mask(bflags, O_NDELAY, LINUX_O_NDELAY);
 	res |= cvtto_linux_mask(bflags, O_FSYNC, LINUX_O_SYNC);
 	res |= cvtto_linux_mask(bflags, O_ASYNC, LINUX_FASYNC);
-	res |= cvtto_linux_mask(bflags, O_APPEND, LINUX_O_APPEND);
+	res |= cvtto_linux_mask(bflags, O_DIRECT, LINUX_O_DIRECT);
 	res |= cvtto_linux_mask(bflags, O_DIRECTORY, LINUX_O_DIRECTORY);
+	res |= cvtto_linux_mask(bflags, O_NOFOLLOW, LINUX_O_NOFOLLOW);
 	res |= cvtto_linux_mask(bflags, O_CLOEXEC, LINUX_O_CLOEXEC);
 
 	return res;
@@ -204,7 +212,7 @@ linux_sys_open(struct lwp *l, const stru
 	SCARG(boa, mode) = SCARG(uap, mode);
 
 	if ((error = sys_open(l, boa, retval)))
-		return error;
+		return (error == EFTYPE) ? ELOOP : error;
 
 	linux_open_ctty(l, fl, *retval);
 	return 0;
@@ -230,7 +238,7 @@ linux_sys_openat(struct lwp *l, const st
 	SCARG(boa, mode) = SCARG(uap, mode);
 
 	if ((error = sys_openat(l, boa, retval)))
-		return error;
+		return (error == EFTYPE) ? ELOOP : error;
 
 	linux_open_ctty(l, fl, *retval);
 	return 0;



CVS commit: src/usr.bin/systat

2014-06-20 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jun 20 07:08:15 UTC 2014

Modified Files:
src/usr.bin/systat: vmstat.c

Log Message:
Remove fagile test which ensured that first namelist element (was
X_NCHSTATS) had a known type. Make disk stats available again for
vmstat display.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/systat/vmstat.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/systat/vmstat.c
diff -u src/usr.bin/systat/vmstat.c:1.79 src/usr.bin/systat/vmstat.c:1.80
--- src/usr.bin/systat/vmstat.c:1.79	Sat Jun 14 20:10:42 2014
+++ src/usr.bin/systat/vmstat.c	Fri Jun 20 07:08:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmstat.c,v 1.79 2014/06/14 20:10:42 joerg Exp $	*/
+/*	$NetBSD: vmstat.c,v 1.80 2014/06/20 07:08:15 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)vmstat.c	8.2 (Berkeley) 1/12/94;
 #endif
-__RCSID($NetBSD: vmstat.c,v 1.79 2014/06/14 20:10:42 joerg Exp $);
+__RCSID($NetBSD: vmstat.c,v 1.80 2014/06/20 07:08:15 njoly Exp $);
 #endif /* not lint */
 
 /*
@@ -212,10 +212,6 @@ initvmstat(void)
 			nlisterr(namelist);
 			return(0);
 		}
-		if (namelist[0].n_type == 0) {
-			error(No namelist);
-			return(0);
-		}
 	}
 	hertz = stathz ? stathz : hz;
 	if (!drvinit(1))



CVS commit: src

2014-06-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jun 14 11:37:35 UTC 2014

Modified Files:
src/lib/libc/sys: truncate.2
src/sys/kern: vfs_syscalls.c

Log Message:
Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/truncate.2
cvs rdiff -u -r1.483 -r1.484 src/sys/kern/vfs_syscalls.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/sys/truncate.2
diff -u src/lib/libc/sys/truncate.2:1.26 src/lib/libc/sys/truncate.2:1.27
--- src/lib/libc/sys/truncate.2:1.26	Mon May 31 12:16:20 2010
+++ src/lib/libc/sys/truncate.2	Sat Jun 14 11:37:35 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: truncate.2,v 1.26 2010/05/31 12:16:20 njoly Exp $
+.\	$NetBSD: truncate.2,v 1.27 2014/06/14 11:37:35 njoly Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)truncate.2	8.1 (Berkeley) 6/4/93
 .\
-.Dd March 16, 2008
+.Dd June 14, 2014
 .Dt TRUNCATE 2
 .Os
 .Sh NAME
@@ -76,6 +76,10 @@ and
 .Fn ftruncate
 are:
 .Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa length
+argument was less than 0.
 .It Bq Er EISDIR
 The named file is a directory.
 .It Bq Er EROFS

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.483 src/sys/kern/vfs_syscalls.c:1.484
--- src/sys/kern/vfs_syscalls.c:1.483	Thu Jun 12 21:39:45 2014
+++ src/sys/kern/vfs_syscalls.c	Sat Jun 14 11:37:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.483 2014/06/12 21:39:45 joerg Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.484 2014/06/14 11:37:35 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.483 2014/06/12 21:39:45 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.484 2014/06/14 11:37:35 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -3923,6 +3923,9 @@ sys_truncate(struct lwp *l, const struct
 	struct vattr vattr;
 	int error;
 
+	if (SCARG(uap, length)  0)
+		return EINVAL;
+
 	error = namei_simple_user(SCARG(uap, path),
 NSM_FOLLOW_TRYEMULROOT, vp);
 	if (error != 0)
@@ -3957,6 +3960,9 @@ sys_ftruncate(struct lwp *l, const struc
 	file_t *fp;
 	int error;
 
+	if (SCARG(uap, length)  0)
+		return EINVAL;
+
 	/* fd_getvnode() will use the descriptor for us */
 	if ((error = fd_getvnode(SCARG(uap, fd), fp)) != 0)
 		return (error);



CVS commit: src/sys/dev/usb

2014-06-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 11 07:05:03 UTC 2014

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

Log Message:
Add Intel new vendor id, and Rate Matching Hub devices.


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.672 src/sys/dev/usb/usbdevs:1.673
--- src/sys/dev/usb/usbdevs:1.672	Fri May 30 16:11:52 2014
+++ src/sys/dev/usb/usbdevs	Wed Jun 11 07:05:03 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp $
+$NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -579,6 +579,7 @@ vendor ARKMICROCHIPS	0x6547	ArkMicroChip
 vendor 3COM2		0x6891	3Com
 vendor EDIMAX		0x7392	EDIMAX
 vendor INTEL		0x8086	Intel
+vendor INTEL2		0x8087	Intel
 vendor ALLWIN		0x8516	ALLWIN Tech
 vendor MOSCHIP		0x9710	MosChip Semiconductor
 vendor NETGEAR4		0x9846	Netgear
@@ -1789,6 +1790,9 @@ product INTEL AP310		0x0200	AP310 AnyPoi
 product INTEL I2011B		0x	Wireless 2011B
 product INTEL TESTBOARD		0x9890	82930 test board
 
+product INTEL2 RMH		0x0020	Rate Matching Hub
+product INTEL2 RMH2		0x0024	Rate Matching Hub
+
 /* Intersil products */
 product INTERSIL PRISM_GT	0x1000	PrismGT USB 2.0 WLAN
 product INTERSIL PRISM_2X	0x3642	Prism2.x WLAN



CVS commit: src/sys/dev/usb

2014-06-11 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 11 07:05:35 UTC 2014

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

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.664 -r1.665 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.665 -r1.666 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.664 src/sys/dev/usb/usbdevs.h:1.665
--- src/sys/dev/usb/usbdevs.h:1.664	Fri May 30 16:12:22 2014
+++ src/sys/dev/usb/usbdevs.h	Wed Jun 11 07:05:35 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.664 2014/05/30 16:12:22 nonaka Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.665 2014/06/11 07:05:35 njoly Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp
+ *	NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp
  */
 
 /*
@@ -586,6 +586,7 @@
 #define	USB_VENDOR_3COM2	0x6891		/* 3Com */
 #define	USB_VENDOR_EDIMAX	0x7392		/* EDIMAX */
 #define	USB_VENDOR_INTEL	0x8086		/* Intel */
+#define	USB_VENDOR_INTEL2	0x8087		/* Intel */
 #define	USB_VENDOR_ALLWIN	0x8516		/* ALLWIN Tech */
 #define	USB_VENDOR_MOSCHIP	0x9710		/* MosChip Semiconductor */
 #define	USB_VENDOR_NETGEAR4	0x9846		/* Netgear */
@@ -1796,6 +1797,9 @@
 #define	USB_PRODUCT_INTEL_I2011B	0x		/* Wireless 2011B */
 #define	USB_PRODUCT_INTEL_TESTBOARD	0x9890		/* 82930 test board */
 
+#define	USB_PRODUCT_INTEL2_RMH	0x0020		/* Rate Matching Hub */
+#define	USB_PRODUCT_INTEL2_RMH2	0x0024		/* Rate Matching Hub */
+
 /* Intersil products */
 #define	USB_PRODUCT_INTERSIL_PRISM_GT	0x1000		/* PrismGT USB 2.0 WLAN */
 #define	USB_PRODUCT_INTERSIL_PRISM_2X	0x3642		/* Prism2.x WLAN */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.665 src/sys/dev/usb/usbdevs_data.h:1.666
--- src/sys/dev/usb/usbdevs_data.h:1.665	Fri May 30 16:12:22 2014
+++ src/sys/dev/usb/usbdevs_data.h	Wed Jun 11 07:05:35 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.665 2014/05/30 16:12:22 nonaka Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.666 2014/06/11 07:05:35 njoly Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp
+ *	NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp
  */
 
 /*
@@ -2123,6 +2123,10 @@ const struct usb_vendor usb_vendors[] = 
 	Intel,
 	},
 	{
+	USB_VENDOR_INTEL2,
+	Intel,
+	},
+	{
 	USB_VENDOR_ALLWIN,
 	ALLWIN Tech,
 	},
@@ -2155,7 +2159,7 @@ const struct usb_vendor usb_vendors[] = 
 	GNU Radio USRP,
 	},
 };
-const int usb_nvendors = 529;
+const int usb_nvendors = 530;
 
 const struct usb_product usb_products[] = {
 	{
@@ -5615,6 +5619,14 @@ const struct usb_product usb_products[] 
 	82930 test board,
 	},
 	{
+	USB_VENDOR_INTEL2, USB_PRODUCT_INTEL2_RMH,
+	Rate Matching Hub,
+	},
+	{
+	USB_VENDOR_INTEL2, USB_PRODUCT_INTEL2_RMH2,
+	Rate Matching Hub,
+	},
+	{
 	USB_VENDOR_INTERSIL, USB_PRODUCT_INTERSIL_PRISM_GT,
 	PrismGT USB 2.0 WLAN,
 	},
@@ -10147,4 +10159,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1997;
+const int usb_nproducts = 1999;



CVS commit: src/lib/libc/sys

2014-06-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jun  9 09:15:48 UTC 2014

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

Log Message:
Replace wrong numeric values with corresponding symbolic constants.
While here, remove unneeded paragraph macro.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/sys/pathconf.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/pathconf.2
diff -u src/lib/libc/sys/pathconf.2:1.27 src/lib/libc/sys/pathconf.2:1.28
--- src/lib/libc/sys/pathconf.2:1.27	Mon Jul 26 12:30:16 2010
+++ src/lib/libc/sys/pathconf.2	Mon Jun  9 09:15:48 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: pathconf.2,v 1.27 2010/07/26 12:30:16 njoly Exp $
+.\	$NetBSD: pathconf.2,v 1.28 2014/06/09 09:15:48 njoly Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -71,7 +71,6 @@ Symbolic constants for each name value a
 header.
 .Pp
 The available values are as follows:
-.Pp
 .Bl -tag -width 123456
 .It Li _PC_LINK_MAX
 The maximum file link count.
@@ -155,8 +154,11 @@ An I/O error occurred while reading from
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters, or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
 The named file does not exist.
 .It Bq Er ENOTDIR



CVS commit: src/tests/fs/vfs

2014-06-03 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jun  3 11:56:07 UTC 2014

Modified Files:
src/tests/fs/vfs: t_vnops.c

Log Message:
Add testcase that check lstat(2) values for symbolic links (PR
kern/48864).


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/fs/vfs/t_vnops.c

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

Modified files:

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.38 src/tests/fs/vfs/t_vnops.c:1.39
--- src/tests/fs/vfs/t_vnops.c:1.38	Sat Oct 19 17:45:00 2013
+++ src/tests/fs/vfs/t_vnops.c	Tue Jun  3 11:56:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.38 2013/10/19 17:45:00 christos Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.39 2014/06/03 11:56:07 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -847,6 +847,30 @@ read_directory(const atf_tc_t *tc, const
 	FSTEST_EXIT();
 }
 
+static void
+lstat_symlink(const atf_tc_t *tc, const char *mp)
+{
+	const char *src, *dst;
+	int res;
+	struct stat st;
+
+	USES_SYMLINKS;
+	FSTEST_ENTER();
+
+	src = source;
+	dst = destination;
+
+	res = rump_sys_symlink(src, dst);
+	ATF_REQUIRE(res != -1);
+	res = rump_sys_lstat(dst, st);
+	ATF_REQUIRE(res != -1);
+
+	ATF_CHECK(S_ISLNK(st.st_mode) != 0);
+	ATF_CHECK(st.st_size == (off_t)strlen(src));
+
+	FSTEST_EXIT();
+}
+
 ATF_TC_FSAPPLY(lookup_simple, simple lookup (./.. on root));
 ATF_TC_FSAPPLY(lookup_complex, lookup of non-dot entries);
 ATF_TC_FSAPPLY(dir_simple, mkdir/rmdir);
@@ -866,6 +890,7 @@ ATF_TC_FSAPPLY(fcntl_lock, check fcntl 
 ATF_TC_FSAPPLY(fcntl_getlock_pids,fcntl F_GETLK w/ many procs, PR kern/44494);
 ATF_TC_FSAPPLY(access_simple, access(2));
 ATF_TC_FSAPPLY(read_directory, read(2) on directories);
+ATF_TC_FSAPPLY(lstat_symlink, lstat(2) values for symbolic links);
 
 ATF_TP_ADD_TCS(tp)
 {
@@ -888,6 +913,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(fcntl_getlock_pids);
 	ATF_TP_FSAPPLY(access_simple);
 	ATF_TP_FSAPPLY(read_directory);
+	ATF_TP_FSAPPLY(lstat_symlink);
 
 	return atf_no_error();
 }



CVS commit: src/sys/compat

2014-06-01 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Jun  1 13:42:12 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: linux_pipe.c
src/sys/compat/linux/common: linux_fcntl.h linux_file.c linux_pipe.c
src/sys/compat/linux32/common: linux32_unistd.c

Log Message:
Cleanup pipe(2) flags, now that native handle them.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux/arch/alpha/linux_pipe.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux/common/linux_fcntl.h
cvs rdiff -u -r1.111 -r1.112 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/common/linux_pipe.c
cvs rdiff -u -r1.38 -r1.39 src/sys/compat/linux32/common/linux32_unistd.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_pipe.c
diff -u src/sys/compat/linux/arch/alpha/linux_pipe.c:1.15 src/sys/compat/linux/arch/alpha/linux_pipe.c:1.16
--- src/sys/compat/linux/arch/alpha/linux_pipe.c:1.15	Thu Apr 14 11:17:47 2011
+++ src/sys/compat/linux/arch/alpha/linux_pipe.c	Sun Jun  1 13:42:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_pipe.c,v 1.15 2011/04/14 11:17:47 he Exp $	*/
+/*	$NetBSD: linux_pipe.c,v 1.16 2014/06/01 13:42:12 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_pipe.c,v 1.15 2011/04/14 11:17:47 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_pipe.c,v 1.16 2014/06/01 13:42:12 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -80,28 +80,16 @@ linux_sys_pipe2(struct lwp *l, const str
 		syscallarg(int *) pfds;
 		syscallarg(int) flags;
 	} */
-	int error;
-	int flag = 0;
+	int error, flags;
 
-	switch (SCARG(uap, flags)) {
-	case LINUX_O_CLOEXEC:
-		break;
-	case LINUX_O_NONBLOCK:
-	case LINUX_O_NONBLOCK|LINUX_O_CLOEXEC:
-		flag = O_NONBLOCK;
-		break;
-	default:
+	flags = linux_to_bsd_ioflags(SCARG(uap, flags));
+	if ((flags  ~(O_CLOEXEC|O_NONBLOCK)) != 0)
 		return EINVAL;
-	}
 
-	if ((error = pipe1(l, retval, flag)))
+	if ((error = pipe1(l, retval, flags)))
 		return error;
 
 	(l-l_md.md_tf)-tf_regs[FRAME_A4] = retval[1];
 
-	if (SCARG(uap, flags)  LINUX_O_CLOEXEC) {
-		fd_set_exclose(l, retval[0], true);
-		fd_set_exclose(l, retval[1], true);
-	}   
 	return 0;
 }

Index: src/sys/compat/linux/common/linux_fcntl.h
diff -u src/sys/compat/linux/common/linux_fcntl.h:1.15 src/sys/compat/linux/common/linux_fcntl.h:1.16
--- src/sys/compat/linux/common/linux_fcntl.h:1.15	Tue Sep 24 13:27:50 2013
+++ src/sys/compat/linux/common/linux_fcntl.h	Sun Jun  1 13:42:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fcntl.h,v 1.15 2013/09/24 13:27:50 njoly Exp $	*/
+/*	$NetBSD: linux_fcntl.h,v 1.16 2014/06/01 13:42:12 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -50,6 +50,7 @@
 #define LINUX_AT_NO_AUTOMOUNT		0x0800
 #define LINUX_AT_EMPTY_PATH		0x1000
 
+int linux_to_bsd_ioflags(int);
 int linux_to_bsd_atflags(int);
 
 struct linux_flock {

Index: src/sys/compat/linux/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.111 src/sys/compat/linux/common/linux_file.c:1.112
--- src/sys/compat/linux/common/linux_file.c:1.111	Sun May 18 09:30:00 2014
+++ src/sys/compat/linux/common/linux_file.c	Sun Jun  1 13:42:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.111 2014/05/18 09:30:00 njoly Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.112 2014/06/01 13:42:12 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.111 2014/05/18 09:30:00 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.112 2014/06/01 13:42:12 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -69,7 +69,6 @@ __KERNEL_RCSID(0, $NetBSD: linux_file.c
 
 #include compat/linux/linux_syscallargs.h
 
-static int linux_to_bsd_ioflags(int);
 static int bsd_to_linux_ioflags(int);
 #ifndef __amd64__
 static void bsd_to_linux_stat(struct stat *, struct linux_stat *);
@@ -86,7 +85,7 @@ conv_linux_flock(linux, flock)
  * The next two functions convert between the Linux and NetBSD values
  * of the flags used in open(2) and fcntl(2).
  */
-static int
+int
 linux_to_bsd_ioflags(int lflags)
 {
 	int res = 0;

Index: src/sys/compat/linux/common/linux_pipe.c
diff -u src/sys/compat/linux/common/linux_pipe.c:1.65 src/sys/compat/linux/common/linux_pipe.c:1.66
--- src/sys/compat/linux/common/linux_pipe.c:1.65	Thu Apr 14 00:59:06 2011
+++ src/sys/compat/linux/common/linux_pipe.c	Sun Jun  1 13:42:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_pipe.c,v 1.65 2011/04/14 00:59:06 christos Exp $	*/
+/*	$NetBSD: linux_pipe.c,v 1.66 2014/06/01 13:42:12 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: 

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

2014-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat May 31 08:51:19 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Fix munmap(2) signature.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.117 -r1.118 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/arch/powerpc/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/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.51 src/sys/compat/linux/arch/amd64/syscalls.master:1.52
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.51	Thu May 29 10:35:26 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sat May 31 08:51:19 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.51 2014/05/29 10:35:26 njoly Exp $
+	$NetBSD: syscalls.master,v 1.52 2014/05/31 08:51:19 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -85,7 +85,7 @@
 			linux_off_t offset); }
 10	STD		{ int|linux_sys||mprotect(const void *start, \
 			unsigned long len, int prot); }
-11	NOARGS		{ int|sys||munmap(void *addr, int len); }
+11	NOARGS		{ int|sys||munmap(void *addr, size_t len); }
 12	STD		{ int|linux_sys||brk(char *nsize); }
 13	STD		{ int|linux_sys||rt_sigaction(int signum, \
 			const struct linux_sigaction *nsa, \

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.60 src/sys/compat/linux/arch/arm/syscalls.master:1.61
--- src/sys/compat/linux/arch/arm/syscalls.master:1.60	Thu May 29 10:35:27 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sat May 31 08:51:19 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.60 2014/05/29 10:35:27 njoly Exp $
+	$NetBSD: syscalls.master,v 1.61 2014/05/31 08:51:19 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -177,7 +177,7 @@
 89	STD		{ int|linux_sys||readdir(int fd, void *dent, \
 			unsigned int count); }
 90	STD		{ int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
-91	NOARGS		{ int|sys||munmap(void *addr, int len); }
+91	NOARGS		{ int|sys||munmap(void *addr, size_t len); }
 92	NOARGS		{ int|compat_43_sys||truncate(const char *path, \
 			long length); }
 93	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); }

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.117 src/sys/compat/linux/arch/i386/syscalls.master:1.118
--- src/sys/compat/linux/arch/i386/syscalls.master:1.117	Thu May 29 10:35:27 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Sat May 31 08:51:19 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.117 2014/05/29 10:35:27 njoly Exp $
+	$NetBSD: syscalls.master,v 1.118 2014/05/31 08:51:19 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -178,7 +178,7 @@
 89	STD		{ int|linux_sys||readdir(int fd, void *dent, \
 			unsigned int count); }
 90	STD		{ int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
-91	NOARGS		{ int|sys||munmap(void *addr, int len); }
+91	NOARGS		{ int|sys||munmap(void *addr, size_t len); }
 92	NOARGS		{ int|compat_43_sys||truncate(const char *path, \
 			long length); }
 93	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); }

Index: src/sys/compat/linux/arch/m68k/syscalls.master
diff -u src/sys/compat/linux/arch/m68k/syscalls.master:1.87 src/sys/compat/linux/arch/m68k/syscalls.master:1.88
--- src/sys/compat/linux/arch/m68k/syscalls.master:1.87	Thu May 29 10:35:27 2014
+++ src/sys/compat/linux/arch/m68k/syscalls.master	Sat May 31 08:51:19 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.87 2014/05/29 10:35:27 njoly Exp $
+	$NetBSD: syscalls.master,v 1.88 2014/05/31 08:51:19 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -193,7 +193,7 @@
 89	STD		{ int|linux_sys||readdir(int fd, void *dent, \
 			unsigned int count); }
 90	STD		{ int|linux_sys||old_mmap(struct linux_oldmmap *lmp); }
-91	NOARGS		{ int|sys||munmap(void *addr, int len); }
+91	NOARGS		{ int|sys||munmap(void *addr, size_t len); }
 92	NOARGS		{ int|compat_43_sys||truncate(const char *path, \
 			long length); }
 #if !defined(_KERNEL) || defined(COMPAT_43)

Index: src/sys/compat/linux/arch/mips/syscalls.master
diff -u 

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

2014-05-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat May 31 08:52:55 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: 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/i386: 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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for munmap(2) signature.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.63 -r1.64 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.102 -r1.103 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.93 -r1.94 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.92 -r1.93 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.59 -r1.60 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
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.68 -r1.69 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.53 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.54
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.53	Thu May 29 10:36:31 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Sat May 31 08:52:54 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.53 2014/05/29 10:36:31 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.54 2014/05/31 08:52:54 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.51 2014/05/29 10:35:26 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.52 2014/05/31 08:51:19 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -45,7 +45,7 @@
 /* syscall: mprotect ret: int args: const void * unsigned long int */
 #define	LINUX_SYS_mprotect	10
 
-/* syscall: munmap ret: int args: void * int */
+/* syscall: munmap ret: int args: void * size_t */
 #define	LINUX_SYS_munmap	11
 
 /* syscall: brk ret: int args: char * */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.53 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.54
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.53	Thu May 29 10:36:31 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Sat May 31 08:52:54 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.53 2014/05/29 10:36:31 njoly Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.54 2014/05/31 08:52:54 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.51 2014/05/29 10:35:26 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.52 2014/05/31 08:51:19 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.53 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.54
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.53	Thu May 29 10:36:31 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Sat May 31 08:52:54 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.53 2014/05/29 10:36:31 njoly Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.54 2014/05/31 08:52:54 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this 

CVS commit: src/lib/libc/sys

2014-05-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May 30 16:11:01 UTC 2014

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

Log Message:
len argument is of unsigned type (size_t) and thus cannot be negative;
remove corresponding statement in ERRORS.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/munmap.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/munmap.2
diff -u src/lib/libc/sys/munmap.2:1.20 src/lib/libc/sys/munmap.2:1.21
--- src/lib/libc/sys/munmap.2:1.20	Sat Oct 15 21:35:50 2011
+++ src/lib/libc/sys/munmap.2	Fri May 30 16:11:01 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: munmap.2,v 1.20 2011/10/15 21:35:50 rmind Exp $
+.\	$NetBSD: munmap.2,v 1.21 2014/05/30 16:11:01 njoly Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -62,9 +62,7 @@ will fail if:
 .It Bq Er EINVAL
 The
 .Fa addr
-parameter was not page aligned, the
-.Fa len
-parameter was negative, or
+parameter was not page aligned, or
 some part of the region being unmapped is outside the
 valid address range for a process.
 .El



CVS commit: src/sys/compat/linux

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:35:27 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_misc.c

Log Message:
For utimes(2), use compat_50_sys_utimes() instead of local version.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.228 -r1.229 src/sys/compat/linux/common/linux_misc.c

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

Modified files:

Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.87 src/sys/compat/linux/arch/alpha/syscalls.master:1.88
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.87	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Thu May 29 10:35:26 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -590,8 +590,8 @@
 362	NOARGS		{ int|compat_50_sys||setitimer(int which, \
 			const struct itimerval50 *itv, \
 			struct itimerval50 *oitv); }
-363	STD		{ int|linux_sys||utimes(char *path, \
-			struct linux_timeval *times); }
+363	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 364	NOARGS		{ int|compat_50_sys||getrusage(int who, \
 			struct rusage50 *rusage); }
 365	STD		{ int|linux_sys||wait4(int pid, int *status, \

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.50 src/sys/compat/linux/arch/amd64/syscalls.master:1.51
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.50	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Thu May 29 10:35:26 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.50 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.51 2014/05/29 10:35:26 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -441,7 +441,8 @@
 232	UNIMPL		epoll_wait
 233	UNIMPL		epoll_ctl
 234	STD		{ int|linux_sys||tgkill(int tgid, int tid, int sig); }
-235	STD		{ int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
+235	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 236	UNIMPL		vserver
 237	UNIMPL		mbind
 238	UNIMPL		set_mempolicy

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.59 src/sys/compat/linux/arch/arm/syscalls.master:1.60
--- src/sys/compat/linux/arch/arm/syscalls.master:1.59	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Thu May 29 10:35:27 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.59 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.60 2014/05/29 10:35:27 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -450,7 +450,8 @@
 267	STD		{ int|linux_sys||fstatfs64(int fd, \
 			size_t sz, struct linux_statfs64 *sp); }
 268	STD		{ int|linux_sys||tgkill(int tgid, int tid, int sig); }
-269	STD		{ int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
+269	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 270	STD		{ int|linux_sys||fadvise64_64(int fd, off_t offset, \
 			off_t len, int advice); }
 271	UNIMPL		pciconfig_iobase

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.116 src/sys/compat/linux/arch/i386/syscalls.master:1.117
--- src/sys/compat/linux/arch/i386/syscalls.master:1.116	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Thu May 29 10:35:27 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.116 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.117 2014/05/29 10:35:27 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -452,7 +452,8 @@
 269	STD		{ int|linux_sys||fstatfs64(int fd, \
 			

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

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:36:31 UTC 2014

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/amd64: 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/i386: 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 for utimes(2) change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.92 -r1.93 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.94 -r1.95 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.62 -r1.63 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.101 -r1.102 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.92 -r1.93 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.91 -r1.92 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.58 -r1.59 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.93 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.94
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.93	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Thu May 29 10:36:31 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -501,7 +501,7 @@
 /* syscall: setitimer ret: int args: int const struct itimerval50 * struct itimerval50 * */
 #define	LINUX_SYS_setitimer	362
 
-/* syscall: utimes ret: int args: char * struct linux_timeval * */
+/* syscall: utimes ret: int args: const char * const struct timeval50 * */
 #define	LINUX_SYS_utimes	363
 
 /* syscall: getrusage ret: int args: int struct rusage50 * */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.93 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.94
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.93	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Thu May 29 10:36:31 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.93 2014/05/17 09:25:06 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.94 2014/05/29 10:36:31 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -796,8 +796,8 @@ struct sysent linux_sysent[] = {
 	(sy_call_t *)compat_50_sys_getitimer },/* 361 = getitimer */
 	{ ns(struct compat_50_sys_setitimer_args), SYCALL_ARG_PTR,
 	(sy_call_t *)compat_50_sys_setitimer },/* 362 = setitimer */
-	{ ns(struct 

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

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:41:48 UTC 2014

Modified Files:
src/sys/rump/kern/lib/libsys_linux: syscalls.master

Log Message:
Ajust for compat linux utimes(2) change.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/rump/kern/lib/libsys_linux/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/rump/kern/lib/libsys_linux/syscalls.master
diff -u src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.15 src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.16
--- src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.15	Sun May  4 10:30:39 2014
+++ src/sys/rump/kern/lib/libsys_linux/syscalls.master	Thu May 29 10:41:48 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp $
+	$NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -547,8 +547,8 @@
 			struct timezone *tzp); }
 419	NOARGS		{ int|linux_sys||settimeofday(struct timeval50 *tp, \
 			struct timezone *tzp); }
-420	NOARGS		{ int|linux_sys||utimes(const char *path, \
-			struct linux_timeval *tv); }
+420	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timveval50 *tptr); }
 421	UNIMPL		adjtime
 422	UNIMPL		lfs_segwait
 423	NOARGS		{ int|sys|50|futimes(int fd, \



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

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:42:23 UTC 2014

Modified Files:
src/sys/rump/kern/lib/libsys_linux: rump_linux_syscall.h
rump_linux_syscallargs.h rump_linux_syscalls.c rump_linux_sysent.c

Log Message:
Regen for utimes(2).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h
cvs rdiff -u -r1.16 -r1.17 \
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

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/libsys_linux/rump_linux_syscall.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.13 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.14
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.13	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h	Thu May 29 10:42:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscall.h,v 1.13 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscall.h,v 1.14 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALL_H_
@@ -249,7 +249,7 @@
 /* syscall: settimeofday ret: int args: struct timeval50 * struct timezone * */
 #define	RUMP_LINUX_SYS_settimeofday	419
 
-/* syscall: utimes ret: int args: const char * struct linux_timeval * */
+/* syscall: utimes ret: int args: const char * const struct timveval50 * */
 #define	RUMP_LINUX_SYS_utimes	420
 
 /* syscall: __futimes50 ret: int args: int const struct timeval * */

Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h	Thu May 29 10:42:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscallargs.h,v 1.16 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscallargs.h,v 1.17 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALLARGS_H_
@@ -171,7 +171,7 @@ struct linux_sys_gettimeofday_args;
 
 struct linux_sys_settimeofday_args;
 
-struct linux_sys_utimes_args;
+struct compat_50_sys_utimes_args;
 
 struct sys___futimes50_args;
 
@@ -396,7 +396,7 @@ int	linux_sys_gettimeofday(struct lwp *,
 
 int	linux_sys_settimeofday(struct lwp *, const struct linux_sys_settimeofday_args *, register_t *);
 
-int	linux_sys_utimes(struct lwp *, const struct linux_sys_utimes_args *, register_t *);
+int	compat_50_sys_utimes(struct lwp *, const struct compat_50_sys_utimes_args *, register_t *);
 
 int	sys___futimes50(struct lwp *, const struct sys___futimes50_args *, register_t *);
 
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c	Thu May 29 10:42:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_syscalls.c,v 1.16 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscalls.c,v 1.17 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.16 2014/05/04 10:31:10 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.17 2014/05/29 10:42:23 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include sys/param.h
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c	Thu May 29 10:42:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_sysent.c,v 1.16 2014/05/04 10:31:10 njoly Exp $ 

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

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:47:00 UTC 2014

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

Log Message:
Add utimes(2) support.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 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.66 src/sys/compat/linux32/arch/amd64/syscalls.master:1.67
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.66	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Thu May 29 10:47:00 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number master file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -472,7 +472,8 @@
 269	STD	{ int|linux32_sys||fstatfs64(int fd, \
 		netbsd32_size_t sz, linux32_statfs64p sp); }
 270	STD	{ int|linux32_sys||tgkill(int tgid, int tid, int sig); }
-271	UNIMPL	utimes
+271	NOARGS	{ int|compat_50_netbsd32||utimes(netbsd32_charp path, \
+		netbsd32_timeval50p_t tptr); }
 272	STD	{ int|linux32_sys||fadvise64_64(int fd, uint32_t offlo, \
 		uint32_t offhi, uint32_t lenlo, uint32_t lenhi, int advice); }
 273	UNIMPL	vserver



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

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:47:23 UTC 2014

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

Log Message:
Regen for utimes(2).


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 \
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.71 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Thu May 29 10:47:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -648,6 +648,9 @@
 /* syscall: tgkill ret: int args: int int int */
 #define	LINUX32_SYS_tgkill	270
 
+/* syscall: compat_50_netbsd32_utimes ret: int args: netbsd32_charp netbsd32_timeval50p_t */
+#define	LINUX32_SYS_compat_50_netbsd32_utimes	271
+
 /* syscall: fadvise64_64 ret: int args: int uint32_t uint32_t uint32_t uint32_t int */
 #define	LINUX32_SYS_fadvise64_64	272
 
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.71 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Thu May 29 10:47:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALLARGS_H_
@@ -898,6 +898,8 @@ struct linux32_sys_tgkill_args {
 };
 check_syscall_args(linux32_sys_tgkill)
 
+struct compat_50_netbsd32_utimes_args;
+
 struct linux32_sys_fadvise64_64_args {
 	syscallarg(int) fd;
 	syscallarg(uint32_t) offlo;
@@ -1419,6 +1421,8 @@ int	linux32_sys_fstatfs64(struct lwp *, 
 
 int	linux32_sys_tgkill(struct lwp *, const struct linux32_sys_tgkill_args *, register_t *);
 
+int	compat_50_netbsd32_utimes(struct lwp *, const struct compat_50_netbsd32_utimes_args *, register_t *);
+
 int	linux32_sys_fadvise64_64(struct lwp *, const struct linux32_sys_fadvise64_64_args *, register_t *);
 
 int	linux32_sys_openat(struct lwp *, const struct linux32_sys_openat_args *, register_t *);
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.71 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Thu May 29 10:47:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux32_syscalls.c,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.71 2014/05/04 10:10:39 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include sys/param.h
@@ -308,7 +308,7 @@ const char *const linux32_syscallnames[]
 	/* 268 */	statfs64,
 	/* 269 */	fstatfs64,
 	/* 270 */	tgkill,
-	/* 271 */	#271 (unimplemented utimes),
+	/* 271 */	compat_50_netbsd32_utimes,
 	/* 272 */	fadvise64_64,
 	/* 273 */	#273 (unimplemented vserver),
 	/* 274 */	#274 (unimplemented mbind),
Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.71 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.71	Sun May  

CVS commit: src/sys/kern

2014-05-27 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May 27 21:00:46 UTC 2014

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

Log Message:
In shmrealloc(), add missing condvar initialisations for segments
copied from previous location.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/kern/sysv_shm.c

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

Modified files:

Index: src/sys/kern/sysv_shm.c
diff -u src/sys/kern/sysv_shm.c:1.124 src/sys/kern/sysv_shm.c:1.125
--- src/sys/kern/sysv_shm.c:1.124	Tue Feb 25 18:30:11 2014
+++ src/sys/kern/sysv_shm.c	Tue May 27 21:00:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_shm.c,v 1.124 2014/02/25 18:30:11 pooka Exp $	*/
+/*	$NetBSD: sysv_shm.c,v 1.125 2014/05/27 21:00:46 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysv_shm.c,v 1.124 2014/02/25 18:30:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysv_shm.c,v 1.125 2014/05/27 21:00:46 njoly Exp $);
 
 #define SYSVSHM
 
@@ -908,9 +908,11 @@ shmrealloc(int newshmni)
 	ALIGN(newshmni * sizeof(struct shmid_ds)));
 
 	/* Copy all memory to the new area */
-	for (i = 0; i  shm_nused; i++)
+	for (i = 0; i  shm_nused; i++) {
+		cv_init(newshm_cv[i], shmwait);
 		(void)memcpy(newshmsegs[i], shmsegs[i],
 		sizeof(newshmsegs[0]));
+	}
 
 	/* Mark as free all new segments, if there is any */
 	for (; i  newshmni; i++) {



CVS commit: src/sys/dev/pci

2014-05-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 25 14:56:46 UTC 2014

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

Log Message:
Do not crash if subclassp == NULL, seen while attaching rstx(4) which
match PCI_CLASS_UNDEFINED class.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/pci/pci_subr.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.118 src/sys/dev/pci/pci_subr.c:1.119
--- src/sys/dev/pci/pci_subr.c:1.118	Sat May 24 18:06:21 2014
+++ src/sys/dev/pci/pci_subr.c	Sun May 25 14:56:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.118 2014/05/24 18:06:21 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.119 2014/05/25 14:56:46 njoly Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.118 2014/05/24 18:06:21 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.119 2014/05/25 14:56:46 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -637,7 +637,8 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl
 		subclassp++;
 	}
 
-	interfacep = (subclassp-name != NULL) ? subclassp-subclasses : NULL;
+	interfacep = (subclassp  subclassp-name != NULL) ?
+	subclassp-subclasses : NULL;
 	while (interfacep  interfacep-name != NULL) {
 		if (interface == interfacep-val)
 			break;



CVS commit: src/sys/dev/pci

2014-05-25 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 25 16:17:41 UTC 2014

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add GeForce GT 640M.


To generate a diff of this commit:
cvs rdiff -u -r1.1188 -r1.1189 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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1188 src/sys/dev/pci/pcidevs:1.1189
--- src/sys/dev/pci/pcidevs:1.1188	Sat Apr 26 07:32:26 2014
+++ src/sys/dev/pci/pcidevs	Sun May 25 16:17:41 2014
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1188 2014/04/26 07:32:26 mrg Exp $
+$NetBSD: pcidevs,v 1.1189 2014/05/25 16:17:41 njoly Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4536,6 +4536,7 @@ product NVIDIA	MCP79_AHCI_10	0x0abd	nFor
 product NVIDIA	MCP79_AHCI_11	0x0abe	nForce MCP79 AHCI Controller
 product NVIDIA	MCP79_AHCI_12	0x0abf	nForce MCP79 AHCI Controller
 product NVIDIA	GEFORCE_210_HDA	0x0be3	GeForce 210 High Definition Audio Controller
+product NVIDIA	GF_GT640M	0x0fd2	GeForce GT 640M
 product NVIDIA	GF116		0x1244	GeForce GTX 550 Ti
 
 /* Nvidia  SGS-Thomson Microelectronics */



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

2014-05-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May 23 12:28:51 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_socket.c

Log Message:
Add a funtion that translate socket type value from Linux to NetBSD.
Use it for socket and socketpair syscalls.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/compat/linux/common/linux_socket.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/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.118 src/sys/compat/linux/common/linux_socket.c:1.119
--- src/sys/compat/linux/common/linux_socket.c:1.118	Sat May 17 21:26:20 2014
+++ src/sys/compat/linux/common/linux_socket.c	Fri May 23 12:28:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.118 2014/05/17 21:26:20 rmind Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.119 2014/05/23 12:28:51 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.118 2014/05/17 21:26:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.119 2014/05/23 12:28:51 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -70,7 +70,6 @@ __KERNEL_RCSID(0, $NetBSD: linux_socket
 #include sys/kauth.h
 #include sys/syscallargs.h
 #include sys/ktrace.h
-#include sys/fcntl.h
 
 #include lib/libkern/libkern.h
 
@@ -111,6 +110,7 @@ __KERNEL_RCSID(0, $NetBSD: linux_socket
 
 static int linux_to_bsd_domain(int);
 static int bsd_to_linux_domain(int);
+static int linux_to_bsd_type(int);
 int linux_to_bsd_sopt_level(int);
 int linux_to_bsd_so_sockopt(int);
 int linux_to_bsd_ip_sockopt(int);
@@ -238,6 +238,27 @@ bsd_to_linux_domain(int bdom)
 }
 
 static int
+linux_to_bsd_type(int ltype)
+{
+	int type, flags;
+
+	/* Real types are identical between Linux and NetBSD */
+	type = ltype  LINUX_SOCK_TYPE_MASK;
+
+	/* But flags are not .. */
+	flags = ltype  ~LINUX_SOCK_TYPE_MASK;
+	if (flags  ~(LINUX_SOCK_CLOEXEC|LINUX_SOCK_NONBLOCK))
+		return -1;
+
+	if (flags  LINUX_SOCK_CLOEXEC)
+		type |= SOCK_CLOEXEC;
+	if (flags  LINUX_SOCK_NONBLOCK)
+		type |= SOCK_NONBLOCK;
+
+	return type;
+}
+
+static int
 linux_to_bsd_msg_flags(int lflag)
 {
 	int i, lfl, bfl;
@@ -300,16 +321,16 @@ linux_sys_socket(struct lwp *l, const st
 		syscallarg(int) protocol;
 	} */
 	struct sys___socket30_args bsa;
-	struct sys_fcntl_args fsa;
-	register_t fretval[2];
-	int error, flags;
+	int error;
 
 
 	SCARG(bsa, protocol) = SCARG(uap, protocol);
-	SCARG(bsa, type) = SCARG(uap, type)  LINUX_SOCK_TYPE_MASK;
 	SCARG(bsa, domain) = linux_to_bsd_domain(SCARG(uap, domain));
 	if (SCARG(bsa, domain) == -1)
 		return EINVAL;
+	SCARG(bsa, type) = linux_to_bsd_type(SCARG(uap, type));
+	if (SCARG(bsa, type) == -1)
+		return EINVAL;
 	/*
 	 * Apparently linux uses this to talk to ISDN sockets. If we fail
 	 * now programs seems to handle it, but if we don't we are going
@@ -317,36 +338,8 @@ linux_sys_socket(struct lwp *l, const st
 	 */
 	if (SCARG(bsa, domain) == AF_ROUTE  SCARG(bsa, type) == SOCK_RAW)
 		return ENOTSUP;
-	flags = SCARG(uap, type)  ~LINUX_SOCK_TYPE_MASK;
-	if (flags  ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK))
-		return EINVAL;
 	error = sys___socket30(l, bsa, retval);
 
-	/*
-	 * Linux overloads the type parameter to include some
-	 * fcntl flags to be set on the file descriptor.
-	 * Process those if creating the socket succeeded.
-	 */
-
-	if (!error  flags  LINUX_SOCK_CLOEXEC) {
-		SCARG(fsa, fd) = *retval;
-		SCARG(fsa, cmd) = F_SETFD;
-		SCARG(fsa, arg) = (void *)(uintptr_t)FD_CLOEXEC;
-		(void) sys_fcntl(l, fsa, fretval);
-	}
-	if (!error  flags  LINUX_SOCK_NONBLOCK) {
-		SCARG(fsa, fd) = *retval;
-		SCARG(fsa, cmd) = F_SETFL;
-		SCARG(fsa, arg) = (void *)(uintptr_t)O_NONBLOCK;
-		error = sys_fcntl(l, fsa, fretval);
-		if (error) {
-			struct sys_close_args csa;
-
-			SCARG(csa, fd) = *retval;
-			(void) sys_close(l, csa, fretval);
-		}
-	}
-
 #ifdef INET6
 	/*
 	 * Linux AF_INET6 socket has IPV6_V6ONLY setsockopt set to 0 by
@@ -385,7 +378,9 @@ linux_sys_socketpair(struct lwp *l, cons
 	SCARG(bsa, domain) = linux_to_bsd_domain(SCARG(uap, domain));
 	if (SCARG(bsa, domain) == -1)
 		return EINVAL;
-	SCARG(bsa, type) = SCARG(uap, type);
+	SCARG(bsa, type) = linux_to_bsd_type(SCARG(uap, type));
+	if (SCARG(bsa, type) == -1)
+		return EINVAL;
 	SCARG(bsa, protocol) = SCARG(uap, protocol);
 	SCARG(bsa, rsv) = SCARG(uap, rsv);
 



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

2014-05-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May 23 12:30:12 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: linux_socket.h

Log Message:
Add missing specific LINUX_SOCK_NONBLOCK value for alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux/arch/alpha/linux_socket.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/compat/linux/arch/alpha/linux_socket.h
diff -u src/sys/compat/linux/arch/alpha/linux_socket.h:1.5 src/sys/compat/linux/arch/alpha/linux_socket.h:1.6
--- src/sys/compat/linux/arch/alpha/linux_socket.h:1.5	Sat Jan 25 13:49:27 2014
+++ src/sys/compat/linux/arch/alpha/linux_socket.h	Fri May 23 12:30:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.h,v 1.5 2014/01/25 13:49:27 njoly Exp $	*/
+/*	$NetBSD: linux_socket.h,v 1.6 2014/05/23 12:30:12 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -89,4 +89,10 @@
 #define LINUX_SO_PEEK_OFF	42
 #define LINUX_SO_NOFCS		43
 
+/*
+ * Flags for socket().
+ * These are provided in the type parameter.
+ */
+#define LINUX_SOCK_NONBLOCK	0x4000
+
 #endif /* !_ALPHA_LINUX_SOCKET_H */



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

2014-05-20 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May 20 17:24:49 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Fix getgroups/setgroups signature.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.62 -r1.63 src/sys/compat/linux/arch/powerpc/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/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.49 src/sys/compat/linux/arch/amd64/syscalls.master:1.50
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.49	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Tue May 20 17:24:49 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.49 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.50 2014/05/20 17:24:49 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -269,8 +269,8 @@
 112	NOARGS		{ int|sys||setsid(void); }
 113	NOARGS		{ int|sys||setreuid(uid_t ruid, uid_t euid); }
 114	NOARGS		{ int|sys||setregid(gid_t rgid, gid_t egid); }
-115	NOARGS		{ int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
-116	NOARGS		{ int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
+115	NOARGS		{ int|sys||getgroups(int gidsetsize, gid_t *gidset); }
+116	NOARGS		{ int|sys||setgroups(int gidsetsize, gid_t *gidset); }
 117	STD		{ int|linux_sys||setresuid(uid_t ruid, uid_t euid, \
 			uid_t suid); }
 118	STD		{ int|linux_sys||getresuid(uid_t *ruid, uid_t *euid, \

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.58 src/sys/compat/linux/arch/arm/syscalls.master:1.59
--- src/sys/compat/linux/arch/arm/syscalls.master:1.58	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Tue May 20 17:24:49 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.58 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.59 2014/05/20 17:24:49 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -357,9 +357,9 @@
 uid_t euid); }
 204	NOARGS		setregid32 { int|sys||setregid(gid_t rgid, \
 gid_t egid); }
-205	NOARGS		getgroups32 { int|sys||getgroups(u_int gidsetsize, \
+205	NOARGS		getgroups32 { int|sys||getgroups(int gidsetsize, \
 gid_t *gidset); }
-206	NOARGS		setgroups32 { int|sys||setgroups(u_int gidsetsize, \
+206	NOARGS		setgroups32 { int|sys||setgroups(int gidsetsize, \
 gid_t *gidset); }
 207	NOARGS		fchown32 { int|sys||__posix_fchown(int fd, uid_t uid, \
 gid_t gid); }

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.115 src/sys/compat/linux/arch/i386/syscalls.master:1.116
--- src/sys/compat/linux/arch/i386/syscalls.master:1.115	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Tue May 20 17:24:49 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.115 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.116 2014/05/20 17:24:49 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -356,8 +356,8 @@
 202	NOARGS		{ gid_t|sys||getegid(void); }
 203	NOARGS		{ int|sys||setreuid(uid_t ruid, uid_t euid); }
 204	NOARGS		{ int|sys||setregid(gid_t rgid, gid_t egid); }
-205	NOARGS		{ int|sys||getgroups(u_int gidsetsize, gid_t *gidset); }
-206	NOARGS		{ int|sys||setgroups(u_int gidsetsize, gid_t *gidset); }
+205	NOARGS		{ int|sys||getgroups(int gidsetsize, gid_t *gidset); }
+206	NOARGS		{ int|sys||setgroups(int gidsetsize, gid_t *gidset); }
 207	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
 			gid_t gid); }
 208	STD		{ int|linux_sys||setresuid(uid_t ruid, uid_t euid, \

Index: src/sys/compat/linux/arch/m68k/syscalls.master
diff -u src/sys/compat/linux/arch/m68k/syscalls.master:1.85 src/sys/compat/linux/arch/m68k/syscalls.master:1.86
--- src/sys/compat/linux/arch/m68k/syscalls.master:1.85	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/m68k/syscalls.master	Tue May 20 17:24:49 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.85 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.86 2014/05/20 17:24:49 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -375,8 +375,8 

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

2014-05-20 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May 20 17:26:04 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: 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/i386: 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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for getgroups/setgroups update.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.61 -r1.62 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.100 -r1.101 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.91 -r1.92 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.90 -r1.91 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.57 -r1.58 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
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.67 -r1.68 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.51 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.52
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.51	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Tue May 20 17:26:04 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.51 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.52 2014/05/20 17:26:04 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.49 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.50 2014/05/20 17:24:49 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -363,10 +363,10 @@
 /* syscall: setregid ret: int args: gid_t gid_t */
 #define	LINUX_SYS_setregid	114
 
-/* syscall: getgroups ret: int args: u_int gid_t * */
+/* syscall: getgroups ret: int args: int gid_t * */
 #define	LINUX_SYS_getgroups	115
 
-/* syscall: setgroups ret: int args: u_int gid_t * */
+/* syscall: setgroups ret: int args: int gid_t * */
 #define	LINUX_SYS_setgroups	116
 
 /* syscall: setresuid ret: int args: uid_t uid_t uid_t */
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.51 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.52
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.51	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Tue May 20 17:26:04 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.51 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.52 2014/05/20 17:26:04 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.49 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.50 2014/05/20 17:24:49 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.51 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.52
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.51	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Tue May 20 17:26:04 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 

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

2014-05-20 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May 20 17:31:18 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_uid16.c

Log Message:
Fix signed vs. unsigned comparison in getgroups16() syscall. Negative
gisetsize values now fail with EINVAL as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/common/linux_uid16.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/common/linux_uid16.c
diff -u src/sys/compat/linux/common/linux_uid16.c:1.3 src/sys/compat/linux/common/linux_uid16.c:1.4
--- src/sys/compat/linux/common/linux_uid16.c:1.3	Tue May 20 15:48:24 2008
+++ src/sys/compat/linux/common/linux_uid16.c	Tue May 20 17:31:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_uid16.c,v 1.3 2008/05/20 15:48:24 njoly Exp $	*/
+/*	$NetBSD: linux_uid16.c,v 1.4 2014/05/20 17:31:18 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_uid16.c,v 1.3 2008/05/20 15:48:24 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_uid16.c,v 1.4 2014/05/20 17:31:18 njoly Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -241,7 +241,7 @@ linux_sys_getgroups16(struct lwp *l, con
 	*retval = ngrps;
 	if (SCARG(uap, gidsetsize) == 0)
 		return 0;
-	if (SCARG(uap, gidsetsize)  ngrps)
+	if (SCARG(uap, gidsetsize)  (int)ngrps)
 		return EINVAL;
 
 	gidset = SCARG(uap, gidset);



CVS commit: src/sys/compat

2014-05-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May 18 09:30:00 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_file.c
src/sys/compat/linux32/common: linux32_unistd.c

Log Message:
Simplify dup3 emulation to call dodup() directly instead of
sys_dup2()+fd_set_exclose(). While here, add some error conditions.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/linux32/common/linux32_unistd.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/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.110 src/sys/compat/linux/common/linux_file.c:1.111
--- src/sys/compat/linux/common/linux_file.c:1.110	Tue May  6 13:21:50 2014
+++ src/sys/compat/linux/common/linux_file.c	Sun May 18 09:30:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.110 2014/05/06 13:21:50 njoly Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.111 2014/05/18 09:30:00 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.110 2014/05/06 13:21:50 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.111 2014/05/18 09:30:00 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -784,14 +784,16 @@ linux_sys_dup3(struct lwp *l, const stru
 		syscallarg(int) to;
 		syscallarg(int) flags;
 	} */
-	int error;
-	if ((error = sys_dup2(l, (const struct sys_dup2_args *)uap, retval)))
-		return error;
+	int flags;
 
-	if (SCARG(uap, flags)  LINUX_O_CLOEXEC)
-		fd_set_exclose(l, SCARG(uap, to), true);
+	flags = linux_to_bsd_ioflags(SCARG(uap, flags));
+	if ((flags  ~O_CLOEXEC) != 0)
+		return EINVAL;
 
-	return 0;
+	if (SCARG(uap, from) == SCARG(uap, to))
+		return EINVAL;
+
+	return dodup(l, SCARG(uap, from), SCARG(uap, to), flags, retval);
 }
 
 

Index: src/sys/compat/linux32/common/linux32_unistd.c
diff -u src/sys/compat/linux32/common/linux32_unistd.c:1.37 src/sys/compat/linux32/common/linux32_unistd.c:1.38
--- src/sys/compat/linux32/common/linux32_unistd.c:1.37	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux32/common/linux32_unistd.c	Sun May 18 09:30:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_unistd.c,v 1.37 2014/05/04 10:08:53 njoly Exp $ */
+/*	$NetBSD: linux32_unistd.c,v 1.38 2014/05/18 09:30:00 njoly Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux32_unistd.c,v 1.37 2014/05/04 10:08:53 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_unistd.c,v 1.38 2014/05/18 09:30:00 njoly Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -293,19 +293,13 @@ linux32_sys_dup3(struct lwp *l, const st
 		syscallarg(int) to;
 		syscallarg(int) flags;
 	} */
-	struct sys_dup2_args ua;
-	int error;
+	struct linux_sys_dup3_args ua;
 
 	NETBSD32TO64_UAP(from);
 	NETBSD32TO64_UAP(to);
+	NETBSD32TO64_UAP(flags);
 
-	if ((error = sys_dup2(l, ua, retval)))
-		return error;
-
-	if (SCARG(uap, flags)  LINUX_O_CLOEXEC)
-		fd_set_exclose(l, SCARG(uap, to), true);
-
-	return 0;
+	return linux_sys_dup3(l, ua, retval);
 }
 
 



CVS commit: src/sys/compat/linux

2014-05-17 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat May 17 09:23:51 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_fadvise64.c

Log Message:
Fix fadvise64 syscalls to use 64bit offset types.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/common/linux_fadvise64.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/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.86 src/sys/compat/linux/arch/alpha/syscalls.master:1.87
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.86	Tue May  6 17:33:35 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp $
+	$NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -657,8 +657,8 @@
 410	UNIMPL		remap_file_pages
 411	STD		{ int|linux_sys||set_tid_address(int *tid); }
 412	UNIMPL		restart_syscall
-413	STD		{ int|linux_sys||fadvise64(int fd, \
-			linux_off_t offset, size_t len, int advice); }
+413	STD		{ int|linux_sys||fadvise64(int fd, off_t offset, \
+			size_t len, int advice); }
 414	UNIMPL		timer_create
 415	UNIMPL		timer_settime
 416	UNIMPL		timer_gettime

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.48 src/sys/compat/linux/arch/amd64/syscalls.master:1.49
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.48	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.48 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.49 2014/05/17 09:23:51 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -421,8 +421,8 @@
 218	STD		{ int|linux_sys||set_tid_address(int *tid); }
 219	UNIMPL		restart_syscall
 220	UNIMPL		semtimedop
-221	STD		{ int|linux_sys||fadvise64(int fd, \
-			linux_off_t offset, size_t len, int advice); }
+221	STD		{ int|linux_sys||fadvise64(int fd, off_t offset, \
+			size_t len, int advice); }
 222	UNIMPL		timer_create
 223	UNIMPL		timer_settime
 224	UNIMPL		timer_gettime

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.57 src/sys/compat/linux/arch/arm/syscalls.master:1.58
--- src/sys/compat/linux/arch/arm/syscalls.master:1.57	Tue May  6 17:33:35 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.57 2014/05/06 17:33:35 njoly Exp $
+	$NetBSD: syscalls.master,v 1.58 2014/05/17 09:23:51 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -451,8 +451,8 @@
 			size_t sz, struct linux_statfs64 *sp); }
 268	STD		{ int|linux_sys||tgkill(int tgid, int tid, int sig); }
 269	STD		{ int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
-270	STD		{ int|linux_sys||fadvise64_64(int fd, \
-			linux_off_t offset, linux_off_t len, int advice); }
+270	STD		{ int|linux_sys||fadvise64_64(int fd, off_t offset, \
+			off_t len, int advice); }
 271	UNIMPL		pciconfig_iobase
 272	UNIMPL		pciconfig_read
 273	UNIMPL		pciconfig_write

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.114 src/sys/compat/linux/arch/i386/syscalls.master:1.115
--- src/sys/compat/linux/arch/i386/syscalls.master:1.114	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.114 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.115 2014/05/17 09:23:51 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -423,8 +423,8 @@
 247	UNIMPL		io_getevents
 248	UNIMPL		io_submit
 249	UNIMPL		io_cancel
-250	STD		{ 

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

2014-05-17 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat May 17 09:25:07 UTC 2014

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/amd64: 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/i386: 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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for fadvise64 offset types changes.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.91 -r1.92 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.93 -r1.94 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.60 -r1.61 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.99 -r1.100 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.100 -r1.101 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.90 -r1.91 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.89 -r1.90 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.56 -r1.57 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
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.66 -r1.67 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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.92 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.93
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.92	Tue May  6 17:34:39 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sat May 17 09:25:06 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.92 2014/05/06 17:34:39 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -576,7 +576,7 @@
 /* syscall: set_tid_address ret: int args: int * */
 #define	LINUX_SYS_set_tid_address	411
 
-/* syscall: fadvise64 ret: int args: int linux_off_t size_t int */
+/* syscall: fadvise64 ret: int args: int off_t size_t int */
 #define	LINUX_SYS_fadvise64	413
 
 /* syscall: clock_settime ret: int args: clockid_t struct linux_timespec * */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.92 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.93
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.92	Tue May  6 17:34:39 2014
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Sat May 17 09:25:06 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.92 2014/05/06 17:34:39 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.92 2014/05/06 17:34:39 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: 

CVS commit: src/sys/compat/linux32/common

2014-05-17 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat May 17 09:30:07 UTC 2014

Modified Files:
src/sys/compat/linux32/common: linux32_fcntl.c

Log Message:
Fix fadvise64 syscalls. Unlike our, linux fadvise syscall do not
return error code; call do_posix_fadvise().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux32/common/linux32_fcntl.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/common/linux32_fcntl.c
diff -u src/sys/compat/linux32/common/linux32_fcntl.c:1.9 src/sys/compat/linux32/common/linux32_fcntl.c:1.10
--- src/sys/compat/linux32/common/linux32_fcntl.c:1.9	Mon May 30 17:50:32 2011
+++ src/sys/compat/linux32/common/linux32_fcntl.c	Sat May 17 09:30:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_fcntl.c,v 1.9 2011/05/30 17:50:32 alnsn Exp $ */
+/*	$NetBSD: linux32_fcntl.c,v 1.10 2014/05/17 09:30:07 njoly Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux32_fcntl.c,v 1.9 2011/05/30 17:50:32 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_fcntl.c,v 1.10 2014/05/17 09:30:07 njoly Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -151,20 +151,15 @@ linux32_sys_fadvise64(struct lwp *l,
 {
 	/* {
 		syscallarg(int) fd;
-		syscallarg(off_t) offset;
-		syscallarg(size_t) len;
+		syscallarg(uint32_t) offlo;
+		syscallarg(uint32_t) offhi;
+		syscallarg(netbsd32_size_t) len;
 		syscallarg(int) advice;
 	} */
-	struct sys___posix_fadvise50_args ua;
+	off_t off = ((off_t)SCARG(uap, offhi)  32) + SCARG(uap, offlo);
 
-	/* Linux doesn't have the 'pad' pseudo-parameter */
-	NETBSD32TO64_UAP(fd);
-	SCARG(ua, PAD) = 0;
-	SCARG(ua, offset) = ((off_t)SCARG(uap, offhi)  32) + SCARG(uap, offlo);
-	SCARG(ua, len) = SCARG(uap, len);
-	SCARG(ua, advice) = linux_to_bsd_posix_fadv(SCARG(uap, advice));
-
-	return sys___posix_fadvise50(l, ua, retval);
+	return do_posix_fadvise(SCARG(uap, fd), off,
+	SCARG(uap, len), linux_to_bsd_posix_fadv(SCARG(uap, advice)));
 }
 
 int
@@ -173,18 +168,15 @@ linux32_sys_fadvise64_64(struct lwp *l,
 {
 	/* {
 		syscallarg(int) fd;
-		syscallarg(off_t) offset;
-		syscallarg(off_t) len;
+		syscallarg(uint32_t) offlo;
+		syscallarg(uint32_t) offhi;
+		syscallarg(uint32_t) lenlo;
+		syscallarg(uint32_t) lenhi;
 		syscallarg(int) advice;
 	} */
-	struct sys___posix_fadvise50_args ua;
-
-	/* Linux doesn't have the 'pad' pseudo-parameter */
-	NETBSD32TO64_UAP(fd);
-	SCARG(ua, PAD) = 0;
-	SCARG(ua, offset) = ((off_t)SCARG(uap, offhi)  32) + SCARG(uap, offlo);
-	SCARG(ua, len) = ((off_t)SCARG(uap, lenhi)  32) + SCARG(uap, lenlo);
-	SCARG(ua, advice) = linux_to_bsd_posix_fadv(SCARG(uap, advice));
+	off_t off = ((off_t)SCARG(uap, offhi)  32) + SCARG(uap, offlo);
+	off_t len = ((off_t)SCARG(uap, lenhi)  32) + SCARG(uap, lenlo);
 
-	return sys___posix_fadvise50(l, ua, retval);
+	return do_posix_fadvise(SCARG(uap, fd), off,
+	len, linux_to_bsd_posix_fadv(SCARG(uap, advice)));
 }



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

2014-05-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May 16 12:55:43 UTC 2014

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_syscall.c

Log Message:
Do not compute code value more than once. Remove unneeded before
trace_enter()/trace_exit() calls.

This fix some cases where tracing show unexpected SYSRET number value
because some syscalls, such as setcontext(2), modified the trapframe
register values.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/amd64/netbsd32_syscall.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/amd64/amd64/netbsd32_syscall.c
diff -u src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.31 src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.32
--- src/sys/arch/amd64/amd64/netbsd32_syscall.c:1.31	Mon Dec 20 00:25:24 2010
+++ src/sys/arch/amd64/amd64/netbsd32_syscall.c	Fri May 16 12:55:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_syscall.c,v 1.31 2010/12/20 00:25:24 matt Exp $	*/
+/*	$NetBSD: netbsd32_syscall.c,v 1.32 2014/05/16 12:55:43 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_syscall.c,v 1.31 2010/12/20 00:25:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_syscall.c,v 1.32 2014/05/16 12:55:43 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -86,8 +86,6 @@ netbsd32_syscall(struct trapframe *frame
 		error = copyin(params, args, callp-sy_argsize);
 		if (__predict_false(error != 0))
 			goto bad;
-		/* Recover 'code' - not in a register */
-		code = frame-tf_rax  (SYS_NSYSENT - 1);
 	}
 
 	if (__predict_false(p-p_trace_enabled)
@@ -107,8 +105,6 @@ netbsd32_syscall(struct trapframe *frame
 out:
 	if (__predict_false(p-p_trace_enabled)
 	 !__predict_false(callp-sy_flags  SYCALL_INDIRECT)) {
-		/* Recover 'code' - the compiler doesn't assign it a register */
-		code = frame-tf_rax  (SYS_NSYSENT - 1);
 		trace_exit(code, rval, error);
 	}
 



CVS commit: src/sys/compat/netbsd32

2014-05-15 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 15 09:54:06 UTC 2014

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Fix setcontext signature, which has a single argument not three.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/compat/netbsd32/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/netbsd32/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.99 src/sys/compat/netbsd32/syscalls.master:1.100
--- src/sys/compat/netbsd32/syscalls.master:1.99	Wed Apr 30 17:23:45 2014
+++ src/sys/compat/netbsd32/syscalls.master	Thu May 15 09:54:06 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp $
+	$NetBSD: syscalls.master,v 1.100 2014/05/15 09:54:06 njoly Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -630,8 +630,7 @@
 306	STD		{ int|netbsd32||utrace(netbsd32_charp label, \
 			netbsd32_voidp addr, netbsd32_size_t len); }
 307	STD		{ int|netbsd32||getcontext(netbsd32_ucontextp ucp); }
-308	STD		{ int|netbsd32||setcontext(netbsd32_ucontextp ucp, \
-			uint32_t flags, netbsd32_lwpidp new_lwp); }
+308	STD		{ int|netbsd32||setcontext(netbsd32_ucontextp ucp); }
 309	STD		{ int|netbsd32||_lwp_create(netbsd32_ucontextp ucp, \
 			netbsd32_u_long flags, netbsd32_lwpidp new_lwp); }
 310	NOARGS		{ int|sys||_lwp_exit(void); }



CVS commit: src/sys/compat/netbsd32

2014-05-15 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 15 09:55:11 UTC 2014

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c

Log Message:
Regen for setcontext signature.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.106 -r1.107 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.107 src/sys/compat/netbsd32/netbsd32_syscall.h:1.108
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.107	Wed Apr 30 17:24:20 2014
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Thu May 15 09:55:11 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.107 2014/04/30 17:24:20 njoly Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.108 2014/05/15 09:55:11 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.100 2014/05/15 09:54:06 njoly Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -831,7 +831,7 @@
 /* syscall: netbsd32_getcontext ret: int args: netbsd32_ucontextp */
 #define	NETBSD32_SYS_netbsd32_getcontext	307
 
-/* syscall: netbsd32_setcontext ret: int args: netbsd32_ucontextp uint32_t netbsd32_lwpidp */
+/* syscall: netbsd32_setcontext ret: int args: netbsd32_ucontextp */
 #define	NETBSD32_SYS_netbsd32_setcontext	308
 
 /* syscall: netbsd32__lwp_create ret: int args: netbsd32_ucontextp netbsd32_u_long netbsd32_lwpidp */
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.107 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.108
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.107	Wed Apr 30 17:24:20 2014
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Thu May 15 09:55:11 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.107 2014/04/30 17:24:20 njoly Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.108 2014/05/15 09:55:11 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.100 2014/05/15 09:54:06 njoly Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -1551,8 +1551,6 @@ check_syscall_args(netbsd32_getcontext)
 
 struct netbsd32_setcontext_args {
 	syscallarg(netbsd32_ucontextp) ucp;
-	syscallarg(uint32_t) flags;
-	syscallarg(netbsd32_lwpidp) new_lwp;
 };
 check_syscall_args(netbsd32_setcontext)
 

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.106 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.107
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.106	Wed Apr 30 17:24:20 2014
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Thu May 15 09:55:11 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.106 2014/04/30 17:24:20 njoly Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.107 2014/05/15 09:55:11 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.100 2014/05/15 09:54:06 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.106 2014/04/30 17:24:20 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.107 2014/05/15 09:55:11 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
Index: src/sys/compat/netbsd32/netbsd32_sysent.c
diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.106 src/sys/compat/netbsd32/netbsd32_sysent.c:1.107
--- src/sys/compat/netbsd32/netbsd32_sysent.c:1.106	Wed Apr 30 17:24:20 2014
+++ src/sys/compat/netbsd32/netbsd32_sysent.c	Thu May 15 09:55:11 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_sysent.c,v 1.106 2014/04/30 17:24:20 njoly Exp $ */
+/* $NetBSD: netbsd32_sysent.c,v 1.107 2014/05/15 09:55:11 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.100 2014/05/15 09:54:06 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_sysent.c,v 1.106 2014/04/30 17:24:20 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_sysent.c,v 1.107 2014/05/15 09:55:11 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h



CVS commit: src/lib/libc/sys

2014-05-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri May  9 17:25:11 UTC 2014

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

Log Message:
Remove error condition for negative length parameter; the
corresponding type is unsigned (size_t) and thus the value cannot be
negative.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/msync.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/msync.2
diff -u src/lib/libc/sys/msync.2:1.24 src/lib/libc/sys/msync.2:1.25
--- src/lib/libc/sys/msync.2:1.24	Sat Oct 15 21:35:50 2011
+++ src/lib/libc/sys/msync.2	Fri May  9 17:25:11 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: msync.2,v 1.24 2011/10/15 21:35:50 rmind Exp $
+.\	$NetBSD: msync.2,v 1.25 2014/05/09 17:25:11 njoly Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)msync.2	8.2 (Berkeley) 6/21/94
 .\
-.Dd October 17, 2005
+.Dd May 9, 2014
 .Dt MSYNC 2
 .Os
 .Sh NAME
@@ -105,10 +105,6 @@ parameter was not page aligned.
 The
 .Fa addr
 parameter did not specify an address part of a mapped region.
-.It Bq Er EINVAL
-The
-.Fa len
-parameter was negative.
 .It Bq Er EIO
 An I/O error occurred while writing to the file system.
 .It Bq Er ENOMEM



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

2014-05-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May  6 13:21:50 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_file.c

Log Message:
linux_off_t - off_t in pwrite() syscall args comment.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/linux/common/linux_file.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/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.109 src/sys/compat/linux/common/linux_file.c:1.110
--- src/sys/compat/linux/common/linux_file.c:1.109	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/common/linux_file.c	Tue May  6 13:21:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.109 2014/05/04 10:08:53 njoly Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.110 2014/05/06 13:21:50 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.109 2014/05/04 10:08:53 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.110 2014/05/06 13:21:50 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -762,7 +762,7 @@ linux_sys_pwrite(struct lwp *l, const st
 		syscallarg(int) fd;
 		syscallarg(void *) buf;
 		syscallarg(size_t) nbyte;
-		syscallarg(linux_off_t) offset;
+		syscallarg(off_t) offset;
 	} */
 	struct sys_pwrite_args pra;
 



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

2014-05-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May  6 17:33:35 UTC 2014

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
src/sys/compat/linux/arch/powerpc: syscalls.master

Log Message:
Reduce diffs between archs; make mknod device argument unsigned.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.83 -r1.84 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/powerpc/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.85 src/sys/compat/linux/arch/alpha/syscalls.master:1.86
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.85	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Tue May  6 17:33:35 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -99,7 +99,7 @@
 12	NOARGS		{ int|sys||chdir(const char *path); }
 13	NOARGS		{ int|sys||fchdir(int fd); }
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
-			int dev); }
+			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
 16	NOARGS		{ int|sys||__posix_chown(const char *path, int uid, int gid); }
 ;17	ALIAS		osf1_sys_brk

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.56 src/sys/compat/linux/arch/arm/syscalls.master:1.57
--- src/sys/compat/linux/arch/arm/syscalls.master:1.56	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Tue May  6 17:33:35 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.56 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.57 2014/05/06 17:33:35 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -72,7 +72,7 @@
 12	NOARGS		{ int|sys||chdir(const char *path); }
 13	STD		{ int|linux_sys||time(linux_time_t *t); }
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
-			int dev); }
+			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
 16	STD		{ int|linux_sys||lchown16(const char *path, \
 			linux_uid16_t uid, linux_gid16_t gid); }

Index: src/sys/compat/linux/arch/m68k/syscalls.master
diff -u src/sys/compat/linux/arch/m68k/syscalls.master:1.83 src/sys/compat/linux/arch/m68k/syscalls.master:1.84
--- src/sys/compat/linux/arch/m68k/syscalls.master:1.83	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/m68k/syscalls.master	Tue May  6 17:33:35 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.83 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.84 2014/05/06 17:33:35 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -75,7 +75,7 @@
 12	NOARGS		{ int|sys||chdir(const char *path); }
 13	STD		{ int|linux_sys||time(linux_time_t *t); }
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
-			int dev); }
+			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
 ;16 lchown on i386; chown on m68k.
 16	STD		{ int|linux_sys||chown16(const char *path, \

Index: src/sys/compat/linux/arch/mips/syscalls.master
diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.51 src/sys/compat/linux/arch/mips/syscalls.master:1.52
--- src/sys/compat/linux/arch/mips/syscalls.master:1.51	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux/arch/mips/syscalls.master	Tue May  6 17:33:35 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.51 2014/05/04 10:08:53 njoly Exp $  
+	$NetBSD: syscalls.master,v 1.52 2014/05/06 17:33:35 njoly Exp $  
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -75,7 +75,7 @@
 12	NOARGS		{ int|sys||chdir(const char *path); }
 13	STD		{ int|linux_sys||time(linux_time_t *t); }
 14	STD		{ int|linux_sys||mknod(const char *path, linux_umode_t mode, \
-			int dev); }
+			unsigned dev); }
 15	NOARGS		{ int|sys||chmod(const char *path, int mode); }
 16	NOARGS		{ int|sys||__posix_lchown(const char *path, int uid, \
 			int gid); }

Index: src/sys/compat/linux/arch/powerpc/syscalls.master
diff -u src/sys/compat/linux/arch/powerpc/syscalls.master:1.60 src/sys/compat/linux/arch/powerpc/syscalls.master:1.61
--- src/sys/compat/linux/arch/powerpc/syscalls.master:1.60	Sun May  4 10:08:53 2014
+++ 

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

2014-05-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May  6 17:34:40 UTC 2014

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
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for mknod device argument type change.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.90 -r1.91 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.59 -r1.60 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.89 -r1.90 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.88 -r1.89 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.55 -r1.56 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
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.65 -r1.66 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.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.91 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.92
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.91	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Tue May  6 17:34:39 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.91 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.92 2014/05/06 17:34:39 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -45,7 +45,7 @@
 /* syscall: fchdir ret: int args: int */
 #define	LINUX_SYS_fchdir	13
 
-/* syscall: mknod ret: int args: const char * linux_umode_t int */
+/* syscall: mknod ret: int args: const char * linux_umode_t unsigned */
 #define	LINUX_SYS_mknod	14
 
 /* syscall: chmod ret: int args: const char * int */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.91 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.92
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.91	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Tue May  6 17:34:39 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.91 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.92 2014/05/06 17:34:39 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.91 2014/05/04 10:10:39 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.92 2014/05/06 17:34:39 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.90 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.91
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.90	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Tue May  6 17:34:39 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.90 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.91 2014/05/06 17:34:39 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 

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

2014-05-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May  6 18:17:22 UTC 2014

Modified Files:
src/sys/compat/linux/common: linux_fadvise64_64.c

Log Message:
Fix cp error for the length argument in fadvise64_64.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/common/linux_fadvise64_64.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/common/linux_fadvise64_64.c
diff -u src/sys/compat/linux/common/linux_fadvise64_64.c:1.1 src/sys/compat/linux/common/linux_fadvise64_64.c:1.2
--- src/sys/compat/linux/common/linux_fadvise64_64.c:1.1	Mon May 30 17:50:32 2011
+++ src/sys/compat/linux/common/linux_fadvise64_64.c	Tue May  6 18:17:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_fadvise64_64.c,v 1.1 2011/05/30 17:50:32 alnsn Exp $	*/
+/*	$NetBSD: linux_fadvise64_64.c,v 1.2 2014/05/06 18:17:22 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_fadvise64_64.c,v 1.1 2011/05/30 17:50:32 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_fadvise64_64.c,v 1.2 2014/05/06 18:17:22 njoly Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -73,5 +73,5 @@ linux_sys_fadvise64_64(struct lwp *l,
 	} */
 
 	return do_posix_fadvise(SCARG(uap, fd), SCARG(uap, offset),
-	SCARG(uap, offset), linux_to_bsd_posix_fadv(SCARG(uap, advice)));
+	SCARG(uap, len), linux_to_bsd_posix_fadv(SCARG(uap, advice)));
 }



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

2014-05-04 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May  4 10:03:55 UTC 2014

Modified Files:
src/sys/compat/linux32/arch/amd64: Makefile

Log Message:
Remove now unneeded bsd.kinc.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux32/arch/amd64/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/compat/linux32/arch/amd64/Makefile
diff -u src/sys/compat/linux32/arch/amd64/Makefile:1.1 src/sys/compat/linux32/arch/amd64/Makefile:1.2
--- src/sys/compat/linux32/arch/amd64/Makefile:1.1	Thu Feb  9 19:18:57 2006
+++ src/sys/compat/linux32/arch/amd64/Makefile	Sun May  4 10:03:55 2014
@@ -1,4 +1,3 @@
-#	$NetBSD: Makefile,v 1.1 2006/02/09 19:18:57 manu Exp $
+#	$NetBSD: Makefile,v 1.2 2014/05/04 10:03:55 njoly Exp $
 
 .include ../../Makefile.inc
-.include bsd.kinc.mk



CVS commit: src/sys/compat

2014-05-04 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun May  4 10:08:53 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_file.c
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/linux32/common: linux32_unistd.c

Log Message:
Fix pread/pwrite syscalls which need a 64bit offset argument.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.36 -r1.37 src/sys/compat/linux32/common/linux32_unistd.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/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.84 src/sys/compat/linux/arch/alpha/syscalls.master:1.85
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.84	Tue Apr  8 16:48:01 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sun May  4 10:08:53 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.84 2014/04/08 16:48:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -554,9 +554,9 @@
 347	UNIMPL		query_module
 348	UNIMPL		prctl
 349	STD		{ int|linux_sys||pread(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 350	STD		{ int|linux_sys||pwrite(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 351	STD		{ int|linux_sys||rt_sigreturn( \
 struct linux_rt_sigframe *sfp); }
 352	STD		{ int|linux_sys||rt_sigaction(int signum, \

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.47 src/sys/compat/linux/arch/amd64/syscalls.master:1.48
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.47	Tue Apr  8 16:48:01 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sun May  4 10:08:53 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.47 2014/04/08 16:48:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.48 2014/05/04 10:08:53 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -99,9 +99,9 @@
 16	STD		{ int|linux_sys||ioctl(int fd, u_long com, \
 			void *data); }
 17	STD		{ int|linux_sys||pread(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 18	STD		{ int|linux_sys||pwrite(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 19	NOARGS		{ ssize_t|sys||readv(int fd, \
 			const struct iovec *iovp, int iovcnt); }
 20	NOARGS		{ ssize_t|sys||writev(int fd, \

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.55 src/sys/compat/linux/arch/arm/syscalls.master:1.56
--- src/sys/compat/linux/arch/arm/syscalls.master:1.55	Tue Apr  8 16:48:01 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sun May  4 10:08:53 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.55 2014/04/08 16:48:01 njoly Exp $
+	$NetBSD: syscalls.master,v 1.56 2014/05/04 10:08:53 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -316,9 +316,9 @@
 179	STD		{ int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
 			size_t sigsetsize); }
 180	STD		{ int|linux_sys||pread(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 181	STD		{ int|linux_sys||pwrite(int fd, char *buf, \
-			size_t nbyte, linux_off_t offset); }
+			size_t nbyte, off_t offset); }
 182	STD		{ int|linux_sys||chown16(const char *path, \
 			linux_uid16_t uid, linux_gid16_t gid); }
 183	NOARGS		{ int|sys||__getcwd(char *bufp, size_t length); }

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.113 src/sys/compat/linux/arch/i386/syscalls.master:1.114

  1   2   3   4   5   6   7   8   9   >