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

2013-10-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct  5 07:00:42 UTC 2013

Modified Files:
src/sys/external/bsd/dwc2: dwctwo2netbsd

Log Message:
Better instructions


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/dwc2/dwctwo2netbsd

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwctwo2netbsd
diff -u src/sys/external/bsd/dwc2/dwctwo2netbsd:1.1 src/sys/external/bsd/dwc2/dwctwo2netbsd:1.2
--- src/sys/external/bsd/dwc2/dwctwo2netbsd:1.1	Thu Sep  5 20:25:27 2013
+++ src/sys/external/bsd/dwc2/dwctwo2netbsd	Sat Oct  5 07:00:41 2013
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: dwctwo2netbsd,v 1.1 2013/09/05 20:25:27 skrll Exp $
+#	$NetBSD: dwctwo2netbsd,v 1.2 2013/10/05 07:00:41 skrll Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,8 +36,9 @@
 #	$ cd /some/where/temporary
 #	$ git clone -b staging.next git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
 #	$ DWC2SRCS=$(pwd)/drivers/staging/dwc2
-#	$ cd /an/other/temporary
-#	$ sh /usr/src/sys/external/bsd/dwc2/dwctwo2netbsd $DWC2SRCS $(pwd)
+#	$ WRKDIR=/an/other/temporary
+#	$ sh /usr/src/sys/external/bsd/dwc2/dwctwo2netbsd $DWC2SRCS $WRKDIR
+#	$ cd $WRKDIR
 #	$ cvs -d cvs.netbsd.org:/cvsroot import -m "Import dwc2 $DATE" src/sys/external/bsd/dwc2/dist SYNOPSYS dwc2-$DATE
 #
 



CVS commit: src/sys/dev/usb

2013-10-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct  5 07:05:01 UTC 2013

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

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/uhidev.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/uhidev.c
diff -u src/sys/dev/usb/uhidev.c:1.57 src/sys/dev/usb/uhidev.c:1.58
--- src/sys/dev/usb/uhidev.c:1.57	Thu Sep 26 07:25:31 2013
+++ src/sys/dev/usb/uhidev.c	Sat Oct  5 07:05:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.c,v 1.57 2013/09/26 07:25:31 skrll Exp $	*/
+/*	$NetBSD: uhidev.c,v 1.58 2013/10/05 07:05:01 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.57 2013/09/26 07:25:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.58 2013/10/05 07:05:01 skrll Exp $");
 
 #include 
 #include 
@@ -87,7 +87,7 @@ extern struct cfdriver uhidev_cd;
 CFATTACH_DECL2_NEW(uhidev, sizeof(struct uhidev_softc), uhidev_match,
 uhidev_attach, uhidev_detach, uhidev_activate, NULL, uhidev_childdet);
 
-int 
+int
 uhidev_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct usbif_attach_arg *uaa = aux;
@@ -102,7 +102,7 @@ uhidev_match(device_t parent, cfdata_t m
 	return (UMATCH_IFACECLASS_GENERIC);
 }
 
-void 
+void
 uhidev_attach(device_t parent, device_t self, void *aux)
 {
 	struct uhidev_softc *sc = device_private(self);
@@ -244,11 +244,11 @@ uhidev_attach(device_t parent, device_t 
 		return;
 	}
 
-	if (uaa->vendor == USB_VENDOR_HOSIDEN && 
+	if (uaa->vendor == USB_VENDOR_HOSIDEN &&
 	uaa->product == USB_PRODUCT_HOSIDEN_PPP) {
 		static uByte reportbuf[] = { 1 };
 		/*
-		 *  This device was sold by Konami with its ParaParaParadise 
+		 *  This device was sold by Konami with its ParaParaParadise
 		 *  game for PlayStation2.  It needs to be "turned on"
 		 *  before it will send any reports.
 		 */
@@ -423,7 +423,7 @@ uhidev_childdet(device_t self, device_t 
 	sc->sc_subdevs[i] = NULL;
 }
 
-int 
+int
 uhidev_detach(device_t self, int flags)
 {
 	struct uhidev_softc *sc = device_private(self);
@@ -555,7 +555,7 @@ uhidev_open(struct uhidev *scd)
 	/* Set up input interrupt pipe. */
 	DPRINTF(("uhidev_open: isize=%d, ep=0x%02x\n", sc->sc_isize,
 		 sc->sc_iep_addr));
-		
+
 	err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_iep_addr,
 		  USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_ibuf,
 		  sc->sc_isize, uhidev_intr, USBD_DEFAULT_INTERVAL);
@@ -591,7 +591,7 @@ uhidev_open(struct uhidev *scd)
 			goto out3;
 		}
 	}
-	
+
 	return (0);
 out3:
 	/* Abort output pipe */
@@ -628,7 +628,7 @@ uhidev_close(struct uhidev *scd)
 
 	if (sc->sc_oxfer != NULL)
 		usbd_free_xfer(sc->sc_oxfer);
