CVS commit: src/sys/rump/dev/lib/librnd

2016-05-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 30 14:52:06 UTC 2016

Modified Files:
src/sys/rump/dev/lib/librnd: rnd_component.c

Log Message:
Disable PR kern/51135 hack now that the problem is supposedly
fixed (to see if tests pass).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/librnd/rnd_component.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/dev/lib/librnd/rnd_component.c
diff -u src/sys/rump/dev/lib/librnd/rnd_component.c:1.4 src/sys/rump/dev/lib/librnd/rnd_component.c:1.5
--- src/sys/rump/dev/lib/librnd/rnd_component.c:1.4	Mon May 16 16:31:07 2016
+++ src/sys/rump/dev/lib/librnd/rnd_component.c	Mon May 30 14:52:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rnd_component.c,v 1.4 2016/05/16 16:31:07 pooka Exp $	*/
+/*	$NetBSD: rnd_component.c,v 1.5 2016/05/30 14:52:06 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rnd_component.c,v 1.4 2016/05/16 16:31:07 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rnd_component.c,v 1.5 2016/05/30 14:52:06 pooka Exp $");
 
 #include 
 #include 
@@ -64,6 +64,7 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV)
 	rnd_init();
 }
 
+#if 0
 /*
  * XXX: the following hack works around PR kern/51135 and should ASAP be
  * nuked to and then from orbit.
@@ -90,3 +91,4 @@ RUMP_COMPONENT(RUMP_COMPONENT_POSTINIT)
 			panic("rnd_system_ioctl failed"); /* XXX */
 	}
 }
+#endif



CVS commit: src/sys/dev/usb

2016-05-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue May 17 11:37:51 UTC 2016

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