-	
+
 	/* Disable interrupts. */
 	if (sc->sc_opipe != NULL) {
 		usbd_abort_pipe(sc->sc_opipe);



CVS commit: src/sbin/mount

2013-10-05 Thread Adrian Steinmann
Module Name:src
Committed By:   ast
Date:   Sat Oct  5 08:06:35 UTC 2013

Modified Files:
src/sbin/mount: mount.c

Log Message:
No code change: corrected spelling in comment, removed trailing white spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sbin/mount/mount.c

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

Modified files:

Index: src/sbin/mount/mount.c
diff -u src/sbin/mount/mount.c:1.98 src/sbin/mount/mount.c:1.99
--- src/sbin/mount/mount.c:1.98	Thu Jan 24 17:53:49 2013
+++ src/sbin/mount/mount.c	Sat Oct  5 08:06:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.c,v 1.98 2013/01/24 17:53:49 christos Exp $	*/
+/*	$NetBSD: mount.c,v 1.99 2013/10/05 08:06:35 ast Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)mount.c	8.25 (Berkeley) 5/8/95";
 #else
-__RCSID("$NetBSD: mount.c,v 1.98 2013/01/24 17:53:49 christos Exp $");
+__RCSID("$NetBSD: mount.c,v 1.99 2013/10/05 08:06:35 ast Exp $");
 #endif
 #endif /* not lint */
 
@@ -85,7 +85,7 @@ static void	prmount(struct statvfs *);
 __dead static void	usage(void);
 
 
-/* Map from mount otions to printable formats. */
+/* Map from mount options to printable formats. */
 static const struct opt {
 	int o_opt;
 	int o_silent;
@@ -352,7 +352,7 @@ hasopt(const char *mntopts, const char *
 }
 
 static int
-mountfs(const char *vfstype, const char *spec, const char *name, 
+mountfs(const char *vfstype, const char *spec, const char *name,
 int flags, const char *options, const char *mntopts,
 int skipmounted, char *buf, size_t buflen)
 {
@@ -579,7 +579,7 @@ prmount(struct statvfs *sfp)
 	sfp->f_fstypename);
 
 	flags = sfp->f_flag & MNT_VISFLAGMASK;
-	for (f = 0, o = optnames; flags && o < 
+	for (f = 0, o = optnames; flags && o <
 	&optnames[sizeof(optnames)/sizeof(optnames[0])]; o++)
 		if (flags & o->o_opt) {
 			if (!o->o_silent || verbose)



CVS commit: src/share/man/man8/man8.emips

2013-10-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct  5 08:20:23 UTC 2013

Modified Files:
src/share/man/man8/man8.emips: boot.8

Log Message:
Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man8/man8.emips/boot.8

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/man8/man8.emips/boot.8
diff -u src/share/man/man8/man8.emips/boot.8:1.1 src/share/man/man8/man8.emips/boot.8:1.2
--- src/share/man/man8/man8.emips/boot.8:1.1	Wed Jan 26 01:18:49 2011
+++ src/share/man/man8/man8.emips/boot.8	Sat Oct  5 08:20:22 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.8,v 1.1 2011/01/26 01:18:49 pooka Exp $
+.\"	$NetBSD: boot.8,v 1.2 2013/10/05 08:20:22 skrll Exp $
 .\"
 .\" Copyright (c) 2010 Microsoft Corp.
 .\" Copyright (c) 2010 NetBSD Foundation, Inc.
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 17, 2010
+.Dd October 5, 2013
 .Dt BOOT 8 emips
 .Os
 .Sh NAME
@@ -59,7 +59,7 @@ at the boot loader prompt.
 .Sh KERNEL ARGUMENTS
 At the boot loader prompt, the user may boot
 .Nx
-with a number of otions that are passed to the kernel unmodified. Parsing of these options is
+with a number of options that are passed to the kernel unmodified. Parsing of these options is
 defined in the file
 .Nm /sys/boot_flag.h
 Some additional flags are as follows.



CVS commit: src/lib/libc/sys

2013-10-05 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct  5 09:18:56 UTC 2013

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

Log Message:
Add missing El macro.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/_lwp_getprivate.2

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

Modified files:

Index: src/lib/libc/sys/_lwp_getprivate.2
diff -u src/lib/libc/sys/_lwp_getprivate.2:1.5 src/lib/libc/sys/_lwp_getprivate.2:1.6
--- src/lib/libc/sys/_lwp_getprivate.2:1.5	Fri Sep  6 17:54:09 2013
+++ src/lib/libc/sys/_lwp_getprivate.2	Sat Oct  5 09:18:56 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: _lwp_getprivate.2,v 1.5 2013/09/06 17:54:09 yamt Exp $
+.\"	$NetBSD: _lwp_getprivate.2,v 1.6 2013/10/05 09:18:56 njoly Exp $
 .\"
 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -70,6 +70,7 @@ accessed using the selector.
 .It sparc
 .Dv %g7
 register is set to the pointer.
+.El
 .Sh ERRORS
 The
 .Fn _lwp_getprivate



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

2013-10-05 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct  5 09:22:01 UTC 2013

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

Log Message:
Add utimensat(2) support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/libsys_linux/syscalls.master

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

Modified files:

Index: src/sys/rump/kern/lib/libsys_linux/syscalls.master
diff -u src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.4 src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.5
--- src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.4	Mon Apr  8 20:54:47 2013
+++ src/sys/rump/kern/lib/libsys_linux/syscalls.master	Sat Oct  5 09:22:01 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.4 2013/04/08 20:54:47 pooka Exp $
+	$NetBSD: syscalls.master,v 1.5 2013/10/05 09:22:01 njoly Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -595,7 +595,8 @@
 464	UNIMPL		fchownat
 465	UNIMPL		fexecve
 466	UNIMPL		fstatat
-467	UNIMPL		utimensat
+467	NODEF		{ int|linux_sys||utimensat(int fd, const char *path, \
+			struct linux_timespec *times, int flag); }
 468	UNIMPL		openat
 469	UNIMPL		readlinkat
 470	UNIMPL		symlinkat



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

2013-10-05 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct  5 09:22:43 UTC 2013

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

Log Message:
Regen for utimensat(2).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h
cvs rdiff -u -r1.5 -r1.6 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c \
src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c

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

Modified files:

Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.2 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.3
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.2	Mon Apr  8 20:58:27 2013
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h	Sat Oct  5 09:22:43 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscall.h,v 1.2 2013/04/08 20:58:27 pooka Exp $ */
+/* $NetBSD: rump_linux_syscall.h,v 1.3 2013/10/05 09:22:43 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.4 2013/04/08 20:54:47 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.5 2013/10/05 09:22:01 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALL_H_

Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.5 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.6
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.5	Mon Apr  8 20:58:27 2013
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h	Sat Oct  5 09:22:43 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscallargs.h,v 1.5 2013/04/08 20:58:27 pooka Exp $ */
+/* $NetBSD: rump_linux_syscallargs.h,v 1.6 2013/10/05 09:22:43 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.4 2013/04/08 20:54:47 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.5 2013/10/05 09:22:01 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALLARGS_H_
@@ -341,6 +341,14 @@ struct linux_sys_mknod_args {
 };
 check_syscall_args(linux_sys_mknod)
 
+struct linux_sys_utimensat_args {
+	syscallarg(int) fd;
+	syscallarg(const char *) path;
+	syscallarg(struct linux_timespec *) times;
+	syscallarg(int) flag;
+};
+check_syscall_args(linux_sys_utimensat)
+
 /*
  * System call prototypes.
  */
@@ -511,4 +519,6 @@ int	linux_sys_lstat64(struct lwp *, cons
 
 int	linux_sys_mknod(struct lwp *, const struct linux_sys_mknod_args *, register_t *);
 
+int	linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *);
+
 #endif /* _RUMP_LINUX_SYS_SYSCALLARGS_H_ */
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.5 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.6
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.5	Mon Apr  8 20:58:27 2013
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c	Sat Oct  5 09:22:43 2013
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_syscalls.c,v 1.5 2013/04/08 20:58:27 pooka Exp $ */
+/* $NetBSD: rump_linux_syscalls.c,v 1.6 2013/10/05 09:22:43 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.4 2013/04/08 20:54:47 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.5 2013/10/05 09:22:01 njoly Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_linux_syscalls.c,v 1.5 2013/04/08 20:58:27 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_linux_syscalls.c,v 1.6 2013/10/05 09:22:43 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include 
@@ -491,7 +491,7 @@ const char *const rump_linux_syscallname
 	/* 464 */	"#464 (unimplemented fchownat)",
 	/* 465 */	"#465 (unimplemented fexecve)",
 	/* 466 */	"#466 (unimplemented fstatat)",
-	/* 467 */	"#467 (unimplemented utimensat)",
+	/* 467 */	"utimensat",
 	/* 468 */	"#468 (unimplemented openat)",
 	/* 469 */	"#469 (unimplemented readlinkat)",
 	/* 470 */	"#470 (unimplemented symlinkat)",
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.5 src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.6
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.5	Mon Apr  8 20:58:27 2013
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c	Sat Oct  5 09:22:43 2013
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_sysent.c,v 1.5 2013/04/08 20:58:27 pooka Exp $ */
+/* $NetBSD: rump_linux_sysent.c,v 1.6 2013/10/05 09:2

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

2013-10-05 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Oct  5 11:20:35 UTC 2013

Modified Files:
src/sys/arch/x86/pci: pci_machdep.c

Log Message:
Force PCI mode 1 when running under QEMU, to work around QEMU bug 897771.
This should also make it possible to boot NetBSD under versions of KVM
that have inherited said QEMU bug.  Fixes PR kern/45671.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x86/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.60 src/sys/arch/x86/pci/pci_machdep.c:1.61
--- src/sys/arch/x86/pci/pci_machdep.c:1.60	Wed Jul 31 19:27:51 2013
+++ src/sys/arch/x86/pci/pci_machdep.c	Sat Oct  5 11:20:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.60 2013/07/31 19:27:51 macallan Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.61 2013/10/05 11:20:34 gson Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.60 2013/07/31 19:27:51 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.61 2013/10/05 11:20:34 gson Exp $");
 
 #include 
 #include 
@@ -526,6 +526,7 @@ pci_mode_detect(void)
 	uint32_t sav, val;
 	int i;
 	pcireg_t idreg;
+	extern char cpu_brand_string[];
 
 	if (pci_mode != -1)
 		return pci_mode;
@@ -555,6 +556,13 @@ pci_mode_detect(void)
 			return (pci_mode);
 		}
 	}
+if (memcmp(cpu_brand_string, "QEMU", 4) == 0) {
+		/* PR 45671, https://bugs.launchpad.net/qemu/+bug/897771 */
+#ifdef DEBUG
+		printf("forcing PCI mode 1 for QEMU\n");
+#endif
+		return (pci_mode);
+	}
 
 	/*
 	 * Strong check for standard compliant mode 1:



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

2013-10-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Oct  5 16:50:31 UTC 2013

Modified Files:
src/sys/arch/x86/x86: pmap.c x86_machdep.c

Log Message:
Remove some unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x86/x86/x86_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.179 src/sys/arch/x86/x86/pmap.c:1.180
--- src/sys/arch/x86/x86/pmap.c:1.179	Tue Nov 13 14:07:42 2012
+++ src/sys/arch/x86/x86/pmap.c	Sat Oct  5 16:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $	*/
+/*	$NetBSD: pmap.c,v 1.180 2013/10/05 16:50:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.180 2013/10/05 16:50:31 rmind Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -3549,12 +3549,10 @@ pmap_page_remove(struct vm_page *pg)
 	struct pv_entry *killlist = NULL;
 	struct vm_page *ptp;
 	pt_entry_t expect;
-	lwp_t *l;
 	int count;
 
 	KASSERT(uvm_page_locked_p(pg));
 
-	l = curlwp;
 	pp = VM_PAGE_TO_PP(pg);
 	expect = pmap_pa2pte(VM_PAGE_TO_PHYS(pg)) | PG_V;
 	count = SPINLOCK_BACKOFF_MIN;

Index: src/sys/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.60 src/sys/arch/x86/x86/x86_machdep.c:1.61
--- src/sys/arch/x86/x86/x86_machdep.c:1.60	Sat Aug 31 12:26:56 2013
+++ src/sys/arch/x86/x86/x86_machdep.c	Sat Oct  5 16:50:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.60 2013/08/31 12:26:56 jmcneill Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.61 2013/10/05 16:50:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.60 2013/08/31 12:26:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.61 2013/10/05 16:50:31 rmind Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -295,14 +295,11 @@ cpu_intr_p(void)
 bool
 cpu_kpreempt_enter(uintptr_t where, int s)
 {
-	struct cpu_info *ci;
 	struct pcb *pcb;
 	lwp_t *l;
 
 	KASSERT(kpreempt_disabled());
-
 	l = curlwp;
-	ci = curcpu();
 
 	/*
 	 * If SPL raised, can't go.  Note this implies that spin



CVS commit: src/external/gpl3/gdb/dist/gdb

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 16:52:55 UTC 2013

Modified Files:
src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c

Log Message:
remove error(1) output.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.6
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.5	Fri Oct  4 19:40:17 2013
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c	Sat Oct  5 12:52:55 2013
@@ -288,7 +288,6 @@ alphanbsd_sigtramp_offset (struct gdbarc
 
   for (i = 0; i < RETCODE_NWORDS; i++)
 {
-/*###287 [cc] error: 'sigtramp_retcode' undeclared (first use in this function)%%%*/
   if (memcmp (w, sigtramp_retcode + (i * 4), 4) == 0)
 	break;
 }



CVS commit: src/external/gpl3/gcc

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 18:37:16 UTC 2013

Added Files:
src/external/gpl3/gcc: gcc2netbsd

Log Message:
mother's little helper.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/gcc2netbsd

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

Added files:

Index: src/external/gpl3/gcc/gcc2netbsd
diff -u /dev/null src/external/gpl3/gcc/gcc2netbsd:1.1
--- /dev/null	Sat Oct  5 14:37:16 2013
+++ src/external/gpl3/gcc/gcc2netbsd	Sat Oct  5 14:37:16 2013
@@ -0,0 +1,71 @@
+#! /bin/sh
+#
+#	NetBSD: gdb2netbsd,v 1.2 2011/10/08 19:28:40 christos Exp 
+#
+# Copyright (c) 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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.
+#
+# gcc2netbsd:  convert a file source tree into a
+# format suitable for import.  Works on current dir.
+# You can run this only once if you want it to work.
+#
+# based on file 2netbsd
+#
+PROG="$(basename "$0")"
+
+if [ -z "$1" ]
+then
+	echo "Usage: $PROG " 1>&2
+	exit 1
+fi
+FILE="$1"
+
+### Remove the $'s around RCS tags
+cleantags "$FILE"
+
+RM="
+gcc/java
+gcc/ada
+gcc/fortran
+gcc/testsuite/ada
+gcc/testsuite/gfortran.dg
+gcc/testsuite/gfortran.fortran-torture
+libffi
+zlib
+boehm-gc
+libjava
+libada
+libgfortran
+"
+
+find "$FILE" -name .cvsignore -exec rm -f {} +
+find "$FILE" -name .gitignore -exec rm -f {} +
+for i in $RM; do
+	rm -fr "$FILE/$i"
+done
+
+echo You can import now.  Use the following command:
+echo cvs import src/external/gpl3/gcc/dist FSF gcc-X-Y-Z
+
+exit 0



CVS commit: src/external/gpl3/gcc

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 18:38:03 UTC 2013

Modified Files:
src/external/gpl3/gcc: gcc2netbsd

Log Message:
dollarize NetBSD tag


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/gcc2netbsd

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

Modified files:

Index: src/external/gpl3/gcc/gcc2netbsd
diff -u src/external/gpl3/gcc/gcc2netbsd:1.1 src/external/gpl3/gcc/gcc2netbsd:1.2
--- src/external/gpl3/gcc/gcc2netbsd:1.1	Sat Oct  5 14:37:16 2013
+++ src/external/gpl3/gcc/gcc2netbsd	Sat Oct  5 14:38:03 2013
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	NetBSD: gdb2netbsd,v 1.2 2011/10/08 19:28:40 christos Exp 
+#	$NetBSD: gcc2netbsd,v 1.2 2013/10/05 18:38:03 christos Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.



CVS commit: src/lib/libc/sys

2013-10-05 Thread Adrian Steinmann
Module Name:src
Committed By:   ast
Date:   Sat Oct  5 21:24:36 UTC 2013

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

Log Message:
Fixed spelling of 'appeared'.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libc/sys/utimes.2

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

Modified files:

Index: src/lib/libc/sys/utimes.2
diff -u src/lib/libc/sys/utimes.2:1.39 src/lib/libc/sys/utimes.2:1.40
--- src/lib/libc/sys/utimes.2:1.39	Sat Sep 14 10:41:18 2013
+++ src/lib/libc/sys/utimes.2	Sat Oct  5 21:24:36 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: utimes.2,v 1.39 2013/09/14 10:41:18 njoly Exp $
+.\"	$NetBSD: utimes.2,v 1.40 2013/10/05 21:24:36 ast Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -302,5 +302,5 @@ Birthtime setting support was added in
 .Fn futimens
 and
 .Fn utimensat
-functions calls appreared in
+functions calls appeared in
 .Nx 6.0 .



CVS commit: src/sys/dev/usb

2013-10-05 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Sat Oct  5 22:00:28 UTC 2013

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

Log Message:
add Keyspan USA-19H serial adapter


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.654 src/sys/dev/usb/usbdevs:1.655
--- src/sys/dev/usb/usbdevs:1.654	Sat Sep 14 20:28:15 2013
+++ src/sys/dev/usb/usbdevs	Sat Oct  5 22:00:28 2013
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.654 2013/09/14 20:28:15 soren Exp $
+$NetBSD: usbdevs,v 1.655 2013/10/05 22:00:28 jnemeth Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1884,6 +1884,7 @@ product KEYSPAN USA18XA_NF	0x0116	USA-18
 product KEYSPAN USA18XA		0x0117	USA-18XA serial adapter
 product KEYSPAN USA19QW_NF	0x0118	USA-19QW serial adapter (no firmware)
 product KEYSPAN USA19QW		0x0119	USA-19QW serial adapter
+product KEYSPAN USA19H		0x0121	USA-19H serial adapter
 product KEYSPAN UIA10		0x0201	UIA-10 remote control
 product KEYSPAN UIA11		0x0202	UIA-11 remote control
 



CVS commit: src/sys/dev/usb

2013-10-05 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Sat Oct  5 22:01:12 UTC 2013

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.646 -r1.647 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.647 -r1.648 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.646 src/sys/dev/usb/usbdevs.h:1.647
--- src/sys/dev/usb/usbdevs.h:1.646	Sat Sep 14 20:29:55 2013
+++ src/sys/dev/usb/usbdevs.h	Sat Oct  5 22:01:12 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.646 2013/09/14 20:29:55 soren Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.647 2013/10/05 22:01:12 jnemeth Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.654 2013/09/14 20:28:15 soren Exp
+ *	NetBSD: usbdevs,v 1.655 2013/10/05 22:00:28 jnemeth Exp
  */
 
 /*
@@ -1891,6 +1891,7 @@
 #define	USB_PRODUCT_KEYSPAN_USA18XA	0x0117		/* USA-18XA serial adapter */
 #define	USB_PRODUCT_KEYSPAN_USA19QW_NF	0x0118		/* USA-19QW serial adapter (no firmware) */
 #define	USB_PRODUCT_KEYSPAN_USA19QW	0x0119		/* USA-19QW serial adapter */
+#define	USB_PRODUCT_KEYSPAN_USA19H	0x0121		/* USA-19H serial adapter */
 #define	USB_PRODUCT_KEYSPAN_UIA10	0x0201		/* UIA-10 remote control */
 #define	USB_PRODUCT_KEYSPAN_UIA11	0x0202		/* UIA-11 remote control */
 

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.647 src/sys/dev/usb/usbdevs_data.h:1.648
--- src/sys/dev/usb/usbdevs_data.h:1.647	Sat Sep 14 20:29:55 2013
+++ src/sys/dev/usb/usbdevs_data.h	Sat Oct  5 22:01:12 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.647 2013/09/14 20:29:55 soren Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.648 2013/10/05 22:01:12 jnemeth Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.654 2013/09/14 20:28:15 soren Exp
+ *	NetBSD: usbdevs,v 1.655 2013/10/05 22:00:28 jnemeth Exp
  */
 
 /*
@@ -5871,6 +5871,10 @@ const struct usb_product usb_products[] 
 	"USA-19QW serial adapter",
 	},
 	{
+	USB_VENDOR_KEYSPAN, USB_PRODUCT_KEYSPAN_USA19H,
+	"USA-19H serial adapter",
+	},
+	{
 	USB_VENDOR_KEYSPAN, USB_PRODUCT_KEYSPAN_UIA10,
 	"UIA-10 remote control",
 	},
@@ -10031,4 +10035,4 @@ const struct usb_product usb_products[] 
 	"Prestige",
 	},
 };
-const int usb_nproducts = 1973;
+const int usb_nproducts = 1974;



CVS commit: src/sys/net

2013-10-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Oct  5 22:38:52 UTC 2013

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

Log Message:
bpf_filter: re-use some code.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/net/bpf_filter.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/bpf_filter.c
diff -u src/sys/net/bpf_filter.c:1.59 src/sys/net/bpf_filter.c:1.60
--- src/sys/net/bpf_filter.c:1.59	Thu Sep 19 00:48:48 2013
+++ src/sys/net/bpf_filter.c	Sat Oct  5 22:38:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf_filter.c,v 1.59 2013/09/19 00:48:48 rmind Exp $	*/
+/*	$NetBSD: bpf_filter.c,v 1.60 2013/10/05 22:38:52 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.59 2013/09/19 00:48:48 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.60 2013/10/05 22:38:52 rmind Exp $");
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -197,8 +197,9 @@ bpf_filter(const struct bpf_insn *pc, co
 {
 	uint32_t A, X, k;
 	uint32_t mem[BPF_MEMWORDS];
-
 #ifdef _KERNEL
+	const struct mbuf * const m0 = (const struct mbuf *)p;
+
 	KASSERT(bc != NULL);
 #endif
 
@@ -242,7 +243,7 @@ bpf_filter(const struct bpf_insn *pc, co
 
 if (buflen != 0)
 	return 0;
-A = m_xword((const struct mbuf *)p, k, &merr);
+A = m_xword(m0, k, &merr);
 if (merr != 0)
 	return 0;
 continue;
@@ -261,7 +262,7 @@ bpf_filter(const struct bpf_insn *pc, co
 
 if (buflen != 0)
 	return 0;
-A = m_xhalf((const struct mbuf *)p, k, &merr);
+A = m_xhalf(m0, k, &merr);
 if (merr != 0)
 	return 0;
 continue;
@@ -276,14 +277,11 @@ bpf_filter(const struct bpf_insn *pc, co
 			k = pc->k;
 			if (k >= buflen) {
 #ifdef _KERNEL
-const struct mbuf *m;
-int len;
+int merr;
 
 if (buflen != 0)
 	return 0;
-m = (const struct mbuf *)p;
-MINDEX(len, m, k);
-A = mtod(m, u_char *)[k];
+A = m_xbyte(m0, k, &merr);
 continue;
 #else
 return 0;
@@ -309,7 +307,7 @@ bpf_filter(const struct bpf_insn *pc, co
 
 if (buflen != 0)
 	return 0;
-A = m_xword((const struct mbuf *)p, k, &merr);
+A = m_xword(m0, k, &merr);
 if (merr != 0)
 	return 0;
 continue;
@@ -329,7 +327,7 @@ bpf_filter(const struct bpf_insn *pc, co
 
 if (buflen != 0)
 	return 0;
-A = m_xhalf((const struct mbuf *)p, k, &merr);
+A = m_xhalf(m0, k, &merr);
 if (merr != 0)
 	return 0;
 continue;
@@ -344,14 +342,11 @@ bpf_filter(const struct bpf_insn *pc, co
 			k = X + pc->k;
 			if (pc->k >= buflen || X >= buflen - pc->k) {
 #ifdef _KERNEL
-const struct mbuf *m;
-int len;
+int merr;
 
 if (buflen != 0)
 	return 0;
-m = (const struct mbuf *)p;
-MINDEX(len, m, k);
-A = mtod(m, u_char *)[k];
+A = m_xbyte(m0, k, &merr);
 continue;
 #else
 return 0;
@@ -364,14 +359,11 @@ bpf_filter(const struct bpf_insn *pc, co
 			k = pc->k;
 			if (k >= buflen) {
 #ifdef _KERNEL
-const struct mbuf *m;
-int len;
+int merr;
 
 if (buflen != 0)
 	return 0;
-m = (const struct mbuf *)p;
-MINDEX(len, m, k);
-X = (mtod(m, char *)[k] & 0xf) << 2;
+X = (m_xbyte(m0, k, &merr) & 0xf) << 2;
 continue;
 #else
 return 0;



CVS commit: src

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 23:16:54 UTC 2013

Modified Files:
src/share/man/man4: netintro.4
src/sys/net: if.c if.h
src/sys/sys: sockio.h

Log Message:
Add SIOCGIFINDEX from Ty Sarna and Matthew Sporleder.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man4/netintro.4
cvs rdiff -u -r1.265 -r1.266 src/sys/net/if.c
cvs rdiff -u -r1.156 -r1.157 src/sys/net/if.h
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/sockio.h

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/netintro.4
diff -u src/share/man/man4/netintro.4:1.25 src/share/man/man4/netintro.4:1.26
--- src/share/man/man4/netintro.4:1.25	Fri Mar  1 13:25:27 2013
+++ src/share/man/man4/netintro.4	Sat Oct  5 19:16:54 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: netintro.4,v 1.25 2013/03/01 18:25:27 joerg Exp $
+.\"	$NetBSD: netintro.4,v 1.26 2013/10/05 23:16:54 christos Exp $
 .\"
 .\" Copyright (c) 1983, 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -197,9 +197,17 @@ struct	ifreq {
 #define ifr_addr  ifr_ifru.ifru_addr/* address */
 #define ifr_dstaddr   ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
 #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+#define ifr_space ifr_ifru.ifru_space /* sockaddr_storage */
 #define ifr_flags ifr_ifru.ifru_flags   /* flags */
 #define ifr_metricifr_ifru.ifru_metric  /* metric */
+#define ifr_mtu   ifr_ifru.ifru_mtu   /* mtu */
+#define ifr_dlt   ifr_ifru.ifru_dlt   /* data link type (DLT_*) */
+#define ifr_value ifr_ifru.ifru_value /* generic value */
+#define ifr_media ifr_ifru.ifru_metric/* media options (overload) */
 #define ifr_data  ifr_ifru.ifru_data/* for use by interface */
+#define ifr_buf   ifr_ifru.ifru_b.b_buf   /* new interface ioctls */
+#define ifr_buflenifr_ifru.ifru_b.b_buflen
+#define ifr_index ifr_ifru.ifru_value /* interface index */
 };
 .Ed
 .Pp
@@ -241,6 +249,8 @@ Set interface routing metric.
 The metric is used only by user-level routers.
 .It Dv SIOCGIFMETRIC
 Get interface metric.
+.It Dv SIOCGIFINDEX
+Get the interface index and populate ifr_index.
 .El
 .Pp
 There are two requests that make use of a new structure:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.265 src/sys/net/if.c:1.266
--- src/sys/net/if.c:1.265	Sat Jun 29 17:06:58 2013
+++ src/sys/net/if.c	Sat Oct  5 19:16:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.265 2013/06/29 21:06:58 rmind Exp $	*/
+/*	$NetBSD: if.c,v 1.266 2013/10/05 23:16:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.265 2013/06/29 21:06:58 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.266 2013/10/05 23:16:54 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -990,7 +990,7 @@ again:
 
 	if (ifc == NULL) {
 		if (*ifname == '\0' ||
-		module_autoload(ifname, MODULE_CLASS_DRIVER))
+		module_autoload(ifname, MODULE_CLASS_DRIVER, "if"))
 			return NULL;
 		*ifname = '\0';
 		goto again;
@@ -1644,6 +1644,11 @@ ifioctl_common(struct ifnet *ifp, u_long
 		ifdr->ifdr_data = ifp->if_data;
 		break;
 
+	case SIOCGIFINDEX:
+		ifr = data;
+		ifr->ifr_index = ifp->if_index;
+		break;
+
 	case SIOCZIFDATA:
 		ifdr = data;
 		ifdr->ifdr_data = ifp->if_data;

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.156 src/sys/net/if.h:1.157
--- src/sys/net/if.h:1.156	Sat Jun 29 17:06:58 2013
+++ src/sys/net/if.h	Sat Oct  5 19:16:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.156 2013/06/29 21:06:58 rmind Exp $	*/
+/*	$NetBSD: if.h,v 1.157 2013/10/05 23:16:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -598,6 +598,7 @@ struct	ifreq {
 		 */
 #define	ifr_buf		ifr_ifru.ifru_b.b_buf	/* new interface ioctls */
 #define	ifr_buflen	ifr_ifru.ifru_b.b_buflen
+#define	ifr_index	ifr_ifru.ifru_index	/* interface index */
 };
 
 #ifdef _KERNEL

Index: src/sys/sys/sockio.h
diff -u src/sys/sys/sockio.h:1.31 src/sys/sys/sockio.h:1.32
--- src/sys/sys/sockio.h:1.31	Wed Oct 31 06:17:35 2012
+++ src/sys/sys/sockio.h	Sat Oct  5 19:16:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockio.h,v 1.31 2012/10/31 10:17:35 msaitoh Exp $	*/
+/*	$NetBSD: sockio.h,v 1.32 2013/10/05 23:16:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -136,6 +136,7 @@
 /* 138 is SIOCGATHDIAG in athioctl.h */
 
 #define	SIOCGETHERCAP	_IOWR('i', 139, struct eccapreq) /* get ethercap */
+#define SIOCGIFINDEX  _IOWR('i', 140, struct ifreq)   /* get ifnet index */
 
 #define	SIOCSETPFSYNC	_IOW('i', 247, struct ifreq)	
 #define	SIOCGETPFSYNC	_IOWR('i', 248, struct ifreq)



CVS commit: src/sys/net

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 23:22:34 UTC 2013

Modified Files:
src/sys/net: if.h

Log Message:
fix the source too, not just the doc.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/net/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/net/if.h
diff -u src/sys/net/if.h:1.157 src/sys/net/if.h:1.158
--- src/sys/net/if.h:1.157	Sat Oct  5 19:16:54 2013
+++ src/sys/net/if.h	Sat Oct  5 19:22:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.157 2013/10/05 23:16:54 christos Exp $	*/
+/*	$NetBSD: if.h,v 1.158 2013/10/05 23:22:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -598,7 +598,7 @@ struct	ifreq {
 		 */
 #define	ifr_buf		ifr_ifru.ifru_b.b_buf	/* new interface ioctls */
 #define	ifr_buflen	ifr_ifru.ifru_b.b_buflen
-#define	ifr_index	ifr_ifru.ifru_index	/* interface index */
+#define	ifr_index	ifr_ifru.ifru_value	/* interface index */
 };
 
 #ifdef _KERNEL



CVS commit: src/share/man/man4

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  5 23:34:33 UTC 2013

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

Log Message:
mention increased tcp window size, from logan


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/tcp.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/tcp.4
diff -u src/share/man/man4/tcp.4:1.26 src/share/man/man4/tcp.4:1.27
--- src/share/man/man4/tcp.4:1.26	Thu Oct  3 03:09:54 2013
+++ src/share/man/man4/tcp.4	Sat Oct  5 19:34:33 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tcp.4,v 1.26 2013/10/03 07:09:54 mbalmer Exp $
+.\"	$NetBSD: tcp.4,v 1.27 2013/10/05 23:34:33 christos Exp $
 .\"	$FreeBSD: tcp.4,v 1.11.2.16 2004/02/16 22:21:47 bms Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
@@ -315,6 +315,8 @@ ECN (Explicit Congestion Notification)
 .It
 Congestion window increase methods; the traditional packet counting or
 RFC 3465 Appropriate Byte Counting
+.It
+RFC 3390: Increased initial window size
 .El
 .Sh DIAGNOSTICS
 A socket operation may fail with one of the following errors returned:



CVS commit: src/share/man/man4

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  6 00:46:07 UTC 2013

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

Log Message:
bump date


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/man/man4/tcp.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/tcp.4
diff -u src/share/man/man4/tcp.4:1.27 src/share/man/man4/tcp.4:1.28
--- src/share/man/man4/tcp.4:1.27	Sat Oct  5 19:34:33 2013
+++ src/share/man/man4/tcp.4	Sat Oct  5 20:46:07 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tcp.4,v 1.27 2013/10/05 23:34:33 christos Exp $
+.\"	$NetBSD: tcp.4,v 1.28 2013/10/06 00:46:07 christos Exp $
 .\"	$FreeBSD: tcp.4,v 1.11.2.16 2004/02/16 22:21:47 bms Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
 .\"
 .\" @(#)tcp.4	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 19, 2007