Log Message:
initialize buf to NULL for error branch on line 532


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/dev/usb/usbdi.c

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

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.170 src/sys/dev/usb/usbdi.c:1.171
--- src/sys/dev/usb/usbdi.c:1.170	Fri May  6 05:19:32 2016
+++ src/sys/dev/usb/usbdi.c	Tue May 17 11:37:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.170 2016/05/06 05:19:32 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.171 2016/05/17 11:37:50 pooka Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.170 2016/05/06 05:19:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.171 2016/05/17 11:37:50 pooka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -508,7 +508,7 @@ usbd_create_xfer(struct usbd_pipe *pipe,
 unsigned int nframes, struct usbd_xfer **xp)
 {
 	KASSERT(xp != NULL);
-	void *buf;
+	void *buf = NULL;
 
 	struct usbd_xfer *xfer = usbd_alloc_xfer(pipe->up_dev, nframes);
 	if (xfer == NULL)



CVS commit: src/sys/dev/pci

2016-05-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue May 17 10:05:31 UTC 2016

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

Log Message:
Try to get more packets going if the transmit interrupt indicates
some were sent.  Doing so avoids a situation where vioif_start never
gets called in case the sendqueue fills up and therefore the interface
perpetually drops all packets due to the queue being full.
(not sure why all drivers need to do this themselves; just keeping
up with the joneses)

Problem reported and patch tested by jmmlmendes and yasukata at
repo.rumpkernel.org/rumprun


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_vioif.c

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

Modified files:

Index: src/sys/dev/pci/if_vioif.c
diff -u src/sys/dev/pci/if_vioif.c:1.22 src/sys/dev/pci/if_vioif.c:1.23
--- src/sys/dev/pci/if_vioif.c:1.22	Tue Feb  9 08:32:11 2016
+++ src/sys/dev/pci/if_vioif.c	Tue May 17 10:05:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vioif.c,v 1.22 2016/02/09 08:32:11 ozaki-r Exp $	*/
+/*	$NetBSD: if_vioif.c,v 1.23 2016/05/17 10:05:31 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.22 2016/02/09 08:32:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.23 2016/05/17 10:05:31 pooka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1116,6 +1116,7 @@ vioif_tx_vq_done(struct virtqueue *vq)
 {
 	struct virtio_softc *vsc = vq->vq_owner;
 	struct vioif_softc *sc = device_private(vsc->sc_child);
+	struct ifnet *ifp = >sc_ethercom.ec_if;
 	int r = 0;
 
 	VIOIF_TX_LOCK(sc);
@@ -1127,6 +1128,8 @@ vioif_tx_vq_done(struct virtqueue *vq)
 
 out:
 	VIOIF_TX_UNLOCK(sc);
+	if (r)
+		vioif_start(ifp);
 	return r;
 }
 



CVS commit: src/sys/rump/dev/lib/librnd

2016-05-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 16 16:31:07 UTC 2016

Modified Files:
src/sys/rump/dev/lib/librnd: rnd_component.c

Log Message:
Add workaround for PR kern/51135

If the rnd component is present, load extra initial entropy to avoid
/dev/random not being able to request it on demand.  The extra initial
entropy will allow a few instances of /dev/random, but will eventually
go into the failure mode described in the PR.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/librnd/rnd_component.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/dev/lib/librnd/rnd_component.c
diff -u src/sys/rump/dev/lib/librnd/rnd_component.c:1.3 src/sys/rump/dev/lib/librnd/rnd_component.c:1.4
--- src/sys/rump/dev/lib/librnd/rnd_component.c:1.3	Tue Jan 26 23:12:16 2016
+++ src/sys/rump/dev/lib/librnd/rnd_component.c	Mon May 16 16:31:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rnd_component.c,v 1.3 2016/01/26 23:12:16 pooka Exp $	*/
+/*	$NetBSD: rnd_component.c,v 1.4 2016/05/16 16:31:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rnd_component.c,v 1.3 2016/01/26 23:12:16 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rnd_component.c,v 1.4 2016/05/16 16:31:07 pooka Exp $");
 
 #include 
 #include 
@@ -63,3 +63,30 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV)
 	rump_pdev_add(rndattach, 4);
 	rnd_init();
 }
+
+/*
+ * XXX: the following hack works around PR kern/51135 and should ASAP be
+ * nuked to and then from orbit.
+ */
+#define RNDPRELOAD 256
+#include 
+RUMP_COMPONENT(RUMP_COMPONENT_POSTINIT)
+{
+	rnddata_t *rd;
+	size_t dsize, i;
+
+	CTASSERT(RNDPRELOAD <= sizeof(rd->data));
+
+	aprint_verbose("/dev/random: "
+	"loading initial entropy to workaround PR kern/51135\n");
+	rd = kmem_alloc(sizeof(*rd), KM_SLEEP);
+	for (i = 0; i < RNDPRELOAD; i += dsize) {
+		if (rumpuser_getrandom(rd->data,
+		RNDPRELOAD-i, RUMPUSER_RANDOM_HARD, ) != 0)
+			panic("rumpuser_getrandom failed"); /* XXX */
+		rd->len = dsize;
+		rd->entropy = dsize*NBBY;
+		if (rnd_system_ioctl(NULL, RNDADDDATA, rd))
+			panic("rnd_system_ioctl failed"); /* XXX */
+	}
+}



CVS commit: src/tests/kernel

2016-05-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri May 13 13:22:29 UTC 2016

Modified Files:
src/tests/kernel: t_rnd.c

Log Message:
mark read_random xfail kern/51135


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/kernel/t_rnd.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/kernel/t_rnd.c
diff -u src/tests/kernel/t_rnd.c:1.7 src/tests/kernel/t_rnd.c:1.8
--- src/tests/kernel/t_rnd.c:1.7	Thu May 12 11:41:43 2016
+++ src/tests/kernel/t_rnd.c	Fri May 13 13:22:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_rnd.c,v 1.7 2016/05/12 11:41:43 pooka Exp $	*/
+/*	$NetBSD: t_rnd.c,v 1.8 2016/05/13 13:22:28 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_rnd.c,v 1.7 2016/05/12 11:41:43 pooka Exp $");
+__RCSID("$NetBSD: t_rnd.c,v 1.8 2016/05/13 13:22:28 pooka Exp $");
 
 #include 
 #include 
@@ -99,6 +99,8 @@ ATF_TC_BODY(read_random, tc)
 	char buf[128];
 	int fd;
 
+	atf_tc_expect_fail("PR kern/51135");
+
 	rump_init();
 	RL(fd = rump_sys_open("/dev/random", O_RDONLY));
 	RL(rump_sys_read(fd, buf, sizeof(buf)));



CVS commit: src/tests/kernel

2016-05-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu May 12 11:41:43 UTC 2016

Modified Files:
src/tests/kernel: t_rnd.c

Log Message:
Test that reading /dev/random returns within a reasonable time.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/kernel/t_rnd.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/kernel/t_rnd.c
diff -u src/tests/kernel/t_rnd.c:1.6 src/tests/kernel/t_rnd.c:1.7
--- src/tests/kernel/t_rnd.c:1.6	Mon Apr 13 22:24:34 2015
+++ src/tests/kernel/t_rnd.c	Thu May 12 11:41:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_rnd.c,v 1.6 2015/04/13 22:24:34 riastradh Exp $	*/
+/*	$NetBSD: t_rnd.c,v 1.7 2016/05/12 11:41:43 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_rnd.c,v 1.6 2015/04/13 22:24:34 riastradh Exp $");
+__RCSID("$NetBSD: t_rnd.c,v 1.7 2016/05/12 11:41:43 pooka Exp $");
 
 #include 
 #include 
@@ -86,10 +86,29 @@ ATF_TC_BODY(RNDADDDATA2, tc)
 	ATF_REQUIRE_ERRNO(EINVAL, rump_sys_ioctl(fd, RNDADDDATA, ) == -1);
 }
 
+ATF_TC(read_random);
+ATF_TC_HEAD(read_random, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "does reading /dev/random return "
+	"within reasonable time");
+	atf_tc_set_md_var(tc, "timeout", "10");
+}
+
+ATF_TC_BODY(read_random, tc)
+{
+	char buf[128];
+	int fd;
+
+	rump_init();
+	RL(fd = rump_sys_open("/dev/random", O_RDONLY));
+	RL(rump_sys_read(fd, buf, sizeof(buf)));
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, RNDADDDATA);
 	ATF_TP_ADD_TC(tp, RNDADDDATA2);
+	ATF_TP_ADD_TC(tp, read_random);
 
 	return atf_no_error();
 }



CVS commit: src/sys/rump/dev/lib/libpci

2016-05-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue May 10 19:38:29 UTC 2016

Modified Files:
src/sys/rump/dev/lib/libpci: Makefile

Log Message:
Avoid '.' in variable names which are expected to be passed to
this Makefile via the env.

That character is strictly speaking not allowed by POSIX in an exported
variable name, and at least dash >= 0.58 refuses to export such variables.

Furthermore, since the individual CFLAGS/CPPFLAGS/etc. variables
are not comprehensive enough for all cases (e.g. HURD), just
support the .includable version from now on, i.e.
RUMPCOMP_MAKEFILEINC_rumpdev_pci.

curious failure mode debugged by Martin Lucina


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/dev/lib/libpci/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/dev/lib/libpci/Makefile
diff -u src/sys/rump/dev/lib/libpci/Makefile:1.10 src/sys/rump/dev/lib/libpci/Makefile:1.11
--- src/sys/rump/dev/lib/libpci/Makefile:1.10	Tue Jan 26 23:12:15 2016
+++ src/sys/rump/dev/lib/libpci/Makefile	Tue May 10 19:38:29 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/01/26 23:12:15 pooka Exp $
+#	$NetBSD: Makefile,v 1.11 2016/05/10 19:38:29 pooka Exp $
 #
 
 RUMPTOP= ${TOPRUMP}
@@ -28,23 +28,36 @@ SRCS+=	pci_at_mainbus.c
 .error RUMP_PCI_IOSPACE defined in Makefile.  Use userfeatures.h instead.
 .endif
 
+RUMPCOMP_USER_CPPFLAGS:=-I${.PARSEDIR}
+
+# current state-of-the-art interface (remains to be seen if it's "good enuf")
+.ifdef RUMPCOMP_MAKEFILEINC_rumpdev_pci
+.include "${RUMPCOMP_MAKEFILEINC_rumpdev_pci}"
+.endif
+
+# old-style ("compat") interfaces.  will go away some day or year.
+# why?  the "protocol" requires passing variables via the env, and
+# the names include dots which POSIX does not, strictly speaking,
+# allow in env names.  There is at least one shell (dash >= 0.58)
+# which refuses to pass variables with dots.
+.if defined(RUMPCOMP_USER_SRCS.rumpdev_pci) \
+|| defined(RUMPCOMP_MAKEFILEINC.rumpdev_pci)
+.warning Use new style RUMPCOMP_MAKEFILEINC_rumpdev_pci
+.endif
+.ifdef RUMPCOMP_USER_PATH.rumpdev_pci
 .PATH:			${RUMPCOMP_USER_PATH.rumpdev_pci}
 RUMPCOMP_USER_SRCS=	${RUMPCOMP_USER_SRCS.rumpdev_pci}
-MYDIR:=			${.PARSEDIR}
-RUMPCOMP_USER_CPPFLAGS=	-I${MYDIR}
 RUMPCOMP_USER_CPPFLAGS+=${RUMPCOMP_USER_CPPFLAGS.rumpdev_pci}
 RUMPCOMP_USER_CFLAGS=	${RUMPCOMP_USER_CFLAGS.rumpdev_pci}
-
 CPPFLAGS+=		${RUMPCOMP_CPPFLAGS.rumpdev_pci}
-
-# XXX: messy
-.undef RUMPKERN_ONLY
-
+.endif
 .ifdef RUMPCOMP_MAKEFILEINC.rumpdev_pci
-.warning RUMPCOMP_MAKEFILEINC interface is unstable and may change
 .include "${RUMPCOMP_MAKEFILEINC.rumpdev_pci}"
 .endif
 
+# XXX: messy
+.undef RUMPKERN_ONLY
+
 .include "${RUMPTOP}/Makefile.rump"
 .include 
 .include 



CVS commit: src/sys/dev/usb

2016-05-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue May 10 15:14:03 UTC 2016

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

Log Message:
sprinkle _KERNEL_OPT


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.272 -r1.273 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/xhci.c

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

Modified files:

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.262 src/sys/dev/usb/ohci.c:1.263
--- src/sys/dev/usb/ohci.c:1.262	Mon May  9 21:52:43 2016
+++ src/sys/dev/usb/ohci.c	Tue May 10 15:14:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.262 2016/05/09 21:52:43 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.263 2016/05/10 15:14:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,9 +41,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.262 2016/05/09 21:52:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.263 2016/05/10 15:14:03 pooka Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_usb.h"
+#endif
 
 #include 
 

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.272 src/sys/dev/usb/uhci.c:1.273
--- src/sys/dev/usb/uhci.c:1.272	Fri May  6 20:12:54 2016
+++ src/sys/dev/usb/uhci.c	Tue May 10 15:14:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.272 2016/05/06 20:12:54 christos Exp $	*/
+/*	$NetBSD: uhci.c,v 1.273 2016/05/10 15:14:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,9 +42,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.272 2016/05/06 20:12:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.273 2016/05/10 15:14:03 pooka Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_usb.h"
+#endif
 
 #include 
 

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.45 src/sys/dev/usb/xhci.c:1.46
--- src/sys/dev/usb/xhci.c:1.45	Sat May  7 08:11:49 2016
+++ src/sys/dev/usb/xhci.c	Tue May 10 15:14:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.45 2016/05/07 08:11:49 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.46 2016/05/10 15:14:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,9 +34,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.45 2016/05/07 08:11:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.46 2016/05/10 15:14:03 pooka Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_usb.h"
+#endif
 
 #include 
 #include 



CVS commit: src/sys

2016-05-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri May  6 10:19:40 UTC 2016

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

Log Message:
regen syscall files


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.300 -r1.301 src/sys/kern/syscalls.c
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/syscalls_autoload.c \
src/sys/kern/systrace_args.c
cvs rdiff -u -r1.100 -r1.101 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.127 -r1.128 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.294 -r1.295 src/sys/sys/syscall.h
cvs rdiff -u -r1.278 -r1.279 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.310 src/sys/kern/init_sysent.c:1.311
--- src/sys/kern/init_sysent.c:1.310	Sat Apr 23 23:09:27 2016
+++ src/sys/kern/init_sysent.c	Fri May  6 10:19:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysent.c,v 1.310 2016/04/23 23:09:27 christos Exp $ */
+/* $NetBSD: init_sysent.c,v 1.311 2016/05/06 10:19:40 pooka Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.310 2016/04/23 23:09:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.311 2016/05/06 10:19:40 pooka Exp $");
 
 #include "opt_modular.h"
 #include "opt_ntp.h"

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.300 src/sys/kern/syscalls.c:1.301
--- src/sys/kern/syscalls.c:1.300	Sat Apr 23 23:09:27 2016
+++ src/sys/kern/syscalls.c	Fri May  6 10:19:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls.c,v 1.300 2016/04/23 23:09:27 christos Exp $ */
+/* $NetBSD: syscalls.c,v 1.301 2016/05/06 10:19:40 pooka Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.300 2016/04/23 23:09:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.301 2016/05/06 10:19:40 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_modular.h"

Index: src/sys/kern/syscalls_autoload.c
diff -u src/sys/kern/syscalls_autoload.c:1.19 src/sys/kern/syscalls_autoload.c:1.20
--- src/sys/kern/syscalls_autoload.c:1.19	Sat Apr 23 23:09:27 2016
+++ src/sys/kern/syscalls_autoload.c	Fri May  6 10:19:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls_autoload.c,v 1.19 2016/04/23 23:09:27 christos Exp $ */
+/* $NetBSD: syscalls_autoload.c,v 1.20 2016/05/06 10:19:40 pooka Exp $ */
 
 /*
  * System call autoload table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.19 2016/04/23 23:09:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.20 2016/05/06 10:19:40 pooka Exp $");
 
 #include 
 static struct sc_autoload netbsd_syscalls_autoload[] = {
Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.19 src/sys/kern/systrace_args.c:1.20
--- src/sys/kern/systrace_args.c:1.19	Sat Apr 23 23:09:27 2016
+++ src/sys/kern/systrace_args.c	Fri May  6 10:19:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.19 2016/04/23 23:09:27 christos Exp $ */
+/* $NetBSD: systrace_args.c,v 1.20 2016/05/06 10:19:40 pooka Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.100 src/sys/rump/include/rump/rump_syscalls.h:1.101
--- src/sys/rump/include/rump/rump_syscalls.h:1.100	Sat Apr 23 23:09:27 2016
+++ src/sys/rump/include/rump/rump_syscalls.h	Fri May  6 10:19:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.100 2016/04/23 23:09:27 christos Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.101 2016/05/06 10:19:40 pooka Exp $ */
 
 /*
  * System call protos in rump namespace.
@@ -16,824 +16,824 @@
 
 #include 
 
-#ifndef RUMP_SYS_RENAME_FKTRACE
-#define RUMP_SYS_RENAME_FKTRACE rump___sysimpl_fktrace
-#endif
-
-#ifndef RUMP_SYS_RENAME_GETSID
-#define RUMP_SYS_RENAME_GETSID rump___sysimpl_getsid
+#ifndef RUMP_SYS_RENAME_FGETXATTR
+#define RUMP_SYS_RENAME_FGETXATTR rump___sysimpl_fgetxattr
 #endif
 
-#ifndef RUMP_SYS_RENAME_RECVMMSG
-#define RUMP_SYS_RENAME_RECVMMSG rump___sysimpl_recvmmsg
+#ifndef RUMP_SYS_RENAME_IOCTL
+#define RUMP_SYS_RENAME_IOCTL rump___sysimpl_ioctl
 #endif
 
-#ifndef RUMP_SYS_RENAME_UTIMENSAT
-#define RUMP_SYS_RENAME_UTIMENSAT rump___sysimpl_utimensat
+#ifndef RUMP_SYS_RENAME_GETPPID
+#define RUMP_SYS_RENAME_GETPPID rump___sysimpl_getppid
 #endif
 
-#ifndef RUMP_SYS_RENAME_CHFLAGS
-#define RUMP_SYS_RENAME_CHFLAGS rump___sysimpl_chflags
+#ifndef RUMP_SYS_RENAME___QUOTACTL
+#define RUMP_SYS_RENAME___QUOTACTL rump___sysimpl___quotactl
 #endif
 
-#ifndef 

CVS commit: src/sys/kern

2016-05-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri May  6 10:17:34 UTC 2016

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

Log Message:
Include non-portable  inside RUMP_CLIENT protection.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/syscalls.conf

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

Modified files:

Index: src/sys/kern/syscalls.conf
diff -u src/sys/kern/syscalls.conf:1.27 src/sys/kern/syscalls.conf:1.28
--- src/sys/kern/syscalls.conf:1.27	Sun Apr  3 01:22:18 2016
+++ src/sys/kern/syscalls.conf	Fri May  6 10:17:34 2016
@@ -1,11 +1,11 @@
-#	$NetBSD: syscalls.conf,v 1.27 2016/04/03 01:22:18 christos Exp $
+#	$NetBSD: syscalls.conf,v 1.28 2016/05/06 10:17:34 pooka Exp $
 
 sysnames="syscalls.c"
 sysnumhdr="../sys/syscall.h"
 syssw="init_sysent.c"
 systrace="systrace_args.c"
 sysarghdr="../sys/syscallargs.h"
-sysarghdrextra='#ifndef RUMP_CLIENT\n#include \n#include \n#endif\n#include \n#include \n\n'
+sysarghdrextra='#ifndef RUMP_CLIENT\n#include \n#include \n#include \n#endif\n\n#include \n\n'
 sysautoload="syscalls_autoload.c"
 sysalign=1
 rumpcalls="../rump/librump/rumpkern/rump_syscalls.c"



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

2016-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 19 18:38:37 UTC 2016

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

Log Message:
add cpu_lock

from freqlabs on irc


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/rump/librump/rumpkern/scheduler.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.43 src/sys/rump/librump/rumpkern/scheduler.c:1.44
--- src/sys/rump/librump/rumpkern/scheduler.c:1.43	Mon Feb  8 18:18:19 2016
+++ src/sys/rump/librump/rumpkern/scheduler.c	Fri Feb 19 18:38:37 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka Exp $");
 
 #include 
 #include 
@@ -80,6 +80,8 @@ kcpuset_t *kcpuset_attached = NULL;
 kcpuset_t *kcpuset_running = NULL;
 int ncpu, ncpuonline;
 
+kmutex_t cpu_lock;
+
 #define RCPULWP_BUSY	((void *)-1)
 #define RCPULWP_WANTED	((void *)-2)
 
@@ -141,6 +143,8 @@ rump_cpus_bootstrap(int *nump)
 		num = MAXCPUS;
 	}
 
+	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);
+
 	kcpuset_create(_attached, true);
 	kcpuset_create(_running, true);
 



CVS commit: src/sys/rump

2016-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb  8 18:18:19 UTC 2016

Modified Files:
src/sys/rump/include/rump-sys: kern.h
src/sys/rump/librump/rumpkern: lwproc.c rump.c scheduler.c

Log Message:
Allocate struct cpu_info dynamically.  Saves quite a lot of BSS in the
common case and reduces rump kernel memory requirements by 10% or more
in really tiny deployments.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/include/rump-sys/kern.h
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.327 -r1.328 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.42 -r1.43 src/sys/rump/librump/rumpkern/scheduler.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/include/rump-sys/kern.h
diff -u src/sys/rump/include/rump-sys/kern.h:1.2 src/sys/rump/include/rump-sys/kern.h:1.3
--- src/sys/rump/include/rump-sys/kern.h:1.2	Tue Feb  2 13:07:30 2016
+++ src/sys/rump/include/rump-sys/kern.h	Mon Feb  8 18:18:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.h,v 1.2 2016/02/02 13:07:30 pooka Exp $	*/
+/*	$NetBSD: kern.h,v 1.3 2016/02/08 18:18:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -144,7 +144,7 @@ typedef void	(*rump_proc_vfs_release_fn)
 extern rump_proc_vfs_init_fn rump_proc_vfs_init;
 extern rump_proc_vfs_release_fn rump_proc_vfs_release;
 
-extern struct cpu_info *rump_cpu;
+extern struct cpu_info rump_bootcpu;
 
 extern bool rump_ttycomponent;
 

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.37 src/sys/rump/librump/rumpkern/lwproc.c:1.38
--- src/sys/rump/librump/rumpkern/lwproc.c:1.37	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/librump/rumpkern/lwproc.c	Mon Feb  8 18:18:19 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.37 2016/01/26 23:12:17 pooka Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.38 2016/02/08 18:18:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.37 2016/01/26 23:12:17 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.38 2016/02/08 18:18:19 pooka Exp $");
 
 #include 
 #include 
@@ -334,8 +334,8 @@ lwproc_makelwp(struct proc *p, struct lw
 	LIST_INSERT_HEAD(>p_lwps, l, l_sibling);
 
 	l->l_fd = p->p_fd;
-	l->l_cpu = rump_cpu;
-	l->l_target_cpu = rump_cpu; /* Initial target CPU always the same */
+	l->l_cpu = _bootcpu;
+	l->l_target_cpu = _bootcpu; /* Initial target CPU always same */
 	l->l_stat = LSRUN;
 	l->l_mutex = _lock;
 	TAILQ_INIT(>l_ld_locks);

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.327 src/sys/rump/librump/rumpkern/rump.c:1.328
--- src/sys/rump/librump/rumpkern/rump.c:1.327	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Feb  8 18:18:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.327 2016/01/26 23:12:17 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.328 2016/02/08 18:18:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.327 2016/01/26 23:12:17 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.328 2016/02/08 18:18:19 pooka Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -246,7 +246,7 @@ rump_init(void)
 	/* init minimal lwp/cpu context */
 	rump_lwproc_init();
 	l = 
-	l->l_cpu = l->l_target_cpu = rump_cpu;
+	l->l_cpu = l->l_target_cpu = _bootcpu;
 	rump_lwproc_curlwp_set(l);
 
 	/* retrieve env vars which affect the early stage of bootstrap */

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.42 src/sys/rump/librump/rumpkern/scheduler.c:1.43
--- src/sys/rump/librump/rumpkern/scheduler.c:1.42	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpkern/scheduler.c	Mon Feb  8 18:18:19 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.42 2016/01/26 23:12:18 pooka Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.42 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $");
 
 #include 
 #include 
@@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: scheduler.c,
 
 #include 
 
-static struct cpu_info rump_cpus[MAXCPUS];
 static struct rumpcpu {
 	/* needed in fastpath */
 	struct cpu_info *rcpu_ci;
@@ -69,7 +68,14 @@ static struct rumpcpu {
 	int rcpu_align[0] __aligned(CACHE_LINE_SIZE);
 } rcpu_storage[MAXCPUS];
 
-struct cpu_info *rump_cpu = _cpus[0];
+static inline struct rumpcpu *
+cpuinf

CVS commit: src

2016-02-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 12:22:23 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: mi
src/sys/rump/include/rump: Makefile
src/sys/rump/librump/rumpvfs: rumpfs.c
Added Files:
src/sys/rump/include/rump: rumpfs.h

Log Message:
Add capability to attach external memory to files on rumpfs.  This
feature is useful e.g. for tight-memory systems where you don't need
block storage, but still need to provide some data via files.


To generate a diff of this commit:
cvs rdiff -u -r1.2016 -r1.2017 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/include/rump/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/rump/rumpfs.h
cvs rdiff -u -r1.136 -r1.137 src/sys/rump/librump/rumpvfs/rumpfs.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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2016 src/distrib/sets/lists/comp/mi:1.2017
--- src/distrib/sets/lists/comp/mi:1.2016	Sun Jan 31 23:14:34 2016
+++ src/distrib/sets/lists/comp/mi	Tue Feb  2 12:22:23 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2016 2016/01/31 23:14:34 pooka Exp $
+#	$NetBSD: mi,v 1.2017 2016/02/02 12:22:23 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -2666,6 +2666,7 @@
 ./usr/include/rump/rumpdefs.h			comp-c-include	rump
 ./usr/include/rump/rumperr.h			comp-c-include	rump
 ./usr/include/rump/rumperrno2host.h			comp-c-include	rump
+./usr/include/rump/rumpfs.h			comp-c-include	rump
 ./usr/include/rump/rumpkern_if_pub.h		comp-c-include	rump
 ./usr/include/rump/rumpnet_if_pub.h		comp-c-include	rump
 ./usr/include/rump/rumpuser.h			comp-c-include	rump

Index: src/sys/rump/include/rump/Makefile
diff -u src/sys/rump/include/rump/Makefile:1.9 src/sys/rump/include/rump/Makefile:1.10
--- src/sys/rump/include/rump/Makefile:1.9	Sun Jan 31 23:14:34 2016
+++ src/sys/rump/include/rump/Makefile	Tue Feb  2 12:22:23 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2016/01/31 23:14:34 pooka Exp $
+#	$NetBSD: Makefile,v 1.10 2016/02/02 12:22:23 pooka Exp $
 
 .include 
 
@@ -8,6 +8,7 @@ INCSDIR=	/usr/include/rump
 INCS=		rump.h rump_namei.h rump_syscalls.h rump_syscalls_compat.h
 INCS+=		rump_syscallshotgun.h
 INCS+=		rumpdefs.h rumperr.h rumperrno2host.h rumpuser.h rumpvnode_if.h
+INCS+=		rumpfs.h
 
 INCS+=		rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h
 .endif

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.136 src/sys/rump/librump/rumpvfs/rumpfs.c:1.137
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.136	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Tue Feb  2 12:22:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.136 2016/01/26 23:12:18 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.137 2016/02/02 12:22:23 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.136 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.137 2016/02/02 12:22:23 pooka Exp $");
 
 #include 
 #include 
@@ -58,6 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1
 #include 
 #include 
 
+#include 
 #include 
 
 static int rump_vop_lookup(void *);
@@ -84,6 +85,7 @@ static int rump_vop_bmap(void *);
 static int rump_vop_strategy(void *);
 static int rump_vop_advlock(void *);
 static int rump_vop_access(void *);
+static int rump_vop_fcntl(void *);
 
 int (**fifo_vnodeop_p)(void *);
 const struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
@@ -128,6 +130,7 @@ const struct vnodeopv_entry_desc rump_vn
 	{ _bmap_desc, rump_vop_bmap },
 	{ _strategy_desc, rump_vop_strategy },
 	{ _advlock_desc, rump_vop_advlock },
+	{ _fcntl_desc, rump_vop_fcntl },
 	{ NULL, NULL }
 };
 const struct vnodeopv_desc rump_vnodeop_opv_desc =
@@ -209,6 +212,7 @@ struct rumpfs_node {
 #define RUMPNODE_DIR_ET		0x02
 #define RUMPNODE_DIR_ETSUBS	0x04
 #define RUMPNODE_ET_PHONE_HOST	0x10
+#define RUMPNODE_EXTSTORAGE	0x20
 
 struct rumpfs_mount {
 	struct vnode *rfsmp_rvp;
@@ -931,7 +935,12 @@ rump_vop_setattr(void *v)
 		copylen = MIN(rn->rn_dlen, newlen);
 		memset(newdata, 0, newlen);
 		memcpy(newdata, rn->rn_data, copylen);
-		rump_hyperfree(rn->rn_data, rn->rn_dlen); 
+
+		if ((rn->rn_flags & RUMPNODE_EXTSTORAGE) == 0) {
+			rump_hyperfree(rn->rn_data, rn->rn_dlen); 
+		} else {
+			rn->rn_flags &= ~RUMPNODE_EXTSTORAGE;
+		}
 
 		rn->rn_data = newdata;
 		rn->rn_dlen = newlen;
@@ -1456,7 +1465,11 @@ rump_vop_write(void *v)
 			rn->rn_dlen = oldlen;
 			uvm_vnp_setsize(vp, oldlen);
 		} else {
-			rump_hyperfree(olddata, oldlen);
+			if ((rn->rn_flags & RUMPNODE_EXTSTORAGE) == 0) {
+rump_hyperfree(olddata, oldlen);
+			} else {
+rn->rn_flags 

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

2016-02-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 13:02:34 UTC 2016

Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
optimize for size a.k.a. operation nuke trailing spaces


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/rump/librump/rumpvfs/rumpfs.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.137 src/sys/rump/librump/rumpvfs/rumpfs.c:1.138
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.137	Tue Feb  2 12:22:23 2016
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Tue Feb  2 13:02:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.137 2016/02/02 12:22:23 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.138 2016/02/02 13:02:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.137 2016/02/02 12:22:23 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.138 2016/02/02 13:02:34 pooka Exp $");
 
 #include 
 #include 
@@ -937,7 +937,7 @@ rump_vop_setattr(void *v)
 		memcpy(newdata, rn->rn_data, copylen);
 
 		if ((rn->rn_flags & RUMPNODE_EXTSTORAGE) == 0) {
-			rump_hyperfree(rn->rn_data, rn->rn_dlen); 
+			rump_hyperfree(rn->rn_data, rn->rn_dlen);
 		} else {
 			rn->rn_flags &= ~RUMPNODE_EXTSTORAGE;
 		}
@@ -1739,7 +1739,7 @@ rump_vop_fcntl(void *v)
 
 	KASSERT(cmd == RUMPFS_FCNTL_EXTSTORAGE_ADD);
 	if (rn->rn_data && (rn->rn_flags & RUMPNODE_EXTSTORAGE) == 0) {
-		rump_hyperfree(rn->rn_data, rn->rn_dlen); 
+		rump_hyperfree(rn->rn_data, rn->rn_dlen);
 	}
 
 	rn->rn_data = rfse->rfse_data;



CVS commit: src/sys/rump/include/rump-sys

2016-02-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 13:07:30 UTC 2016

Modified Files:
src/sys/rump/include/rump-sys: kern.h

Log Message:
Remove leading spaces.

Bet you didn't see that one coming.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/rump-sys/kern.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/rump/include/rump-sys/kern.h
diff -u src/sys/rump/include/rump-sys/kern.h:1.1 src/sys/rump/include/rump-sys/kern.h:1.2
--- src/sys/rump/include/rump-sys/kern.h:1.1	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/include/rump-sys/kern.h	Tue Feb  2 13:07:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.h,v 1.1 2016/01/26 23:12:17 pooka Exp $	*/
+/*	$NetBSD: kern.h,v 1.2 2016/02/02 13:07:30 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -228,13 +228,13 @@ struct rump_sysproxy_ops {
 };
 extern struct rump_sysproxy_ops rump_sysproxy_ops;
 #define rump_sysproxy_copyin(arg, raddr, laddr, len)			\
- 	rump_sysproxy_ops.rspo_copyin(arg, raddr, laddr, len)
+	rump_sysproxy_ops.rspo_copyin(arg, raddr, laddr, len)
 #define rump_sysproxy_copyinstr(arg, raddr, laddr, lenp)		\
- 	rump_sysproxy_ops.rspo_copyinstr(arg, raddr, laddr, lenp)
+	rump_sysproxy_ops.rspo_copyinstr(arg, raddr, laddr, lenp)
 #define rump_sysproxy_copyout(arg, laddr, raddr, len)			\
- 	rump_sysproxy_ops.rspo_copyout(arg, laddr, raddr, len)
+	rump_sysproxy_ops.rspo_copyout(arg, laddr, raddr, len)
 #define rump_sysproxy_copyoutstr(arg, laddr, raddr, lenp)		\
- 	rump_sysproxy_ops.rspo_copyoutstr(arg, laddr, raddr, lenp)
+	rump_sysproxy_ops.rspo_copyoutstr(arg, laddr, raddr, lenp)
 #define rump_sysproxy_anonmmap(arg, howmuch, addr)			\
 	rump_sysproxy_ops.rspo_anonmmap(arg, howmuch, addr)
 #define rump_sysproxy_raise(arg, signo)	\



CVS commit: src/sys/rump/include/rump

2016-02-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 01:15:24 UTC 2016

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
snarf fcntl definitions


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/rump/include/rump/makerumpdefs.sh

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

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.28 src/sys/rump/include/rump/makerumpdefs.sh:1.29
--- src/sys/rump/include/rump/makerumpdefs.sh:1.28	Tue Sep 15 14:55:12 2015
+++ src/sys/rump/include/rump/makerumpdefs.sh	Tue Feb  2 01:15:24 2016
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec 3>&1 > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.29 2016/02/02 01:15:24 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -53,6 +53,11 @@ enum rump_'"$2"' {
 fromvers ../../../sys/fcntl.h
 sed -n '/#define	O_[A-Z]*	*0x/s/O_/RUMP_O_/gp' \
 < ../../../sys/fcntl.h
+sed -n '/#define	F_[A-Z_]*	*0x/s/F_/RUMP_F_/gp' \
+< ../../../sys/fcntl.h
+sed -n '/#define	F_[A-Z_]*	*(/s/F_/RUMP_F_/gp' \
+< ../../../sys/fcntl.h
+sed -n '/#define[ 	]*_FCN/{:t;N;/\\$/bt;s/_FCN/RUMP__FCN/g;s/F_[A-Z]/RUMP_&/gp}' <../../../sys/fcntl.h | sed 's,/\*.*$,,'
 
 fromvers ../../../sys/vnode.h
 sed -n '/enum vtype.*{/{s/vtype/rump_&/;s/ V/ RUMP_V/gp;}' <../../../sys/vnode.h
@@ -130,7 +135,7 @@ exec 1>&3
 echo Generating rumperr.h
 rm -f rumperr.h
 exec > rumperr.h
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.29 2016/02/02 01:15:24 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
 
 fromvers ../../../sys/errno.h
@@ -171,7 +176,7 @@ fi
 echo Generating rumperrno2host.h 1>&3
 rm -f rumperrno2host.h
 exec > rumperrno2host.h
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.29 2016/02/02 01:15:24 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
 
 fromvers ../../../sys/errno.h



CVS commit: src/sys/rump/include/rump

2016-02-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 01:14:26 UTC 2016

Modified Files:
src/sys/rump/include/rump: rumpdefs.h rumperr.h rumperrno2host.h

Log Message:
periodic regen (because having new rcs ids in comments is most useful)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/include/rump/rumperr.h
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/rump/rumperrno2host.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.34 src/sys/rump/include/rump/rumpdefs.h:1.35
--- src/sys/rump/include/rump/rumpdefs.h:1.34	Thu Jan  7 13:54:08 2016
+++ src/sys/rump/include/rump/rumpdefs.h	Tue Feb  2 01:14:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.34 2016/01/07 13:54:08 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.35 2016/02/02 01:14:26 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -33,7 +33,7 @@
 #define	RUMP_O_SEARCH	0x0080	/* skip search permission checks */
 #define	RUMP_O_NOSIGPIPE	0x0100	/* don't deliver sigpipe */
 
-/*	NetBSD: vnode.h,v 1.256 2015/07/12 08:11:28 hannken Exp 	*/
+/*	NetBSD: vnode.h,v 1.259 2016/01/23 16:08:20 christos Exp 	*/
 enum rump_vtype	{ RUMP_VNON, RUMP_VREG, RUMP_VDIR, RUMP_VBLK, RUMP_VCHR, RUMP_VLNK, RUMP_VSOCK, RUMP_VFIFO, RUMP_VBAD };
 #define	RUMP_LK_SHARED	0x0001	
 #define	RUMP_LK_EXCLUSIVE	0x0002	
@@ -478,7 +478,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	_RUMP_IOW(g,n,t)	_RUMP_IOC(RUMP_IOC_IN,	(g), (n), sizeof(t))
 #define	_RUMP_IOWR(g,n,t)	_RUMP_IOC(RUMP_IOC_INOUT,	(g), (n), sizeof(t))
 
-/*	NetBSD: ktrace.h,v 1.61 2013/12/09 17:43:58 pooka Exp 	*/
+/*	NetBSD: ktrace.h,v 1.62 2016/01/23 21:19:24 christos Exp 	*/
 #define RUMP_KTROP_SET		0	
 #define RUMP_KTROP_CLEAR		1	
 #define RUMP_KTROP_CLEARFILE		2	
@@ -522,7 +522,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_KTRFACv1	(1 << RUMP_KTRFAC_VER_SHIFT)
 #define	RUMP_KTRFACv2	(2 << RUMP_KTRFAC_VER_SHIFT)
 
-/*	NetBSD: module.h,v 1.39 2015/11/04 04:28:58 pgoyette Exp 	*/
+/*	NetBSD: module.h,v 1.40 2016/01/18 16:46:08 pooka Exp 	*/
 struct rump_modctl_load {
 	const char *ml_filename;
 
@@ -548,7 +548,7 @@ struct rump_sysvbfs_args {
 	char	*fspec;		/* blocks special holding the fs to mount */
 };
 
-/*	NetBSD: dirent.h,v 1.29 2015/02/26 02:05:54 dholland Exp 	*/
+/*	NetBSD: dirent.h,v 1.30 2016/01/22 23:31:30 dholland Exp 	*/
 struct rump_dirent {
 	uint64_t d_fileno;			/* file number of entry */
 	uint16_t d_reclen;		/* length of this record */

Index: src/sys/rump/include/rump/rumperr.h
diff -u src/sys/rump/include/rump/rumperr.h:1.4 src/sys/rump/include/rump/rumperr.h:1.5
--- src/sys/rump/include/rump/rumperr.h:1.4	Tue Sep 15 14:55:55 2015
+++ src/sys/rump/include/rump/rumperr.h	Tue Feb  2 01:14:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperr.h,v 1.4 2015/09/15 14:55:55 pooka Exp $	*/
+/*	$NetBSD: rumperr.h,v 1.5 2016/02/02 01:14:26 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.

Index: src/sys/rump/include/rump/rumperrno2host.h
diff -u src/sys/rump/include/rump/rumperrno2host.h:1.1 src/sys/rump/include/rump/rumperrno2host.h:1.2
--- src/sys/rump/include/rump/rumperrno2host.h:1.1	Tue Sep 15 14:55:55 2015
+++ src/sys/rump/include/rump/rumperrno2host.h	Tue Feb  2 01:14:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperrno2host.h,v 1.1 2015/09/15 14:55:55 pooka Exp $	*/
+/*	$NetBSD: rumperrno2host.h,v 1.2 2016/02/02 01:14:26 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.



CVS commit: src/sys/rump/include/rump

2016-02-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  2 01:15:58 UTC 2016

Modified Files:
src/sys/rump/include/rump: rumpdefs.h rumperr.h rumperrno2host.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/rump/rumperr.h
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/include/rump/rumperrno2host.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.35 src/sys/rump/include/rump/rumpdefs.h:1.36
--- src/sys/rump/include/rump/rumpdefs.h:1.35	Tue Feb  2 01:14:26 2016
+++ src/sys/rump/include/rump/rumpdefs.h	Tue Feb  2 01:15:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.35 2016/02/02 01:14:26 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.36 2016/02/02 01:15:58 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -32,6 +32,31 @@
 #define	RUMP_O_CLOEXEC	0x0040	/* set close on exec */
 #define	RUMP_O_SEARCH	0x0080	/* skip search permission checks */
 #define	RUMP_O_NOSIGPIPE	0x0100	/* don't deliver sigpipe */
+#define	RUMP_F_WAIT		0x010		/* Wait until lock is granted */
+#define	RUMP_F_FLOCK		0x020	 	/* Use flock(2) semantics for lock */
+#define	RUMP_F_POSIX		0x040	 	/* Use POSIX semantics for lock */
+#define	RUMP_F_PARAM_MASK	0xfff
+#define	RUMP_F_PARAM_LEN(x)	(((x) >> 16) & RUMP_F_PARAM_MASK)
+#define	RUMP_F_FSCTL		(int)0x8000	/* This fcntl goes to the fs */
+#define	RUMP_F_FSVOID	(int)0x4000	/* no parameters */
+#define	RUMP_F_FSOUT		(int)0x2000	/* copy out parameter */
+#define	RUMP_F_FSIN		(int)0x1000	/* copy in parameter */
+#define	RUMP_F_FSINOUT	(RUMP_F_FSIN | RUMP_F_FSOUT)
+#define	RUMP_F_FSDIRMASK	(int)0x7000	/* mask for IN/OUT/VOID */
+#define	RUMP_F_FSPRIV	(int)0x8000	/* command is fs-specific */
+#define	RUMP__FCN(inout, num, len) \
+		(RUMP_F_FSCTL | inout | ((len & RUMP_F_PARAM_MASK) << 16) | (num))
+#define	RUMP__FCNO(c)	RUMP__FCN(RUMP_F_FSVOID,	(c), 0)
+#define	RUMP__FCNR(c, t)	RUMP__FCN(RUMP_F_FSIN,	(c), (int)sizeof(t))
+#define	RUMP__FCNW(c, t)	RUMP__FCN(RUMP_F_FSOUT,	(c), (int)sizeof(t))
+#define	RUMP__FCNRW(c, t)	RUMP__FCN(RUMP_F_FSINOUT,	(c), (int)sizeof(t))
+#define	RUMP__FCN_FSPRIV(inout, fs, num, len) \
+	(RUMP_F_FSCTL | RUMP_F_FSPRIV | inout | ((len & RUMP_F_PARAM_MASK) << 16) |	\
+	 (fs) << 8 | (num))
+#define	RUMP__FCNO_FSPRIV(f, c)	RUMP__FCN_FSPRIV(RUMP_F_FSVOID,  (f), (c), 0)
+#define	RUMP__FCNR_FSPRIV(f, c, t)	RUMP__FCN_FSPRIV(RUMP_F_FSIN,(f), (c), (int)sizeof(t))
+#define	RUMP__FCNW_FSPRIV(f, c, t)	RUMP__FCN_FSPRIV(RUMP_F_FSOUT,   (f), (c), (int)sizeof(t))
+#define	RUMP__FCNRW_FSPRIV(f, c, t)	RUMP__FCN_FSPRIV(RUMP_F_FSINOUT, (f), (c), (int)sizeof(t))
 
 /*	NetBSD: vnode.h,v 1.259 2016/01/23 16:08:20 christos Exp 	*/
 enum rump_vtype	{ RUMP_VNON, RUMP_VREG, RUMP_VDIR, RUMP_VBLK, RUMP_VCHR, RUMP_VLNK, RUMP_VSOCK, RUMP_VFIFO, RUMP_VBAD };

Index: src/sys/rump/include/rump/rumperr.h
diff -u src/sys/rump/include/rump/rumperr.h:1.5 src/sys/rump/include/rump/rumperr.h:1.6
--- src/sys/rump/include/rump/rumperr.h:1.5	Tue Feb  2 01:14:26 2016
+++ src/sys/rump/include/rump/rumperr.h	Tue Feb  2 01:15:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperr.h,v 1.5 2016/02/02 01:14:26 pooka Exp $	*/
+/*	$NetBSD: rumperr.h,v 1.6 2016/02/02 01:15:58 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.

Index: src/sys/rump/include/rump/rumperrno2host.h
diff -u src/sys/rump/include/rump/rumperrno2host.h:1.2 src/sys/rump/include/rump/rumperrno2host.h:1.3
--- src/sys/rump/include/rump/rumperrno2host.h:1.2	Tue Feb  2 01:14:26 2016
+++ src/sys/rump/include/rump/rumperrno2host.h	Tue Feb  2 01:15:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperrno2host.h,v 1.2 2016/02/02 01:14:26 pooka Exp $	*/
+/*	$NetBSD: rumperrno2host.h,v 1.3 2016/02/02 01:15:58 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.



CVS commit: src

2016-01-31 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Jan 31 23:14:34 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: mi
src/sys/rump/include/rump: Makefile rump.h
Added Files:
src/sys/rump/include/rump: rump_syscallshotgun.h

Log Message:
Move "shotgun approach to rump syscalls" from rump.h to a separate header,
sort of as a hint that relying on those macros is not necessarily the
way you want to do things in 2016.  Include things from rump.h for compat
for the time being, though.


To generate a diff of this commit:
cvs rdiff -u -r1.2015 -r1.2016 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/include/rump/Makefile
cvs rdiff -u -r1.67 -r1.68 src/sys/rump/include/rump/rump.h
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/rump/rump_syscallshotgun.h

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.2015 src/distrib/sets/lists/comp/mi:1.2016
--- src/distrib/sets/lists/comp/mi:1.2015	Sun Jan 24 17:14:10 2016
+++ src/distrib/sets/lists/comp/mi	Sun Jan 31 23:14:34 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2015 2016/01/24 17:14:10 christos Exp $
+#	$NetBSD: mi,v 1.2016 2016/01/31 23:14:34 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -2661,6 +2661,7 @@
 ./usr/include/rump/rump_namei.h			comp-c-include	rump
 ./usr/include/rump/rump_syscalls.h		comp-c-include	rump
 ./usr/include/rump/rump_syscalls_compat.h	comp-c-include	rump
+./usr/include/rump/rump_syscallshotgun.h	comp-c-include	rump
 ./usr/include/rump/rumpclient.h			comp-c-include	rump
 ./usr/include/rump/rumpdefs.h			comp-c-include	rump
 ./usr/include/rump/rumperr.h			comp-c-include	rump

Index: src/sys/rump/include/rump/Makefile
diff -u src/sys/rump/include/rump/Makefile:1.8 src/sys/rump/include/rump/Makefile:1.9
--- src/sys/rump/include/rump/Makefile:1.8	Tue Sep 15 14:57:34 2015
+++ src/sys/rump/include/rump/Makefile	Sun Jan 31 23:14:34 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2015/09/15 14:57:34 pooka Exp $
+#	$NetBSD: Makefile,v 1.9 2016/01/31 23:14:34 pooka Exp $
 
 .include 
 
@@ -6,6 +6,7 @@ INCSDIR=	/usr/include/rump
 
 .if (${MKRUMP} != "no")
 INCS=		rump.h rump_namei.h rump_syscalls.h rump_syscalls_compat.h
+INCS+=		rump_syscallshotgun.h
 INCS+=		rumpdefs.h rumperr.h rumperrno2host.h rumpuser.h rumpvnode_if.h
 
 INCS+=		rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h

Index: src/sys/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.67 src/sys/rump/include/rump/rump.h:1.68
--- src/sys/rump/include/rump/rump.h:1.67	Fri Jan 29 20:35:48 2016
+++ src/sys/rump/include/rump/rump.h	Sun Jan 31 23:14:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.67 2016/01/29 20:35:48 christos Exp $	*/
+/*	$NetBSD: rump.h,v 1.68 2016/01/31 23:14:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -132,89 +132,10 @@ _END_DECLS
 #endif
 
 /*
- * Begin rump syscall conditionals.  Yes, something a little better
- * is required here.
+ * Include macros prehistorically provided by this header.
+ * The inclusion might go away some year.  Include the header directly
+ * if you want it to keep working for you.
  */
-#ifdef RUMP_SYS_NETWORKING
-#include 
-#define socket(a,b,c) rump_sys_socket(a,b,c)
-#define accept(a,b,c) rump_sys_accept(a,b,c)
-#define bind(a,b,c) rump_sys_bind(a,b,c)
-#define connect(a,b,c) rump_sys_connect(a,b,c)
-#define getpeername(a,b,c) rump_sys_getpeername(a,b,c)
-#define getsockname(a,b,c) rump_sys_getsockname(a,b,c)
-#define listen(a,b) rump_sys_listen(a,b)
-#define recvfrom(a,b,c,d,e,f) rump_sys_recvfrom(a,b,c,d,e,f)
-#define recvmsg(a,b,c) rump_sys_recvmsg(a,b,c)
-#define sendto(a,b,c,d,e,f) rump_sys_sendto(a,b,c,d,e,f)
-#define sendmsg(a,b,c) rump_sys_sendmsg(a,b,c)
-#define getsockopt(a,b,c,d,e) rump_sys_getsockopt(a,b,c,d,e)
-#define setsockopt(a,b,c,d,e) rump_sys_setsockopt(a,b,c,d,e)
-#define shutdown(a,b) rump_sys_shutdown(a,b)
-#endif /* RUMP_SYS_NETWORKING */
-
-#ifdef RUMP_SYS_IOCTL
-#include 
-#define ioctl(...) rump_sys_ioctl(__VA_ARGS__)
-#define fcntl(...) rump_sys_fcntl(__VA_ARGS__)
-#endif /* RUMP_SYS_IOCTL */
-
-#ifdef RUMP_SYS_CLOSE
-#include 
-#define close(a) rump_sys_close(a)
-#endif /* RUMP_SYS_CLOSE */
-
-#ifdef RUMP_SYS_OPEN
-#include 
-#define open(...) rump_sys_open(__VA_ARGS__)
-#endif /* RUMP_SYS_OPEN */
-
-#ifdef RUMP_SYS_READWRITE
-#include 
-#define read(a,b,c) rump_sys_read(a,b,c)
-#define readv(a,b,c) rump_sys_readv(a,b,c)
-#define pread(a,b,c,d) rump_sys_pread(a,b,c,d)
-#define preadv(a,b,c,d) rump_sys_preadv(a,b,c,d)
-#define write(a,b,c) rump_sys_write(a,b,c)
-#define writev(a,b,c) rump_sys_writev(a,b,c)
-#define pwrite(a,b,c,d) rump_sys_pwrite(a,b,c,d)
-#define pwritev(a,b,c,d) rump_sys_pwritev(a,b,c,d)
-#endif /* R

CVS commit: src/sys/rump/librump

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:21:19 UTC 2016

Modified Files:
src/sys/rump/librump: makerumpif.sh

Log Message:
include rumpif private headers from 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/makerumpif.sh

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

Modified files:

Index: src/sys/rump/librump/makerumpif.sh
diff -u src/sys/rump/librump/makerumpif.sh:1.9 src/sys/rump/librump/makerumpif.sh:1.10
--- src/sys/rump/librump/makerumpif.sh:1.9	Thu Apr 23 10:50:00 2015
+++ src/sys/rump/librump/makerumpif.sh	Tue Jan 26 23:21:18 2016
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: makerumpif.sh,v 1.9 2015/04/23 10:50:00 pooka Exp $
+#	$NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp $
 #
 # Copyright (c) 2009, 2015 Antti Kantee.  All rights reserved.
 #
@@ -78,9 +78,9 @@ sed -e '
 ' ${1} | awk -F\| -v topdir=${TOPDIR} '
 function fileheaders(file, srcstr)
 {
-	printf("/*\t$NetBSD: makerumpif.sh,v 1.9 2015/04/23 10:50:00 pooka Exp $\t*/\n\n") > file
+	printf("/*\t$NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp $\t*/\n\n") > file
 	printf("/*\n * Automatically generated.  DO NOT EDIT.\n") > file
-	genstr = "$NetBSD: makerumpif.sh,v 1.9 2015/04/23 10:50:00 pooka Exp $"
+	genstr = "$NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp $"
 	gsub("\\$", "", genstr)
 	printf(" * from: %s\n", srcstr) > file
 	printf(" * by:   %s\n", genstr) > file
@@ -154,11 +154,11 @@ $1 == "WRAPPERS"{gencalls = topdir "/" $
 		printf("\n") > privhdr
 
 		printf("\n#include \n") > gencalls
-		printf("#include \n") > gencalls
-		printf("\n#include \n") > gencalls
+		printf("#include \n\n") > gencalls
+		printf("#include \n", privfile) > gencalls
+		printf("#include \n\n", privfile) > gencalls
+		printf("#include \n") > gencalls
 		printf("#include \n\n", pubfile) > gencalls
-		printf("#include \"rump_private.h\"\n", privfile) > gencalls
-		printf("#include \"%s\"\n\n", privfile) > gencalls
 		printf("void __dead rump_%s_unavailable(void);\n",	\
 		myname) > gencalls
 		printf("void __dead\nrump_%s_unavailable(void)\n{\n",	\



CVS commit: src/sys/rump/librump

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:22:22 UTC 2016

Modified Files:
src/sys/rump/librump/rumpkern: rumpkern.ifspec
src/sys/rump/librump/rumpnet: rumpnet.ifspec
src/sys/rump/librump/rumpvfs: rumpvfs.ifspec

Log Message:
generate privhdrs to new location


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpkern/rumpkern.ifspec
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpnet/rumpnet.ifspec
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec
diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.13 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.14
--- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.13	Fri Apr 25 13:10:42 2014
+++ src/sys/rump/librump/rumpkern/rumpkern.ifspec	Tue Jan 26 23:22:22 2016
@@ -1,8 +1,8 @@
-;	$NetBSD: rumpkern.ifspec,v 1.13 2014/04/25 13:10:42 pooka Exp $
+;	$NetBSD: rumpkern.ifspec,v 1.14 2016/01/26 23:22:22 pooka Exp $
 
 NAME|kern
 PUBHDR|include/rump/rumpkern_if_pub.h
-PRIVHDR|librump/rumpkern/rumpkern_if_priv.h
+PRIVHDR|include/rump-sys/kern_if.h
 WRAPPERS|librump/rumpkern/rumpkern_if_wrappers.c
 
 ; type		| name		| args

Index: src/sys/rump/librump/rumpnet/rumpnet.ifspec
diff -u src/sys/rump/librump/rumpnet/rumpnet.ifspec:1.3 src/sys/rump/librump/rumpnet/rumpnet.ifspec:1.4
--- src/sys/rump/librump/rumpnet/rumpnet.ifspec:1.3	Wed Jul  3 19:21:11 2013
+++ src/sys/rump/librump/rumpnet/rumpnet.ifspec	Tue Jan 26 23:22:22 2016
@@ -1,8 +1,8 @@
-;   $NetBSD: rumpnet.ifspec,v 1.3 2013/07/03 19:21:11 pooka Exp $
+;   $NetBSD: rumpnet.ifspec,v 1.4 2016/01/26 23:22:22 pooka Exp $
 
 NAME|net
 PUBHDR|include/rump/rumpnet_if_pub.h
-PRIVHDR|librump/rumpnet/rumpnet_if_priv.h
+PRIVHDR|include/rump-sys/net_if.h
 WRAPPERS|librump/rumpnet/rumpnet_if_wrappers.c
 
 ; type  | name  | args			| attrs

Index: src/sys/rump/librump/rumpvfs/rumpvfs.ifspec
diff -u src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.10 src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.11
--- src/sys/rump/librump/rumpvfs/rumpvfs.ifspec:1.10	Thu Apr 23 10:50:29 2015
+++ src/sys/rump/librump/rumpvfs/rumpvfs.ifspec	Tue Jan 26 23:22:22 2016
@@ -1,8 +1,8 @@
-;   $NetBSD: rumpvfs.ifspec,v 1.10 2015/04/23 10:50:29 pooka Exp $
+;   $NetBSD: rumpvfs.ifspec,v 1.11 2016/01/26 23:22:22 pooka Exp $
 
 NAME|vfs
 PUBHDR|include/rump/rumpvfs_if_pub.h
-PRIVHDR|librump/rumpvfs/rumpvfs_if_priv.h
+PRIVHDR|include/rump-sys/vfs_if.h
 WRAPPERS|librump/rumpvfs/rumpvfs_if_wrappers.c
 
 ; type  | name  | args		| attrs



CVS commit: src/sys/rump

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:24:55 UTC 2016

Modified Files:
src/sys/rump: makerumpsyscalls.sh

Log Message:
"rump_private.h" -> 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/makerumpsyscalls.sh

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

Modified files:

Index: src/sys/rump/makerumpsyscalls.sh
diff -u src/sys/rump/makerumpsyscalls.sh:1.2 src/sys/rump/makerumpsyscalls.sh:1.3
--- src/sys/rump/makerumpsyscalls.sh:1.2	Sun Apr 27 16:28:21 2014
+++ src/sys/rump/makerumpsyscalls.sh	Tue Jan 26 23:24:55 2016
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: makerumpsyscalls.sh,v 1.2 2014/04/27 16:28:21 pooka Exp $
+#	$NetBSD: makerumpsyscalls.sh,v 1.3 2016/01/26 23:24:55 pooka Exp $
 #
 
 #
@@ -58,16 +58,16 @@ END {
 }
 '
 
-SYSCOMP_HDR='/*	$NetBSD: makerumpsyscalls.sh,v 1.2 2014/04/27 16:28:21 pooka Exp $	*/
+SYSCOMP_HDR='/*	$NetBSD: makerumpsyscalls.sh,v 1.3 2016/01/26 23:24:55 pooka Exp $	*/
 
 /* AUTOMATICALLY GENERATED BY makerumpsyscalls.sh */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: makerumpsyscalls.sh,v 1.2 2014/04/27 16:28:21 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makerumpsyscalls.sh,v 1.3 2016/01/26 23:24:55 pooka Exp $");
 
 #include 
 
-#include "rump_private.h"
+#include 
 '
 
 SYSCOMP_BODY='



CVS commit: src/sys/rump

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:25:41 UTC 2016

Modified Files:
src/sys/rump/include/rump: rumpkern_if_pub.h rumpnet_if_pub.h
rumpvfs_if_pub.h
src/sys/rump/include/rump-sys: kern_if.h net_if.h vfs_if.h
src/sys/rump/librump/rumpkern: rumpkern_if_wrappers.c
src/sys/rump/librump/rumpnet: rumpnet_if_wrappers.c
src/sys/rump/librump/rumpvfs: rumpvfs_if_wrappers.c

Log Message:
regen rump kernel interfaces for header change.
(they were already manually edited for a prior commit, so not much change)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/include/rump/rumpkern_if_pub.h
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/rump/rumpnet_if_pub.h
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/include/rump/rumpvfs_if_pub.h
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/rump-sys/kern_if.h \
src/sys/rump/include/rump-sys/net_if.h \
src/sys/rump/include/rump-sys/vfs_if.h
cvs rdiff -u -r1.17 -r1.18 \
src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpnet/rumpnet_if_wrappers.c
cvs rdiff -u -r1.14 -r1.15 src/sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.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/include/rump/rumpkern_if_pub.h
diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.17 src/sys/rump/include/rump/rumpkern_if_pub.h:1.18
--- src/sys/rump/include/rump/rumpkern_if_pub.h:1.17	Fri Apr 25 17:50:28 2014
+++ src/sys/rump/include/rump/rumpkern_if_pub.h	Tue Jan 26 23:25:40 2016
@@ -1,9 +1,9 @@
-/*	$NetBSD: rumpkern_if_pub.h,v 1.17 2014/04/25 17:50:28 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_pub.h,v 1.18 2016/01/26 23:25:40 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpkern.ifspec,v 1.13 2014/04/25 13:10:42 pooka Exp 
- * by:   NetBSD: makerumpif.sh,v 1.8 2014/04/25 17:50:01 pooka Exp 
+ * from: NetBSD: rumpkern.ifspec,v 1.14 2016/01/26 23:22:22 pooka Exp 
+ * by:   NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp 
  */
 
 int rump_pub_module_init(const struct modinfo * const *, size_t);

Index: src/sys/rump/include/rump/rumpnet_if_pub.h
diff -u src/sys/rump/include/rump/rumpnet_if_pub.h:1.5 src/sys/rump/include/rump/rumpnet_if_pub.h:1.6
--- src/sys/rump/include/rump/rumpnet_if_pub.h:1.5	Wed Jul  3 19:22:21 2013
+++ src/sys/rump/include/rump/rumpnet_if_pub.h	Tue Jan 26 23:25:40 2016
@@ -1,9 +1,9 @@
-/*	$NetBSD: rumpnet_if_pub.h,v 1.5 2013/07/03 19:22:21 pooka Exp $	*/
+/*	$NetBSD: rumpnet_if_pub.h,v 1.6 2016/01/26 23:25:40 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpnet.ifspec,v 1.3 2013/07/03 19:21:11 pooka Exp 
- * by:   NetBSD: makerumpif.sh,v 1.6 2013/02/14 10:54:54 pooka Exp 
+ * from: NetBSD: rumpnet.ifspec,v 1.4 2016/01/26 23:22:22 pooka Exp 
+ * by:   NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp 
  */
 
 int rump_pub_shmif_create(const char *, int *);

Index: src/sys/rump/include/rump/rumpvfs_if_pub.h
diff -u src/sys/rump/include/rump/rumpvfs_if_pub.h:1.13 src/sys/rump/include/rump/rumpvfs_if_pub.h:1.14
--- src/sys/rump/include/rump/rumpvfs_if_pub.h:1.13	Thu Apr 23 10:51:20 2015
+++ src/sys/rump/include/rump/rumpvfs_if_pub.h	Tue Jan 26 23:25:40 2016
@@ -1,9 +1,9 @@
-/*	$NetBSD: rumpvfs_if_pub.h,v 1.13 2015/04/23 10:51:20 pooka Exp $	*/
+/*	$NetBSD: rumpvfs_if_pub.h,v 1.14 2016/01/26 23:25:40 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpvfs.ifspec,v 1.10 2015/04/23 10:50:29 pooka Exp 
- * by:   NetBSD: makerumpif.sh,v 1.9 2015/04/23 10:50:00 pooka Exp 
+ * from: NetBSD: rumpvfs.ifspec,v 1.11 2016/01/26 23:22:22 pooka Exp 
+ * by:   NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp 
  */
 
 void rump_pub_getvninfo(struct vnode *, enum rump_vtype *, off_t *, dev_t *);

Index: src/sys/rump/include/rump-sys/kern_if.h
diff -u src/sys/rump/include/rump-sys/kern_if.h:1.1 src/sys/rump/include/rump-sys/kern_if.h:1.2
--- src/sys/rump/include/rump-sys/kern_if.h:1.1	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/include/rump-sys/kern_if.h	Tue Jan 26 23:25:40 2016
@@ -1,9 +1,9 @@
-/*	$NetBSD: kern_if.h,v 1.1 2016/01/26 23:12:17 pooka Exp $	*/
+/*	$NetBSD: kern_if.h,v 1.2 2016/01/26 23:25:40 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpkern.ifspec,v 1.13 2014/04/25 13:10:42 pooka Exp 
- * by:   NetBSD: makerumpif.sh,v 1.8 2014/04/25 17:50:01 pooka Exp 
+ * from: NetBSD: rumpkern.ifspec,v 1.14 2016/01/26 23:22:22 pooka Exp 
+ * by:   NetBSD: makerumpif.sh,v 1.10 2016/01/26 23:21:18 pooka Exp 
  */
 
 #ifndef _RUMP_PRIF_KERN_H_
Index: src/sys/rump/include/rump-sys/net_if.h
diff -u src/sys/rump/include/rump-sys/net_if.h:1.1 src/sys/rump/include/rump-sys/net_if.h:1.2
--- src/sys/rump/include/rump-sys/net_if.h:1.1	Tue Jan 26 23:12:17 2016
+++ 

CVS commit: src/sys/kern

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:28:06 UTC 2016

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

Log Message:
"rump_private.h" -> 


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/vnode_if.sh

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

Modified files:

Index: src/sys/kern/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.60 src/sys/kern/vnode_if.sh:1.61
--- src/sys/kern/vnode_if.sh:1.60	Mon Jan 13 12:07:55 2014
+++ src/sys/kern/vnode_if.sh	Tue Jan 26 23:28:06 2016
@@ -29,7 +29,7 @@ copyright="\
  * SUCH DAMAGE.
  */
 "
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.61 2016/01/26 23:28:06 pooka Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -306,7 +306,7 @@ echo '
 #include 
 #include '
 [ ! -z "${rump}" ] && echo '#include '		\
-	&& echo '#include "rump_private.h"'
+	&& echo '#include '
 
 if [ -z "${rump}" ] ; then
 	echo "



CVS commit: src/sys

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:30:10 UTC 2016

Modified Files:
src/sys/kern: vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: vnode_if.h

Log Message:
regen vnode interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.90 -r1.91 src/sys/sys/vnode_if.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/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.95 src/sys/kern/vnode_if.c:1.96
--- src/sys/kern/vnode_if.c:1.95	Mon Apr 20 23:11:27 2015
+++ src/sys/kern/vnode_if.c	Tue Jan 26 23:30:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.95 2015/04/20 23:11:27 riastradh Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.96 2016/01/26 23:30:10 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.95 2015/04/20 23:11:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.96 2016/01/26 23:30:10 pooka Exp $");
 
 #include 
 #include 

Index: src/sys/rump/include/rump/rumpvnode_if.h
diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.19 src/sys/rump/include/rump/rumpvnode_if.h:1.20
--- src/sys/rump/include/rump/rumpvnode_if.h:1.19	Mon Apr 20 23:11:27 2015
+++ src/sys/rump/include/rump/rumpvnode_if.h	Tue Jan 26 23:30:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.h,v 1.19 2015/04/20 23:11:27 riastradh Exp $	*/
+/*	$NetBSD: rumpvnode_if.h,v 1.20 2016/01/26 23:30:10 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!

Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c
diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.19 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.20
--- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.19	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c	Tue Jan 26 23:30:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.c,v 1.19 2016/01/26 23:12:18 pooka Exp $	*/
+/*	$NetBSD: rumpvnode_if.c,v 1.20 2016/01/26 23:30:10 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -40,17 +40,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.19 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.20 2016/01/26 23:30:10 pooka Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
-
-#include 
-
 #include 
+#include 
 
 int
 RUMP_VOP_BWRITE(struct vnode *vp,

Index: src/sys/sys/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.90 src/sys/sys/vnode_if.h:1.91
--- src/sys/sys/vnode_if.h:1.90	Mon Apr 20 23:11:27 2015
+++ src/sys/sys/vnode_if.h	Tue Jan 26 23:30:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.h,v 1.90 2015/04/20 23:11:27 riastradh Exp $	*/
+/*	$NetBSD: vnode_if.h,v 1.91 2016/01/26 23:30:10 pooka Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!



CVS commit: src/sys/rump

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:41:15 UTC 2016

Modified Files:
src/sys/rump/dev/lib/libucom: Makefile
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
nuke a few missed -Ifactiondir CPPFLAGSitions.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/libucom/Makefile
cvs rdiff -u -r1.165 -r1.166 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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/dev/lib/libucom/Makefile
diff -u src/sys/rump/dev/lib/libucom/Makefile:1.6 src/sys/rump/dev/lib/libucom/Makefile:1.7
--- src/sys/rump/dev/lib/libucom/Makefile:1.6	Mon Oct 19 16:16:34 2015
+++ src/sys/rump/dev/lib/libucom/Makefile	Tue Jan 26 23:41:15 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2015/10/19 16:16:34 pooka Exp $
+#	$NetBSD: Makefile,v 1.7 2016/01/26 23:41:15 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/usb ${.CURDIR}/../../../../kern
@@ -12,7 +12,5 @@ SRCS=	ucom.c uplcom.c u3g.c
 
 SRCS+=	ucom_at_usb.c
 
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs
-
 .include 
 .include 

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.165 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.166
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.165	Mon Oct 19 16:16:38 2015
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Tue Jan 26 23:41:15 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.165 2015/10/19 16:16:38 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.166 2016/01/26 23:41:15 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -169,8 +169,7 @@ SRCS+=		subr_lockdebug.c
 SRCS+=		kern_ktrace.c
 .endif
 
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev
+CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
 AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
 
 #



CVS commit: src/sys/kern

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:44:58 UTC 2016

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

Log Message:
"rump_private" -> 


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

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

Modified files:

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.162 src/sys/kern/makesyscalls.sh:1.163
--- src/sys/kern/makesyscalls.sh:1.162	Tue Dec  1 00:58:29 2015
+++ src/sys/kern/makesyscalls.sh	Tue Jan 26 23:44:58 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.162 2015/12/01 00:58:29 pgoyette Exp $
+#	$NetBSD: makesyscalls.sh,v 1.163 2016/01/26 23:44:58 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -287,8 +287,8 @@ NR == 1 {
 	printf "#include \n" > rumpcalls
 	printf "#include \n\n" > rumpcalls
 	printf "#include \n\n" > rumpcalls
+	printf "#include \"\n\n" > rumpcalls
 	printf "#include \n" > rumpcalls
-	printf "#include \"rump_private.h\"\n\n" > rumpcalls
 	printf "#define rsys_syscall(num, data, dlen, retval)\t\\\n" > rumpcalls
 	printf "rump_syscall(num, data, dlen, retval)\n\n" > rumpcalls
 	printf "#define rsys_seterrno(error) rumpuser_seterrno(error)\n" \



CVS commit: src/sys/kern

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:46:37 UTC 2016

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

Log Message:
fix typo in previous


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

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

Modified files:

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.163 src/sys/kern/makesyscalls.sh:1.164
--- src/sys/kern/makesyscalls.sh:1.163	Tue Jan 26 23:44:58 2016
+++ src/sys/kern/makesyscalls.sh	Tue Jan 26 23:46:37 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.163 2016/01/26 23:44:58 pooka Exp $
+#	$NetBSD: makesyscalls.sh,v 1.164 2016/01/26 23:46:37 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -287,7 +287,7 @@ NR == 1 {
 	printf "#include \n" > rumpcalls
 	printf "#include \n\n" > rumpcalls
 	printf "#include \n\n" > rumpcalls
-	printf "#include \"\n\n" > rumpcalls
+	printf "#include \n\n" > rumpcalls
 	printf "#include \n" > rumpcalls
 	printf "#define rsys_syscall(num, data, dlen, retval)\t\\\n" > rumpcalls
 	printf "rump_syscall(num, data, dlen, retval)\n\n" > rumpcalls



CVS commit: src/sys

2016-01-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan 26 23:49:47 UTC 2016

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

Log Message:
regen syscall files


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.295 -r1.296 src/sys/kern/syscalls.c
cvs rdiff -u -r1.14 -r1.15 src/sys/kern/syscalls_autoload.c \
src/sys/kern/systrace_args.c
cvs rdiff -u -r1.95 -r1.96 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.122 -r1.123 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.289 -r1.290 src/sys/sys/syscall.h
cvs rdiff -u -r1.273 -r1.274 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.305 src/sys/kern/init_sysent.c:1.306
--- src/sys/kern/init_sysent.c:1.305	Thu Dec  3 02:56:48 2015
+++ src/sys/kern/init_sysent.c	Tue Jan 26 23:49:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysent.c,v 1.305 2015/12/03 02:56:48 pgoyette Exp $ */
+/* $NetBSD: init_sysent.c,v 1.306 2016/01/26 23:49:46 pooka Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.305 2015/12/03 02:56:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.306 2016/01/26 23:49:46 pooka Exp $");
 
 #include "opt_modular.h"
 #include "opt_ntp.h"

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.295 src/sys/kern/syscalls.c:1.296
--- src/sys/kern/syscalls.c:1.295	Thu Dec  3 02:56:48 2015
+++ src/sys/kern/syscalls.c	Tue Jan 26 23:49:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls.c,v 1.295 2015/12/03 02:56:48 pgoyette Exp $ */
+/* $NetBSD: syscalls.c,v 1.296 2016/01/26 23:49:46 pooka Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.295 2015/12/03 02:56:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.296 2016/01/26 23:49:46 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_modular.h"

Index: src/sys/kern/syscalls_autoload.c
diff -u src/sys/kern/syscalls_autoload.c:1.14 src/sys/kern/syscalls_autoload.c:1.15
--- src/sys/kern/syscalls_autoload.c:1.14	Thu Dec  3 02:56:48 2015
+++ src/sys/kern/syscalls_autoload.c	Tue Jan 26 23:49:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls_autoload.c,v 1.14 2015/12/03 02:56:48 pgoyette Exp $ */
+/* $NetBSD: syscalls_autoload.c,v 1.15 2016/01/26 23:49:46 pooka Exp $ */
 
 /*
  * System call autoload table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.14 2015/12/03 02:56:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.15 2016/01/26 23:49:46 pooka Exp $");
 
 #include 
 static struct sc_autoload netbsd_syscalls_autoload[] = {
Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.14 src/sys/kern/systrace_args.c:1.15
--- src/sys/kern/systrace_args.c:1.14	Thu Dec  3 02:56:48 2015
+++ src/sys/kern/systrace_args.c	Tue Jan 26 23:49:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.14 2015/12/03 02:56:48 pgoyette Exp $ */
+/* $NetBSD: systrace_args.c,v 1.15 2016/01/26 23:49:46 pooka Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.95 src/sys/rump/include/rump/rump_syscalls.h:1.96
--- src/sys/rump/include/rump/rump_syscalls.h:1.95	Thu Dec  3 02:56:48 2015
+++ src/sys/rump/include/rump/rump_syscalls.h	Tue Jan 26 23:49:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.95 2015/12/03 02:56:48 pgoyette Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.96 2016/01/26 23:49:46 pooka Exp $ */
 
 /*
  * System call protos in rump namespace.
@@ -16,824 +16,824 @@
 
 #include 
 
-#ifndef RUMP_SYS_RENAME_FKTRACE
-#define RUMP_SYS_RENAME_FKTRACE rump___sysimpl_fktrace
-#endif
-
-#ifndef RUMP_SYS_RENAME_GETSID
-#define RUMP_SYS_RENAME_GETSID rump___sysimpl_getsid
+#ifndef RUMP_SYS_RENAME_FGETXATTR
+#define RUMP_SYS_RENAME_FGETXATTR rump___sysimpl_fgetxattr
 #endif
 
-#ifndef RUMP_SYS_RENAME_RECVMMSG
-#define RUMP_SYS_RENAME_RECVMMSG rump___sysimpl_recvmmsg
+#ifndef RUMP_SYS_RENAME_IOCTL
+#define RUMP_SYS_RENAME_IOCTL rump___sysimpl_ioctl
 #endif
 
-#ifndef RUMP_SYS_RENAME_UTIMENSAT
-#define RUMP_SYS_RENAME_UTIMENSAT rump___sysimpl_utimensat
+#ifndef RUMP_SYS_RENAME_GETPPID
+#define RUMP_SYS_RENAME_GETPPID rump___sysimpl_getppid
 #endif
 
-#ifndef RUMP_SYS_RENAME_CHFLAGS
-#define RUMP_SYS_RENAME_CHFLAGS rump___sysimpl_chflags
+#ifndef RUMP_SYS_RENAME___QUOTACTL
+#define RUMP_SYS_RENAME___QUOTACTL rump___sysimpl___quotactl
 #endif
 
-#ifndef RUMP_SYS_RENAME_GETGROUPS

CVS commit: src/share/examples/rump

2016-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 11:01:17 UTC 2016

Modified Files:
src/share/examples/rump/ttyserv: Makefile
src/share/examples/rump/umserv: Makefile

Log Message:
add -D_KERNTYPES


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/examples/rump/ttyserv/Makefile
cvs rdiff -u -r1.3 -r1.4 src/share/examples/rump/umserv/Makefile

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

Modified files:

Index: src/share/examples/rump/ttyserv/Makefile
diff -u src/share/examples/rump/ttyserv/Makefile:1.2 src/share/examples/rump/ttyserv/Makefile:1.3
--- src/share/examples/rump/ttyserv/Makefile:1.2	Mon Jun 14 14:48:51 2010
+++ src/share/examples/rump/ttyserv/Makefile	Mon Jan 25 11:01:17 2016
@@ -5,6 +5,8 @@ LDADD+=-lrumpkern_tty
 LDADD+=-lrumpvfs
 LDADD+=-lrump -lrumpuser -lpthread
 
+CPPFLAGS+= -D_KERNTYPES
+
 WARNS=4
 DBG=-g
 

Index: src/share/examples/rump/umserv/Makefile
diff -u src/share/examples/rump/umserv/Makefile:1.3 src/share/examples/rump/umserv/Makefile:1.4
--- src/share/examples/rump/umserv/Makefile:1.3	Mon Aug 23 20:56:27 2010
+++ src/share/examples/rump/umserv/Makefile	Mon Jan 25 11:01:17 2016
@@ -5,6 +5,8 @@ LDADD+=-lrumpdev_disk -lrumpdev
 LDADD+=-lrumpvfs
 LDADD+=-lrump -lrumpuser -lpthread
 
+CPPFLAGS+= -D_KERNTYPES
+
 WARNS=4
 DBG=-g
 



CVS commit: src

2016-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 11:45:58 UTC 2016

Modified Files:
src/lib/libp2k: p2k.c
src/lib/libukfs: ukfs.c
src/share/examples/rump/ttyserv: ttyserv.c
src/share/examples/rump/umserv: umserv.c
src/sys/rump/include/rump: rump.h
src/tests/rump/rumpvfs: t_p2kifs.c

Log Message:
Don't include  from rump.h.  It's not needed
unless you're doing something special, but requires register_t.
Adjust the few places which actually need rumpvnode_if.h.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libp2k/p2k.c
cvs rdiff -u -r1.58 -r1.59 src/lib/libukfs/ukfs.c
cvs rdiff -u -r1.2 -r1.3 src/share/examples/rump/ttyserv/ttyserv.c
cvs rdiff -u -r1.2 -r1.3 src/share/examples/rump/umserv/umserv.c
cvs rdiff -u -r1.64 -r1.65 src/sys/rump/include/rump/rump.h
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpvfs/t_p2kifs.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/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.67 src/lib/libp2k/p2k.c:1.68
--- src/lib/libp2k/p2k.c:1.67	Sat Jan 23 16:39:31 2016
+++ src/lib/libp2k/p2k.c	Mon Jan 25 11:45:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.67 2016/01/23 16:39:31 christos Exp $	*/
+/*	$NetBSD: p2k.c,v 1.68 2016/01/25 11:45:58 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -58,6 +58,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/lib/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.58 src/lib/libukfs/ukfs.c:1.59
--- src/lib/libukfs/ukfs.c:1.58	Wed Jun 17 00:15:26 2015
+++ src/lib/libukfs/ukfs.c	Mon Jan 25 11:45:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.58 2015/06/17 00:15:26 christos Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.59 2016/01/25 11:45:57 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -61,6 +61,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include "ukfs_int_disklabel.h"

Index: src/share/examples/rump/ttyserv/ttyserv.c
diff -u src/share/examples/rump/ttyserv/ttyserv.c:1.2 src/share/examples/rump/ttyserv/ttyserv.c:1.3
--- src/share/examples/rump/ttyserv/ttyserv.c:1.2	Thu Jun 24 13:03:05 2010
+++ src/share/examples/rump/ttyserv/ttyserv.c	Mon Jan 25 11:45:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttyserv.c,v 1.2 2010/06/24 13:03:05 hannken Exp $	*/
+/*	$NetBSD: ttyserv.c,v 1.3 2016/01/25 11:45:58 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -37,6 +37,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 

Index: src/share/examples/rump/umserv/umserv.c
diff -u src/share/examples/rump/umserv/umserv.c:1.2 src/share/examples/rump/umserv/umserv.c:1.3
--- src/share/examples/rump/umserv/umserv.c:1.2	Thu Jun 24 13:03:05 2010
+++ src/share/examples/rump/umserv/umserv.c	Mon Jan 25 11:45:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: umserv.c,v 1.2 2010/06/24 13:03:05 hannken Exp $	*/
+/*	$NetBSD: umserv.c,v 1.3 2016/01/25 11:45:58 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 

Index: src/sys/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.64 src/sys/rump/include/rump/rump.h:1.65
--- src/sys/rump/include/rump/rump.h:1.64	Sun Nov  1 12:34:28 2015
+++ src/sys/rump/include/rump/rump.h	Mon Jan 25 11:45:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.64 2015/11/01 12:34:28 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.65 2016/01/25 11:45:57 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -62,7 +62,6 @@ typedef struct prop_dictionary *prop_dic
 typedef RUMP_REGISTER_T register_t;
 #endif
 
-#include 
 #include 
 
 /* rumpkern */

Index: src/tests/rump/rumpvfs/t_p2kifs.c
diff -u src/tests/rump/rumpvfs/t_p2kifs.c:1.4 src/tests/rump/rumpvfs/t_p2kifs.c:1.5
--- src/tests/rump/rumpvfs/t_p2kifs.c:1.4	Fri Feb  7 15:29:23 2014
+++ src/tests/rump/rumpvfs/t_p2kifs.c	Mon Jan 25 11:45:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_p2kifs.c,v 1.4 2014/02/07 15:29:23 hannken Exp $	*/
+/*	$NetBSD: t_p2kifs.c,v 1.5 2016/01/25 11:45:57 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 



CVS commit: src/tests/rump/rumpkern/h_server

2016-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 12:21:42 UTC 2016

Modified Files:
src/tests/rump/rumpkern/h_server: h_simpleserver.c

Log Message:
include  for bool


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/rump/rumpkern/h_server/h_simpleserver.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/rump/rumpkern/h_server/h_simpleserver.c
diff -u src/tests/rump/rumpkern/h_server/h_simpleserver.c:1.3 src/tests/rump/rumpkern/h_server/h_simpleserver.c:1.4
--- src/tests/rump/rumpkern/h_server/h_simpleserver.c:1.3	Fri Jan 14 13:23:15 2011
+++ src/tests/rump/rumpkern/h_server/h_simpleserver.c	Mon Jan 25 12:21:42 2016
@@ -1,10 +1,11 @@
-/*	$NetBSD: h_simpleserver.c,v 1.3 2011/01/14 13:23:15 pooka Exp $	*/
+/*	$NetBSD: h_simpleserver.c,v 1.4 2016/01/25 12:21:42 pooka Exp $	*/
 
 #include 
 
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 



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

2016-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 12:24:41 UTC 2016

Modified Files:
src/usr.sbin/npf/npftest: npftest.c

Log Message:
include proplib.h if you're going to useuseitit


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

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

Modified files:

Index: src/usr.sbin/npf/npftest/npftest.c
diff -u src/usr.sbin/npf/npftest/npftest.c:1.18 src/usr.sbin/npf/npftest/npftest.c:1.19
--- src/usr.sbin/npf/npftest/npftest.c:1.18	Tue Jun 16 23:04:14 2015
+++ src/usr.sbin/npf/npftest/npftest.c	Mon Jan 25 12:24:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: npftest.c,v 1.18 2015/06/16 23:04:14 christos Exp $	*/
+/*	$NetBSD: npftest.c,v 1.19 2016/01/25 12:24:41 pooka Exp $	*/
 
 /*
  * NPF testing framework.
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 



CVS commit: src/sys/rump/include/rump

2016-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 12:25:38 UTC 2016

Modified Files:
src/sys/rump/include/rump: rump.h

Log Message:
prop_dictionary_t hasn't been needed here in, um, 5 years, so remove
the type madness.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/rump/include/rump/rump.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/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.65 src/sys/rump/include/rump/rump.h:1.66
--- src/sys/rump/include/rump/rump.h:1.65	Mon Jan 25 11:45:57 2016
+++ src/sys/rump/include/rump/rump.h	Mon Jan 25 12:25:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.65 2016/01/25 11:45:57 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.66 2016/01/25 12:25:38 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -46,17 +46,6 @@ struct lwp;
 struct modinfo;
 struct uio;
 
-/* yetch */
-#if defined(__NetBSD__)
-#include 
-#else
-#ifndef HAVE_PROP_DICTIONARY_T
-#define HAVE_PROP_DICTIONARY_T
-struct prop_dictionary;
-typedef struct prop_dictionary *prop_dictionary_t;
-#endif
-#endif /* __NetBSD__ */
-
 #if (!defined(_KERNEL)) && (defined(__sun__) || defined(__ANDROID__)) && !defined(RUMP_REGISTER_T)
 #define RUMP_REGISTER_T long
 typedef RUMP_REGISTER_T register_t;



CVS commit: src

2016-01-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 00:24:23 UTC 2016

Modified Files:
src/sys/rump: README.compileopts
Added Files:
src/lib/librumpuser: README.compileopts

Log Message:
Move librumpuser compile-time options into the librumpuser source
directory.  Those options apply only for the in-tree implementation.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/README.compileopts
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/README.compileopts

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/README.compileopts
diff -u src/sys/rump/README.compileopts:1.13 src/sys/rump/README.compileopts:1.14
--- src/sys/rump/README.compileopts:1.13	Wed Jun 17 11:48:06 2015
+++ src/sys/rump/README.compileopts	Mon Jan 25 00:24:23 2016
@@ -1,4 +1,4 @@
-	$NetBSD: README.compileopts,v 1.13 2015/06/17 11:48:06 pooka Exp $
+	$NetBSD: README.compileopts,v 1.14 2016/01/25 00:24:23 pooka Exp $
 
 This file describes compile-time options for rump kernels.  Additionally,
 NetBSD build options will have an effect.  See src/share/mk/bsd.README
@@ -82,22 +82,6 @@ effect:	Builds NetBSD COMPAT_nn code for
 
 
 
-Rumpuser options:
-
-RUMPUSER_THREADS
-
-values: pthread/none/fiber or 
-defval: 
-effect: Define the way threading is implemented in the rumpuser hypercall
-	implmentation.
-	 - use default implementation (currently "pthread")
-	pthread - use pthreads to implement threading
-	none- do not support kernel threads at all
-	fiber   - user a fiber interface, cooperatively scheduled contexts
-
-
-
-
 Per-component options:
 
 RUMP_SYM_NORENAME

Added files:

Index: src/lib/librumpuser/README.compileopts
diff -u /dev/null src/lib/librumpuser/README.compileopts:1.1
--- /dev/null	Mon Jan 25 00:24:23 2016
+++ src/lib/librumpuser/README.compileopts	Mon Jan 25 00:24:23 2016
@@ -0,0 +1,19 @@
+$NetBSD: README.compileopts,v 1.1 2016/01/25 00:24:23 pooka Exp $
+
+This file describes compile-time options (make variables) for
+the rumpuser POSIX implementation.
+
+Note: after changing an option, do a clean build.
+
+Global options:
+
+RUMPUSER_THREADS
+
+values: pthread/none/fiber or 
+defval: 
+effect: Define the way threading is implemented in the rumpuser hypercall
+	implmentation.
+	 - use default implementation (currently "pthread")
+	pthread - use pthreads to implement threading
+	none- do not support kernel threads at all
+	fiber   - user a fiber interface, cooperatively scheduled contexts



CVS commit: src/sys/sys

2016-01-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Jan 24 22:50:23 UTC 2016

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

Log Message:
bump version for pr_output change


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.490 src/sys/sys/param.h:1.491
--- src/sys/sys/param.h:1.490	Mon Dec 21 12:35:15 2015
+++ src/sys/sys/param.h	Sun Jan 24 22:50:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.490 2015/12/21 12:35:15 mlelstv Exp $	*/
+/*	$NetBSD: param.h,v 1.491 2016/01/24 22:50:23 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799002500	/* NetBSD 7.99.25 */
+#define	__NetBSD_Version__	799002600	/* NetBSD 7.99.26 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/rump/dev/lib/libpci

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 14:37:54 UTC 2016

Modified Files:
src/sys/rump/dev/lib/libpci: rumpdev_bus_space.c

Log Message:
Implement the inverse of a nop.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/libpci/rumpdev_bus_space.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/dev/lib/libpci/rumpdev_bus_space.c
diff -u src/sys/rump/dev/lib/libpci/rumpdev_bus_space.c:1.6 src/sys/rump/dev/lib/libpci/rumpdev_bus_space.c:1.7
--- src/sys/rump/dev/lib/libpci/rumpdev_bus_space.c:1.6	Tue Aug 11 22:28:34 2015
+++ src/sys/rump/dev/lib/libpci/rumpdev_bus_space.c	Mon Jan 18 14:37:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdev_bus_space.c,v 1.6 2015/08/11 22:28:34 pooka Exp $	*/
+/*	$NetBSD: rumpdev_bus_space.c,v 1.7 2016/01/18 14:37:53 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2013 Antti Kantee.  All Rights Reserved.
@@ -272,6 +272,9 @@ bus_space_unmap(bus_space_tag_t bst, bus
 	bus_size_t size)
 {
 
+	if (bst == 0)
+		return;
+
 	panic("%s: unimplemented", __func__);
 }
 



CVS commit: src/sys

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 16:46:08 UTC 2016

Modified Files:
src/sys/rump/librump/rumpkern: rump.c rump_private.h
src/sys/sys: module.h sysctl.h

Log Message:
Fix dlopen()/dlclose()+RUMP_USE_CTOR to not leave dangling pointers around.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.92 -r1.93 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/module.h
cvs rdiff -u -r1.217 -r1.218 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/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.325 src/sys/rump/librump/rumpkern/rump.c:1.326
--- src/sys/rump/librump/rumpkern/rump.c:1.325	Mon Aug 31 07:38:48 2015
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Jan 18 16:46:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.325 2015/08/31 07:38:48 ozaki-r Exp $	*/
+/*	$NetBSD: rump.c,v 1.326 2016/01/18 16:46:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.325 2015/08/31 07:38:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.326 2016/01/18 16:46:08 pooka Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -314,7 +314,8 @@ rump_init(void)
 	{
 		struct sysctl_setup_chain *ssc;
 
-		LIST_FOREACH(ssc, _boot_chain, ssc_entries) {
+		while ((ssc = LIST_FIRST(_boot_chain)) != NULL) {
+			LIST_REMOVE(ssc, ssc_entries);
 			ssc->ssc_func(NULL);
 		}
 	}
@@ -544,6 +545,10 @@ rump_component_load(const struct rump_co
 {
 	struct rump_component *rc, *rc_iter;
 
+	/* time for rump component loading and unloading has passed */
+	if (!cold)
+		return;
+
 	/*
 	 * XXX: this is ok since the "const" was removed from the
 	 * definition of RUMP_COMPONENT().
@@ -565,6 +570,20 @@ rump_component_load(const struct rump_co
 	compcounter[rc->rc_type]++;
 }
 
+void
+rump_component_unload(struct rump_component *rc)
+{
+
+	/*
+	 * Checking for cold is enough because rump_init() both
+	 * flips it and handles component loading.
+	 */
+	if (!cold)
+		return;
+
+	LIST_REMOVE(rc, rc_entries);
+}
+
 int
 rump_component_count(enum rump_component_type type)
 {

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.92 src/sys/rump/librump/rumpkern/rump_private.h:1.93
--- src/sys/rump/librump/rumpkern/rump_private.h:1.92	Wed Apr 22 17:38:33 2015
+++ src/sys/rump/librump/rumpkern/rump_private.h	Mon Jan 18 16:46:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.92 2015/04/22 17:38:33 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.93 2016/01/18 16:46:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -90,6 +90,11 @@ static void rumpcomp_ctor##type(void) __
 static void rumpcomp_ctor##type(void)	\
 {	\
 	rump_component_load(##type);\
+}	\
+static void rumpcomp_dtor##type(void) __attribute__((destructor));	\
+static void rumpcomp_dtor##type(void)	\
+{	\
+	rump_component_unload(##type);\
 }
 
 #else /* RUMP_USE_CTOR */
@@ -130,6 +135,7 @@ struct rump_spctl {
 #define RUMP_SPVM2CTL(vm) (((struct rump_spctl *)vm)->spctl)
 
 void		rump_component_load(const struct rump_component *);
+void		rump_component_unload(struct rump_component *);
 void		rump_component_init(enum rump_component_type);
 int		rump_component_count(enum rump_component_type);
 

Index: src/sys/sys/module.h
diff -u src/sys/sys/module.h:1.39 src/sys/sys/module.h:1.40
--- src/sys/sys/module.h:1.39	Wed Nov  4 04:28:58 2015
+++ src/sys/sys/module.h	Mon Jan 18 16:46:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: module.h,v 1.39 2015/11/04 04:28:58 pgoyette Exp $	*/
+/*	$NetBSD: module.h,v 1.40 2016/01/18 16:46:08 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -65,6 +65,7 @@ typedef enum modcmd {
 
 #ifdef _KERNEL
 
+#include 
 #include 
 
 #include 
@@ -105,6 +106,12 @@ typedef struct module {
  * Alternatively, in some environments rump kernels use
  * __attribute__((constructor)) due to link sets being
  * difficult (impossible?) to implement (e.g. GNU gold, OS X, etc.)
+ * If we're cold (read: rump_init() has not been called), we lob the
+ * module onto the list to be handled when rump_init() runs.
+ * nb. it's not possible to use in-kernel locking mechanisms here since
+ * the code runs before rump_init().  We solve the problem by decreeing
+ * that thou shalt not call dlopen()/dlclose() for rump kernel components
+ * from multiple threads before calling rump_init().
  */
 
 #ifdef RUMP_USE_CTOR
@@ -114,14 +121,26 @@ struct modinfo_chain {
 };
 LIST_HEAD(modinfo_boot_chain, modinfo_chain);
 #define _MODULE_REGISTER(name)		\
+static struct modinfo_chain __CONCAT(mc,name) = {		

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

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 15:53:38 UTC 2016

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

Log Message:
boottime is a timespec, not timeval


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/rump/librump/rumpkern/emul.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.174 src/sys/rump/librump/rumpkern/emul.c:1.175
--- src/sys/rump/librump/rumpkern/emul.c:1.174	Tue Dec 29 10:22:05 2015
+++ src/sys/rump/librump/rumpkern/emul.c	Mon Jan 18 15:53:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.174 2015/12/29 10:22:05 pgoyette Exp $	*/
+/*	$NetBSD: emul.c,v 1.175 2016/01/18 15:53:38 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.174 2015/12/29 10:22:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.175 2016/01/18 15:53:38 pooka Exp $");
 
 #include 
 #include 
@@ -36,6 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.1
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -86,7 +87,7 @@ dev_t rootdev = NODEV;
 
 const int schedppq = 1;
 bool mp_online = false;
-struct timeval boottime;
+struct timespec boottime;
 int cold = 1;
 int boothowto = AB_SILENT;
 struct tty *constty;



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

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 23:27:20 UTC 2016

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

Log Message:
put lwp/proc stuff into the same source module (emul.c -> lwproc.c)


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.35 -r1.36 src/sys/rump/librump/rumpkern/lwproc.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.176 src/sys/rump/librump/rumpkern/emul.c:1.177
--- src/sys/rump/librump/rumpkern/emul.c:1.176	Mon Jan 18 23:21:28 2016
+++ src/sys/rump/librump/rumpkern/emul.c	Mon Jan 18 23:27:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.176 2016/01/18 23:21:28 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.177 2016/01/18 23:27:20 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.176 2016/01/18 23:21:28 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.177 2016/01/18 23:27:20 pooka Exp $");
 
 #include 
 #include 
@@ -55,11 +55,6 @@ int physmem = PHYSMEM;
 int nkmempages = PHYSMEM/2; /* from le chapeau */
 #undef PHYSMEM
 
-struct lwp lwp0 = {
-	.l_lid = 1,
-	.l_proc = ,
-	.l_fd = ,
-};
 struct vnode *rootvp;
 dev_t rootdev = NODEV;
 
@@ -90,8 +85,6 @@ int booted_partition;
 kmutex_t tty_lock;
 krwlock_t exec_lock;
 
-struct lwplist alllwp = LIST_HEAD_INITIALIZER(alllwp);
-
 /* sparc doesn't sport constant page size, pretend we have 4k pages */
 #ifdef __sparc__
 int nbpg = 4096;
@@ -130,8 +123,6 @@ struct emul emul_netbsd = {
 	.e_sc_autoload = netbsd_syscalls_autoload,
 };
 
-u_int nprocs = 1;
-
 cprng_strong_t *kern_cprng;
 
 /* not used, but need the symbols for pointer comparisons */
@@ -158,34 +149,6 @@ kpause(const char *wmesg, bool intr, int
 	return 0;
 }
 
-void
-lwp_unsleep(lwp_t *l, bool cleanup)
-{
-
-	KASSERT(mutex_owned(l->l_mutex));
-
-	(*l->l_syncobj->sobj_unsleep)(l, cleanup);
-}
-
-void
-lwp_update_creds(struct lwp *l)
-{
-	struct proc *p;
-	kauth_cred_t oldcred;
-
-	p = l->l_proc;
-	oldcred = l->l_cred;
-	l->l_prflag &= ~LPR_CRMOD;
-
-	mutex_enter(p->p_lock);
-	kauth_cred_hold(p->p_cred);
-	l->l_cred = p->p_cred;
-	mutex_exit(p->p_lock);
-
-	if (oldcred != NULL)
-		kauth_cred_free(oldcred);
-}
-
 vaddr_t
 calc_cache_size(vsize_t vasz, int pct, int va_pct)
 {

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.35 src/sys/rump/librump/rumpkern/lwproc.c:1.36
--- src/sys/rump/librump/rumpkern/lwproc.c:1.35	Sat Apr 18 15:49:18 2015
+++ src/sys/rump/librump/rumpkern/lwproc.c	Mon Jan 18 23:27:20 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.35 2015/04/18 15:49:18 pooka Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.36 2016/01/18 23:27:20 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.35 2015/04/18 15:49:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.36 2016/01/18 23:27:20 pooka Exp $");
 
 #include 
 #include 
@@ -47,9 +47,46 @@ __KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1
 #include "rump_private.h"
 #include "rump_curlwp.h"
 
+struct lwp lwp0 = {
+	.l_lid = 1,
+	.l_proc = ,
+	.l_fd = ,
+};
+struct lwplist alllwp = LIST_HEAD_INITIALIZER(alllwp);
+
+u_int nprocs = 1;
+
 struct emul *emul_default = _netbsd;
 
 void
+lwp_unsleep(lwp_t *l, bool cleanup)
+{
+
+	KASSERT(mutex_owned(l->l_mutex));
+
+	(*l->l_syncobj->sobj_unsleep)(l, cleanup);
+}
+
+void
+lwp_update_creds(struct lwp *l)
+{
+	struct proc *p;
+	kauth_cred_t oldcred;
+
+	p = l->l_proc;
+	oldcred = l->l_cred;
+	l->l_prflag &= ~LPR_CRMOD;
+
+	mutex_enter(p->p_lock);
+	kauth_cred_hold(p->p_cred);
+	l->l_cred = p->p_cred;
+	mutex_exit(p->p_lock);
+
+	if (oldcred != NULL)
+		kauth_cred_free(oldcred);
+}
+
+void
 rump_lwproc_init(void)
 {
 



CVS commit: src/sys/sys

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 23:27:49 UTC 2016

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

Log Message:
Include  only if it's needed.
(fix build failure)


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 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/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.218 src/sys/sys/sysctl.h:1.219
--- src/sys/sys/sysctl.h:1.218	Mon Jan 18 16:46:08 2016
+++ src/sys/sys/sysctl.h	Mon Jan 18 23:27:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.218 2016/01/18 16:46:08 pooka Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.219 2016/01/18 23:27:49 pooka Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -50,8 +50,6 @@
 #include 
 #include 
 #include 
-
-#include 
 #endif
 
 
@@ -1150,6 +1148,8 @@ extern struct ctldebug debug15, debug16,
 	oname, l, node
 
 #ifdef RUMP_USE_CTOR
+#include 
+
 struct sysctl_setup_chain {
 	void (*ssc_func)(struct sysctllog **);
 	LIST_ENTRY(sysctl_setup_chain) ssc_entries;



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

2016-01-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 18 23:21:28 UTC 2016

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

Log Message:
massively reduce header pollution from times prehistoric


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/rump/librump/rumpkern/emul.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.175 src/sys/rump/librump/rumpkern/emul.c:1.176
--- src/sys/rump/librump/rumpkern/emul.c:1.175	Mon Jan 18 15:53:38 2016
+++ src/sys/rump/librump/rumpkern/emul.c	Mon Jan 18 23:21:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.175 2016/01/18 15:53:38 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.176 2016/01/18 23:21:28 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,42 +26,20 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.175 2016/01/18 15:53:38 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.176 2016/01/18 23:21:28 pooka Exp $");
 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 
 #include 
 
 #include 
 
-#include 
-
 #include "rump_private.h"
 
 void (*rump_vfs_fini)(void) = (void *)nullop;



CVS commit: src/tests/fs/vfs

2016-01-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 13 12:05:49 UTC 2016

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

Log Message:
create_many: remove PR kern/50607 xfail

Seems to have been fixed by ext2fs_lookup.c 1.79
(thanks, riastradh)


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 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.52 src/tests/fs/vfs/t_vnops.c:1.53
--- src/tests/fs/vfs/t_vnops.c:1.52	Sat Jan  2 12:11:30 2016
+++ src/tests/fs/vfs/t_vnops.c	Wed Jan 13 12:05:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.52 2016/01/02 12:11:30 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.53 2016/01/13 12:05:49 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -438,6 +438,7 @@ rename_reg_nodir(const atf_tc_t *tc, con
 	rump_sys_chdir("/");
 }
 
+/* PR kern/50607 */
 static void
 create_many(const atf_tc_t *tc, const char *mp)
 {
@@ -445,9 +446,6 @@ create_many(const atf_tc_t *tc, const ch
 	int nfiles = 2324; /* #Nancy */
 	int i;
 
-	if (FSTYPE_EXT2FS(tc))
-		atf_tc_expect_fail("PR kern/50607");
-
 	if (FSTYPE_UDF(tc))
 		atf_tc_expect_fail("PR kern/50608");
 



CVS commit: src/sys/rump/include/rump

2016-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jan  7 13:54:08 UTC 2016

Modified Files:
src/sys/rump/include/rump: rumpdefs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/rump/include/rump/rumpdefs.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.33 src/sys/rump/include/rump/rumpdefs.h:1.34
--- src/sys/rump/include/rump/rumpdefs.h:1.33	Tue Sep 15 14:55:55 2015
+++ src/sys/rump/include/rump/rumpdefs.h	Thu Jan  7 13:54:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.33 2015/09/15 14:55:55 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.34 2016/01/07 13:54:08 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -170,7 +170,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_AB_SILENT	0x0004	
 #define	RUMP_AB_DEBUG	0x0008	
 
-/*	NetBSD: socket.h,v 1.117 2015/04/03 20:01:08 rtr Exp 	*/
+/*	NetBSD: socket.h,v 1.118 2015/10/13 21:28:34 rjs Exp 	*/
 #define	RUMP_SOCK_STREAM	1		
 #define	RUMP_SOCK_DGRAM	2		
 #define	RUMP_SOCK_RAW	3		
@@ -291,13 +291,14 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_MSG_CRUMP_MSG_CLOEXEC 0x0800		
 #define	RUMP_MSG_NBIO	0x1000		
 #define	RUMP_MSG_WAITFORONE	0x2000		
+#define	RUMP_MSG_NOTIFICATION 0x4000		
 #define	RUMP_MSG_USERFLAGS	0x0ff
 #define RUMP_MSG_NAMEMBUF	0x100	
 #define RUMP_MSG_CONTROLMBUF	0x200	
 #define RUMP_MSG_IOVUSRSPACE	0x400	
 #define RUMP_MSG_LENUSRSPACE	0x800	
 
-/*	NetBSD: in.h,v 1.97 2015/05/02 14:41:32 roy Exp 	*/
+/*	NetBSD: in.h,v 1.98 2015/10/13 21:28:35 rjs Exp 	*/
 #define	RUMP_IP_OPTIONS		1
 #define	RUMP_IP_HDRINCL		2
 #define	RUMP_IP_TOS			3
@@ -359,6 +360,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_IPPROTO_IPCOMP		108		
 #define	RUMP_IPPROTO_VRRP		112		
 #define	RUMP_IPPROTO_CARP		112		
+#define	RUMP_IPPROTO_SCTP		132		
 #define RUMP_IPPROTO_PFSYNC  240 
 #define	RUMP_IPPROTO_RAW		255		
 #define	RUMP_IPPROTO_MAX		256
@@ -383,7 +385,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_TCP_MD5SIG	0x10	
 #define	RUMP_TCP_CONGCTL	0x20	
 
-/*	NetBSD: mount.h,v 1.217 2015/05/06 15:57:08 hannken Exp 	*/
+/*	NetBSD: mount.h,v 1.218 2015/10/23 19:40:10 maxv Exp 	*/
 #define	RUMP_MOUNT_FFS	"ffs"		
 #define	RUMP_MOUNT_UFS	RUMP_MOUNT_FFS	
 #define	RUMP_MOUNT_NFS	"nfs"		
@@ -520,7 +522,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_KTRFACv1	(1 << RUMP_KTRFAC_VER_SHIFT)
 #define	RUMP_KTRFACv2	(2 << RUMP_KTRFAC_VER_SHIFT)
 
-/*	NetBSD: module.h,v 1.38 2015/06/22 16:35:13 matt Exp 	*/
+/*	NetBSD: module.h,v 1.39 2015/11/04 04:28:58 pgoyette Exp 	*/
 struct rump_modctl_load {
 	const char *ml_filename;
 



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

2016-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jan  7 21:09:01 UTC 2016

Modified Files:
src/sys/rump/kern/lib/libtty: tty_component.c

Log Message:
Initialize non-VFS parts of tty subsystem already at RUMP_COMPONENT_KERN.

That way components under RUMP__FACTION_DEV can call tty routines.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libtty/tty_component.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/libtty/tty_component.c
diff -u src/sys/rump/kern/lib/libtty/tty_component.c:1.2 src/sys/rump/kern/lib/libtty/tty_component.c:1.3
--- src/sys/rump/kern/lib/libtty/tty_component.c:1.2	Thu Aug 20 11:59:16 2015
+++ src/sys/rump/kern/lib/libtty/tty_component.c	Thu Jan  7 21:09:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_component.c,v 1.2 2015/08/20 11:59:16 christos Exp $	*/
+/*	$NetBSD: tty_component.c,v 1.3 2016/01/07 21:09:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty_component.c,v 1.2 2015/08/20 11:59:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_component.c,v 1.3 2016/01/07 21:09:01 pooka Exp $");
 
 #include 
 #include 
@@ -38,6 +38,15 @@ __KERNEL_RCSID(0, "$NetBSD: tty_componen
 
 #include "ioconf.h"
 
+RUMP_COMPONENT(RUMP_COMPONENT_KERN)
+{
+
+	tty_init();
+	ttyldisc_init();
+
+	rump_ttycomponent = true;
+}
+
 RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
 {
 	extern const struct cdevsw ctty_cdevsw, ptc_cdevsw, pts_cdevsw;
@@ -64,10 +73,5 @@ RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptmx", cmaj, 0));
 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptm", cmaj, 1));
 
-	tty_init();
-	ttyldisc_init();
-
 	ptyattach(1);
-
-	rump_ttycomponent = true;
 }



CVS commit: src/sys/rump/include/opt

2016-01-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jan  7 21:04:27 UTC 2016

Modified Files:
src/sys/rump/include/opt: opt_rumpkernel.h

Log Message:
use WSEMUL_NO_DUMB and WSEMUL_VT100


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/opt/opt_rumpkernel.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/rump/include/opt/opt_rumpkernel.h
diff -u src/sys/rump/include/opt/opt_rumpkernel.h:1.3 src/sys/rump/include/opt/opt_rumpkernel.h:1.4
--- src/sys/rump/include/opt/opt_rumpkernel.h:1.3	Mon Aug 24 22:52:15 2015
+++ src/sys/rump/include/opt/opt_rumpkernel.h	Thu Jan  7 21:04:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: opt_rumpkernel.h,v 1.3 2015/08/24 22:52:15 pooka Exp $	*/
+/*	$NetBSD: opt_rumpkernel.h,v 1.4 2016/01/07 21:04:27 pooka Exp $	*/
 
 #ifndef __NetBSD__
 #define __NetBSD__
@@ -26,3 +26,6 @@
 
 #undef PIPE_SOCKETPAIR /* would need uipc_usrreq.c */
 #define PIPE_NODIRECT
+
+#define WSEMUL_NO_DUMB
+#define WSEMUL_VT100



CVS commit: src/tests/fs/vfs

2016-01-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan  2 12:11:31 UTC 2016

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

Log Message:
create_many:
  * add xfails for ext2 and udf
  * don't try to create a subdirectory for sysvbfs


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 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.51 src/tests/fs/vfs/t_vnops.c:1.52
--- src/tests/fs/vfs/t_vnops.c:1.51	Fri Jan  1 15:18:39 2016
+++ src/tests/fs/vfs/t_vnops.c	Sat Jan  2 12:11:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.51 2016/01/01 15:18:39 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.52 2016/01/02 12:11:30 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -445,9 +445,11 @@ create_many(const atf_tc_t *tc, const ch
 	int nfiles = 2324; /* #Nancy */
 	int i;
 
-	/* fs doesn't support many files */
-	if (FSTYPE_SYSVBFS(tc))
-		nfiles = 5;
+	if (FSTYPE_EXT2FS(tc))
+		atf_tc_expect_fail("PR kern/50607");
+
+	if (FSTYPE_UDF(tc))
+		atf_tc_expect_fail("PR kern/50608");
 
 	/* takes forever with many files */
 	if (FSTYPE_MSDOS(tc))
@@ -455,9 +457,14 @@ create_many(const atf_tc_t *tc, const ch
 
 	RL(rump_sys_chdir(mp));
 
-	/* msdosfs doesn't like many entries in the root directory */
-	RL(rump_sys_mkdir("subdir", 0777));
-	RL(rump_sys_chdir("subdir"));
+	if (FSTYPE_SYSVBFS(tc)) {
+		/* fs doesn't support many files or subdirectories */
+		nfiles = 5;
+	} else {
+		/* msdosfs doesn't like many entries in the root directory */
+		RL(rump_sys_mkdir("subdir", 0777));
+		RL(rump_sys_chdir("subdir"));
+	}
 
 	/* create them */
 #define TESTFN "testfile"



CVS commit: src/tests/fs/vfs

2016-01-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  1 15:13:57 UTC 2016

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

Log Message:
Add a test which creates many directory entries.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 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.49 src/tests/fs/vfs/t_vnops.c:1.50
--- src/tests/fs/vfs/t_vnops.c:1.49	Thu Apr  9 19:47:05 2015
+++ src/tests/fs/vfs/t_vnops.c	Fri Jan  1 15:13:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.49 2015/04/09 19:47:05 riastradh Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.50 2016/01/01 15:13:57 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -439,6 +439,47 @@ rename_reg_nodir(const atf_tc_t *tc, con
 }
 
 static void
+create_many(const atf_tc_t *tc, const char *mp)
+{
+	char buf[64];
+	int nfiles = 2324; /* #Nancy */
+	int i;
+
+	/* fs doesn't support many files */
+	if (FSTYPE_SYSVBFS(tc))
+		nfiles = 5;
+
+	/* takes forever with many files */
+	if (FSTYPE_MSDOS(tc))
+		nfiles /= 4;
+
+	RL(rump_sys_chdir(mp));
+
+	/* msdosfs doesn't like many entries in the root directory */
+	RL(rump_sys_mkdir("subdir", 0777));
+	RL(rump_sys_chdir("subdir"));
+
+	/* create them */
+#define TESTFN "this_is_the_filename"
+	for (i = 0; i < nfiles; i++) {
+		int fd;
+
+		sprintf(buf, TESTFN "%d\n", i);
+		RL(fd = rump_sys_open(buf, O_RDWR|O_CREAT|O_EXCL, 0666));
+		RL(rump_sys_close(fd));
+	}
+
+	/* wipe them out */
+	for (i = 0; i < nfiles; i++) {
+		sprintf(buf, TESTFN "%d\n", i);
+		RL(rump_sys_unlink(buf));
+	}
+#undef TESTFN
+
+	rump_sys_chdir("/");
+}
+
+static void
 create_nametoolong(const atf_tc_t *tc, const char *mp)
 {
 	char *name;
@@ -958,6 +999,10 @@ 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");
 
+#undef FSTEST_IMGSIZE
+#define FSTEST_IMGSIZE (1024*1024*64)
+ATF_TC_FSAPPLY(create_many, "create many directory entries");
+
 ATF_TP_ADD_TCS(tp)
 {
 
@@ -969,6 +1014,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(rename_dir);
 	ATF_TP_FSAPPLY(rename_dotdot);
 	ATF_TP_FSAPPLY(rename_reg_nodir);
+	ATF_TP_FSAPPLY(create_many);
 	ATF_TP_FSAPPLY(create_nametoolong);
 	ATF_TP_FSAPPLY(create_exist);
 	ATF_TP_FSAPPLY(rename_nametoolong);



CVS commit: src/tests/fs/vfs

2016-01-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  1 15:18:39 UTC 2016

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

Log Message:
use a shorter filename template in previous (for v7fs)


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 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.50 src/tests/fs/vfs/t_vnops.c:1.51
--- src/tests/fs/vfs/t_vnops.c:1.50	Fri Jan  1 15:13:57 2016
+++ src/tests/fs/vfs/t_vnops.c	Fri Jan  1 15:18:39 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.50 2016/01/01 15:13:57 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.51 2016/01/01 15:18:39 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -460,7 +460,7 @@ create_many(const atf_tc_t *tc, const ch
 	RL(rump_sys_chdir("subdir"));
 
 	/* create them */
-#define TESTFN "this_is_the_filename"
+#define TESTFN "testfile"
 	for (i = 0; i < nfiles; i++) {
 		int fd;
 



CVS commit: src/sys/rump/dev

2015-11-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 16 23:27:08 UTC 2015

Modified Files:
src/sys/rump/dev: files.rump
src/sys/rump/dev/lib: Makefile.inc component_simple.c
src/sys/rump/dev/lib/libmiiphy: Makefile
src/sys/rump/dev/lib/libpci_auich: Makefile
src/sys/rump/dev/lib/libpci_eap: Makefile
src/sys/rump/dev/lib/libpci_if_iwn: Makefile
src/sys/rump/dev/lib/libpci_if_pcn: Makefile
src/sys/rump/dev/lib/libpci_if_wm: Makefile
src/sys/rump/dev/lib/libpci_usbhc: Makefile
src/sys/rump/dev/lib/libpci_virtio: Makefile
src/sys/rump/dev/lib/libubt: Makefile
src/sys/rump/dev/lib/libugenhc: Makefile
src/sys/rump/dev/lib/libusb: Makefile
src/sys/rump/dev/lib/libvirtio_if_vioif: Makefile
src/sys/rump/dev/lib/libvirtio_viornd: Makefile
src/sys/rump/dev/lib/libvirtio_vioscsi: Makefile

Log Message:
Use IOCONF #define to determine component name.

Avoids having to manually retype info already in .ioconf.

Also, COMPONENT_SIMPLE -> RUMP_COMPONENT=simple.  That way, we can add
other attributes where necessary.  As "future directions", the "ioconf"
attribute for RUMP_COMPONENT can just be removed when a driver is
converted to modular and has a proper modcmd.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/files.rump
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/component_simple.c
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/libmiiphy/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_auich/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_eap/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_if_iwn/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_if_pcn/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_if_wm/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libpci_usbhc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libpci_virtio/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/libubt/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/dev/lib/libugenhc/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/dev/lib/libusb/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libvirtio_if_vioif/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libvirtio_viornd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libvirtio_vioscsi/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/dev/files.rump
diff -u src/sys/rump/dev/files.rump:1.4 src/sys/rump/dev/files.rump:1.5
--- src/sys/rump/dev/files.rump:1.4	Tue Sep 17 00:50:19 2013
+++ src/sys/rump/dev/files.rump	Mon Nov 16 23:27:07 2015
@@ -1,6 +1,8 @@
-#	$NetBSD: files.rump,v 1.4 2013/09/17 00:50:19 pooka Exp $
+#	$NetBSD: files.rump,v 1.5 2015/11/16 23:27:07 pooka Exp $
 #
 
+version 20151112
+
 device mainbus { }: pcibus
 attach mainbus at root
 

Index: src/sys/rump/dev/lib/Makefile.inc
diff -u src/sys/rump/dev/lib/Makefile.inc:1.5 src/sys/rump/dev/lib/Makefile.inc:1.6
--- src/sys/rump/dev/lib/Makefile.inc:1.5	Wed Nov 11 21:52:45 2015
+++ src/sys/rump/dev/lib/Makefile.inc	Mon Nov 16 23:27:07 2015
@@ -1,14 +1,14 @@
-#	$NetBSD: Makefile.inc,v 1.5 2015/11/11 21:52:45 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2015/11/16 23:27:07 pooka Exp $
 #
 
 RUMPTOP=	${.CURDIR}/../../..
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpdev
 
 RUMPDEVLIBDIR:= ${.PARSEDIR}
-.ifdef COMPONENT_SIMPLE
+
+.if defined(RUMP_COMPONENT) && !empty(${RUMP_COMPONENT:Mioconf})
 .PATH:	${RUMPDEVLIBDIR}
 SRCS+=   component_simple.c
-CPPFLAGS.component_simple.c+= -DCOMPONENT_NAME=${COMPONENT_SIMPLE}
 .endif
 
 .include "${RUMPTOP}/Makefile.rump"

Index: src/sys/rump/dev/lib/component_simple.c
diff -u src/sys/rump/dev/lib/component_simple.c:1.1 src/sys/rump/dev/lib/component_simple.c:1.2
--- src/sys/rump/dev/lib/component_simple.c:1.1	Wed Nov 11 21:52:45 2015
+++ src/sys/rump/dev/lib/component_simple.c	Mon Nov 16 23:27:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $	*/
+/*	$NetBSD: component_simple.c,v 1.2 2015/11/16 23:27:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2015 Antti Kantee.  All Rights Reserved.
@@ -25,12 +25,8 @@
  * SUCH DAMAGE.
  */
 
-#ifndef COMPONENT_NAME
-#error Internal error: COMPONENT_NAME not defined
-#endif
-
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component_simple.c,v 1.2 2015/11/16 23:27:07 pooka Exp $");
 
 #include 
 #include 
@@ -49,5 +45,5 @@ __KERNEL_RCSID(0, "$NetBSD: component_si
 RUMP_COMPONENT(RUMP_COMPONENT_DEV)
 {
 
-	CONFIG_INIT_COMPONENT(COMPONENT_NAME);
+	CONFIG_INIT_COMPONENT(IOCONF);
 }

Index: src/sys/rump/dev/lib/libmiiphy/Makefile
diff -

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

2015-11-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Nov 17 01:07:34 UTC 2015

Modified Files:
src/sys/rump/dev/lib: Makefile.inc

Log Message:
Fix argument to empty()

Guess none of the fast-running tests exercised the
component being initialized ...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/Makefile.inc

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

Modified files:

Index: src/sys/rump/dev/lib/Makefile.inc
diff -u src/sys/rump/dev/lib/Makefile.inc:1.6 src/sys/rump/dev/lib/Makefile.inc:1.7
--- src/sys/rump/dev/lib/Makefile.inc:1.6	Mon Nov 16 23:27:07 2015
+++ src/sys/rump/dev/lib/Makefile.inc	Tue Nov 17 01:07:34 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.6 2015/11/16 23:27:07 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2015/11/17 01:07:34 pooka Exp $
 #
 
 RUMPTOP=	${.CURDIR}/../../..
@@ -6,7 +6,7 @@ CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
 
 RUMPDEVLIBDIR:= ${.PARSEDIR}
 
-.if defined(RUMP_COMPONENT) && !empty(${RUMP_COMPONENT:Mioconf})
+.if defined(RUMP_COMPONENT) && !empty(RUMP_COMPONENT:Mioconf)
 .PATH:	${RUMPDEVLIBDIR}
 SRCS+=   component_simple.c
 .endif



CVS commit: src

2015-11-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov 15 13:50:10 UTC 2015

Modified Files:
src/share/mk: bsd.own.mk
src/sys/rump: Makefile.rump

Log Message:
describe => rumpdescribe


To generate a diff of this commit:
cvs rdiff -u -r1.879 -r1.880 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.119 -r1.120 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.879 src/share/mk/bsd.own.mk:1.880
--- src/share/mk/bsd.own.mk:1.879	Fri Nov  6 01:17:08 2015
+++ src/share/mk/bsd.own.mk	Sun Nov 15 13:50:10 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.879 2015/11/06 01:17:08 jmcneill Exp $
+#	$NetBSD: bsd.own.mk,v 1.880 2015/11/15 13:50:10 pooka Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -842,11 +842,13 @@ ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang
 GENASSYM_CPPFLAGS+=	${${ACTIVE_CC} == "clang":? -no-integrated-as :}
 
 TARGETS+=	all clean cleandir depend dependall includes \
-		install lint obj regress tags html analyze describe
+		install lint obj regress tags html analyze describe \
+		rumpdescribe
 PHONY_NOTMAIN =	all clean cleandir depend dependall distclean includes \
 		install lint obj regress beforedepend afterdepend \
 		beforeinstall afterinstall realinstall realdepend realall \
-		html subdir-all subdir-install subdir-depend analyze describe
+		html subdir-all subdir-install subdir-depend analyze describe \
+		rumpdescribe
 .PHONY:		${PHONY_NOTMAIN}
 .NOTMAIN:	${PHONY_NOTMAIN}
 

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.119 src/sys/rump/Makefile.rump:1.120
--- src/sys/rump/Makefile.rump:1.119	Mon Oct 19 16:16:32 2015
+++ src/sys/rump/Makefile.rump	Sun Nov 15 13:50:10 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.119 2015/10/19 16:16:32 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.120 2015/11/15 13:50:10 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -243,7 +243,7 @@ __archivebuild: .USE
 .endif
 
 COMMENT?=	(no description)
-describe: .PHONY
+rumpdescribe: .PHONY
 	@printf '%-24s %s\n' '${LIB}' '${COMMENT}'
 
 _BSD_IOCONF_MK_USER_=1



CVS commit: src/sys/rump

2015-11-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov 15 16:54:16 UTC 2015

Modified Files:
src/sys/rump/dev: Makefile.rumpdevcomp
src/sys/rump/fs: Makefile.rumpfscomp
src/sys/rump/kern: Makefile.rumpkerncomp
src/sys/rump/net: Makefile.rumpnetcomp

Log Message:
Always descend into component directories for rumpdescribe.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/dev/Makefile.rumpdevcomp
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/fs/Makefile.rumpfscomp
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/kern/Makefile.rumpkerncomp
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/net/Makefile.rumpnetcomp

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/dev/Makefile.rumpdevcomp
diff -u src/sys/rump/dev/Makefile.rumpdevcomp:1.22 src/sys/rump/dev/Makefile.rumpdevcomp:1.23
--- src/sys/rump/dev/Makefile.rumpdevcomp:1.22	Sun Nov  1 09:03:28 2015
+++ src/sys/rump/dev/Makefile.rumpdevcomp	Sun Nov 15 16:54:16 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpdevcomp,v 1.22 2015/11/01 09:03:28 pooka Exp $
+#	$NetBSD: Makefile.rumpdevcomp,v 1.23 2015/11/15 16:54:16 pooka Exp $
 #
 
 RUMPDEVCOMP=	audio bpf cgd disk dm drvctl fss md netsmb		\
@@ -24,7 +24,8 @@ RUMPDEVLDADD+=-lrumpdev_${var}
 RUMPDEVLIBS+=lib${var}
 .endfor
 
-# Currently no NetBSD host support.
-#.for var in ${RUMPPCIDEVS}
-#RUMPDEVLIBS+=lib${var}
-#.endfor
+.if make(rumpdescribe)
+.for var in ${RUMPPCIDEVS}
+RUMPDEVLIBS+=lib${var}
+.endfor
+.endif

Index: src/sys/rump/fs/Makefile.rumpfscomp
diff -u src/sys/rump/fs/Makefile.rumpfscomp:1.5 src/sys/rump/fs/Makefile.rumpfscomp:1.6
--- src/sys/rump/fs/Makefile.rumpfscomp:1.5	Thu Apr 10 00:09:09 2014
+++ src/sys/rump/fs/Makefile.rumpfscomp	Sun Nov 15 16:54:16 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpfscomp,v 1.5 2014/04/10 00:09:09 pooka Exp $
+#	$NetBSD: Makefile.rumpfscomp,v 1.6 2015/11/15 16:54:16 pooka Exp $
 #
 
 .include 
@@ -7,7 +7,7 @@ RUMPFSCOMP=	cd9660 efs ext2fs fdesc ffs 
 		nfs nilfs ntfs null ptyfs smbfs syspuffs sysvbfs	\
 		tmpfs udf umap union v7fs
 
-.if ${MKZFS} != "no"
+.if ${MKZFS} != "no" || make(rumpdescribe)
 RUMPFSCOMP+=	zfs
 .endif
 

Index: src/sys/rump/kern/Makefile.rumpkerncomp
diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.11 src/sys/rump/kern/Makefile.rumpkerncomp:1.12
--- src/sys/rump/kern/Makefile.rumpkerncomp:1.11	Wed Jan  7 22:24:03 2015
+++ src/sys/rump/kern/Makefile.rumpkerncomp	Sun Nov 15 16:54:16 2015
@@ -1,15 +1,20 @@
-#	$NetBSD: Makefile.rumpkerncomp,v 1.11 2015/01/07 22:24:03 pooka Exp $
+#	$NetBSD: Makefile.rumpkerncomp,v 1.12 2015/11/15 16:54:16 pooka Exp $
 #
 
 .include 
 
 RUMPKERNCOMPS=	crypto sysproxy tty z
+RUMPSYSEMUS=	sys_cygwin sys_linux sys_sunos
 
-.if ${MKSLJIT} != "no"
+.if make(rumpdescribe)
+RUMPKERNCOMPS+=	${RUMPSYSEMUS}
+.endif
+
+.if ${MKSLJIT} != "no" || make(rumpdescribe)
 RUMPKERNCOMPS+=	sljit
 .endif
 
-.if ${MKZFS} != "no"
+.if ${MKZFS} != "no" || make(rumpdescribe)
 RUMPKERNCOMPS+=solaris
 .endif
 

Index: src/sys/rump/net/Makefile.rumpnetcomp
diff -u src/sys/rump/net/Makefile.rumpnetcomp:1.12 src/sys/rump/net/Makefile.rumpnetcomp:1.13
--- src/sys/rump/net/Makefile.rumpnetcomp:1.12	Wed Nov  4 23:57:06 2015
+++ src/sys/rump/net/Makefile.rumpnetcomp	Sun Nov 15 16:54:16 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpnetcomp,v 1.12 2015/11/04 23:57:06 knakahara Exp $
+#	$NetBSD: Makefile.rumpnetcomp,v 1.13 2015/11/15 16:54:16 pooka Exp $
 #
 
 .include 
@@ -6,11 +6,11 @@
 RUMPNETCOMP=	agr bridge net net80211 netbt netinet netinet6
 RUMPNETCOMP+=	gif netmpls npf local shmif tap
 
-.if ${MKSLJIT} != "no"
+.if ${MKSLJIT} != "no" || make(rumpdescribe)
 RUMPNETCOMP+=	bpfjit
 .endif
 
-.if ${RUMP_VIRTIF:Uyes} == "yes"
+.if ${RUMP_VIRTIF:Uyes} == "yes" || make(rumpdescribe)
 RUMPNETCOMP+=	virtif
 .endif
 



CVS commit: src/sys/fs/sysvbfs

2015-11-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Nov 13 13:36:54 UTC 2015

Modified Files:
src/sys/fs/sysvbfs: sysvbfs_vnops.c

Log Message:
Fix bug in readdir loop condition.

Reading all dirents using a small buffer and multiple calls now works.

Bug found by "Shamar" on #rumpkernel


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/fs/sysvbfs/sysvbfs_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/sys/fs/sysvbfs/sysvbfs_vnops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.58 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.59
--- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.58	Sat Apr  4 13:28:36 2015
+++ src/sys/fs/sysvbfs/sysvbfs_vnops.c	Fri Nov 13 13:36:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vnops.c,v 1.58 2015/04/04 13:28:36 riastradh Exp $	*/
+/*	$NetBSD: sysvbfs_vnops.c,v 1.59 2015/11/13 13:36:54 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.58 2015/04/04 13:28:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.59 2015/11/13 13:36:54 pooka Exp $");
 
 #include 
 #include 
@@ -642,15 +642,18 @@ sysvbfs_readdir(void *v)
 	if ((i + n) > bfs->n_dirent)
 		n = bfs->n_dirent - i;
 
-	for (file = >dirent[i]; i < n; file++) {
-		if (file->inode == 0)
-			continue;
+	DPRINTF("%s 1: %d %d %d\n", __func__, i, n, bfs->n_dirent);
+	for (file = >dirent[i]; n > 0; file++, i++) {
 		if (i == bfs->max_dirent) {
 			DPRINTF("%s: file system inconsistent.\n",
 			__func__);
 			break;
 		}
-		i++;
+		if (file->inode == 0)
+			continue;
+
+		/* ok, we have a live one here */
+		n--;
 		memset(dp, 0, sizeof(struct dirent));
 		dp->d_fileno = file->inode;
 		dp->d_type = file->inode == BFS_ROOT_INODE ? DT_DIR : DT_REG;
@@ -663,7 +666,7 @@ sysvbfs_readdir(void *v)
 			return error;
 		}
 	}
-	DPRINTF("%s: %d %d %d\n", __func__, i, n, bfs->n_dirent);
+	DPRINTF("%s 2: %d %d %d\n", __func__, i, n, bfs->n_dirent);
 	*ap->a_eofflag = (i == bfs->n_dirent);
 
 	free(dp, M_BFS);



CVS commit: src/usr.bin/config

2015-11-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Nov 12 14:38:21 UTC 2015

Modified Files:
src/usr.bin/config: defs.h mkioconf.c

Log Message:
In ioconfname mode, #define IOCONF as the ioconf token.

Avoids having to retype the name to call config_init/fini_component().


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/config/defs.h
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/config/mkioconf.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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.93 src/usr.bin/config/defs.h:1.94
--- src/usr.bin/config/defs.h:1.93	Fri Sep  4 10:16:35 2015
+++ src/usr.bin/config/defs.h	Thu Nov 12 14:38:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.93 2015/09/04 10:16:35 uebayasi Exp $	*/
+/*	$NetBSD: defs.h,v 1.94 2015/11/12 14:38:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -107,7 +107,7 @@ extern const char *progname;
  * The next two lines define the current version of the config(1) binary,
  * and the minimum version of the configuration files it supports.
  */
-#define CONFIG_VERSION		20150846
+#define CONFIG_VERSION		20151112
 #define CONFIG_MINVERSION	0
 
 /*

Index: src/usr.bin/config/mkioconf.c
diff -u src/usr.bin/config/mkioconf.c:1.32 src/usr.bin/config/mkioconf.c:1.33
--- src/usr.bin/config/mkioconf.c:1.32	Thu Sep  3 13:53:36 2015
+++ src/usr.bin/config/mkioconf.c	Thu Nov 12 14:38:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkioconf.c,v 1.32 2015/09/03 13:53:36 uebayasi Exp $	*/
+/*	$NetBSD: mkioconf.c,v 1.33 2015/11/12 14:38:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: mkioconf.c,v 1.32 2015/09/03 13:53:36 uebayasi Exp $");
+__RCSID("$NetBSD: mkioconf.c,v 1.33 2015/11/12 14:38:21 pooka Exp $");
 
 #include 
 #include 
@@ -93,6 +93,8 @@ mkioconf(void)
 	}
 
 	fprintf(fp, "#include \"ioconf.h\"\n");
+	if (ioconfname)
+		fprintf(fp, "#define IOCONF %s\n", ioconfname);
 
 	emithdr(fp);
 	emitcfdrivers(fp);



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

2015-11-11 Thread Antti Kantee
ibvirtio_vioscsi/Makefile	Wed Nov 11 21:52:47 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2015/11/01 09:03:28 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2015/11/11 21:52:47 pooka Exp $
 #
 
 RUMPTOP=${TOPRUMP}
@@ -10,7 +10,7 @@ COMMENT=VirtIO SCSI driver
 
 IOCONF=	VIRTIO_VIOSCSI.ioconf
 
-SRCS=	vioscsi_at_virtio.c
+COMPONENT_SIMPLE= virtio_vioscsi
 
 SRCS+=	vioscsi.c
 

Added files:

Index: src/sys/rump/dev/lib/component_simple.c
diff -u /dev/null src/sys/rump/dev/lib/component_simple.c:1.1
--- /dev/null	Wed Nov 11 21:52:47 2015
+++ src/sys/rump/dev/lib/component_simple.c	Wed Nov 11 21:52:45 2015
@@ -0,0 +1,53 @@
+/*	$NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2015 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef COMPONENT_NAME
+#error Internal error: COMPONENT_NAME not defined
+#endif
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include "rump_private.h"
+
+#include "ioconf.c"
+
+#define CONFIG_INIT_COMPONENT(a) config_init_component(			\
+__CONCAT(cfdriver_ioconf_,a),	\
+__CONCAT(cfattach_ioconf_,a),	\
+__CONCAT(cfdata_ioconf_,a));
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+
+	CONFIG_INIT_COMPONENT(COMPONENT_NAME);
+}



CVS commit: src/sys/dev/pci

2015-11-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov  1 08:55:05 UTC 2015

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

Log Message:
Use SCSIPI_CHAN_NOSETTLE.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/vioscsi.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/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.5 src/sys/dev/pci/vioscsi.c:1.6
--- src/sys/dev/pci/vioscsi.c:1.5	Sat Oct 31 00:41:19 2015
+++ src/sys/dev/pci/vioscsi.c	Sun Nov  1 08:55:05 2015
@@ -17,7 +17,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.5 2015/10/31 00:41:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.6 2015/11/01 08:55:05 pooka Exp $");
 
 #include 
 #include 
@@ -186,6 +186,7 @@ vioscsi_attach(device_t parent, device_t
 	chan->chan_ntargets = max_target;
 	chan->chan_nluns = max_lun;
 	chan->chan_id = 0;
+	chan->chan_flags = SCSIPI_CHAN_NOSETTLE;
 
 	config_found(sc->sc_dev, >sc_channel, scsiprint);
 }



CVS commit: src/sys/rump/dev

2015-11-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov  1 09:03:29 UTC 2015

Modified Files:
src/sys/rump/dev: Makefile.rumpdevcomp
Added Files:
src/sys/rump/dev/lib/libvirtio_vioscsi: Makefile VIRTIO_VIOSCSI.ioconf
vioscsi_at_virtio.c

Log Message:
add virtio-scsi component


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/dev/Makefile.rumpdevcomp
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libvirtio_vioscsi/Makefile \
src/sys/rump/dev/lib/libvirtio_vioscsi/VIRTIO_VIOSCSI.ioconf \
src/sys/rump/dev/lib/libvirtio_vioscsi/vioscsi_at_virtio.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/dev/Makefile.rumpdevcomp
diff -u src/sys/rump/dev/Makefile.rumpdevcomp:1.21 src/sys/rump/dev/Makefile.rumpdevcomp:1.22
--- src/sys/rump/dev/Makefile.rumpdevcomp:1.21	Wed Jun  3 14:06:19 2015
+++ src/sys/rump/dev/Makefile.rumpdevcomp	Sun Nov  1 09:03:28 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpdevcomp,v 1.21 2015/06/03 14:06:19 pooka Exp $
+#	$NetBSD: Makefile.rumpdevcomp,v 1.22 2015/11/01 09:03:28 pooka Exp $
 #
 
 RUMPDEVCOMP=	audio bpf cgd disk dm drvctl fss md netsmb		\
@@ -10,6 +10,7 @@ RUMPUSBDEVS=	ubt ucom ugenhc ulpt umass 
 RUMPPCIDEVS=	pci pci_if_iwn pci_if_pcn pci_if_wm
 RUMPPCIDEVS+=	pci_usbhc
 RUMPPCIDEVS+=	pci_virtio virtio_if_vioif virtio_ld virtio_viornd
+RUMPPCIDEVS+=	virtio_vioscsi
 RUMPPCIDEVS+=	audio_ac97 pci_auich pci_eap pci_hdaudio hdaudio_hdafg
 # Not really a PCI device, but 
 RUMPPCIDEVS+=	miiphy

Added files:

Index: src/sys/rump/dev/lib/libvirtio_vioscsi/Makefile
diff -u /dev/null src/sys/rump/dev/lib/libvirtio_vioscsi/Makefile:1.1
--- /dev/null	Sun Nov  1 09:03:29 2015
+++ src/sys/rump/dev/lib/libvirtio_vioscsi/Makefile	Sun Nov  1 09:03:28 2015
@@ -0,0 +1,21 @@
+#	$NetBSD: Makefile,v 1.1 2015/11/01 09:03:28 pooka Exp $
+#
+
+RUMPTOP=${TOPRUMP}
+
+.PATH:	${RUMPTOP}/../dev/pci
+
+LIB=	rumpdev_virtio_vioscsi
+COMMENT=VirtIO SCSI driver
+
+IOCONF=	VIRTIO_VIOSCSI.ioconf
+
+SRCS=	vioscsi_at_virtio.c
+
+SRCS+=	vioscsi.c
+
+CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
+   
+.include "${RUMPTOP}/Makefile.rump"
+.include 
+.include 
Index: src/sys/rump/dev/lib/libvirtio_vioscsi/VIRTIO_VIOSCSI.ioconf
diff -u /dev/null src/sys/rump/dev/lib/libvirtio_vioscsi/VIRTIO_VIOSCSI.ioconf:1.1
--- /dev/null	Sun Nov  1 09:03:29 2015
+++ src/sys/rump/dev/lib/libvirtio_vioscsi/VIRTIO_VIOSCSI.ioconf	Sun Nov  1 09:03:28 2015
@@ -0,0 +1,12 @@
+#	$NetBSD: VIRTIO_VIOSCSI.ioconf,v 1.1 2015/11/01 09:03:28 pooka Exp $
+#
+
+ioconf virtio_vioscsi
+
+include "conf/files"
+include "dev/pci/files.pci"
+include "rump/dev/files.rump"
+
+pseudo-root virtio*
+
+vioscsi* at virtio?# Virtio SCSI device
Index: src/sys/rump/dev/lib/libvirtio_vioscsi/vioscsi_at_virtio.c
diff -u /dev/null src/sys/rump/dev/lib/libvirtio_vioscsi/vioscsi_at_virtio.c:1.1
--- /dev/null	Sun Nov  1 09:03:29 2015
+++ src/sys/rump/dev/lib/libvirtio_vioscsi/vioscsi_at_virtio.c	Sun Nov  1 09:03:28 2015
@@ -0,0 +1,49 @@
+/*	$NetBSD: vioscsi_at_virtio.c,v 1.1 2015/11/01 09:03:28 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2014 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: vioscsi_at_virtio.c,v 1.1 2015/11/01 09:03:28 pooka Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include "rump_private.h"
+
+#include "ioconf.c"
+
+#define CONFIG_INIT_COMPONENT(a) config_init_component(			\
+__CONCAT(cfdriver_ioconf_,a),	\
+__CONCAT(cfattach_ioconf_,a),	\
+__CONCAT(cfdata_ioconf_,a));
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+
+	CONFIG_INIT_COMPONENT(virtio_vioscsi);
+}



CVS commit: src/sys/rump/include/rump

2015-11-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov  1 12:34:28 UTC 2015

Modified Files:
src/sys/rump/include/rump: rump.h

Log Message:
fix typo: fnctl -> fcntl

from Robert Millan <r...@gnu.org> via rumpkernel-users


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/rump/include/rump/rump.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/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.63 src/sys/rump/include/rump/rump.h:1.64
--- src/sys/rump/include/rump/rump.h:1.63	Fri Jun 13 15:45:02 2014
+++ src/sys/rump/include/rump/rump.h	Sun Nov  1 12:34:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.63 2014/06/13 15:45:02 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.64 2015/11/01 12:34:28 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -166,7 +166,7 @@ _END_DECLS
 
 #ifdef RUMP_SYS_IOCTL
 #define ioctl(...) rump_sys_ioctl(__VA_ARGS__)
-#define fnctl(...) rump_sys_fcntl(__VA_ARGS__)
+#define fcntl(...) rump_sys_fcntl(__VA_ARGS__)
 #endif /* RUMP_SYS_IOCTL */
 
 #ifdef RUMP_SYS_CLOSE



CVS commit: src/sys/rump/dev/lib/libpci

2015-11-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Nov  1 22:41:24 UTC 2015

Modified Files:
src/sys/rump/dev/lib/libpci: Makefile

Log Message:
Allow PCI implementers to specify arbitrary makefile constructs.
(interface subject to change)

from Robert Millan


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/dev/lib/libpci/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/dev/lib/libpci/Makefile
diff -u src/sys/rump/dev/lib/libpci/Makefile:1.8 src/sys/rump/dev/lib/libpci/Makefile:1.9
--- src/sys/rump/dev/lib/libpci/Makefile:1.8	Mon Oct 19 16:16:33 2015
+++ src/sys/rump/dev/lib/libpci/Makefile	Sun Nov  1 22:41:24 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2015/10/19 16:16:33 pooka Exp $
+#	$NetBSD: Makefile,v 1.9 2015/11/01 22:41:24 pooka Exp $
 #
 
 RUMPTOP= ${TOPRUMP}
@@ -43,6 +43,11 @@ CPPFLAGS+=		${RUMPCOMP_CPPFLAGS.rumpdev_
 # XXX: messy
 .undef RUMPKERN_ONLY
 
+.ifdef RUMPCOMP_MAKEFILEINC.rumpdev_pci
+.warning RUMPCOMP_MAKEFILEINC interface is unstable and may change
+.include "${RUMPCOMP_MAKEFILEINC.rumpdev_pci}"
+.endif
+
 .include "${RUMPTOP}/Makefile.rump"
 .include 
 .include 



CVS commit: src/lib/libc/gen

2015-10-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Oct 25 16:01:04 UTC 2015

Modified Files:
src/lib/libc/gen: Makefile.inc

Log Message:
Don't include daemon.c in RUMPRUN=yes mode.

The standard implementation uses fork(), needs an alternative
implementation for Rumprun.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/lib/libc/gen/Makefile.inc

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

Modified files:

Index: src/lib/libc/gen/Makefile.inc
diff -u src/lib/libc/gen/Makefile.inc:1.191 src/lib/libc/gen/Makefile.inc:1.192
--- src/lib/libc/gen/Makefile.inc:1.191	Tue Jan 20 17:28:00 2015
+++ src/lib/libc/gen/Makefile.inc	Sun Oct 25 16:01:04 2015
@@ -1,16 +1,16 @@
-#	$NetBSD: Makefile.inc,v 1.191 2015/01/20 17:28:00 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.192 2015/10/25 16:01:04 pooka Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
 .PATH: ${ARCHDIR}/gen ${.CURDIR}/gen
 
 .if ${RUMPRUN} != "yes"
-SRCS+=	_errno.c
+SRCS+=	_errno.c daemon.c
 .endif
 
 SRCS+=	alarm.c alphasort.c arc4random.c assert.c asysctl.c \
 	basename.c clock.c closedir.c closefrom.c \
-	confstr.c ctermid.c ctype_.c daemon.c \
+	confstr.c ctermid.c ctype_.c \
 	dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \
 	errc.c errlist.c errno.c execl.c execle.c execlp.c execv.c execvp.c \
 	extattr.c fmtcheck.c fmtmsg.c fnmatch.c fstab.c ftok.c \



CVS commit: src/share/man/man4

2015-10-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Oct 19 14:33:11 UTC 2015

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

Log Message:
terminology police: rump -> rump kernel


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/shmif.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/shmif.4
diff -u src/share/man/man4/shmif.4:1.3 src/share/man/man4/shmif.4:1.4
--- src/share/man/man4/shmif.4:1.3	Wed Nov 17 18:02:20 2010
+++ src/share/man/man4/shmif.4	Mon Oct 19 14:33:11 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: shmif.4,v 1.3 2010/11/17 18:02:20 wiz Exp $
+.\"	$NetBSD: shmif.4,v 1.4 2015/10/19 14:33:11 pooka Exp $
 .\"
 .\" Copyright (c) 2010 Antti Kantee
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .Os
 .Sh NAME
 .Nm shmif
-.Nd rump shared memory network interface
+.Nd rump kernel shared memory network interface
 .Sh SYNOPSIS
 .In rump/rump.h
 .Ft int
@@ -52,7 +52,7 @@ the bus hold).
 .El
 .Pp
 It is not possible to directly access the host networking
-facilities from a rump virtual kernel using purely
+facilities from a rump kernel using purely
 .Nm .
 However, traffic can be routed to another rump kernel instance which
 provides both



CVS commit: src/share/mk

2015-10-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Oct 19 16:17:14 UTC 2015

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

Log Message:
Allow "make describe" to descend into SUBDIRs.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.876 src/share/mk/bsd.own.mk:1.877
--- src/share/mk/bsd.own.mk:1.876	Tue Oct 13 20:12:03 2015
+++ src/share/mk/bsd.own.mk	Mon Oct 19 16:17:14 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.876 2015/10/13 20:12:03 rjs Exp $
+#	$NetBSD: bsd.own.mk,v 1.877 2015/10/19 16:17:14 pooka Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -842,11 +842,11 @@ ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang
 GENASSYM_CPPFLAGS+=	${${ACTIVE_CC} == "clang":? -no-integrated-as :}
 
 TARGETS+=	all clean cleandir depend dependall includes \
-		install lint obj regress tags html analyze
+		install lint obj regress tags html analyze describe
 PHONY_NOTMAIN =	all clean cleandir depend dependall distclean includes \
 		install lint obj regress beforedepend afterdepend \
 		beforeinstall afterinstall realinstall realdepend realall \
-		html subdir-all subdir-install subdir-depend analyze
+		html subdir-all subdir-install subdir-depend analyze describe
 .PHONY:		${PHONY_NOTMAIN}
 .NOTMAIN:	${PHONY_NOTMAIN}
 



CVS commit: src/sys/rump

2015-10-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Oct 19 16:16:39 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump
src/sys/rump/dev/lib/libaudio: Makefile
src/sys/rump/dev/lib/libaudio_ac97: Makefile
src/sys/rump/dev/lib/libbpf: Makefile
src/sys/rump/dev/lib/libcgd: Makefile
src/sys/rump/dev/lib/libdisk: Makefile
src/sys/rump/dev/lib/libdm: Makefile
src/sys/rump/dev/lib/libdrvctl: Makefile
src/sys/rump/dev/lib/libfss: Makefile
src/sys/rump/dev/lib/libhdaudio_hdafg: Makefile
src/sys/rump/dev/lib/libmd: Makefile
src/sys/rump/dev/lib/libmiiphy: Makefile
src/sys/rump/dev/lib/libnetsmb: Makefile
src/sys/rump/dev/lib/libopencrypto: Makefile
src/sys/rump/dev/lib/libpad: Makefile
src/sys/rump/dev/lib/libpci: Makefile
src/sys/rump/dev/lib/libpci_auich: Makefile
src/sys/rump/dev/lib/libpci_eap: Makefile
src/sys/rump/dev/lib/libpci_hdaudio: Makefile
src/sys/rump/dev/lib/libpci_if_iwn: Makefile
src/sys/rump/dev/lib/libpci_if_pcn: Makefile
src/sys/rump/dev/lib/libpci_if_wm: Makefile
src/sys/rump/dev/lib/libpci_usbhc: Makefile
src/sys/rump/dev/lib/libpci_virtio: Makefile
src/sys/rump/dev/lib/libpud: Makefile
src/sys/rump/dev/lib/libputter: Makefile
src/sys/rump/dev/lib/libraidframe: Makefile
src/sys/rump/dev/lib/librnd: Makefile
src/sys/rump/dev/lib/libscsipi: Makefile
src/sys/rump/dev/lib/libsysmon: Makefile
src/sys/rump/dev/lib/libubt: Makefile
src/sys/rump/dev/lib/libucom: Makefile
src/sys/rump/dev/lib/libugenhc: Makefile
src/sys/rump/dev/lib/libulpt: Makefile
src/sys/rump/dev/lib/libumass: Makefile
src/sys/rump/dev/lib/libusb: Makefile
src/sys/rump/dev/lib/libvirtio_if_vioif: Makefile
src/sys/rump/dev/lib/libvirtio_ld: Makefile
src/sys/rump/dev/lib/libvirtio_viornd: Makefile
src/sys/rump/dev/lib/libvnd: Makefile
src/sys/rump/dev/lib/libwscons: Makefile
src/sys/rump/fs/lib/libaio: Makefile
src/sys/rump/fs/lib/libcd9660: Makefile
src/sys/rump/fs/lib/libefs: Makefile
src/sys/rump/fs/lib/libext2fs: Makefile
src/sys/rump/fs/lib/libfdesc: Makefile
src/sys/rump/fs/lib/libffs: Makefile
src/sys/rump/fs/lib/libfifovfs: Makefile
src/sys/rump/fs/lib/libhfs: Makefile
src/sys/rump/fs/lib/libkernfs: Makefile
src/sys/rump/fs/lib/liblayervfs: Makefile
src/sys/rump/fs/lib/liblfs: Makefile
src/sys/rump/fs/lib/libmfs: Makefile
src/sys/rump/fs/lib/libmsdos: Makefile
src/sys/rump/fs/lib/libnfs: Makefile
src/sys/rump/fs/lib/libnfsserver: Makefile
src/sys/rump/fs/lib/libnilfs: Makefile
src/sys/rump/fs/lib/libntfs: Makefile
src/sys/rump/fs/lib/libnull: Makefile
src/sys/rump/fs/lib/libptyfs: Makefile
src/sys/rump/fs/lib/libsmbfs: Makefile
src/sys/rump/fs/lib/libsyspuffs: Makefile
src/sys/rump/fs/lib/libsysvbfs: Makefile
src/sys/rump/fs/lib/libtmpfs: Makefile
src/sys/rump/fs/lib/libudf: Makefile
src/sys/rump/fs/lib/libumap: Makefile
src/sys/rump/fs/lib/libunion: Makefile
src/sys/rump/fs/lib/libv7fs: Makefile
src/sys/rump/fs/lib/libzfs: Makefile
src/sys/rump/kern/lib/libcrypto: Makefile
src/sys/rump/kern/lib/libsljit: Makefile
src/sys/rump/kern/lib/libsolaris: Makefile
src/sys/rump/kern/lib/libsys_cygwin: Makefile
src/sys/rump/kern/lib/libsys_linux: Makefile
src/sys/rump/kern/lib/libsys_sunos: Makefile
src/sys/rump/kern/lib/libsysproxy: Makefile
src/sys/rump/kern/lib/libtty: Makefile
src/sys/rump/kern/lib/libz: Makefile
src/sys/rump/librump/rumpdev: Makefile.rumpdev
src/sys/rump/librump/rumpkern: Makefile.rumpkern
src/sys/rump/librump/rumpnet: Makefile.rumpnet
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
src/sys/rump/net/lib/libagr: Makefile
src/sys/rump/net/lib/libbpfjit: Makefile
src/sys/rump/net/lib/libbridge: Makefile
src/sys/rump/net/lib/liblocal: Makefile
src/sys/rump/net/lib/libnet: Makefile
src/sys/rump/net/lib/libnet80211: Makefile
src/sys/rump/net/lib/libnetbt: Makefile
src/sys/rump/net/lib/libnetinet: Makefile
src/sys/rump/net/lib/libnetinet6: Makefile
src/sys/rump/net/lib/libnetmpls: Makefile
src/sys/rump/net/lib/libnpf: Makefile
src/sys/rump/net/lib/libshmif: Makefile
src/sys/rump/net/lib/libsockin: Makefile
src/sys/rump/net/lib/libtap: Makefile
src/sys/rump/net/lib/libvirtif: Makefile

Log Message:
Add a COMMENT describing what each component roughly does.

"make describe" prints the comment.

Requested/inspired by Vincent Schwarzer on 

CVS commit: src

2015-09-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 21 21:50:16 UTC 2015

Modified Files:
src/lib/librumpuser: rumpuser_port.h
src/tools/compat: compat_defs.h
src/usr.bin/make: make.h

Log Message:
Add more compat defs for code compiled for !NetBSD targets.

At least GNU Hurd lacks MAXHOSTNAMELEN/MAXPATHLEN/PATH_MAX, so make sure
those have some arbitrary semi-sane values.

from Robert Millan in PR misc/50166, with some modifications from myself


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/librumpuser/rumpuser_port.h
cvs rdiff -u -r1.102 -r1.103 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/make/make.h

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

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.45 src/lib/librumpuser/rumpuser_port.h:1.46
--- src/lib/librumpuser/rumpuser_port.h:1.45	Sun Aug 16 11:37:39 2015
+++ src/lib/librumpuser/rumpuser_port.h	Mon Sep 21 21:50:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.45 2015/08/16 11:37:39 pooka Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.46 2015/09/21 21:50:16 pooka Exp $	*/
 
 #ifndef _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
 #define _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
@@ -314,4 +314,16 @@ do {		\
 #define setprogname(a)
 #endif
 
+/* at least GNU Hurd does not specify various common hardcoded constants */
+#include 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN	4096
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX	MAXPATHLEN
+#endif
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN	256
+#endif
+
 #endif /* _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_ */

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.102 src/tools/compat/compat_defs.h:1.103
--- src/tools/compat/compat_defs.h:1.102	Sun Jul 26 14:01:53 2015
+++ src/tools/compat/compat_defs.h	Mon Sep 21 21:50:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.102 2015/07/26 14:01:53 kamil Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.103 2015/09/21 21:50:16 pooka Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -910,6 +910,13 @@ void *setmode(const char *);
 #define LLONG_MIN ((long long)(~LLONG_MAX))
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN	4096
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX	MAXPATHLEN
+#endif
+
 /*  */
 
 /* The host's _PATH_BSHELL might be broken, so override it. */
@@ -1149,6 +1156,9 @@ __GEN_ENDIAN_DEC(64, le)
 #ifndef MAXPHYS
 #define MAXPHYS (64 * 1024)
 #endif
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN	256
+#endif
 
 /* XXX needed by makefs; this should be done in a better way */
 #undef btodb

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.95 src/usr.bin/make/make.h:1.96
--- src/usr.bin/make/make.h:1.95	Sun Sep  7 20:55:34 2014
+++ src/usr.bin/make/make.h	Mon Sep 21 21:50:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.95 2014/09/07 20:55:34 joerg Exp $	*/
+/*	$NetBSD: make.h,v 1.96 2015/09/21 21:50:16 pooka Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -503,4 +503,13 @@ int str2Lst_Append(Lst, char *, const ch
 #define MAX(a, b) ((a > b) ? a : b)
 #endif
 
+/* At least GNU/Hurd systems lack hardcoded MAXPATHLEN/PATH_MAX */
+#include 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN	4096
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX	MAXPATHLEN
+#endif
+
 #endif /* _MAKE_H_ */



CVS commit: src/lib/librumpuser

2015-09-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Sep 18 10:56:26 UTC 2015

Modified Files:
src/lib/librumpuser: rumpuser_pth.c

Log Message:
Fix typos to match values from rumpuser_config.h

from Hajime Tazaki via rumpkernel-users


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/librumpuser/rumpuser_pth.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/librumpuser/rumpuser_pth.c
diff -u src/lib/librumpuser/rumpuser_pth.c:1.44 src/lib/librumpuser/rumpuser_pth.c:1.45
--- src/lib/librumpuser/rumpuser_pth.c:1.44	Tue Dec 16 17:00:17 2014
+++ src/lib/librumpuser/rumpuser_pth.c	Fri Sep 18 10:56:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $	*/
+/*	$NetBSD: rumpuser_pth.c,v 1.45 2015/09/18 10:56:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth.c,v 1.45 2015/09/18 10:56:25 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -80,11 +80,11 @@ rumpuser_thread_create(void *(*f)(void *
 		nanosleep(, NULL);
 	}
 
-#if defined(HAVE_PTHREAD_SETNAME_3)
+#if defined(HAVE_PTHREAD_SETNAME3)
 	if (rv == 0 && thrname) {
 		pthread_setname_np(*ptidp, thrname, NULL);
 	}
-#elif defined(HAVE_PTHREAD_SETNAME_2)
+#elif defined(HAVE_PTHREAD_SETNAME2)
 	if (rv == 0 && thrname) {
 		pthread_setname_np(*ptidp, thrname);
 	}



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

2015-09-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep 15 15:09:11 UTC 2015

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

Log Message:
Use the more widely accepted version of alphabetical order.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.163 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.164
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.163	Mon Aug 31 07:38:48 2015
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Tue Sep 15 15:09:10 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.163 2015/08/31 07:38:48 ozaki-r Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.164 2015/09/15 15:09:10 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -83,6 +83,7 @@ SRCS+=	init_sysctl_base.c	\
 	kern_rndpool.c		\
 	kern_rndq.c		\
 	kern_rndsink.c		\
+	kern_rwlock_obj.c	\
 	kern_stub.c		\
 	kern_syscall.c		\
 	kern_sysctl.c		\
@@ -92,11 +93,11 @@ SRCS+=	init_sysctl_base.c	\
 	kern_uidinfo.c		\
 	kern_xxx.c		\
 	param.c			\
-	subr_devsw.c		\
 	subr_callback.c		\
 	subr_copy.c		\
 	subr_cprng.c		\
 	subr_device.c		\
+	subr_devsw.c		\
 	subr_evcnt.c		\
 	subr_extent.c		\
 	subr_hash.c		\
@@ -113,7 +114,6 @@ SRCS+=	init_sysctl_base.c	\
 	subr_pool.c		\
 	subr_prf.c		\
 	subr_pserialize.c	\
-	kern_rwlock_obj.c	\
 	subr_specificdata.c	\
 	subr_time.c		\
 	subr_vmem.c		\



CVS commit: src

2015-09-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep 15 14:57:35 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi
src/sys/rump/include/rump: Makefile

Log Message:
install 


To generate a diff of this commit:
cvs rdiff -u -r1.1987 -r1.1988 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/include/rump/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1987 src/distrib/sets/lists/comp/mi:1.1988
--- src/distrib/sets/lists/comp/mi:1.1987	Sun Sep 13 10:58:30 2015
+++ src/distrib/sets/lists/comp/mi	Tue Sep 15 14:57:34 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1987 2015/09/13 10:58:30 he Exp $
+#	$NetBSD: mi,v 1.1988 2015/09/15 14:57:34 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2658,6 +2658,7 @@
 ./usr/include/rump/rumpclient.h			comp-c-include	rump
 ./usr/include/rump/rumpdefs.h			comp-c-include	rump
 ./usr/include/rump/rumperr.h			comp-c-include	rump
+./usr/include/rump/rumperrno2host.h			comp-c-include	rump
 ./usr/include/rump/rumpkern_if_pub.h		comp-c-include	rump
 ./usr/include/rump/rumpnet_if_pub.h		comp-c-include	rump
 ./usr/include/rump/rumpuser.h			comp-c-include	rump

Index: src/sys/rump/include/rump/Makefile
diff -u src/sys/rump/include/rump/Makefile:1.7 src/sys/rump/include/rump/Makefile:1.8
--- src/sys/rump/include/rump/Makefile:1.7	Fri Apr 25 00:24:39 2014
+++ src/sys/rump/include/rump/Makefile	Tue Sep 15 14:57:34 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2014/04/25 00:24:39 pooka Exp $
+#	$NetBSD: Makefile,v 1.8 2015/09/15 14:57:34 pooka Exp $
 
 .include 
 
@@ -6,7 +6,7 @@ INCSDIR=	/usr/include/rump
 
 .if (${MKRUMP} != "no")
 INCS=		rump.h rump_namei.h rump_syscalls.h rump_syscalls_compat.h
-INCS+=		rumpdefs.h rumperr.h rumpuser.h rumpvnode_if.h
+INCS+=		rumpdefs.h rumperr.h rumperrno2host.h rumpuser.h rumpvnode_if.h
 
 INCS+=		rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h
 .endif



CVS commit: src/sys/rump/include/rump

2015-09-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep 15 14:55:55 UTC 2015

Modified Files:
src/sys/rump/include/rump: rumpdefs.h rumperr.h
Added Files:
src/sys/rump/include/rump: rumperrno2host.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/rump/rumperr.h
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/rump/rumperrno2host.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.32 src/sys/rump/include/rump/rumpdefs.h:1.33
--- src/sys/rump/include/rump/rumpdefs.h:1.32	Thu Sep 10 16:21:48 2015
+++ src/sys/rump/include/rump/rumpdefs.h	Tue Sep 15 14:55:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.32 2015/09/10 16:21:48 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.33 2015/09/15 14:55:55 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.

Index: src/sys/rump/include/rump/rumperr.h
diff -u src/sys/rump/include/rump/rumperr.h:1.3 src/sys/rump/include/rump/rumperr.h:1.4
--- src/sys/rump/include/rump/rumperr.h:1.3	Thu Sep 10 16:21:48 2015
+++ src/sys/rump/include/rump/rumperr.h	Tue Sep 15 14:55:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperr.h,v 1.3 2015/09/10 16:21:48 pooka Exp $	*/
+/*	$NetBSD: rumperr.h,v 1.4 2015/09/15 14:55:55 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.

Added files:

Index: src/sys/rump/include/rump/rumperrno2host.h
diff -u /dev/null src/sys/rump/include/rump/rumperrno2host.h:1.1
--- /dev/null	Tue Sep 15 14:55:55 2015
+++ src/sys/rump/include/rump/rumperrno2host.h	Tue Sep 15 14:55:55 2015
@@ -0,0 +1,411 @@
+/*	$NetBSD: rumperrno2host.h,v 1.1 2015/09/15 14:55:55 pooka Exp $	*/
+
+/*
+ *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ */
+
+/*	NetBSD: errno.h,v 1.40 2013/01/02 18:51:53 dsl Exp 	*/
+
+#ifndef ERANGE
+#error include ISO C style errno.h first
+#endif
+
+static inline int 
+rump_errno2host(int rumperrno)
+{
+
+	switch (rumperrno) {
+	case 0:
+		 return 0;
+#ifdef EPERM
+	case 1:
+		return EPERM;
+#endif
+#ifdef ENOENT
+	case 2:
+		return ENOENT;
+#endif
+#ifdef ESRCH
+	case 3:
+		return ESRCH;
+#endif
+#ifdef EINTR
+	case 4:
+		return EINTR;
+#endif
+#ifdef EIO
+	case 5:
+		return EIO;
+#endif
+#ifdef ENXIO
+	case 6:
+		return ENXIO;
+#endif
+#ifdef E2BIG
+	case 7:
+		return E2BIG;
+#endif
+#ifdef ENOEXEC
+	case 8:
+		return ENOEXEC;
+#endif
+#ifdef EBADF
+	case 9:
+		return EBADF;
+#endif
+#ifdef ECHILD
+	case 10:
+		return ECHILD;
+#endif
+#ifdef EDEADLK
+	case 11:
+		return EDEADLK;
+#endif
+#ifdef ENOMEM
+	case 12:
+		return ENOMEM;
+#endif
+#ifdef EACCES
+	case 13:
+		return EACCES;
+#endif
+#ifdef EFAULT
+	case 14:
+		return EFAULT;
+#endif
+#ifdef ENOTBLK
+	case 15:
+		return ENOTBLK;
+#endif
+#ifdef EBUSY
+	case 16:
+		return EBUSY;
+#endif
+#ifdef EEXIST
+	case 17:
+		return EEXIST;
+#endif
+#ifdef EXDEV
+	case 18:
+		return EXDEV;
+#endif
+#ifdef ENODEV
+	case 19:
+		return ENODEV;
+#endif
+#ifdef ENOTDIR
+	case 20:
+		return ENOTDIR;
+#endif
+#ifdef EISDIR
+	case 21:
+		return EISDIR;
+#endif
+#ifdef EINVAL
+	case 22:
+		return EINVAL;
+#endif
+#ifdef ENFILE
+	case 23:
+		return ENFILE;
+#endif
+#ifdef EMFILE
+	case 24:
+		return EMFILE;
+#endif
+#ifdef ENOTTY
+	case 25:
+		return ENOTTY;
+#endif
+#ifdef ETXTBSY
+	case 26:
+		return ETXTBSY;
+#endif
+#ifdef EFBIG
+	case 27:
+		return EFBIG;
+#endif
+#ifdef ENOSPC
+	case 28:
+		return ENOSPC;
+#endif
+#ifdef ESPIPE
+	case 29:
+		return ESPIPE;
+#endif
+#ifdef EROFS
+	case 30:
+		return EROFS;
+#endif
+#ifdef EMLINK
+	case 31:
+		return EMLINK;
+#endif
+#ifdef EPIPE
+	case 32:
+		return EPIPE;
+#endif
+#ifdef EDOM
+	case 33:
+		return EDOM;
+#endif
+#ifdef ERANGE
+	case 34:
+		return ERANGE;
+#endif
+#ifdef EAGAIN
+	case 35:
+		return EAGAIN;
+#endif
+#ifdef EINPROGRESS
+	case 36:
+		return EINPROGRESS;
+#endif
+#ifdef EALREADY
+	case 37:
+		return EALREADY;
+#endif
+#ifdef ENOTSOCK
+	case 38:
+		return ENOTSOCK;
+#endif
+#ifdef EDESTADDRREQ
+	case 39:
+		return EDESTADDRREQ;
+#endif
+#ifdef EMSGSIZE
+	case 40:
+		return EMSGSIZE;
+#endif
+#ifdef EPROTOTYPE
+	case 41:
+		return EPROTOTYPE;
+#endif
+#ifdef ENOPROTOOPT
+	case 42:
+		return ENOPROTOOPT;
+#endif
+#ifdef EPROTONOSUPPORT
+	case 43:
+		return EPROTONOSUPPORT;
+#endif
+#ifdef ESOCKTNOSUPPORT
+	case 44:
+		return ESOCKTNOSUPPORT;
+#endif
+#ifdef EOPNOTSUPP
+	case 45:
+		return EOPNOTSUPP;
+#endif
+#ifdef EPFNOSUPPORT
+	case 46:
+		return EPFNOSUPPORT;
+#endif
+#ifdef EAFNOSUPPORT
+	case 47:
+		return EAFNOSUPPORT;
+#endif
+#ifdef EADDRINUSE
+	case 48:
+		return EADDRINUSE;
+#endif
+#ifdef EADDRNOTAVAIL
+	case 49:
+		return EADDRNOTAVAIL;
+#endif
+#ifdef ENETDOWN
+	case 50:
+		return ENETDOWN;
+#endif
+#ifdef ENETUNREACH
+	case 51:
+		return ENETUNREACH;
+#endif
+#ifdef ENETRESET
+	case 52:
+		return ENETRESET;
+#endif
+#ifdef 

CVS commit: src/sys/rump/include/rump

2015-09-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep 15 14:55:12 UTC 2015

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
Generate rump_errno2host(): translates rump kernel errnos to host errnos.

Essentially, it's a partial I-know-what-I'm-doing syscall compat.

Functionality requested by Robert Millan.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/include/rump/makerumpdefs.sh

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

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.27 src/sys/rump/include/rump/makerumpdefs.sh:1.28
--- src/sys/rump/include/rump/makerumpdefs.sh:1.27	Thu Sep 10 16:21:32 2015
+++ src/sys/rump/include/rump/makerumpdefs.sh	Tue Sep 15 14:55:12 2015
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec 3>&1 > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.27 2015/09/10 16:21:32 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -126,11 +126,11 @@ getstruct ../../../sys/dirent.h dirent
 printf '\n#endif /* _RUMP_RUMPDEFS_H_ */\n'
 
 exec 1>&3
+
 echo Generating rumperr.h
 rm -f rumperr.h
 exec > rumperr.h
-
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.27 2015/09/10 16:21:32 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
 
 fromvers ../../../sys/errno.h
@@ -168,4 +168,44 @@ if [ $? -ne 0 ]; then
 	exit 1
 fi
 
+echo Generating rumperrno2host.h 1>&3
+rm -f rumperrno2host.h
+exec > rumperrno2host.h
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.28 2015/09/15 14:55:12 pooka Exp $	*/\n\n'
+printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
+
+fromvers ../../../sys/errno.h
+
+printf "\n#ifndef ERANGE\n#error include ISO C style errno.h first\n#endif\n"
+printf "\nstatic inline int \nrump_errno2host(int rumperrno)\n{\n\n"
+printf "\tswitch (rumperrno) {\n\tcase 0:\n"
+printf "\t\t return 0;\n"
+awk '/^#define[ 	]*E.*[0-9]/{
+	ename = $2
+	evalue = $3
+	error = 1
+	if (ename == "ELAST") {
+		printf "\tdefault:\n"
+		printf "#ifdef EINVAL\n\t\treturn EINVAL;\n"
+		printf "#else\n\t\treturn ERANGE;\n#endif\n"
+		printf "\t}\n}\n"
+		error = 0
+		exit 0
+	}
+	if (preverror + 1 != evalue)
+		exit 1
+	preverror = evalue
+	printf "#ifdef %s\n", ename
+	printf "\tcase %d:\n\t\treturn %s;\n", evalue, ename
+	printf "#endif\n"
+}
+END {
+	exit error
+}' < ../../../sys/errno.h
+if [ $? -ne 0 ]; then
+	echo 'Parsing errno.h failed!' 1>&3
+	rm -f rumpdefs.h rumperr.h rumperrno2host.h
+	exit 1
+fi
+
 exit 0



CVS commit: src/sys/rump/dev/lib/libugenhc

2015-09-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 14 15:08:50 UTC 2015

Modified Files:
src/sys/rump/dev/lib/libugenhc: ugenhc_dma.c

Log Message:
Note in comment why this "d"ma implementation is not in libusb.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libugenhc/ugenhc_dma.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/dev/lib/libugenhc/ugenhc_dma.c
diff -u src/sys/rump/dev/lib/libugenhc/ugenhc_dma.c:1.1 src/sys/rump/dev/lib/libugenhc/ugenhc_dma.c:1.2
--- src/sys/rump/dev/lib/libugenhc/ugenhc_dma.c:1.1	Thu Sep 19 17:55:22 2013
+++ src/sys/rump/dev/lib/libugenhc/ugenhc_dma.c	Mon Sep 14 15:08:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugenhc_dma.c,v 1.1 2013/09/19 17:55:22 pooka Exp $	*/
+/*	$NetBSD: ugenhc_dma.c,v 1.2 2015/09/14 15:08:50 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,16 @@
 #include 
 
 /*
- * bus_dma(9) that works for USB drivers
+ * bus_dma(9) that works for USB drivers.
+ *
+ * So why is it here instead of in libusb?  Well, first of all, it's
+ * actually a bus_dma implementation which works with ugenhc.  Of course,
+ * ugenhc doesn't make any bus_dma calls itself, all of those calls come
+ * from the usb code.  However, the USB component can be paired with other
+ * USB host controllers, such as {e,o,u}hci.  Therefore, we keep the "D"MA
+ * code here.
+ *
+ * Note: this implementation requires a __HAVE_NEW_STYLE_BUS_H arch
  */
 
 int



CVS commit: src/sys/rump/dev/lib/libugenhc

2015-09-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 14 15:09:35 UTC 2015

Modified Files:
src/sys/rump/dev/lib/libugenhc: Makefile

Log Message:
Fully build ugenhc only on archs where libusb is built.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/dev/lib/libugenhc/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/dev/lib/libugenhc/Makefile
diff -u src/sys/rump/dev/lib/libugenhc/Makefile:1.8 src/sys/rump/dev/lib/libugenhc/Makefile:1.9
--- src/sys/rump/dev/lib/libugenhc/Makefile:1.8	Thu Mar 13 01:38:11 2014
+++ src/sys/rump/dev/lib/libugenhc/Makefile	Mon Sep 14 15:09:35 2015
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.8 2014/03/13 01:38:11 pooka Exp $
+#	$NetBSD: Makefile,v 1.9 2015/09/14 15:09:35 pooka Exp $
 #
 
 LIB=	rumpdev_ugenhc
+
+.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
 IOCONF= UGENHC.ioconf
 
 SRCS=	ugenhc.c ugenhc_at_mainbus.c ugenhc_dma.c
@@ -9,6 +11,10 @@ SRCS=	ugenhc.c ugenhc_at_mainbus.c ugenh
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
 
 RUMPCOMP_USER_SRCS=	ugenhc_user.c
+.else
+.PATH:	${.CURDIR}/../libusb
+SRCS=	dummy.c
+.endif
 
 .include 
 .include 



CVS import: src/external/bsd/libc++/dist/libcxxrt

2015-09-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Sep 11 11:20:00 UTC 2015

Update of /cvsroot/src/external/bsd/libc++/dist/libcxxrt
In directory ivanova.netbsd.org:/tmp/cvs-serv12720

Log Message:
Import libcxxrt e64e93fe5bba67a6d52cbe5a97f8770c054bfa65

Implements __cxa_throw_bad_array_new_length, which is generated by gcc
4.9 and later.  Also, some demangle support and fixes.

Status:

Vendor Tag: PATHSCALE
Release Tags:   libcxxrt-e64e93fe5bba67a6d52cbe5a97f8770c054bfa65

U src/external/bsd/libc++/dist/libcxxrt/LICENSE
U src/external/bsd/libc++/dist/libcxxrt/COPYRIGHT
U src/external/bsd/libc++/dist/libcxxrt/AUTHORS
U src/external/bsd/libc++/dist/libcxxrt/README
U src/external/bsd/libc++/dist/libcxxrt/src/guard.cc
U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.cc
U src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c
U src/external/bsd/libc++/dist/libcxxrt/src/cxa_finalize.c
C src/external/bsd/libc++/dist/libcxxrt/src/exception.cc
U src/external/bsd/libc++/dist/libcxxrt/src/atomic.h
U src/external/bsd/libc++/dist/libcxxrt/src/abi_namespace.h
U src/external/bsd/libc++/dist/libcxxrt/src/dwarf_eh.h
U src/external/bsd/libc++/dist/libcxxrt/src/memory.cc
U src/external/bsd/libc++/dist/libcxxrt/src/cxa_atexit.c
U src/external/bsd/libc++/dist/libcxxrt/src/auxhelper.cc
U src/external/bsd/libc++/dist/libcxxrt/src/unwind-arm.h
U src/external/bsd/libc++/dist/libcxxrt/src/dynamic_cast.cc
U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.h
U src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h
U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.cc
U src/external/bsd/libc++/dist/libcxxrt/src/unwind.h
U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.h
U src/external/bsd/libc++/dist/libcxxrt/src/cxxabi.h
U src/external/bsd/libc++/dist/libcxxrt/src/terminate.cc
U src/external/bsd/libc++/dist/libcxxrt/test/test.cc
U src/external/bsd/libc++/dist/libcxxrt/test/run_test.sh
U src/external/bsd/libc++/dist/libcxxrt/test/test_typeinfo.cc
U src/external/bsd/libc++/dist/libcxxrt/test/test_guard.cc
U src/external/bsd/libc++/dist/libcxxrt/test/test.h
U src/external/bsd/libc++/dist/libcxxrt/test/test_exception.cc

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jPATHSCALE:yesterday -jPATHSCALE 
src/external/bsd/libc++/dist/libcxxrt



CVS commit: src/sys/rump/include/rump

2015-09-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep 10 16:21:48 UTC 2015

Modified Files:
src/sys/rump/include/rump: rumpdefs.h rumperr.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/include/rump/rumperr.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.31 src/sys/rump/include/rump/rumpdefs.h:1.32
--- src/sys/rump/include/rump/rumpdefs.h:1.31	Thu Sep 10 16:16:35 2015
+++ src/sys/rump/include/rump/rumpdefs.h	Thu Sep 10 16:21:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.31 2015/09/10 16:16:35 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.32 2015/09/10 16:21:48 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -76,7 +76,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_EDOM		33		/* Numerical argument out of domain */
 #define	RUMP_ERANGE		34		/* Result too large or too small */
 #define	RUMP_EAGAIN		35		/* Resource temporarily unavailable */
-#define	RUMP_EWOULDBLOCK	EAGAIN		/* Operation would block */
+#define	RUMP_EWOULDBLOCK	RUMP_EAGAIN		/* Operation would block */
 #define	RUMP_EINPROGRESS	36		/* Operation now in progress */
 #define	RUMP_EALREADY	37		/* Operation already in progress */
 #define	RUMP_ENOTSOCK	38		/* Socket operation on non-socket */

Index: src/sys/rump/include/rump/rumperr.h
diff -u src/sys/rump/include/rump/rumperr.h:1.2 src/sys/rump/include/rump/rumperr.h:1.3
--- src/sys/rump/include/rump/rumperr.h:1.2	Thu Sep 10 16:16:35 2015
+++ src/sys/rump/include/rump/rumperr.h	Thu Sep 10 16:21:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumperr.h,v 1.2 2015/09/10 16:16:35 pooka Exp $	*/
+/*	$NetBSD: rumperr.h,v 1.3 2015/09/10 16:21:48 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.



CVS commit: src/sys/rump/include/rump

2015-09-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep 10 16:14:22 UTC 2015

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
Ignore multiline IOC macros by default.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/rump/include/rump/makerumpdefs.sh

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

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.25 src/sys/rump/include/rump/makerumpdefs.sh:1.26
--- src/sys/rump/include/rump/makerumpdefs.sh:1.25	Wed Dec 18 20:10:58 2013
+++ src/sys/rump/include/rump/makerumpdefs.sh	Thu Sep 10 16:14:22 2015
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec 3>&1 > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.25 2013/12/18 20:10:58 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.26 2015/09/10 16:14:22 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -97,7 +97,7 @@ fromvers ../../../sys/fstypes.h
 sed -n '/#define[ 	]*MNT_[A-Z].*[^\]$/s/MNT_/RUMP_MNT_/gp' <../../../sys/fstypes.h | sed 's,/\*.*$,,'
 
 fromvers ../../../sys/ioccom.h
-sed -n '/#define[ 	]*IOC[A-Z_]/s/IOC/RUMP_&/gp' <../../../sys/ioccom.h | sed 's,/\*.*$,,'
+sed -n '/#define[ 	]*IOC[A-Z_].*[^\\]$/s/IOC/RUMP_&/gp' <../../../sys/ioccom.h | sed 's,/\*.*$,,'
 sed -n '/#define[ 	]*_IO.*\\$/{:t;N;/\\$/bt;s/_IOC/_RUMP_IOC/g;s/IOC[A-Z]/RUMP_&/gp}' <../../../sys/ioccom.h \
 | sed 's,/\*.*$,,'
 sed -n '/#define[ 	]*_IO.*[^\]$/{s/_IO/_RUMP_IO/g;s/IOC_/RUMP_IOC_/gp}' <../../../sys/ioccom.h \
@@ -129,7 +129,7 @@ echo Generating rumperr.h
 rm -f rumperr.h
 exec > rumperr.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.25 2013/12/18 20:10:58 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.26 2015/09/10 16:14:22 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
 
 fromvers ../../../sys/errno.h



CVS commit: src/sys/rump/include/rump

2015-09-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep 10 16:16:35 UTC 2015

Modified Files:
src/sys/rump/include/rump: rumpdefs.h rumperr.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/rump/rumperr.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.30 src/sys/rump/include/rump/rumpdefs.h:1.31
--- src/sys/rump/include/rump/rumpdefs.h:1.30	Wed Dec 18 20:12:08 2013
+++ src/sys/rump/include/rump/rumpdefs.h	Thu Sep 10 16:16:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.30 2013/12/18 20:12:08 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.31 2015/09/10 16:16:35 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -33,7 +33,7 @@
 #define	RUMP_O_SEARCH	0x0080	/* skip search permission checks */
 #define	RUMP_O_NOSIGPIPE	0x0100	/* don't deliver sigpipe */
 
-/*	NetBSD: vnode.h,v 1.243 2013/12/01 17:29:40 christos Exp 	*/
+/*	NetBSD: vnode.h,v 1.256 2015/07/12 08:11:28 hannken Exp 	*/
 enum rump_vtype	{ RUMP_VNON, RUMP_VREG, RUMP_VDIR, RUMP_VBLK, RUMP_VCHR, RUMP_VLNK, RUMP_VSOCK, RUMP_VFIFO, RUMP_VBAD };
 #define	RUMP_LK_SHARED	0x0001	
 #define	RUMP_LK_EXCLUSIVE	0x0002	
@@ -170,12 +170,14 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_AB_SILENT	0x0004	
 #define	RUMP_AB_DEBUG	0x0008	
 
-/*	NetBSD: socket.h,v 1.108 2013/01/31 14:30:47 joerg Exp 	*/
+/*	NetBSD: socket.h,v 1.117 2015/04/03 20:01:08 rtr Exp 	*/
 #define	RUMP_SOCK_STREAM	1		
 #define	RUMP_SOCK_DGRAM	2		
 #define	RUMP_SOCK_RAW	3		
 #define	RUMP_SOCK_RDM	4		
 #define	RUMP_SOCK_SEQPACKET	5		
+#define	RUMP_SOCK_CONN_DGRAM	6		
+#define	RUMP_SOCK_DCCP	RUMP_SOCK_CONN_DGRAM
 #define	RUMP_SOCK_CLOEXEC	0x1000	
 #define	RUMP_SOCK_NONBLOCK	0x2000	
 #define	RUMP_SOCK_NOSIGPIPE	0x4000	
@@ -295,7 +297,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define RUMP_MSG_IOVUSRSPACE	0x400	
 #define RUMP_MSG_LENUSRSPACE	0x800	
 
-/*	NetBSD: in.h,v 1.89 2013/06/27 19:38:16 christos Exp 	*/
+/*	NetBSD: in.h,v 1.97 2015/05/02 14:41:32 roy Exp 	*/
 #define	RUMP_IP_OPTIONS		1
 #define	RUMP_IP_HDRINCL		2
 #define	RUMP_IP_TOS			3
@@ -313,7 +315,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_IP_PORTRANGE		19   
 #define	RUMP_IP_RECVIF		20   
 #define	RUMP_IP_ERRORMTU		21   
-#define	RUMP_IP_IPSEC_POLICY		22 
+#define	RUMP_IP_IPSEC_POLICY		22   
 #define	RUMP_IP_RECVTTL		23   
 #define	RUMP_IP_MINTTL		24   
 #define	RUMP_IP_PKTINFO		25   
@@ -337,6 +339,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_IPPROTO_UDP		17		
 #define	RUMP_IPPROTO_IDP		22		
 #define	RUMP_IPPROTO_TP		29 		
+#define	RUMP_IPPROTO_DCCP		33		
 #define	RUMP_IPPROTO_IPV6		41		
 #define	RUMP_IPPROTO_ROUTING		43		
 #define	RUMP_IPPROTO_FRAGMENT	44		
@@ -362,7 +365,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_IPPROTO_DONE		257
 #define	RUMP_IPPROTO_MAXID	(RUMP_IPPROTO_AH + 1)	
 
-/*	NetBSD: tcp.h,v 1.30 2012/01/07 20:20:22 christos Exp 	*/
+/*	NetBSD: tcp.h,v 1.31 2015/02/14 12:57:53 he Exp 	*/
 #define	RUMP_TCP_MSS		536
 #define	RUMP_TCP_MINMSS	216
 #define	RUMP_TCP_MAXWIN	65535	
@@ -376,10 +379,11 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_TCP_KEEPCNT	6
 #define	RUMP_TCP_KEEPINIT	7
 #define	RUMP_TCP_NOOPT	8	
+#define	RUMP_TCP_INFO	9	
 #define	RUMP_TCP_MD5SIG	0x10	
 #define	RUMP_TCP_CONGCTL	0x20	
 
-/*	NetBSD: mount.h,v 1.210 2013/11/23 13:35:36 christos Exp 	*/
+/*	NetBSD: mount.h,v 1.217 2015/05/06 15:57:08 hannken Exp 	*/
 #define	RUMP_MOUNT_FFS	"ffs"		
 #define	RUMP_MOUNT_UFS	RUMP_MOUNT_FFS	
 #define	RUMP_MOUNT_NFS	"nfs"		
@@ -414,7 +418,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define RUMP_MOUNT_RUMPFS	"rumpfs"	
 #define	RUMP_MOUNT_V7FS	"v7fs"		
 
-/*	NetBSD: fstypes.h,v 1.32 2012/11/26 16:22:21 drochner Exp 	*/
+/*	NetBSD: fstypes.h,v 1.33 2015/05/06 15:57:08 hannken Exp 	*/
 #define	RUMP_MNT_RDONLY	0x0001	
 #define	RUMP_MNT_SYNCHRONOUS	0x0002	
 #define	RUMP_MNT_NOEXEC	0x0004	
@@ -451,7 +455,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_MNT_NOWAIT	2	
 #define	RUMP_MNT_LAZY 	3	
 
-/*	NetBSD: ioccom.h,v 1.11 2011/10/19 10:53:12 yamt Exp 	*/
+/*	NetBSD: ioccom.h,v 1.12 2014/12/10 00:16:05 christos Exp 	*/
 #define	RUMP_IOCPARM_MASK	0x1fff		
 #define	RUMP_IOCPARM_SHIFT	16
 #define	RUMP_IOCGROUP_SHIFT	8
@@ -516,7 +520,7 @@ enum rump_vtype	{ RUMP_VNON, RUMP_VREG, 
 #define	RUMP_KTRFACv1	(1 << RUMP_KTRFAC_VER_SHIFT)
 #define	RUMP_KTRFACv2	(2 << RUMP_KTRFAC_VER_SHIFT)
 
-/*	NetBSD: module.h,v 1.34 2013/10/23 18:57:40 mbalmer Exp 	*/
+/*	NetBSD: module.h,v 1.38 2015/06/22 16:35:13 matt Exp 	*/
 struct rump_modctl_load {
 	const char *ml_filename;
 
@@ -532,7 +536,7 @@ enum rump_modctl {
 	RUMP_MODCTL_EXISTS		/* enum: 0: load, 1: autoload */
 };
 

CVS commit: src/sys/rump/include/rump

2015-09-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep 10 16:21:32 UTC 2015

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
Fix #define ERRNO EANOTHERRNO.

Was: #define RUMP_ERRNO EANOTHERRNO
Now: #define RUMP_ERRNO RUMP_EANOTHERRNO

pointed out by Sebastian Wicki on irc


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/rump/include/rump/makerumpdefs.sh

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

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.26 src/sys/rump/include/rump/makerumpdefs.sh:1.27
--- src/sys/rump/include/rump/makerumpdefs.sh:1.26	Thu Sep 10 16:14:22 2015
+++ src/sys/rump/include/rump/makerumpdefs.sh	Thu Sep 10 16:21:32 2015
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec 3>&1 > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.26 2015/09/10 16:14:22 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.27 2015/09/10 16:21:32 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -60,7 +60,8 @@ sed -n '/#define.*LK_[A-Z]/s/LK_/RUMP_LK
 | sed 's,/\*.*$,,'
 
 fromvers ../../../sys/errno.h
-sed -n '/#define[ 	]*E/s/E[A-Z]*/RUMP_&/p' < ../../../sys/errno.h
+sed -n '/#define[ 	]*E/s/\([ 	]\)\(E[A-Z2][A-Z]*\)/\1RUMP_\2/gp' \
+< ../../../sys/errno.h
 
 fromvers ../../../sys/reboot.h
 sed -n '/#define.*RB_[A-Z]/s/RB_/RUMP_RB_/gp' <../../../sys/reboot.h	\
@@ -129,7 +130,7 @@ echo Generating rumperr.h
 rm -f rumperr.h
 exec > rumperr.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.26 2015/09/10 16:14:22 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.27 2015/09/10 16:21:32 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
 
 fromvers ../../../sys/errno.h



CVS commit: src/sys/rump

2015-09-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep  8 12:14:21 UTC 2015

Modified Files:
src/sys/rump: TODO

Log Message:
Remove solved item.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/TODO

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/TODO
diff -u src/sys/rump/TODO:1.11 src/sys/rump/TODO:1.12
--- src/sys/rump/TODO:1.11	Wed Jun  3 10:23:08 2015
+++ src/sys/rump/TODO	Tue Sep  8 12:14:20 2015
@@ -1,4 +1,4 @@
-	$NetBSD: TODO,v 1.11 2015/06/03 10:23:08 pooka Exp $
+	$NetBSD: TODO,v 1.12 2015/09/08 12:14:20 pooka Exp $
 
 * integrate build framework with config(1) to stop the need to
   maintain a separate build infrastructure.  the remaining step
@@ -7,10 +7,6 @@
   + this will also benefit kernel modules
   + the patch to config(1) exists but is not in-tree.  remaining work is
 modifications to files.*
-* find a better solution for rumpdefs.h, the sed "solution"
-  doesn't really scale nicely
-  + everything except deeply embedded (i.e. small) can use:
-http://github.com/justincormack/rumprun
 * the .a semantics do not make sense for rump kernel components.
   additionally, they cannot be loaded as modules since they are
   ar's instead of elf objects.  make the build produce and use elf



CVS commit: src/sys/net

2015-08-31 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 31 12:57:45 UTC 2015

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

Log Message:
#if __NetBSD__ -> #if defined(__NetBSD__)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net/if_llatbl.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/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.2 src/sys/net/if_llatbl.c:1.3
--- src/sys/net/if_llatbl.c:1.2	Mon Aug 31 08:05:20 2015
+++ src/sys/net/if_llatbl.c	Mon Aug 31 12:57:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.2 2015/08/31 08:05:20 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.3 2015/08/31 12:57:45 pooka Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -373,7 +373,7 @@ lltable_free(struct lltable *llt)
 	LIST_FOREACH_SAFE(lle, , lle_chain, next) {
 		if (callout_stop(>la_timer))
 			LLE_REMREF(lle);
-#if __NetBSD__
+#if defined(__NetBSD__)
 		/* XXX should have callback? */
 		if (lle->la_rt != NULL)
 			rtfree(lle->la_rt);



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

2015-08-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Aug 28 09:30:01 UTC 2015

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

Log Message:
Convert to __cpu_simple_lock_nv_t.  Somehow missed alpha in the earlier
commit.  Thanks to uebs for pointing it out.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/include/types.h

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

Modified files:

Index: src/sys/arch/alpha/include/types.h
diff -u src/sys/arch/alpha/include/types.h:1.50 src/sys/arch/alpha/include/types.h:1.51
--- src/sys/arch/alpha/include/types.h:1.50	Thu Jan  8 22:27:17 2015
+++ src/sys/arch/alpha/include/types.h	Fri Aug 28 09:30:01 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.50 2015/01/08 22:27:17 riastradh Exp $ */
+/* $NetBSD: types.h,v 1.51 2015/08/28 09:30:01 pooka Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -63,7 +63,7 @@ typedef long int	register_t;
 #define	PRIxREGISTER	lx
 #endif
 
-typedef	volatile int		__cpu_simple_lock_t;
+typedef	int		__cpu_simple_lock_nv_t;
 
 #define	__SIMPLELOCK_LOCKED	1
 #define	__SIMPLELOCK_UNLOCKED	0



CVS commit: src/doc

2015-08-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Aug 27 12:32:05 UTC 2015

Modified Files:
src/doc: HACKS

Log Message:
update c++/volatile/constexpr entry


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.161 src/doc/HACKS:1.162
--- src/doc/HACKS:1.161	Thu Jul 23 08:03:25 2015
+++ src/doc/HACKS	Thu Aug 27 12:32:05 2015
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.161 2015/07/23 08:03:25 mrg Exp $
+# $NetBSD: HACKS,v 1.162 2015/08/27 12:32:05 pooka Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -381,11 +381,10 @@ descr
 	used in the link(2) system call.
 kcah
 
-hack	g++ 5.1 barfs on volatile in initializers
-cdata	26 Jun 2015
+hack	g++ 5.x barfs on volatile in constexpr initializers
+cdata	27 Aug 2015
 who	pooka
-file	src/lib/libpthread/pthread_types.h	: 1.14
-file	src/lib/libpthread/pthread_types.h	: 1.15
+file	src/lib/libpthread/pthread_types.h	: 1.17
 pr	lib/49989
 descr
 	Trying to use e.g. pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER



CVS commit: src

2015-08-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Aug 27 12:30:51 UTC 2015

Modified Files:
src/lib/libpthread: pthread_types.h
src/sys/arch/aarch64/include: types.h
src/sys/arch/amd64/include: types.h
src/sys/arch/arm/include: types.h
src/sys/arch/hppa/include: types.h
src/sys/arch/i386/include: types.h
src/sys/arch/ia64/include: types.h
src/sys/arch/m68k/include: types.h
src/sys/arch/mips/include: types.h
src/sys/arch/or1k/include: types.h
src/sys/arch/powerpc/include: types.h
src/sys/arch/riscv/include: types.h
src/sys/arch/sh3/include: types.h
src/sys/arch/sparc/include: types.h
src/sys/arch/usermode/include: types.h
src/sys/arch/vax/include: types.h
src/sys/sys: types.h

Log Message:
Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libpthread/pthread_types.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/include/types.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/amd64/include/types.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/include/types.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hppa/include/types.h
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/i386/include/types.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/include/types.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/m68k/include/types.h
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/include/types.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/or1k/include/types.h
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/types.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sh3/include/types.h
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sparc/include/types.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/include/types.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/vax/include/types.h
cvs rdiff -u -r1.94 -r1.95 src/sys/sys/types.h

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

Modified files:

Index: src/lib/libpthread/pthread_types.h
diff -u src/lib/libpthread/pthread_types.h:1.16 src/lib/libpthread/pthread_types.h:1.17
--- src/lib/libpthread/pthread_types.h:1.16	Fri Jun 26 11:25:22 2015
+++ src/lib/libpthread/pthread_types.h	Thu Aug 27 12:30:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_types.h,v 1.16 2015/06/26 11:25:22 pooka Exp $	*/
+/*	$NetBSD: pthread_types.h,v 1.17 2015/08/27 12:30:50 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
@@ -35,8 +35,19 @@
 /*
  * We use the pthread_spin_t name internally; pthread_spinlock_t is the
  * POSIX spinlock object. 
+ *
+ * C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
+ * This does not work for volatile types.  Since C++ does not touch the guts
+ * of those types, we do not include volatile in the C++ definitions.
  */
-typedef __cpu_simple_lock_t	pthread_spin_t;
+typedef __cpu_simple_lock_t pthread_spin_t;
+#ifdef __cplusplus
+typedef __cpu_simple_lock_nv_t __pthread_spin_t;
+#define __pthread_volatile
+#else
+typedef pthread_spin_t __pthread_spin_t;
+#define __pthread_volatile volatile
+#endif
 
 /*
  * Copied from PTQ_HEAD in pthread_queue.h
@@ -100,16 +111,16 @@ struct	__pthread_attr_st {
 #endif
 struct	__pthread_mutex_st {
 	unsigned int	ptm_magic;
-	pthread_spin_t	ptm_errorcheck;
+	__pthread_spin_t ptm_errorcheck;
 #ifdef __CPU_SIMPLE_LOCK_PAD
 	uint8_t		ptm_pad1[3];
 #endif
-	pthread_spin_t	ptm_interlock;	/* unused - backwards compat */
+	__pthread_spin_t ptm_interlock;	/* unused - backwards compat */
 #ifdef __CPU_SIMPLE_LOCK_PAD
 	uint8_t		ptm_pad2[3];
 #endif
-	volatile pthread_t ptm_owner;
-	pthread_t * volatile ptm_waiters;
+	__pthread_volatile pthread_t ptm_owner;
+	pthread_t * __pthread_volatile ptm_waiters;
 	unsigned int	ptm_recursed;
 	void		*ptm_spare2;	/* unused - backwards compat */
 };
@@ -145,7 +156,7 @@ struct	__pthread_cond_st {
 	unsigned int	ptc_magic;
 
 	/* Protects the queue of waiters */
-	pthread_spin_t	ptc_lock;
+	__pthread_spin_t ptc_lock;
 	pthread_queue_t	ptc_waiters;
 
 	pthread_mutex_t	*ptc_mutex;	/* Current mutex */
@@ -179,7 +190,7 @@ struct	__pthread_once_st {
 
 struct	__pthread_spinlock_st {
 	unsigned int	pts_magic;
-	pthread_spin_t	

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

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:53:25 UTC 2015

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

Log Message:
initialize ncpuonline


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/sys/rump/librump/rumpkern/rump.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.323 src/sys/rump/librump/rumpkern/rump.c:1.324
--- src/sys/rump/librump/rumpkern/rump.c:1.323	Tue Aug 25 14:52:59 2015
+++ src/sys/rump/librump/rumpkern/rump.c	Tue Aug 25 14:53:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.323 2015/08/25 14:52:59 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.324 2015/08/25 14:53:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.323 2015/08/25 14:52:59 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.324 2015/08/25 14:53:25 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -384,6 +384,7 @@ rump_init(void)
 
 		aprint_verbose(cpu%d at thinair0: rump virtual cpu\n, i);
 	}
+	ncpuonline = ncpu;
 
 	/* Once all CPUs are detected, initialize the per-CPU cprng_fast.  */
 	cprng_fast_init();



CVS commit: src/sys/kern

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:32:34 UTC 2015

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

Log Message:
hw nodes do not go under the kern tree, so add new init routine for them


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/init_sysctl_base.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/init_sysctl_base.c
diff -u src/sys/kern/init_sysctl_base.c:1.5 src/sys/kern/init_sysctl_base.c:1.6
--- src/sys/kern/init_sysctl_base.c:1.5	Tue Jul  7 13:07:10 2015
+++ src/sys/kern/init_sysctl_base.c	Tue Aug 25 14:32:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl_base.c,v 1.5 2015/07/07 13:07:10 justin Exp $ */
+/*	$NetBSD: init_sysctl_base.c,v 1.6 2015/08/25 14:32:34 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl_base.c,v 1.5 2015/07/07 13:07:10 justin Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl_base.c,v 1.6 2015/08/25 14:32:34 pooka Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -181,6 +181,11 @@ SYSCTL_SETUP(sysctl_kernbase_setup, sys
 		   SYSCTL_DESCR(Raw partition of a disk),
 		   NULL, RAW_PART, NULL, 0,
 		   CTL_KERN, KERN_RAWPARTITION, CTL_EOL);
+}
+
+SYSCTL_SETUP(sysctl_hwbase_setup, sysctl hw subtree base setup)
+{
+
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRING, machine,



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

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:47:27 UTC 2015

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

Log Message:
add cpu_getmodel()


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/rump/librump/rumpkern/emul.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.172 src/sys/rump/librump/rumpkern/emul.c:1.173
--- src/sys/rump/librump/rumpkern/emul.c:1.172	Fri Jul 24 14:11:11 2015
+++ src/sys/rump/librump/rumpkern/emul.c	Tue Aug 25 14:47:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.172 2015/07/24 14:11:11 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.173 2015/08/25 14:47:26 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.172 2015/07/24 14:11:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.173 2015/08/25 14:47:26 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -392,3 +392,10 @@ cpu_reboot(int howto, char *bootstr)
 	rump_sysproxy_fini(finiarg);
 	rumpuser_exit(ruhow);
 }
+
+const char *
+cpu_getmodel(void)
+{
+
+	return rumpcore (virtual);
+}



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

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:52:59 UTC 2015

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

Log Message:
remove mksysctls(), now provided by init_sysctl_base


To generate a diff of this commit:
cvs rdiff -u -r1.322 -r1.323 src/sys/rump/librump/rumpkern/rump.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.322 src/sys/rump/librump/rumpkern/rump.c:1.323
--- src/sys/rump/librump/rumpkern/rump.c:1.322	Tue Jul  7 12:38:02 2015
+++ src/sys/rump/librump/rumpkern/rump.c	Tue Aug 25 14:52:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.322 2015/07/07 12:38:02 justin Exp $	*/
+/*	$NetBSD: rump.c,v 1.323 2015/08/25 14:52:59 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.322 2015/07/07 12:38:02 justin Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.323 2015/08/25 14:52:59 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -133,25 +133,6 @@ rump_proc_vfs_release_fn rump_proc_vfs_r
 
 static void add_linkedin_modules(const struct modinfo *const *, size_t);
 
-/*
- * Create some sysctl nodes.  why only this you ask.  well, init_sysctl
- * is a kitchen sink in need of some gardening.  but i want to use
- * others today.  Furthermore, creating a whole kitchen sink full of
- * sysctl nodes is a waste of cycles for rump kernel bootstrap.
- */
-static void
-mksysctls(void)
-{
-
-	/* hw.pagesize */
-	sysctl_createv(NULL, 0, NULL, NULL,
-	CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-	CTLTYPE_INT, pagesize,
-	SYSCTL_DESCR(Software page size),
-	NULL, PAGE_SIZE, NULL, 0,
-	CTL_HW, HW_PAGESIZE, CTL_EOL);
-}
-
 static pid_t rspo_wrap_getpid(void) {
 	return rump_sysproxy_hyp_getpid();
 }
@@ -412,7 +393,6 @@ rump_init(void)
 
 	rnd_init_softint();
 
-	mksysctls();
 	kqueue_init();
 	iostat_init();
 	fd_sys_init();



CVS commit: src/lib/librumphijack

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 13:50:19 UTC 2015

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Remember that dlsym() tends to fail on PowerPC during init (or at least
tended), so call rumphijack_dlsym() instead to be safe.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.118 src/lib/librumphijack/hijack.c:1.119
--- src/lib/librumphijack/hijack.c:1.118	Tue Aug 25 13:45:00 2015
+++ src/lib/librumphijack/hijack.c	Tue Aug 25 13:50:19 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.118 2015/08/25 13:45:00 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.119 2015/08/25 13:50:19 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include rump/rumpuser_port.h
 
 #if !defined(lint)
-__RCSID($NetBSD: hijack.c,v 1.118 2015/08/25 13:45:00 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.119 2015/08/25 13:50:19 pooka Exp $);
 #endif
 
 #include sys/param.h
@@ -2235,7 +2235,7 @@ mmap(void *addr, size_t len, int prot, i
 		return MAP_FAILED;
 	}
 	if (__predict_false(host_mmap == NULL)) {
-		host_mmap = dlsym(RTLD_NEXT, mmap);
+		host_mmap = rumphijack_dlsym(RTLD_NEXT, mmap);
 	}
 	return host_mmap(addr, len, prot, flags, fd, offset);
 }



CVS commit: src/sys/kern

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:52:31 UTC 2015

Modified Files:
src/sys/kern: init_sysctl.c init_sysctl_base.c

Log Message:
Move a bunch of sysctl nodes from init_sysctl (kitchen sink sysctl file)
to init_sysctl_base (only base kernel defs).  Main motivation was to
fix sysconf(_SC_NPROCESSORS) for Rumprun.  As reported by neeraj on irc,
it returned -1 before this fix, so we were doing imaginary computing.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/init_sysctl.c
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/init_sysctl_base.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/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.208 src/sys/kern/init_sysctl.c:1.209
--- src/sys/kern/init_sysctl.c:1.208	Tue Jul  7 12:38:02 2015
+++ src/sys/kern/init_sysctl.c	Tue Aug 25 14:52:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.208 2015/07/07 12:38:02 justin Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.209 2015/08/25 14:52:31 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.208 2015/07/07 12:38:02 justin Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.209 2015/08/25 14:52:31 pooka Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd.h
@@ -607,82 +607,27 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl 
 			CTL_CREATE, CTL_EOL);
 }
 
-SYSCTL_SETUP(sysctl_hw_setup, sysctl hw subtree setup)
+SYSCTL_SETUP(sysctl_hw_misc_setup, sysctl hw subtree misc setup)
 {
-	u_int u;
-	u_quad_t q;
-	const char *model = cpu_getmodel();
 
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
-		   CTLTYPE_STRING, model,
-		   SYSCTL_DESCR(Machine model),
-		   NULL, 0, __UNCONST(model), 0,
-		   CTL_HW, HW_MODEL, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_INT, ncpu,
-		   SYSCTL_DESCR(Number of CPUs configured),
-		   NULL, 0, ncpu, 0,
-		   CTL_HW, HW_NCPU, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-		   CTLTYPE_INT, byteorder,
-		   SYSCTL_DESCR(System byte order),
-		   NULL, BYTE_ORDER, NULL, 0,
-		   CTL_HW, HW_BYTEORDER, CTL_EOL);
-	u = ((u_int)physmem  (UINT_MAX / PAGE_SIZE)) ?
-		UINT_MAX : physmem * PAGE_SIZE;
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-		   CTLTYPE_INT, physmem,
-		   SYSCTL_DESCR(Bytes of physical memory),
-		   NULL, u, NULL, 0,
-		   CTL_HW, HW_PHYSMEM, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
 		   CTLTYPE_INT, usermem,
 		   SYSCTL_DESCR(Bytes of non-kernel memory),
 		   sysctl_hw_usermem, 0, NULL, 0,
 		   CTL_HW, HW_USERMEM, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-		   CTLTYPE_INT, pagesize,
-		   SYSCTL_DESCR(Software page size),
-		   NULL, PAGE_SIZE, NULL, 0,
-		   CTL_HW, HW_PAGESIZE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-		   CTLTYPE_INT, alignbytes,
-		   SYSCTL_DESCR(Alignment constraint for all possible 
-data types),
-		   NULL, ALIGNBYTES, NULL, 0,
-		   CTL_HW, HW_ALIGNBYTES, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE|CTLFLAG_HEX,
 		   CTLTYPE_STRING, cnmagic,
 		   SYSCTL_DESCR(Console magic key sequence),
 		   sysctl_hw_cnmagic, 0, NULL, CNS_LEN,
 		   CTL_HW, HW_CNMAGIC, CTL_EOL);
-	q = (u_quad_t)physmem * PAGE_SIZE;
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
-		   CTLTYPE_QUAD, physmem64,
-		   SYSCTL_DESCR(Bytes of physical memory),
-		   NULL, q, NULL, 0,
-		   CTL_HW, HW_PHYSMEM64, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_QUAD, usermem64,
 		   SYSCTL_DESCR(Bytes of non-kernel memory),
 		   sysctl_hw_usermem, 0, NULL, 0,
 		   CTL_HW, HW_USERMEM64, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_INT, ncpuonline,
-		   SYSCTL_DESCR(Number of CPUs online),
-		   NULL, 0, ncpuonline, 0,
-		   CTL_HW, HW_NCPUONLINE, CTL_EOL);
 }
 
 #ifdef DEBUG

Index: src/sys/kern/init_sysctl_base.c
diff -u src/sys/kern/init_sysctl_base.c:1.6 src/sys/kern/init_sysctl_base.c:1.7
--- src/sys/kern/init_sysctl_base.c:1.6	Tue Aug 25 14:32:34 2015
+++ src/sys/kern/init_sysctl_base.c	Tue Aug 25 14:52:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl_base.c,v 1.6 2015/08/25 14:32:34 pooka Exp $ */
+/*	$NetBSD: init_sysctl_base.c,v 1.7 2015/08/25 14:52:31 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD 

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

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 14:47:40 UTC 2015

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

Log Message:
add ncpuonline


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpkern/scheduler.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.40 src/sys/rump/librump/rumpkern/scheduler.c:1.41
--- src/sys/rump/librump/rumpkern/scheduler.c:1.40	Wed Apr 22 16:01:07 2015
+++ src/sys/rump/librump/rumpkern/scheduler.c	Tue Aug 25 14:47:39 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.40 2015/04/22 16:01:07 pooka Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.41 2015/08/25 14:47:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.40 2015/04/22 16:01:07 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.41 2015/08/25 14:47:39 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -72,7 +72,7 @@ static struct rumpcpu {
 struct cpu_info *rump_cpu = rump_cpus[0];
 kcpuset_t *kcpuset_attached = NULL;
 kcpuset_t *kcpuset_running = NULL;
-int ncpu;
+int ncpu, ncpuonline;
 
 #define RCPULWP_BUSY	((void *)-1)
 #define RCPULWP_WANTED	((void *)-2)



CVS commit: src/sys/dev/dkwedge

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 11:08:59 UTC 2015

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Rename variable to avoid -Wshadow warnings with some compilers.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.82 src/sys/dev/dkwedge/dk.c:1.83
--- src/sys/dev/dkwedge/dk.c:1.82	Sat Aug 22 07:48:14 2015
+++ src/sys/dev/dkwedge/dk.c	Tue Aug 25 11:08:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.82 2015/08/22 07:48:14 mlelstv Exp $	*/
+/*	$NetBSD: dk.c,v 1.83 2015/08/25 11:08:59 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.82 2015/08/22 07:48:14 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.83 2015/08/25 11:08:59 pooka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_dkwedge.h
@@ -949,7 +949,7 @@ dkwedge_read(struct disk *pdk, struct vn
 	int error;
 	bool isopen;
 	dev_t bdev;
-	struct vnode *bdevvp;
+	struct vnode *bdvp;
 
 	/*
 	 * The kernel cannot read from a character device vnode
@@ -968,17 +968,17 @@ dkwedge_read(struct disk *pdk, struct vn
 		KASSERT(pdk-dk_rawvp != NULL);
 		isopen = true;
 		++pdk-dk_rawopens;
-		bdevvp = pdk-dk_rawvp;
+		bdvp = pdk-dk_rawvp;
 	} else {
 		isopen = false;
-		bdevvp = dk_open_parent(bdev, FREAD);
+		bdvp = dk_open_parent(bdev, FREAD);
 	}
 	mutex_exit(pdk-dk_rawlock);
 
-	if (bdevvp == NULL)
+	if (bdvp == NULL)
 		return EBUSY;
 
-	bp = getiobuf(bdevvp, true);
+	bp = getiobuf(bdvp, true);
 	bp-b_flags = B_READ;
 	bp-b_cflags = BC_BUSY;
 	bp-b_dev = bdev;
@@ -988,7 +988,7 @@ dkwedge_read(struct disk *pdk, struct vn
 	bp-b_cylinder = 0;
 	bp-b_error = 0;
 
-	VOP_STRATEGY(bdevvp, bp);
+	VOP_STRATEGY(bdvp, bp);
 	error = biowait(bp);
 	putiobuf(bp);
 
@@ -996,7 +996,7 @@ dkwedge_read(struct disk *pdk, struct vn
 	if (isopen) {
 		--pdk-dk_rawopens;
 	} else {
-		dk_close_parent(bdevvp, FREAD);
+		dk_close_parent(bdvp, FREAD);
 	}
 	mutex_exit(pdk-dk_rawlock);
 



CVS commit: src/lib/librumphijack

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 13:45:00 UTC 2015

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
allow mmap() to be called before init runs


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.117 src/lib/librumphijack/hijack.c:1.118
--- src/lib/librumphijack/hijack.c:1.117	Sat Apr 11 12:54:41 2015
+++ src/lib/librumphijack/hijack.c	Tue Aug 25 13:45:00 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.117 2015/04/11 12:54:41 riastradh Exp $	*/
+/*  $NetBSD: hijack.c,v 1.118 2015/08/25 13:45:00 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include rump/rumpuser_port.h
 
 #if !defined(lint)
-__RCSID($NetBSD: hijack.c,v 1.117 2015/04/11 12:54:41 riastradh Exp $);
+__RCSID($NetBSD: hijack.c,v 1.118 2015/08/25 13:45:00 pooka Exp $);
 #endif
 
 #include sys/param.h
@@ -885,7 +885,8 @@ rcinit(void)
 
 	host_fork = dlsym(RTLD_NEXT, fork);
 	host_daemon = dlsym(RTLD_NEXT, daemon);
-	host_mmap = dlsym(RTLD_NEXT, mmap);
+	if (host_mmap == NULL)
+		host_mmap = dlsym(RTLD_NEXT, mmap);
 
 	/*
 	 * In theory cannot print anything during lookups because
@@ -2233,6 +2234,9 @@ mmap(void *addr, size_t len, int prot, i
 		errno = ENOSYS;
 		return MAP_FAILED;
 	}
+	if (__predict_false(host_mmap == NULL)) {
+		host_mmap = dlsym(RTLD_NEXT, mmap);
+	}
 	return host_mmap(addr, len, prot, flags, fd, offset);
 }
 



CVS commit: src/lib/libpthread

2015-08-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 25 13:46:23 UTC 2015

Modified Files:
src/lib/libpthread: pthread_tsd.c

Log Message:
Revert 1.14 now that the arduous task of fixing rumphijack to allow
mmap() in early init has been completed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libpthread/pthread_tsd.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/libpthread/pthread_tsd.c
diff -u src/lib/libpthread/pthread_tsd.c:1.14 src/lib/libpthread/pthread_tsd.c:1.15
--- src/lib/libpthread/pthread_tsd.c:1.14	Sat May 30 14:42:26 2015
+++ src/lib/libpthread/pthread_tsd.c	Tue Aug 25 13:46:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_tsd.c,v 1.14 2015/05/30 14:42:26 christos Exp $	*/
+/*	$NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_tsd.c,v 1.14 2015/05/30 14:42:26 christos Exp $);
+__RCSID($NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $);
 
 /* Functions and structures dealing with thread-specific data */
 #include errno.h
@@ -60,9 +60,6 @@ null_destructor(void *p)
 #include stdlib.h
 #include stdio.h
 
-/* Can't use mmap directly so early in the process because rump hijacks it */
-void *_mmap(void *, size_t, int, int, int, off_t);
-
 void *
 pthread_tsd_init(size_t *tlen)
 {
@@ -88,7 +85,7 @@ pthread_tsd_init(size_t *tlen)
 	+ sizeof(*pthread__tsd_list) * pthread_keys_max
 	+ sizeof(*pthread__tsd_destructors) * pthread_keys_max;
 
-	arena = _mmap(NULL, alen, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
+	arena = mmap(NULL, alen, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
 	if (arena == MAP_FAILED) {
 		pthread_keys_max = 0;
 		return NULL;



CVS commit: src/sys

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 16:07:11 UTC 2015

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.287 -r1.288 src/sys/kern/syscalls.c
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/syscalls_autoload.c
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/systrace_args.c
cvs rdiff -u -r1.88 -r1.89 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.113 -r1.114 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.282 -r1.283 src/sys/sys/syscall.h
cvs rdiff -u -r1.266 -r1.267 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.298 src/sys/kern/init_sysent.c:1.299
--- src/sys/kern/init_sysent.c:1.298	Thu Jun 18 15:19:50 2015
+++ src/sys/kern/init_sysent.c	Mon Aug 24 16:07:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysent.c,v 1.298 2015/06/18 15:19:50 pooka Exp $ */
+/* $NetBSD: init_sysent.c,v 1.299 2015/08/24 16:07:10 pooka Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.298 2015/06/18 15:19:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.299 2015/08/24 16:07:10 pooka Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.287 src/sys/kern/syscalls.c:1.288
--- src/sys/kern/syscalls.c:1.287	Thu Jun 18 15:19:50 2015
+++ src/sys/kern/syscalls.c	Mon Aug 24 16:07:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls.c,v 1.287 2015/06/18 15:19:50 pooka Exp $ */
+/* $NetBSD: syscalls.c,v 1.288 2015/08/24 16:07:10 pooka Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.287 2015/06/18 15:19:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.288 2015/08/24 16:07:10 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/kern/syscalls_autoload.c
diff -u src/sys/kern/syscalls_autoload.c:1.5 src/sys/kern/syscalls_autoload.c:1.6
--- src/sys/kern/syscalls_autoload.c:1.5	Thu Jun 18 15:19:50 2015
+++ src/sys/kern/syscalls_autoload.c	Mon Aug 24 16:07:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls_autoload.c,v 1.5 2015/06/18 15:19:50 pooka Exp $ */
+/* $NetBSD: syscalls_autoload.c,v 1.6 2015/08/24 16:07:10 pooka Exp $ */
 
 /*
  * System call autoload table.
@@ -8,7 +8,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.5 2015/06/18 15:19:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.6 2015/08/24 16:07:10 pooka Exp $);
 
 static struct {
 	u_int		al_code;

Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.6 src/sys/kern/systrace_args.c:1.7
--- src/sys/kern/systrace_args.c:1.6	Wed May 13 02:13:08 2015
+++ src/sys/kern/systrace_args.c	Mon Aug 24 16:07:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.6 2015/05/13 02:13:08 pgoyette Exp $ */
+/* $NetBSD: systrace_args.c,v 1.7 2015/08/24 16:07:10 pooka Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.88 src/sys/rump/include/rump/rump_syscalls.h:1.89
--- src/sys/rump/include/rump/rump_syscalls.h:1.88	Thu Jun 18 15:19:51 2015
+++ src/sys/rump/include/rump/rump_syscalls.h	Mon Aug 24 16:07:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.88 2015/06/18 15:19:51 pooka Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.89 2015/08/24 16:07:11 pooka Exp $ */
 
 /*
  * System call protos in rump namespace.

Index: src/sys/rump/librump/rumpkern/rump_syscalls.c
diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.113 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.114
--- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.113	Thu Jun 18 15:19:50 2015
+++ src/sys/rump/librump/rumpkern/rump_syscalls.c	Mon Aug 24 16:07:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.c,v 1.113 2015/06/18 15:19:50 pooka Exp $ */
+/* $NetBSD: rump_syscalls.c,v 1.114 2015/08/24 16:07:11 pooka Exp $ */
 
 /*
  * System call vector and marshalling for rump.
@@ -15,7 +15,7 @@
 
 #ifdef __NetBSD__
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.113 2015/06/18 15:19:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.114 2015/08/24 16:07:11 pooka Exp $);
 
 #include sys/fstypes.h
 #include sys/proc.h

Index: src/sys/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.282 src/sys/sys/syscall.h:1.283
--- src/sys/sys/syscall.h:1.282	Thu Jun 18 15:19:50 2015
+++ 

CVS commit: src/sys/kern

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 16:05:46 UTC 2015

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

Log Message:
sys/mount.h is necessary only with !RUMP_CLIENT, so include it only
in that case.  Fixes build for Hurd (which does not provide sys/mount.h)

from r...@gnu.org


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/syscalls.conf

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

Modified files:

Index: src/sys/kern/syscalls.conf
diff -u src/sys/kern/syscalls.conf:1.23 src/sys/kern/syscalls.conf:1.24
--- src/sys/kern/syscalls.conf:1.23	Sat May  9 05:57:18 2015
+++ src/sys/kern/syscalls.conf	Mon Aug 24 16:05:46 2015
@@ -1,11 +1,11 @@
-#	$NetBSD: syscalls.conf,v 1.23 2015/05/09 05:57:18 pgoyette Exp $
+#	$NetBSD: syscalls.conf,v 1.24 2015/08/24 16:05:46 pooka Exp $
 
 sysnames=syscalls.c
 sysnumhdr=../sys/syscall.h
 syssw=init_sysent.c
 systrace=systrace_args.c
 sysarghdr=../sys/syscallargs.h
-sysarghdrextra='#include sys/mount.h\n#ifndef RUMP_CLIENT\n#include sys/sched.h\n#endif\n#include sys/socket.h\n\n'
+sysarghdrextra='#ifndef RUMP_CLIENT\n#include sys/mount.h\n#include sys/sched.h\n#endif\n#include sys/socket.h\n\n'
 sysautoload=syscalls_autoload.c
 sysalign=1
 rumpcalls=../rump/librump/rumpkern/rump_syscalls.c



CVS commit: src/sys/rump

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 18:17:05 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Remove unnecessary DPSRCS+=

-imacros automatically results in a dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/rump/Makefile.rump

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/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.115 src/sys/rump/Makefile.rump:1.116
--- src/sys/rump/Makefile.rump:1.115	Mon Aug 24 09:45:44 2015
+++ src/sys/rump/Makefile.rump	Mon Aug 24 18:17:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.115 2015/08/24 09:45:44 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.116 2015/08/24 18:17:04 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -131,7 +131,6 @@ CPPFLAGS+=	-DPPC_OEA
 
 # If any of these files change, we need a full rebuild
 DPSRCS+=	${RUMPTOP}/Makefile.rump
-DPSRCS+=	${RUMPTOP}/include/opt/opt_rumpkernel.h
 
 #
 # Support for component-specific hypercalls



CVS commit: src/sys/rump

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 09:45:45 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Use BUILDRUMP_IMACROS if specified.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/rump/Makefile.rump

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/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.114 src/sys/rump/Makefile.rump:1.115
--- src/sys/rump/Makefile.rump:1.114	Fri Aug 21 12:39:07 2015
+++ src/sys/rump/Makefile.rump	Mon Aug 24 09:45:44 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.114 2015/08/21 12:39:07 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.115 2015/08/24 09:45:44 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -46,6 +46,9 @@ CFLAGS+=	-ffreestanding -fno-strict-alia
 CWARNFLAGS+=	-Wno-format-zero-length -Wno-pointer-sign
 
 CPPFLAGS+=	-imacros ${RUMPTOP}/include/opt/opt_rumpkernel.h
+.ifdef BUILDRUMP_IMACROS
+CPPFLAGS+=	-imacros ${BUILDRUMP_IMACROS}
+.endif
 
 CPPFLAGS+=	-I${.CURDIR} -I.
 CPPFLAGS+=	-I${RUMPTOP}/../../common/include



CVS commit: src/sys/net80211

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 20:58:47 UTC 2015

Modified Files:
src/sys/net80211: ieee80211_amrr.c

Log Message:
+ include opt_inet.h for INET (or lack thereof)
+ include net/in_ether.h, not netinet/in_ether.h
  (did not cause a meltdown only because opt_inet.h was missing)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net80211/ieee80211_amrr.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/net80211/ieee80211_amrr.c
diff -u src/sys/net80211/ieee80211_amrr.c:1.2 src/sys/net80211/ieee80211_amrr.c:1.3
--- src/sys/net80211/ieee80211_amrr.c:1.2	Tue Dec 11 12:40:10 2007
+++ src/sys/net80211/ieee80211_amrr.c	Mon Aug 24 20:58:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_amrr.c,v 1.2 2007/12/11 12:40:10 lukem Exp $	*/
+/*	$NetBSD: ieee80211_amrr.c,v 1.3 2015/08/24 20:58:47 pooka Exp $	*/
 /*	$OpenBSD: ieee80211_amrr.c,v 1.1 2006/06/17 19:07:19 damien Exp $	*/
 
 /*-
@@ -19,7 +19,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ieee80211_amrr.c,v 1.2 2007/12/11 12:40:10 lukem Exp $);
+__KERNEL_RCSID(0, $NetBSD: ieee80211_amrr.c,v 1.3 2015/08/24 20:58:47 pooka Exp $);
+
+#ifdef _KERNEL_OPT
+#include opt_inet.h
+#endif
 
 #include sys/param.h
 #include sys/kernel.h
@@ -27,11 +31,11 @@ __KERNEL_RCSID(0, $NetBSD: ieee80211_am
 #include sys/sysctl.h
 
 #include net/if.h
+#include net/if_ether.h
 #include net/if_media.h
 
 #ifdef INET
 #include netinet/in.h
-#include netinet/if_ether.h
 #endif
 
 #include net80211/ieee80211.h



CVS commit: src/sys/rump

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 22:25:50 UTC 2015

Modified Files:
src/sys/rump/include/opt: opt_rumpkernel.h
Removed Files:
src/sys/rump/librump/rumpkern/opt: rnd.h
src/sys/rump/librump/rumpnet/opt: opt_atalk.h opt_dccp.h opt_inet.h
opt_inet6.h opt_mbuftrace.h opt_natm.h opt_pipe.h opt_route.h
opt_sb_max.h opt_sock_counters.h opt_somaxkva.h opt_sosend_loan.h
src/sys/rump/net/lib/libnet/opt: opt_mpls.h opt_net_mpsafe.h
opt_pfil_hooks.h opt_pppoe.h opt_route.h
src/sys/rump/net/lib/libnetinet/opt: opt_eon.h opt_gateway.h
opt_inet_conf.h opt_inet_csum.h opt_ipsec.h opt_mrouting.h
opt_pim.h opt_tcp_compat_42.h opt_tcp_congctl.h opt_tcp_debug.h
opt_tcp_space.h opt_wlan.h rnd.h

Log Message:
Remove a bunch of opt files.

It's a cute idea to have component-specific opt files, but also a
completely stupid one since there's no way of knowing how options
transcend component boundaries, and therefore if a set of options is
conflicting or not.  So, just continue concentrating all of opt_foo.h in
opt_rumpkernel.h in accordance with the monolithic opt model.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/opt/opt_rumpkernel.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rumpkern/opt/rnd.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rumpnet/opt/opt_atalk.h \
src/sys/rump/librump/rumpnet/opt/opt_dccp.h \
src/sys/rump/librump/rumpnet/opt/opt_inet6.h \
src/sys/rump/librump/rumpnet/opt/opt_mbuftrace.h \
src/sys/rump/librump/rumpnet/opt/opt_natm.h \
src/sys/rump/librump/rumpnet/opt/opt_pipe.h \
src/sys/rump/librump/rumpnet/opt/opt_route.h \
src/sys/rump/librump/rumpnet/opt/opt_sb_max.h \
src/sys/rump/librump/rumpnet/opt/opt_sock_counters.h \
src/sys/rump/librump/rumpnet/opt/opt_somaxkva.h \
src/sys/rump/librump/rumpnet/opt/opt_sosend_loan.h
cvs rdiff -u -r1.4 -r0 src/sys/rump/librump/rumpnet/opt/opt_inet.h
cvs rdiff -u -r1.3 -r0 src/sys/rump/net/lib/libnet/opt/opt_mpls.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libnet/opt/opt_net_mpsafe.h \
src/sys/rump/net/lib/libnet/opt/opt_pfil_hooks.h \
src/sys/rump/net/lib/libnet/opt/opt_pppoe.h \
src/sys/rump/net/lib/libnet/opt/opt_route.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/net/lib/libnetinet/opt/opt_eon.h \
src/sys/rump/net/lib/libnetinet/opt/opt_gateway.h \
src/sys/rump/net/lib/libnetinet/opt/opt_inet_conf.h \
src/sys/rump/net/lib/libnetinet/opt/opt_inet_csum.h \
src/sys/rump/net/lib/libnetinet/opt/opt_ipsec.h \
src/sys/rump/net/lib/libnetinet/opt/opt_mrouting.h \
src/sys/rump/net/lib/libnetinet/opt/opt_pim.h \
src/sys/rump/net/lib/libnetinet/opt/opt_tcp_compat_42.h \
src/sys/rump/net/lib/libnetinet/opt/opt_tcp_congctl.h \
src/sys/rump/net/lib/libnetinet/opt/opt_tcp_debug.h \
src/sys/rump/net/lib/libnetinet/opt/opt_tcp_space.h \
src/sys/rump/net/lib/libnetinet/opt/opt_wlan.h \
src/sys/rump/net/lib/libnetinet/opt/rnd.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/rump/include/opt/opt_rumpkernel.h
diff -u src/sys/rump/include/opt/opt_rumpkernel.h:1.1 src/sys/rump/include/opt/opt_rumpkernel.h:1.2
--- src/sys/rump/include/opt/opt_rumpkernel.h:1.1	Fri Aug 21 12:39:07 2015
+++ src/sys/rump/include/opt/opt_rumpkernel.h	Mon Aug 24 22:25:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: opt_rumpkernel.h,v 1.1 2015/08/21 12:39:07 pooka Exp $	*/
+/*	$NetBSD: opt_rumpkernel.h,v 1.2 2015/08/24 22:25:50 pooka Exp $	*/
 
 #ifndef __NetBSD__
 #define __NetBSD__
@@ -12,3 +12,14 @@
 #define MAXUSERS 32
 
 #define DEBUGPRINT
+
+#define INET	1
+#define INET6	1
+#define GATEWAY	1
+
+#define MPLS	1
+
+#define SOSEND_NO_LOAN
+
+#undef PIPE_SOCKETPAIR /* would need uipc_usrreq.c */
+#define PIPE_NODIRECT



CVS commit: src/sys

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 22:21:27 UTC 2015

Modified Files:
src/sys/kern: uipc_mbuf.c uipc_socket.c uipc_socket2.c uipc_syscalls.c
src/sys/net: if_arcsubr.c if_atmsubr.c if_ecosubr.c if_etherip.c
if_ethersubr.c if_fddisubr.c if_gif.c if_gre.c if_hippisubr.c
if_ieee1394subr.c if_loop.c if_mpls.c if_ppp.c if_pppoe.c if_sl.c
if_srt.c if_stf.c if_strip.c if_tokensubr.c if_tun.c ppp_tty.c
radix.c route.c rtbl.c slcompress.c
src/sys/net/agr: if_agr.c if_agrsubr.c
src/sys/net80211: ieee80211.c ieee80211_crypto.c ieee80211_input.c
ieee80211_ioctl.c ieee80211_node.c ieee80211_output.c
ieee80211_proto.c
src/sys/netinet: dccp_cc_sw.c dccp_tcplike.c dccp_tfrc.c dccp_usrreq.c
if_arp.c if_atm.c igmp.c in.c in_gif.c in_pcb.c in_proto.c
in_selsrc.c ip_carp.c ip_ecn.c ip_encap.c ip_etherip.c ip_icmp.c
ip_input.c ip_mroute.c ip_output.c portalgo.c raw_ip.c
tcp_congctl.c tcp_debug.c tcp_input.c tcp_output.c tcp_sack.c
tcp_subr.c tcp_timer.c tcp_usrreq.c tcp_vtw.c udp_usrreq.c
src/sys/netinet6: dccp6_usrreq.c icmp6.c in6.c in6_gif.c in6_pcb.c
in6_proto.c in6_src.c ip6_etherip.c ip6_forward.c ip6_input.c
ip6_mroute.c ip6_output.c mld6.c nd6.c nd6_nbr.c raw_ip6.c
udp6_output.c udp6_usrreq.c
src/sys/netmpls: mpls_proto.c mpls_ttl.c mpls_var.h

Log Message:
sprinkle _KERNEL_OPT


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.245 -r1.246 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.121 -r1.122 src/sys/kern/uipc_socket2.c
cvs rdiff -u -r1.179 -r1.180 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.67 -r1.68 src/sys/net/if_arcsubr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/net/if_atmsubr.c
cvs rdiff -u -r1.43 -r1.44 src/sys/net/if_ecosubr.c \
src/sys/net/if_hippisubr.c
cvs rdiff -u -r1.36 -r1.37 src/sys/net/if_etherip.c
cvs rdiff -u -r1.211 -r1.212 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.92 -r1.93 src/sys/net/if_fddisubr.c
cvs rdiff -u -r1.87 -r1.88 src/sys/net/if_gif.c
cvs rdiff -u -r1.166 -r1.167 src/sys/net/if_gre.c
cvs rdiff -u -r1.49 -r1.50 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.82 -r1.83 src/sys/net/if_loop.c
cvs rdiff -u -r1.18 -r1.19 src/sys/net/if_mpls.c
cvs rdiff -u -r1.148 -r1.149 src/sys/net/if_ppp.c src/sys/net/route.c
cvs rdiff -u -r1.103 -r1.104 src/sys/net/if_pppoe.c
cvs rdiff -u -r1.120 -r1.121 src/sys/net/if_sl.c
cvs rdiff -u -r1.19 -r1.20 src/sys/net/if_srt.c
cvs rdiff -u -r1.81 -r1.82 src/sys/net/if_stf.c
cvs rdiff -u -r1.100 -r1.101 src/sys/net/if_strip.c
cvs rdiff -u -r1.69 -r1.70 src/sys/net/if_tokensubr.c
cvs rdiff -u -r1.122 -r1.123 src/sys/net/if_tun.c
cvs rdiff -u -r1.58 -r1.59 src/sys/net/ppp_tty.c
cvs rdiff -u -r1.44 -r1.45 src/sys/net/radix.c
cvs rdiff -u -r1.1 -r1.2 src/sys/net/rtbl.c
cvs rdiff -u -r1.38 -r1.39 src/sys/net/slcompress.c
cvs rdiff -u -r1.32 -r1.33 src/sys/net/agr/if_agr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/net/agr/if_agrsubr.c
cvs rdiff -u -r1.55 -r1.56 src/sys/net80211/ieee80211.c
cvs rdiff -u -r1.16 -r1.17 src/sys/net80211/ieee80211_crypto.c
cvs rdiff -u -r1.78 -r1.79 src/sys/net80211/ieee80211_input.c
cvs rdiff -u -r1.59 -r1.60 src/sys/net80211/ieee80211_ioctl.c
cvs rdiff -u -r1.68 -r1.69 src/sys/net80211/ieee80211_node.c
cvs rdiff -u -r1.52 -r1.53 src/sys/net80211/ieee80211_output.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net80211/ieee80211_proto.c
cvs rdiff -u -r1.1 -r1.2 src/sys/netinet/dccp_cc_sw.c \
src/sys/netinet/dccp_tcplike.c src/sys/netinet/dccp_tfrc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/netinet/dccp_usrreq.c
cvs rdiff -u -r1.172 -r1.173 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.35 -r1.36 src/sys/netinet/if_atm.c
cvs rdiff -u -r1.55 -r1.56 src/sys/netinet/igmp.c
cvs rdiff -u -r1.156 -r1.157 src/sys/netinet/in.c
cvs rdiff -u -r1.64 -r1.65 src/sys/netinet/in_gif.c
cvs rdiff -u -r1.161 -r1.162 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.112 -r1.113 src/sys/netinet/in_proto.c
cvs rdiff -u -r1.13 -r1.14 src/sys/netinet/in_selsrc.c \
src/sys/netinet/tcp_vtw.c
cvs rdiff -u -r1.61 -r1.62 src/sys/netinet/ip_carp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netinet/ip_ecn.c
cvs rdiff -u -r1.45 -r1.46 src/sys/netinet/ip_encap.c
cvs rdiff -u -r1.14 -r1.15 src/sys/netinet/ip_etherip.c
cvs rdiff -u -r1.140 -r1.141 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.323 -r1.324 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.131 -r1.132 src/sys/netinet/ip_mroute.c
cvs rdiff -u -r1.245 -r1.246 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.8 -r1.9 src/sys/netinet/portalgo.c
cvs rdiff -u -r1.152 -r1.153 src/sys/netinet/raw_ip.c
cvs rdiff -u -r1.19 -r1.20 src/sys/netinet/tcp_congctl.c
cvs rdiff -u -r1.28 -r1.29 src/sys/netinet/tcp_debug.c
cvs rdiff -u -r1.343 -r1.344 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.184 -r1.185 src/sys/netinet/tcp_output.c
cvs rdiff -u -r1.31 -r1.32 

CVS commit: src/sys/rump

2015-08-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 24 23:01:59 UTC 2015

Modified Files:
src/sys/rump/dev/lib: Makefile.inc
src/sys/rump/dev/lib/libsysmon: Makefile
src/sys/rump/dev/lib/libusb: Makefile
src/sys/rump/dev/lib/libwscons: Makefile
Added Files:
src/sys/rump/include/opt: sysmon_envsys.h sysmon_power.h sysmon_wdog.h
wsdisplay.h wskbd.h wsmouse.h wsmux.h
Removed Files:
src/sys/rump/dev/lib/libsysmon/opt: sysmon_envsys.h sysmon_power.h
sysmon_wdog.h
src/sys/rump/dev/lib/libusb/opt: opt_usb.h opt_usbverbose.h
src/sys/rump/dev/lib/libwscons/opt: opt_wsdisplay_compat.h wsdisplay.h
wskbd.h wsmouse.h wsmux.h
src/sys/rump/librump/rumpdev/opt: wsdisplay.h

Log Message:
continue consolidating non-modular option files


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/dev/lib/libsysmon/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libsysmon/opt/sysmon_envsys.h \
src/sys/rump/dev/lib/libsysmon/opt/sysmon_power.h \
src/sys/rump/dev/lib/libsysmon/opt/sysmon_wdog.h
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/dev/lib/libusb/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/lib/libusb/opt/opt_usb.h \
src/sys/rump/dev/lib/libusb/opt/opt_usbverbose.h
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libwscons/Makefile
cvs rdiff -u -r1.1 -r0 \
src/sys/rump/dev/lib/libwscons/opt/opt_wsdisplay_compat.h \
src/sys/rump/dev/lib/libwscons/opt/wskbd.h \
src/sys/rump/dev/lib/libwscons/opt/wsmouse.h \
src/sys/rump/dev/lib/libwscons/opt/wsmux.h
cvs rdiff -u -r1.2 -r0 src/sys/rump/dev/lib/libwscons/opt/wsdisplay.h
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/opt/sysmon_envsys.h \
src/sys/rump/include/opt/sysmon_power.h \
src/sys/rump/include/opt/sysmon_wdog.h \
src/sys/rump/include/opt/wsdisplay.h src/sys/rump/include/opt/wskbd.h \
src/sys/rump/include/opt/wsmouse.h src/sys/rump/include/opt/wsmux.h
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rumpdev/opt/wsdisplay.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/rump/dev/lib/Makefile.inc
diff -u src/sys/rump/dev/lib/Makefile.inc:1.3 src/sys/rump/dev/lib/Makefile.inc:1.4
--- src/sys/rump/dev/lib/Makefile.inc:1.3	Mon Mar  1 13:12:19 2010
+++ src/sys/rump/dev/lib/Makefile.inc	Mon Aug 24 23:01:58 2015
@@ -1,8 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.3 2010/03/01 13:12:19 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2015/08/24 23:01:58 pooka Exp $
 #
 
 RUMPTOP=	${.CURDIR}/../../..
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpdev \
-		-I${RUMPTOP}/librump/rumpdev/opt
+CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpdev
 
 .include ${RUMPTOP}/Makefile.rump

Index: src/sys/rump/dev/lib/libsysmon/Makefile
diff -u src/sys/rump/dev/lib/libsysmon/Makefile:1.6 src/sys/rump/dev/lib/libsysmon/Makefile:1.7
--- src/sys/rump/dev/lib/libsysmon/Makefile:1.6	Thu Mar 13 01:47:07 2014
+++ src/sys/rump/dev/lib/libsysmon/Makefile	Mon Aug 24 23:01:58 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2014/03/13 01:47:07 pooka Exp $
+#	$NetBSD: Makefile,v 1.7 2015/08/24 23:01:58 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/sysmon
@@ -12,7 +12,7 @@ SRCS=	sysmon_taskq.c sysmon_power.c sysm
 
 SRCS+=	sysmon_component.c
 
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs -I${.CURDIR}/opt
+CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs
 
 .include bsd.lib.mk
 .include bsd.klinks.mk

Index: src/sys/rump/dev/lib/libusb/Makefile
diff -u src/sys/rump/dev/lib/libusb/Makefile:1.7 src/sys/rump/dev/lib/libusb/Makefile:1.8
--- src/sys/rump/dev/lib/libusb/Makefile:1.7	Wed May 20 11:53:08 2015
+++ src/sys/rump/dev/lib/libusb/Makefile	Mon Aug 24 23:01:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2015/05/20 11:53:08 pooka Exp $
+#	$NetBSD: Makefile,v 1.8 2015/08/24 23:01:59 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/usb
@@ -17,7 +17,5 @@ SRCS=	dummy.c
 
 #CPPFLAGS+= -DUHUB_DEBUG
 
-CPPFLAGS+=	-I${.CURDIR}/opt
-
 .include bsd.lib.mk
 .include bsd.klinks.mk

Index: src/sys/rump/dev/lib/libwscons/Makefile
diff -u src/sys/rump/dev/lib/libwscons/Makefile:1.4 src/sys/rump/dev/lib/libwscons/Makefile:1.5
--- src/sys/rump/dev/lib/libwscons/Makefile:1.4	Thu Mar 13 01:48:08 2014
+++ src/sys/rump/dev/lib/libwscons/Makefile	Mon Aug 24 23:01:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/03/13 01:48:08 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2015/08/24 23:01:59 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/wscons
@@ -10,7 +10,7 @@ SRCS=   wsevent.c wskbd.c wskbdutil.c ws
 
 SRCS+=	wscons_component.c
 
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs -I${.CURDIR}/opt
+CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs
 
 .include bsd.lib.mk
 .include bsd.klinks.mk

Added files:

Index: src/sys/rump/include/opt/sysmon_envsys.h
diff -u /dev/null 

  1   2   3   4   5   6   7   8   9   10   >