+.Dd October 5, 2013
 .Dt TCP 4
 .Os
 .Sh NAME



CVS commit: src/doc

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  6 00:48:03 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
update gcc info


To generate a diff of this commit:
cvs rdiff -u -r1.1058 -r1.1059 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1058 src/doc/3RDPARTY:1.1059
--- src/doc/3RDPARTY:1.1058	Thu Oct  3 14:24:28 2013
+++ src/doc/3RDPARTY	Sat Oct  5 20:48:03 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1058 2013/10/03 18:24:28 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1059 2013/10/06 00:48:03 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -366,7 +366,7 @@ There is a flex2netbsd script to help ne
 
 Package:	gcc
 Version:	4.1.3-20080831/4.5.4
-Current Vers:	4.8.0
+Current Vers:	4.8.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gcc/
 Home Page:	http://www.gnu.org/software/gcc/
@@ -376,18 +376,12 @@ License:	GPLv3, LGPLv3.1
 Location:	external/gpl3/gcc/dist
 Notes:
 before importing:
-	- delete all .cvsignore and .brik files
-	- delete gcc/java gcc/ada libffi zlib boehm-gc libjava fastjar
-	- delete all related testsuites
-for GCC4:
-	- delete all fortran and testsuites
+	- delete all .cvsignore and .gitignore files
+	- delete java ada fortran their libraries and testsuites
+	- delete libffi zlib boehm-gc 
 	- update gcc/version.c for the NetBSD GCC date
-for GCC 4.5:
 	- use core/c++/objc/testsuite tarballs
-	- delete:
-		gcc/testsuite/ada
-		gcc/testsuite/gfortran*
-		gcc/testsuite/gnat.dg
+	- you can use the gcc2netbsd script for the above (except version)
 
 Package:	gdb
 Version:	7.6.1



CVS commit: src/sys/net

2013-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  6 01:21:24 UTC 2013

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

Log Message:
remove unrelated diff.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/net/if.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.c
diff -u src/sys/net/if.c:1.266 src/sys/net/if.c:1.267
--- src/sys/net/if.c:1.266	Sat Oct  5 19:16:54 2013
+++ src/sys/net/if.c	Sat Oct  5 21:21:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.266 2013/10/05 23:16:54 christos Exp $	*/
+/*	$NetBSD: if.c,v 1.267 2013/10/06 01:21:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.266 2013/10/05 23:16:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.267 2013/10/06 01:21:24 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -990,7 +990,7 @@ again:
 
 	if (ifc == NULL) {
 		if (*ifname == '\0' ||
-		module_autoload(ifname, MODULE_CLASS_DRIVER, "if"))
+		module_autoload(ifname, MODULE_CLASS_DRIVER))
 			return NULL;
 		*ifname = '\0';
 		goto again;



CVS commit: src/share/doc/psd/05.sysman

2013-10-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Oct  6 05:45:19 UTC 2013

Modified Files:
src/share/doc/psd/05.sysman: 0.t 1.0.t 1.1.t 1.2.t 1.3.t 1.4.t 1.5.t
1.6.t 1.7.t 2.0.t 2.1.t 2.2.t 2.3.t 2.4.t 2.5.t Makefile a.t

Log Message:
I'm a document, Jim, not a shell script.

Fix this to not use .sy to generate portions of the document.
Instead, generate the necessary bits with sed beforehand.

Apparently -ms is too feeble to be able to generate tables of contents
with automatically generated page numbers, so add the expected page
numbers into the document and make it possible to turn on a
rudimentary mechanism for crosschecking them. (This mechanism still
requires .sy though. Improvements welcome.)

This makes it unnecessary to build the document twice, or to use
groff in unsafe mode.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/doc/psd/05.sysman/0.t \
src/share/doc/psd/05.sysman/1.2.t src/share/doc/psd/05.sysman/1.6.t \
src/share/doc/psd/05.sysman/2.2.t src/share/doc/psd/05.sysman/2.3.t \
src/share/doc/psd/05.sysman/a.t
cvs rdiff -u -r1.3 -r1.4 src/share/doc/psd/05.sysman/1.0.t \
src/share/doc/psd/05.sysman/1.1.t src/share/doc/psd/05.sysman/1.3.t \
src/share/doc/psd/05.sysman/1.4.t src/share/doc/psd/05.sysman/1.5.t \
src/share/doc/psd/05.sysman/1.7.t src/share/doc/psd/05.sysman/2.0.t \
src/share/doc/psd/05.sysman/2.1.t src/share/doc/psd/05.sysman/2.4.t \
src/share/doc/psd/05.sysman/2.5.t
cvs rdiff -u -r1.7 -r1.8 src/share/doc/psd/05.sysman/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/doc/psd/05.sysman/0.t
diff -u src/share/doc/psd/05.sysman/0.t:1.4 src/share/doc/psd/05.sysman/0.t:1.5
--- src/share/doc/psd/05.sysman/0.t:1.4	Mon Dec 26 20:04:46 2005
+++ src/share/doc/psd/05.sysman/0.t	Sun Oct  6 05:45:19 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: 0.t,v 1.4 2005/12/26 20:04:46 perry Exp $
+.\"	$NetBSD: 0.t,v 1.5 2013/10/06 05:45:19 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -78,15 +78,24 @@ network server processes.
 .AE
 .LP
 .bp +3
-.sy echo -n >toc
+.\" The second argument of .Sh is the page number the section is
+.\" expected to begin on. This is extracted into the table of contents
+.\" before we begin typesetting. If you have been editing the document
+.\" and want to check that the page numbers are still correct,
+.\" uncomment the following line and the .sy line two lines down, then
+.\" run groff with -U so .sy is allowed. Then check the output pagelog
+.\" file. If anyone knows how to change this to an assertion, so .sy
+.\" isn't needed and groff will complain if $2 isn't equal to the page
+.\" number, please go ahead.
+.\".sy echo 'have should-be heading' >pagelog
 .de Sh
-.sy echo >>toc '.L\\$1 "\\$2" \\n%'
+.\".sy echo >>pagelog '\\$2 \\n% "\\$3"'
 .ie \\$1=0 \{\
-\fB\\$2\fP
+\fB\\$3\fP
 .\}
 .el \{\
 .NH \\$1
-\\$2
+\\$3
 .LP
 .\}
 ..
@@ -97,9 +106,8 @@ network server processes.
 \\$1\\$2
 ..
 .de Fd
-.sy echo >>toc '.Nm \\$1 \\$2 "\\$3'
 ..
-.Sh 0 "Notation and Types
+.Sh 0 4 "Notation and Types
 .PP
 The notation used to describe system calls is a variant of a
 C language function call, consisting of a prototype call followed by
Index: src/share/doc/psd/05.sysman/1.2.t
diff -u src/share/doc/psd/05.sysman/1.2.t:1.4 src/share/doc/psd/05.sysman/1.2.t:1.5
--- src/share/doc/psd/05.sysman/1.2.t:1.4	Fri Feb 13 11:36:08 2004
+++ src/share/doc/psd/05.sysman/1.2.t	Sun Oct  6 05:45:19 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: 1.2.t,v 1.4 2004/02/13 11:36:08 wiz Exp $
+.\"	$NetBSD: 1.2.t,v 1.5 2013/10/06 05:45:19 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,8 +29,8 @@
 .\"
 .\"	@(#)1.2.t	8.9 (Berkeley) 5/29/94
 .\"
-.Sh 2 "Memory management
-.Sh 3 "Text, data, and stack
+.Sh 2 8 "Memory management
+.Sh 3 8 "Text, data, and stack
 .PP
 Each process begins execution with three logical areas of memory
 called text, data, and stack.  
@@ -63,7 +63,7 @@ and
 .LP
 There is no call for extending the stack,
 as it is automatically extended as needed.
-.Sh 3 "Mapping pages
+.Sh 3 8 "Mapping pages
 .PP
 The system supports sharing of data between processes
 by allowing pages to be mapped into memory.  These mapped
@@ -205,7 +205,7 @@ caddr_t addr; size_t len;
 This call deletes the mappings for the specified address range,
 and causes further references to addresses within the range
 to generate invalid memory references.
-.Sh 3 "Page protection control
+.Sh 3 10 "Page protection control
 .LP
 A process can control the protection of pages using the call:
 .DS
@@ -216,7 +216,7 @@ caddr_t addr; size_t len; int prot;
 This call changes the specified pages to have protection \fIprot\fP\|.
 Not all implementations will guarantee protection on a page basis