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

2016-01-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 11 07:46:15 UTC 2016

Modified Files:
src/sys/arch/aarch64/include: db_machdep.h

Log Message:
PR port-arm/50641: src/sys/arch/aarch64/include/db_machdep.h:67: possible bad 
if test ?

Fix the bl instruction test.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/include/db_machdep.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/aarch64/include/db_machdep.h
diff -u src/sys/arch/aarch64/include/db_machdep.h:1.1 src/sys/arch/aarch64/include/db_machdep.h:1.2
--- src/sys/arch/aarch64/include/db_machdep.h:1.1	Sun Aug 10 05:47:38 2014
+++ src/sys/arch/aarch64/include/db_machdep.h	Mon Jan 11 07:46:15 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.1 2014/08/10 05:47:38 matt Exp $ */
+/* $NetBSD: db_machdep.h,v 1.2 2016/01/11 07:46:15 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@ extern db_regs_t ddb_regs;
 static inline bool 
 inst_call(db_expr_t insn)
 {
-	return (insn & 0xfc00) == 0x9200	/* bl */
+	return (insn & 0xfc00) == 0x9400	/* bl */
 	|| (insn & 0xfcef) == 0xd63f;	/* blr */
 }
 



CVS commit: src/lib/libm/arch/mips

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 11 01:34:39 UTC 2016

Modified Files:
src/lib/libm/arch/mips: fenv.c

Log Message:
fix lint build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/mips/fenv.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/libm/arch/mips/fenv.c
diff -u src/lib/libm/arch/mips/fenv.c:1.1 src/lib/libm/arch/mips/fenv.c:1.2
--- src/lib/libm/arch/mips/fenv.c:1.1	Mon Dec 21 12:02:02 2015
+++ src/lib/libm/arch/mips/fenv.c	Sun Jan 10 20:34:39 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.c,v 1.1 2015/12/21 17:02:02 christos Exp $	*/
+/*	$NetBSD: fenv.c,v 1.2 2016/01/11 01:34:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 David Schultz 
@@ -28,12 +28,12 @@
  * $FreeBSD: head/lib/msun/mips/fenv.c 226415 2011-10-16 05:37:56Z das $
  */
 #include 
-__RCSID("$NetBSD: fenv.c,v 1.1 2015/12/21 17:02:02 christos Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.2 2016/01/11 01:34:39 christos Exp $");
 
 #define	__fenv_static
 #include "fenv.h"
 
-#if defined(__GNUC_GNU_INLINE__) || defined(__lint__)
+#if defined(__GNUC_GNU_INLINE__) && !defined(__lint__)
 #error "This file must be compiled with C99 'inline' semantics"
 #endif
 



CVS commit: src/sys/dev/filemon

2016-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 11 01:37:36 UTC 2016

Modified Files:
src/sys/dev/filemon: filemon.c filemon.h

Log Message:
Take a reference on the (activity log) file itself, and not on the
descriptor.

Should fix PR kern/50627


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/filemon/filemon.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/filemon/filemon.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/filemon/filemon.c
diff -u src/sys/dev/filemon/filemon.c:1.27 src/sys/dev/filemon/filemon.c:1.28
--- src/sys/dev/filemon/filemon.c:1.27	Sat Jan  9 07:27:31 2016
+++ src/sys/dev/filemon/filemon.c	Mon Jan 11 01:37:36 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: filemon.c,v 1.27 2016/01/09 07:27:31 pgoyette Exp $ */
+/*  $NetBSD: filemon.c,v 1.28 2016/01/11 01:37:36 pgoyette Exp $ */
 /*
  * Copyright (c) 2010, Juniper Networks, Inc.
  *
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.27 2016/01/09 07:27:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.28 2016/01/11 01:37:36 pgoyette Exp $");
 
 #include 
 #include 
@@ -227,7 +227,6 @@ filemon_open(dev_t dev, int oflags __unu
 
 	filemon = kmem_alloc(sizeof(struct filemon), KM_SLEEP);
 	rw_init(>fm_mtx);
-	filemon->fm_fd = -1;
 	filemon->fm_fp = NULL;
 	filemon->fm_pid = curproc->p_pid;
 
@@ -270,7 +269,7 @@ filemon_close(struct file * fp)
 	 */
 	rw_enter(>fm_mtx, RW_WRITER);
 	if (filemon->fm_fp) {
-		fd_putfile(filemon->fm_fd);	/* release our reference */
+		closef(filemon->fm_fp);	/* release our reference */
 		filemon->fm_fp = NULL;
 	}
 	rw_exit(>fm_mtx);
@@ -284,6 +283,7 @@ static int
 filemon_ioctl(struct file * fp, u_long cmd, void *data)
 {
 	int error = 0;
+	int fd;
 	struct filemon *filemon;
 	struct proc *tp;
 
@@ -306,11 +306,11 @@ filemon_ioctl(struct file * fp, u_long c
 
 		/* First, release any current output file descriptor */
 		if (filemon->fm_fp)
-			fd_putfile(filemon->fm_fd);
+			closef(filemon->fm_fp);
 
 		/* Now set up the new one */
-		filemon->fm_fd = *((int *) data);
-		if ((filemon->fm_fp = fd_getfile(filemon->fm_fd)) == NULL) {
+		fd = *((int *) data);
+		if ((filemon->fm_fp = fd_getfile2(curproc, fd)) == NULL) {
 			error = EBADF;
 			break;
 		}

Index: src/sys/dev/filemon/filemon.h
diff -u src/sys/dev/filemon/filemon.h:1.8 src/sys/dev/filemon/filemon.h:1.9
--- src/sys/dev/filemon/filemon.h:1.8	Wed Nov 25 07:34:49 2015
+++ src/sys/dev/filemon/filemon.h	Mon Jan 11 01:37:36 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: filemon.h,v 1.8 2015/11/25 07:34:49 pgoyette Exp $ */
+/* $NetBSD: filemon.h,v 1.9 2016/01/11 01:37:36 pgoyette Exp $ */
 /*
  * Copyright (c) 2010, Juniper Networks, Inc.
  *
@@ -41,7 +41,6 @@ struct filemon {
 	char fm_fname1[MAXPATHLEN];/* Temporary filename buffer. */
 	char fm_fname2[MAXPATHLEN];/* Temporary filename buffer. */
 	char fm_msgbufr[32 + 2 * MAXPATHLEN];	/* Output message buffer. */
-	int fm_fd;			/* Output fd */
 	struct file *fm_fp;	/* Output file pointer. */
 	krwlock_t fm_mtx;		/* Lock mutex for this filemon. */
 	TAILQ_ENTRY(filemon) fm_link;	/* Link into the in-use list. */



CVS commit: src/common/lib/libc/gmon

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 11 01:57:12 UTC 2016

Modified Files:
src/common/lib/libc/gmon: mcount.c

Log Message:
Put back the rump-disabling of mcount for librump. Otherwise the world
breaks because the mcount assembly code is written to call __mcount via
the PLT.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/common/lib/libc/gmon/mcount.c

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

Modified files:

Index: src/common/lib/libc/gmon/mcount.c
diff -u src/common/lib/libc/gmon/mcount.c:1.11 src/common/lib/libc/gmon/mcount.c:1.12
--- src/common/lib/libc/gmon/mcount.c:1.11	Sun Jan 10 04:04:32 2016
+++ src/common/lib/libc/gmon/mcount.c	Sun Jan 10 20:57:12 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcount.c,v 1.11 2016/01/10 09:04:32 ryo Exp $	*/
+/*	$NetBSD: mcount.c,v 1.12 2016/01/11 01:57:12 christos Exp $	*/
 
 /*
  * Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
 #if 0
 static char sccsid[] = "@(#)mcount.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: mcount.c,v 1.11 2016/01/10 09:04:32 ryo Exp $");
+__RCSID("$NetBSD: mcount.c,v 1.12 2016/01/11 01:57:12 christos Exp $");
 #endif
 #endif
 
@@ -106,6 +106,16 @@ _MCOUNT_DECL(u_long, u_long)
 __used;
 #endif
 
+/* XXX: make these interfaces */
+#ifdef _RUMPKERNEL
+#undef MCOUNT_ENTER
+#define MCOUNT_ENTER
+#undef MCOUNT_EXIT
+#define MCOUNT_EXIT
+#undef MCOUNT
+#define MCOUNT
+#endif
+
 /*
  * mcount is called on entry to each function compiled with the profiling
  * switch set.  _mcount(), which is declared in a machine-dependent way



CVS commit: src/share/man/man4

2016-01-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 11 01:45:27 UTC 2016

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

Log Message:
Remove current bug, now that PR kern/50627 is fixed.  Add another security
consideration concerning re-used of the target/monitored process's pid.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/filemon.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/filemon.4
diff -u src/share/man/man4/filemon.4:1.17 src/share/man/man4/filemon.4:1.18
--- src/share/man/man4/filemon.4:1.17	Wed Jan  6 05:22:06 2016
+++ src/share/man/man4/filemon.4	Mon Jan 11 01:45:27 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: filemon.4,v 1.17 2016/01/06 05:22:06 wiz Exp $
+.\"	$NetBSD: filemon.4,v 1.18 2016/01/11 01:45:27 pgoyette Exp $
 .\"
 .\" Copyright (c) 2011, Juniper Networks, Inc.
 .\"
@@ -218,17 +218,11 @@ successful, and is thus more complex to 
 .Sh HISTORY
 .Nm
 was contributed by Juniper Networks.
-.Sh BUGS
-If the file descriptor to which monitored events are being written is
-numerically lower than the descriptor on which
-.Pa /dev/filemon
-is open, the monitoring process will hang when it calls
-.Xr exit 3
-or an attempt is made to close the output file descriptor.
-To avoid the hang, ensure that the file descriptor on which
-.Pa /dev/filemon
-is open gets closed first.
 .Sh SECURITY CONSIDERATIONS
+If the monitored process exits, and its pid gets reused, filemon will
+continue to report events for the new process (and its descendants)
+without any authorization checks.
+.Pp
 Monitoring of a process enables the target process to write to the
 tracking process's file descriptor.
 .Sh RESTRICTIONS



CVS commit: src/share/man/man4

2016-01-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan 11 06:21:23 UTC 2016

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

Log Message:
Use more markup.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/filemon.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/filemon.4
diff -u src/share/man/man4/filemon.4:1.18 src/share/man/man4/filemon.4:1.19
--- src/share/man/man4/filemon.4:1.18	Mon Jan 11 01:45:27 2016
+++ src/share/man/man4/filemon.4	Mon Jan 11 06:21:23 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: filemon.4,v 1.18 2016/01/11 01:45:27 pgoyette Exp $
+.\"	$NetBSD: filemon.4,v 1.19 2016/01/11 06:21:23 wiz Exp $
 .\"
 .\" Copyright (c) 2011, Juniper Networks, Inc.
 .\"
@@ -154,7 +154,7 @@ indicates the version of
 A
 .Nm
 instance is created by opening
-.Dv /dev/filemon .
+.Pa /dev/filemon .
 Then use
 .Fn ioctl filemon_fd FILEMON_SET_PID 
 to identify the target process to monitor, and
@@ -219,9 +219,10 @@ successful, and is thus more complex to 
 .Nm
 was contributed by Juniper Networks.
 .Sh SECURITY CONSIDERATIONS
-If the monitored process exits, and its pid gets reused, filemon will
-continue to report events for the new process (and its descendants)
-without any authorization checks.
+If the monitored process exits, and its pid gets reused,
+.Nm
+will continue to report events for the new process (and its
+descendants) without any authorization checks.
 .Pp
 Monitoring of a process enables the target process to write to the
 tracking process's file descriptor.
@@ -238,8 +239,9 @@ any descendants of such processes can be
 If two processes are monitored, and one is a descendant of the other, events
 related to the descendant process and its further descendants are delivered
 only to the descendant process's monitor.
-If a process is being monitored by two instances of filemon, events will be
-delivered only to the first instance created (when
+If a process is being monitored by two instances of
+.Nm ,
+events will be delivered only to the first instance created (when
 .Pa /dev/filemon
 was opened), regardless of the order in which the monitoring processes
 called



CVS commit: src

2016-01-10 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sun Jan 10 09:04:32 UTC 2016

Modified Files:
src/common/lib/libc/gmon: mcount.c
src/sys/arch/amd64/include: profile.h
src/sys/arch/i386/include: profile.h

Log Message:
__mcount_lock is moved to MI from MD.
because it is needed for all MULTIPROCESSOR arch, but it is exists only in i386 
and amd64.

ok christos@, on tech-kern@


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/gmon/mcount.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/include/profile.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/include/profile.h

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

Modified files:

Index: src/common/lib/libc/gmon/mcount.c
diff -u src/common/lib/libc/gmon/mcount.c:1.10 src/common/lib/libc/gmon/mcount.c:1.11
--- src/common/lib/libc/gmon/mcount.c:1.10	Tue Mar 20 16:21:41 2012
+++ src/common/lib/libc/gmon/mcount.c	Sun Jan 10 09:04:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcount.c,v 1.10 2012/03/20 16:21:41 matt Exp $	*/
+/*	$NetBSD: mcount.c,v 1.11 2016/01/10 09:04:32 ryo Exp $	*/
 
 /*
  * Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -76,12 +76,13 @@
 #if 0
 static char sccsid[] = "@(#)mcount.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: mcount.c,v 1.10 2012/03/20 16:21:41 matt Exp $");
+__RCSID("$NetBSD: mcount.c,v 1.11 2016/01/10 09:04:32 ryo Exp $");
 #endif
 #endif
 
 #include 
 #include 
+#include 
 
 #ifndef _KERNEL
 #include "reentrant.h"
@@ -93,6 +94,10 @@ extern struct gmonparam _gmondummy;
 struct gmonparam *_m_gmon_alloc(void);
 #endif
 
+#if defined(_KERNEL) && !defined(_RUMPKERNEL) && defined(MULTIPROCESSOR)
+__cpu_simple_lock_t __mcount_lock;
+#endif
+
 #ifndef __LINT__
 _MCOUNT_DECL(u_long, u_long)
 #ifdef _KERNEL
@@ -101,16 +106,6 @@ _MCOUNT_DECL(u_long, u_long)
 __used;
 #endif
 
-/* XXX: make these interfaces */
-#ifdef _RUMPKERNEL
-#undef MCOUNT_ENTER
-#define MCOUNT_ENTER
-#undef MCOUNT_EXIT
-#define MCOUNT_EXIT
-#undef MCOUNT
-#define MCOUNT
-#endif
-
 /*
  * mcount is called on entry to each function compiled with the profiling
  * switch set.  _mcount(), which is declared in a machine-dependent way
@@ -155,8 +150,12 @@ _MCOUNT_DECL(u_long frompc, u_long selfp
 	 */
 	if (p->state != GMON_PROF_ON)
 		return;
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(_RUMPKERNEL)
 	MCOUNT_ENTER;
+#ifdef MULTIPROCESSOR
+	__cpu_simple_lock(&__mcount_lock);
+	__insn_barrier();
+#endif
 #endif
 	p->state = GMON_PROF_BUSY;
 	/*
@@ -246,17 +245,25 @@ _MCOUNT_DECL(u_long frompc, u_long selfp
 			*frompcindex = (u_short)toindex;
 			goto done;
 		}
-		
 	}
 done:
 	p->state = GMON_PROF_ON;
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(_RUMPKERNEL)
+#ifdef MULTIPROCESSOR
+	__insn_barrier();
+	__cpu_simple_unlock(&__mcount_lock);
+#endif
 	MCOUNT_EXIT;
 #endif
 	return;
+
 overflow:
 	p->state = GMON_PROF_ERROR;
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(_RUMPKERNEL)
+#ifdef MULTIPROCESSOR
+	__insn_barrier();
+	__cpu_simple_unlock(&__mcount_lock);
+#endif
 	MCOUNT_EXIT;
 #endif
 	return;

Index: src/sys/arch/amd64/include/profile.h
diff -u src/sys/arch/amd64/include/profile.h:1.16 src/sys/arch/amd64/include/profile.h:1.17
--- src/sys/arch/amd64/include/profile.h:1.16	Thu Sep 12 15:36:17 2013
+++ src/sys/arch/amd64/include/profile.h	Sun Jan 10 09:04:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.16 2013/09/12 15:36:17 joerg Exp $	*/
+/*	$NetBSD: profile.h,v 1.17 2016/01/10 09:04:32 ryo Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -34,14 +34,9 @@
 #ifdef __x86_64__
 
 #ifdef _KERNEL_OPT
-#include "opt_multiprocessor.h"
 #include "opt_xen.h"
 #endif
 
-#ifdef _KERNEL
-#include 
-#endif
-
 #define	_MCOUNT_DECL void _mcount
 
 #define EPROL_EXPORT	__asm(".globl _eprol")
@@ -84,27 +79,6 @@ __asm(" .globl __mcount		\n"			\
 
 
 #ifdef _KERNEL
-#ifdef MULTIPROCESSOR
-__cpu_simple_lock_t __mcount_lock;
-
-static inline void
-MCOUNT_ENTER_MP(void)
-{
-	__cpu_simple_lock(&__mcount_lock);
-	__insn_barrier();
-}
-
-static inline void
-MCOUNT_EXIT_MP(void)
-{
-	__insn_barrier();
-	__mcount_lock = __SIMPLELOCK_UNLOCKED;
-}
-#else
-#define MCOUNT_ENTER_MP()
-#define MCOUNT_EXIT_MP()
-#endif
-
 #ifdef XEN
 static inline void
 mcount_disable_intr(void)
@@ -150,14 +124,10 @@ mcount_write_psl(u_long ef)
 }
 
 #endif /* XEN */
-#define	MCOUNT_ENTER			\
-	s = (int)mcount_read_psl();	\
-	mcount_disable_intr();		\
-	MCOUNT_ENTER_MP();
-
-#define	MCOUNT_EXIT			\
-	MCOUNT_EXIT_MP();		\
-	mcount_write_psl(s);
+
+#define MCOUNT_ENTER	\
+	do { s = (int)mcount_read_psl(); mcount_disable_intr(); } while (0)
+#define MCOUNT_EXIT	do { mcount_write_psl(s); } while (0)
 
 #endif /* _KERNEL */
 

Index: src/sys/arch/i386/include/profile.h
diff -u src/sys/arch/i386/include/profile.h:1.33 src/sys/arch/i386/include/profile.h:1.34
--- src/sys/arch/i386/include/profile.h:1.33	Thu Dec 20 23:46:13 2007
+++ 

CVS commit: src/lib/libcurses

2016-01-10 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Jan 10 08:11:07 UTC 2016

Modified Files:
src/lib/libcurses: refresh.c

Log Message:
Clear the "forced" flag after updating a line, otherwise we'll always do
complete line redraws.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/lib/libcurses/refresh.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/libcurses/refresh.c
diff -u src/lib/libcurses/refresh.c:1.79 src/lib/libcurses/refresh.c:1.80
--- src/lib/libcurses/refresh.c:1.79	Thu Feb 20 09:42:42 2014
+++ src/lib/libcurses/refresh.c	Sun Jan 10 08:11:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: refresh.c,v 1.79 2014/02/20 09:42:42 blymn Exp $	*/
+/*	$NetBSD: refresh.c,v 1.80 2016/01/10 08:11:06 jdc Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c	8.7 (Berkeley) 8/13/94";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.79 2014/02/20 09:42:42 blymn Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.80 2016/01/10 08:11:06 jdc Exp $");
 #endif
 #endif/* not lint */
 
@@ -396,7 +396,7 @@ _cursesi_wnoutrefresh(SCREEN *screen, WI
 	"_wnoutrefresh: "
 	"line %d notdirty\n", wy);
 #endif
-	wlp->flags &= ~__ISDIRTY;
+	wlp->flags &= ~(__ISDIRTY | __ISFORCED);
 }
 			}
 		}



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

2016-01-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 10:33:43 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: usb.c usb_subr.c usbdivar.h xhci.c

Log Message:
Bring the following change from HEAD

Get the iManufacturer, iProduct, and iSerialNumber strings before probing
for drivers and cache them for later use.  This reduces bus transactions
and fixes attachment for at least two of my umass(4)s.


To generate a diff of this commit:
cvs rdiff -u -r1.156.2.11 -r1.156.2.12 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.198.2.22 -r1.198.2.23 src/sys/dev/usb/usb_subr.c
cvs rdiff -u -r1.109.2.21 -r1.109.2.22 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.28.2.48 -r1.28.2.49 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/usb.c
diff -u src/sys/dev/usb/usb.c:1.156.2.11 src/sys/dev/usb/usb.c:1.156.2.12
--- src/sys/dev/usb/usb.c:1.156.2.11	Sun Dec 27 12:09:59 2015
+++ src/sys/dev/usb/usb.c	Sun Jan 10 10:33:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.c,v 1.156.2.11 2015/12/27 12:09:59 skrll Exp $	*/
+/*	$NetBSD: usb.c,v 1.156.2.12 2016/01/10 10:33:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.156.2.11 2015/12/27 12:09:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.156.2.12 2016/01/10 10:33:43 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -960,7 +960,7 @@ usbd_add_dev_event(int type, struct usbd
 {
 	struct usb_event *ue = usb_alloc_event();
 
-	usbd_fill_deviceinfo(udev, >u.ue_device, USB_EVENT_IS_ATTACH(type));
+	usbd_fill_deviceinfo(udev, >u.ue_device, false);
 	usb_add_event(type, ue);
 }
 

Index: src/sys/dev/usb/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.198.2.22 src/sys/dev/usb/usb_subr.c:1.198.2.23
--- src/sys/dev/usb/usb_subr.c:1.198.2.22	Mon Dec 28 09:26:33 2015
+++ src/sys/dev/usb/usb_subr.c	Sun Jan 10 10:33:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.198.2.22 2015/12/28 09:26:33 skrll Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.198.2.23 2016/01/10 10:33:43 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.22 2015/12/28 09:26:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.23 2016/01/10 10:33:43 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -166,6 +166,33 @@ usbd_trim_spaces(char *p)
 	*e = '\0';			/* kill trailing spaces */
 }
 
+static void
+usbd_get_device_string(struct usbd_device *ud, uByte index, char **buf)
+{
+	char *b = kmem_alloc(USB_MAX_ENCODED_STRING_LEN, KM_SLEEP);
+	if (b) {
+		usbd_status err = usbd_get_string0(ud, index, b, true);
+		if (err != USBD_NORMAL_COMPLETION) {
+			kmem_free(b, USB_MAX_ENCODED_STRING_LEN);
+			b = NULL;
+		} else {
+			usbd_trim_spaces(b);
+		}
+	}
+	*buf = b;
+}
+
+void
+usbd_get_device_strings(struct usbd_device *ud)
+{
+	usb_device_descriptor_t *udd = >ud_ddesc;
+
+	usbd_get_device_string(ud, udd->iManufacturer, >ud_vendor);
+	usbd_get_device_string(ud, udd->iProduct, >ud_product);
+	usbd_get_device_string(ud, udd->iSerialNumber, >ud_serial);
+}
+
+
 Static void
 usbd_devinfo_vp(struct usbd_device *dev, char *v, size_t vl, char *p,
 size_t pl, int usedev, int useencoded)
@@ -183,6 +210,13 @@ usbd_devinfo_vp(struct usbd_device *dev,
 		if (usbd_get_string0(dev, udd->iProduct, p, useencoded) ==
 		USBD_NORMAL_COMPLETION)
 			usbd_trim_spaces(p);
+	} else {
+		if (dev->ud_vendor) {
+			strlcpy(v, dev->ud_vendor, vl);
+		}
+		if (dev->ud_product) {
+			strlcpy(p, dev->ud_product, pl);
+		}
 	}
 	if (v[0] == '\0')
 		usb_findvendor(v, vl, UGETW(udd->idVendor));
@@ -215,7 +249,7 @@ usbd_devinfo(struct usbd_device *dev, in
 	ep = cp + l;
 
 	usbd_devinfo_vp(dev, vendor, USB_MAX_ENCODED_STRING_LEN,
-	product, USB_MAX_ENCODED_STRING_LEN, 1, 1);
+	product, USB_MAX_ENCODED_STRING_LEN, 0, 1);
 	cp += snprintf(cp, ep - cp, "%s %s", vendor, product);
 	if (showclass)
 		cp += snprintf(cp, ep - cp, ", class %d/%d",
@@ -832,19 +866,10 @@ usbd_attach_roothub(device_t parent, str
 static void
 usbd_serialnumber(device_t dv, struct usbd_device *dev)
 {
-	usb_device_descriptor_t *dd = >ud_ddesc;
-	char *serialnumber;
-
-	serialnumber = kmem_alloc(USB_MAX_ENCODED_STRING_LEN, KM_SLEEP);
-	if (serialnumber == NULL)
-		return;
-	serialnumber[0] = '\0';
-	(void)usbd_get_string(dev, dd->iSerialNumber, serialnumber);
-	if (serialnumber[0]) {
+	if (dev->ud_serial) {
 		prop_dictionary_set_cstring(device_properties(dv),
-		"serialnumber", serialnumber);
+		"serialnumber", dev->ud_serial);
 	}
-	kmem_free(serialnumber, USB_MAX_ENCODED_STRING_LEN);
 }
 
 static usbd_status
@@ -1325,6 +1350,8 @@ usbd_new_device(device_t parent, struct 
 
 	DPRINTF("new dev (addr %d), dev=%p, parent=%p", 

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

2016-01-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 10:16:00 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c ohcivar.h

Log Message:
Do the same loan dance with control transfers as with other transfer
types.  That is,

Use the pipe "tail" TD as our first and loan our first TD to the
next transfer.

Sprinkle the above comment where necessary.

Also, remove a TD from the hash list BEFORE calling into
usb_transfer_complete.  It might get reused when starting the next
transfer.


To generate a diff of this commit:
cvs rdiff -u -r1.254.2.41 -r1.254.2.42 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.55.6.11 -r1.55.6.12 src/sys/dev/usb/ohcivar.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/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.41 src/sys/dev/usb/ohci.c:1.254.2.42
--- src/sys/dev/usb/ohci.c:1.254.2.41	Sat Jan  9 21:45:20 2016
+++ src/sys/dev/usb/ohci.c	Sun Jan 10 10:16:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.41 2016/01/09 21:45:20 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.42 2016/01/10 10:16:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.41 2016/01/09 21:45:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.42 2016/01/10 10:16:00 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1527,11 +1527,11 @@ ohci_softintr(void *v)
 
 		cc = OHCI_TD_GET_CC(O32TOH(std->td.td_flags));
 		if (cc == OHCI_CC_NO_ERROR) {
+			ohci_hash_rem_td(sc, std);
 			if (std->flags & OHCI_CALL_DONE) {
 xfer->ux_status = USBD_NORMAL_COMPLETION;
 usb_transfer_complete(xfer);
 			}
-			ohci_hash_rem_td(sc, std);
 		} else {
 			/*
 			 * Endpoint is halted.  First unlink all the TDs
@@ -1686,7 +1686,10 @@ ohci_device_intr_done(struct usbd_xfer *
 		ohci_soft_td_t *data, *last, *tail;
 		int len = xfer->ux_length;
 
-		/* Use "tail" TD and loan our first TD to next transfer */
+		/*
+		 * Use the pipe "tail" TD as our first and loan our first TD
+		 * to the next transfer.
+		 */
 		data = opipe->tail.td;
 		opipe->tail.td = ox->ox_stds[0];
 		ox->ox_stds[0] = data;
@@ -2728,26 +2731,24 @@ ohci_device_ctrl_init(struct usbd_xfer *
 	struct ohci_xfer *ox = OHCI_XFER2OXFER(xfer);
 	usb_device_request_t *req = >ux_request;
 	ohci_softc_t *sc = OHCI_XFER2SC(xfer);
-	ohci_soft_td_t *stat, *tail;
+	ohci_soft_td_t *stat, *setup;
 	int isread = req->bmRequestType & UT_READ;
 	int len = xfer->ux_bufsize;
 	int err = ENOMEM;
 
 	OHCIHIST_FUNC(); OHCIHIST_CALLED();
 
-	/* The TD for setup will be a 'tail' from elsewhere */
-	stat = ohci_alloc_std(sc);
-	if (stat == NULL) {
+	setup = ohci_alloc_std(sc);
+	if (setup == NULL) {
 		goto bad1;
 	}
-	tail = ohci_alloc_std(sc);
-	if (tail == NULL) {
+	stat = ohci_alloc_std(sc);
+	if (stat == NULL) {
 		goto bad2;
 	}
-	tail->xfer = NULL;
 
+	ox->ox_setup = setup;
 	ox->ox_stat = stat;
-	ox->ox_tdtail = tail;
 	ox->ox_nstd = 0;
 
 	/* Set up data transaction */
@@ -2760,9 +2761,9 @@ ohci_device_ctrl_init(struct usbd_xfer *
 	return 0;
 
  bad3:
-	ohci_free_std(sc, tail);
- bad2:
 	ohci_free_std(sc, stat);
+ bad2:
+	ohci_free_std(sc, setup);
  bad1:
 	return err;
 }
@@ -2778,8 +2779,8 @@ ohci_device_ctrl_fini(struct usbd_xfer *
 	DPRINTFN(8, "xfer %p nstd %d", xfer, ox->ox_nstd, 0, 0);
 
 	mutex_enter(>sc_lock);
-	if (ox->ox_tdtail != opipe->tail.td) {
-		ohci_free_std_locked(sc, ox->ox_tdtail);
+	if (ox->ox_setup != opipe->tail.td) {
+		ohci_free_std_locked(sc, ox->ox_setup);
 	}
 	for (size_t i = 0; i < ox->ox_nstd; i++) {
 		ohci_soft_td_t *std = ox->ox_stds[i];
@@ -2845,10 +2846,16 @@ ohci_device_ctrl_start(struct usbd_xfer 
 	/* Need to take lock here for pipe->tail.td */
 	mutex_enter(>sc_lock);
 
+	/*
+	 * Use the pipe "tail" TD as our first and loan our first TD to the
+	 * next transfer
+	 */
 	setup = opipe->tail.td;
+	opipe->tail.td = ox->ox_setup;
+	ox->ox_setup = setup;
+
 	stat = ox->ox_stat;
-	tail = ox->ox_tdtail;
-	opipe->tail.td = tail;
+	tail = opipe->tail.td;	/* point at sentinel */
 
 	sed = opipe->sed;
 
@@ -3125,7 +3132,10 @@ ohci_device_bulk_start(struct usbd_xfer 
 
 	mutex_enter(>sc_lock);
 
-	/* Use "tail" TD and loan our first TD to next transfer */
+	/*
+	 * Use the pipe "tail" TD as our first and loan our first TD to the
+	 * next transfer
+	 */
 	data = opipe->tail.td;
 	opipe->tail.td = ox->ox_stds[0];
 	ox->ox_stds[0] = data;
@@ -3319,7 +3329,10 @@ ohci_device_intr_start(struct usbd_xfer 
 
 	mutex_enter(>sc_lock);
 
-	/* Use "tail" TD and loan our first TD to next transfer */
+	/*
+	 * Use the pipe "tail" TD as our first and loan our first TD to the
+	 * next transfer.
+	 */
 	data = opipe->tail.td;
 	opipe->tail.td = ox->ox_stds[0];
 	ox->ox_stds[0] = data;

Index: src/sys/dev/usb/ohcivar.h
diff -u src/sys/dev/usb/ohcivar.h:1.55.6.11 

CVS commit: src/sys/dev/i2c

2016-01-10 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Jan 10 14:03:11 UTC 2016

Modified Files:
src/sys/dev/i2c: lm87.c

Log Message:
Correct previous - external temperature 2 is read from the 2.5V register,
not the Vccp2 register.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/lm87.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/i2c/lm87.c
diff -u src/sys/dev/i2c/lm87.c:1.6 src/sys/dev/i2c/lm87.c:1.7
--- src/sys/dev/i2c/lm87.c:1.6	Sun Jan 10 10:20:08 2016
+++ src/sys/dev/i2c/lm87.c	Sun Jan 10 14:03:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lm87.c,v 1.6 2016/01/10 10:20:08 jdc Exp $	*/
+/*	$NetBSD: lm87.c,v 1.7 2016/01/10 14:03:11 jdc Exp $	*/
 /*	$OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.6 2016/01/10 10:20:08 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.7 2016/01/10 14:03:11 jdc Exp $");
 
 #include 
 #include 
@@ -121,7 +121,7 @@ struct lmenv_softc {
 
 	int	sc_fan1_div, sc_fan2_div;
 	int	sc_family;
-	int	sc_channel;
+	uint8_t	sc_channel;
 
 	struct sysmon_envsys *sc_sme;
 	envsys_data_t sc_sensor[LMENV_NUM_SENSORS];
@@ -271,9 +271,15 @@ lmenv_attach(device_t parent, device_t s
 
 	/* Initialize sensor data. */
 	sc->sc_sensor[LMENV_2_5V].state = ENVSYS_SINVALID;
-	sc->sc_sensor[LMENV_2_5V].units = ENVSYS_SVOLTS_DC;
-	strlcpy(sc->sc_sensor[LMENV_2_5V].desc, "+2.5Vin",
-	sizeof(sc->sc_sensor[LMENV_2_5V].desc));
+	if (sc->sc_channel & LM87_CHANNEL_TEMP2) {
+		sc->sc_sensor[LMENV_INT_TEMP].units = ENVSYS_STEMP;
+		strlcpy(sc->sc_sensor[LMENV_2_5V].desc, "External 2",
+		sizeof(sc->sc_sensor[LMENV_2_5V].desc));
+	} else {
+		sc->sc_sensor[LMENV_2_5V].units = ENVSYS_SVOLTS_DC;
+		strlcpy(sc->sc_sensor[LMENV_2_5V].desc, "+2.5Vin",
+		sizeof(sc->sc_sensor[LMENV_2_5V].desc));
+	}
 
 	sc->sc_sensor[LMENV_VCCP1].state = ENVSYS_SINVALID;
 	sc->sc_sensor[LMENV_VCCP1].units = ENVSYS_SVOLTS_DC;
@@ -296,11 +302,7 @@ lmenv_attach(device_t parent, device_t s
 	sizeof(sc->sc_sensor[LMENV_12V].desc));
 
 	sc->sc_sensor[LMENV_VCCP2].state = ENVSYS_SINVALID;
-	if (sc->sc_channel & LM87_CHANNEL_TEMP2) {
-		sc->sc_sensor[LMENV_INT_TEMP].units = ENVSYS_STEMP;
-		strlcpy(sc->sc_sensor[LMENV_VCCP2].desc, "External 2",
-		sizeof(sc->sc_sensor[LMENV_VCCP2].desc));
-	} else {
+	if (!(sc->sc_channel & LM87_CHANNEL_TEMP2)) {
 		sc->sc_sensor[LMENV_VCCP2].units = ENVSYS_SVOLTS_DC;
 		strlcpy(sc->sc_sensor[LMENV_VCCP2].desc, "Vccp2",
 		sizeof(sc->sc_sensor[LMENV_VCCP2].desc));
@@ -380,9 +382,15 @@ lmenv_refresh(struct sysmon_envsys *sme,
 
 	switch (edata->sensor) {
 	case LMENV_2_5V:
-		/* If monitoring external temperature 2, this isn't monitored */
+		/* Might be external temperature 2 */
 		if (sc->sc_channel & LM87_CHANNEL_TEMP2) {
-			edata->state = ENVSYS_SINVALID;
+			if (data == 0x80)
+edata->state = ENVSYS_SINVALID;
+			else {
+edata->value_cur =
+(int8_t)data * 100 + 27315;
+edata->state = ENVSYS_SVALID;
+			}
 			break;
 		}
 		edata->value_cur = 250 * data / 192;
@@ -401,15 +409,9 @@ lmenv_refresh(struct sysmon_envsys *sme,
 		edata->state = ENVSYS_SVALID;
 		break;
 	case LMENV_VCCP2:
-		/* Might be external temperature 2 */
+		/* If monitoring external temperature 2, this isn't monitored */
 		if (sc->sc_channel & LM87_CHANNEL_TEMP2) {
-			if (data == 0x80)
-edata->state = ENVSYS_SINVALID;
-			else {
-edata->value_cur =
-(int8_t)data * 100 + 27315;
-edata->state = ENVSYS_SVALID;
-			}
+			edata->state = ENVSYS_SINVALID;
 			break;
 		}
 		edata->value_cur = 270 * data / 192;



CVS commit: src/sys/dev/i2c

2016-01-10 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Jan 10 10:20:08 UTC 2016

Modified Files:
src/sys/dev/i2c: lm87.c

Log Message:
Add missing register definitions.
Handle LM87 external temperature 2 input, and Vcc input scaling (5V or 3.3V).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/lm87.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/i2c/lm87.c
diff -u src/sys/dev/i2c/lm87.c:1.5 src/sys/dev/i2c/lm87.c:1.6
--- src/sys/dev/i2c/lm87.c:1.5	Sun Sep 27 13:02:21 2015
+++ src/sys/dev/i2c/lm87.c	Sun Jan 10 10:20:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lm87.c,v 1.5 2015/09/27 13:02:21 phx Exp $	*/
+/*	$NetBSD: lm87.c,v 1.6 2016/01/10 10:20:08 jdc Exp $	*/
 /*	$OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.5 2015/09/27 13:02:21 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.6 2016/01/10 10:20:08 jdc Exp $");
 
 #include 
 #include 
@@ -28,25 +28,66 @@ __KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.5
 #include 
 
 /* LM87 registers */
-#define LM87_2_5V	0x20
-#define LM87_VCCP1	0x21
-#define LM87_VCC	0x22
-#define LM87_5V		0x23
-#define LM87_12V	0x24
-#define LM87_VCCP2	0x25
-#define LM87_EXT_TEMP	0x26
-#define LM87_INT_TEMP	0x27
-#define LM87_FAN1	0x28
-#define LM87_FAN2	0x29
-#define LM87_COMPANY_ID	0x3e
-#define LM87_REVISION	0x3f
-#define LM87_CONFIG1	0x40
+#define LM87_INT_HHIGH_L	0x13	/* Hardware int high limit (lockable) */
+#define LM87_EXT_HHIGH_L	0x14	/* Hardware ext high limit (lockable) */
+#define LM87_TEST		0x15
+#define LM87_CHANNEL		0x16	/* Dual purpose pin and scaling */
+#define LM87_INT_HHIGH		0x17	/* Hardware int temp high limit */
+#define LM87_EXT_HHIGH		0x18	/* Hardware ext temp high limit */
+#define LM87_DAC_DATA		0x19	/* DAC output scaling */
+#define LM87_AIN1_LOW		0x1a	/* Analog in 1 low limit */
+#define LM87_AIN2_LOW		0x1b	/* Analog in 2 low limit */
+#define LM87_2_5V		0x20	/* +2.5V or ext temp 2 reading */
+#define LM87_VCCP1		0x21	/* Vccp1 reading */
+#define LM87_VCC		0x22	/* +Vcc reading */
+#define LM87_5V			0x23	/* +5V reading */
+#define LM87_12V		0x24	/* +12V reading */
+#define LM87_VCCP2		0x25	/* Vccp2 reading */
+#define LM87_EXT_TEMP		0x26	/* External tempurature 1 reading */
+#define LM87_INT_TEMP		0x27	/* Internal temperature reading */
+#define LM87_FAN1		0x28	/* Fan1 or AIN1 reading */
+#define LM87_FAN2		0x29	/* Fan2 or AIN2 reading */
+#define LM87_2_5V_HIGH		0x2b	/* +2.5V or ext temp 2 high limit */
+#define LM87_2_5V_LOW		0x2c	/* +2.5V or ext temp 2 low limit */
+#define LM87_VCCP1_HIGH		0x2d	/* Vccp1 high limit */
+#define LM87_VCCP1_LOW		0x2e	/* Vccp1 low limit */
+#define LM87_VCC_HIGH		0x2f	/* +3.3V (Vcc) high limit */
+#define LM87_VCC_LOW		0x30	/* +3.3V (Vcc) low limit */
+#define LM87_5V_HIGH		0x31	/* +5V high limit */
+#define LM87_5V_LOW		0x32	/* +5V low limit */
+#define LM87_12V_HIGH		0x33	/* +12V high limit */
+#define LM87_12V_LOW		0x34	/* +12V low limit */
+#define LM87_VCCP2_HIGH		0x35	/* Vccp2 high limit */
+#define LM87_VCCP2_LOW		0x36	/* Vccp2 low limit */
+#define LM87_EXT_HIGH		0x37	/* External tempurature 1 high limit */
+#define LM87_EXT_LOW		0x38	/* External tempurature low limit */
+#define LM87_INT_HIGH		0x39	/* Internal tempurature 1 high limit */
+#define LM87_INT_LOW		0x3a	/* Internal tempurature low limit */
+#define LM87_FAN1_HIGH		0x3b	/* Fan 1 count or AIN1 high limit */
+#define LM87_FAN2_HIGH		0x3c	/* Fan 2 count or AIN2 high limit */
+#define LM87_COMPANY_ID		0x3e	/* Company ID */
+#define LM87_REVISION		0x3f	/* Revision */
+#define LM87_CONFIG1		0x40	/* Configuration 1 */
+#define LM87_INT_STAT1		0x41	/* Interrupt status 1 */
+#define LM87_INT_STAT2		0x42	/* Interrupt status 2 */
+#define LM87_INT_MASK1		0x43	/* Interrupt mask 1 */
+#define LM87_INT_MASK2		0x44	/* Interrupt mask 2 */
+#define LM87_CI_CLEAR		0x46	/* Chassis intrusion */
+#define LM87_FANDIV		0x47	/* Fan divisor + VID 0-3 */
+#define LM87_VID4		0x48	/* VID4 */
+#define LM87_CONFIG2		0x4a	/* Configuration 2 */
+#define LM87_INT_MIRR1		0x4c	/* Interrupt status 1 mirror */
+#define LM87_INT_MIRR2		0x4d	/* Interrupt status 2 mirror */
+#define LM87_ALERT		0x80	/* SMB Alert enable */
+
+/* Register contents */
 #define  LM87_CONFIG1_START	0x01
 #define  LM87_CONFIG1_INTCLR	0x08
-#define LM87_CHANNEL	0x16
+
 #define  LM87_CHANNEL_AIN1	0x01
 #define  LM87_CHANNEL_AIN2	0x02
-#define LM87_FANDIV	0x47
+#define  LM87_CHANNEL_TEMP2	0x04
+#define  LM87_CHANNEL_VCC5	0x08
 
 struct lmenv_id {
 	u_int8_t id, family;
@@ -80,6 +121,7 @@ struct lmenv_softc {
 
 	int	sc_fan1_div, sc_fan2_div;
 	int	sc_family;
+	int	sc_channel;
 
 	struct sysmon_envsys *sc_sme;
 	envsys_data_t sc_sensor[LMENV_NUM_SENSORS];
@@ -151,7 +193,7 @@ lmenv_attach(device_t parent, device_t s
 {
 	struct lmenv_softc *sc = device_private(self);
 	struct i2c_attach_args *ia 

CVS commit: src/external/bsd/wpa/bin/wpa_supplicant

2016-01-10 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan 10 15:52:36 UTC 2016

Modified Files:
src/external/bsd/wpa/bin/wpa_supplicant: wpa_supplicant.8

Log Message:
Fixup SYNOPSIS some more.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8

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

Modified files:

Index: src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8
diff -u src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.4 src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.5
--- src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.4	Fri Jan  8 23:37:58 2016
+++ src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8	Sun Jan 10 15:52:36 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpa_supplicant.8,v 1.4 2016/01/08 23:37:58 roy Exp $
+.\" $NetBSD: wpa_supplicant.8,v 1.5 2016/01/10 15:52:36 roy Exp $
 .\"
 .\" Copyright (c) 2005 Sam Leffler 
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" Based on:
 .\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8,v 1.2 2005/06/27 06:40:43 ru Exp $
 .\"
-.Dd January 8, 2016
+.Dd January 9, 2016
 .Dt WPA_SUPPLICANT 8
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd WPA/802.11i Supplicant for wireless network devices
 .Sh SYNOPSIS
 .Nm
-.Op Fl BdhLqstuvW
+.Op Fl BdhKLqstvW
 .Op Fl b Ar br_ifname
 .Op Fl C Ar ctrl
 .Fl c Ar config-file
@@ -44,10 +44,12 @@
 .Op Fl f Ar debug-file
 .Op Fl G Ar global-ctrl-group
 .Op Fl g Ar global-ctrl
+.Op Fl I Ar additional-config-file
 .Fl i Ar ifname
 .Op Fl O Ar override-ctrl
 .Op Fl o Ar override-driver
 .Op Fl P Ar pidfile
+.Op Fl p Ar parameters
 .Op Fl N i Ar ifname Fl c Ar config-file ...
 .Sh DESCRIPTION
 The
@@ -119,6 +121,8 @@ Messages are sent to stdout by default, 
 This can be changed with the
 .Fl f
 flag.
+.It Fl e
+Specifies a file to store entropy.
 .It Fl f
 Specifies a file to send debug messages to when enabled with the
 .Fl d



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

2016-01-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 16:06:07 UTC 2016

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

Log Message:
Debug improvements


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.77 -r1.234.2.78 src/sys/dev/usb/ehci.c

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

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.77 src/sys/dev/usb/ehci.c:1.234.2.78
--- src/sys/dev/usb/ehci.c:1.234.2.77	Sat Jan  9 21:47:23 2016
+++ src/sys/dev/usb/ehci.c	Sun Jan 10 16:06:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.77 2016/01/09 21:47:23 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.78 2016/01/10 16:06:07 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.77 2016/01/09 21:47:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.78 2016/01/10 16:06:07 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -1863,10 +1863,30 @@ ehci_dump_exfer(struct ehci_xfer *ex)
 {
 	USBHIST_FUNC(); USBHIST_CALLED(ehcidebug);
 
-	USBHIST_LOG(ehcidebug, "ex = %p sqtdstart = %p end = %p",
-	ex, ex->ex_sqtdstart, ex->ex_sqtdend, 0);
-	USBHIST_LOG(ehcidebug, " itdstart = %p end = %p isdone = %d",
-	ex->ex_itdstart, ex->ex_itdend, ex->ex_isdone, 0);
+	USBHIST_LOG(ehcidebug, "ex = %p type %d isdone", ex, ex->ex_type,
+	ex->ex_isdone, 0);
+
+	switch (ex->ex_type) {
+	case EX_CTRL:
+		USBHIST_LOG(ehcidebug, "   setup = %p data = %p status = %p",
+		ex->ex_setup, ex->ex_data, ex->ex_status, 0);
+		break;
+	case EX_BULK:
+	case EX_INTR:
+		USBHIST_LOG(ehcidebug, "   qtdstart = %p qtdend = %p",
+		ex->ex_sqtdstart, ex->ex_sqtdend, 0, 0);
+		break;
+	case EX_ISOC:
+		USBHIST_LOG(ehcidebug, "   itdstart = %p itdend = %p",
+		ex->ex_itdstart, ex->ex_itdend, 0, 0);
+		break;
+	case EX_FS_ISOC:
+		USBHIST_LOG(ehcidebug, "   sitdstart = %p sitdend = %p",
+		ex->ex_sitdstart, ex->ex_sitdend, 0, 0);
+		break;
+	default:
+		USBHIST_LOG(ehcidebug, "   unknown type", 0, 0, 0, 0);
+	}
 }
 #endif
 
@@ -2980,6 +3000,8 @@ ehci_reset_sqtd_chain(ehci_softc_t *sc, 
 	USBHIST_FUNC(); USBHIST_CALLED(ehcidebug);
 	USBHIST_LOG(ehcidebug, "xfer=%p len %d isread %d toggle %d", xfer,
 	len, isread, *toggle);
+	USBHIST_LOG(ehcidebug, "VA %p", KERNADDR(>ux_dmabuf, 0),
+	0, 0, 0);
 
 	sqtd = prev = NULL;
 	for (i = 0; i < exfer->ex_nsqtd; i++, prev = sqtd) {
@@ -2992,6 +3014,8 @@ ehci_reset_sqtd_chain(ehci_softc_t *sc, 
 
 		USBHIST_LOG(ehcidebug, "sqtd[%d]=%p prev %p len %d", i, sqtd,
 		prev, sqtd->len);
+		USBHIST_LOG(ehcidebug, "va %p bufoff %d pa %p", va, sqtd->bufoff,
+		DMAADDR(>ux_dmabuf, sqtd->bufoff), 0);
 
 		if (prev) {
 			prev->nextqtd = sqtd;



CVS commit: src/share/mk

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 16:22:57 UTC 2016

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

Log Message:
group by directory.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/share/mk/bsd.sys.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.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.249 src/share/mk/bsd.sys.mk:1.250
--- src/share/mk/bsd.sys.mk:1.249	Sun Jan 10 01:13:21 2016
+++ src/share/mk/bsd.sys.mk	Sun Jan 10 11:22:57 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.249 2016/01/10 06:13:21 dholland Exp $
+#	$NetBSD: bsd.sys.mk,v 1.250 2016/01/10 16:22:57 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -15,16 +15,20 @@ error2:
 .endif
 
 .if ${MKREPRO:Uno} == "yes"
-CPPFLAGS+=	-Wp,-iremap,${DESTDIR}:
-CPPFLAGS+=	-Wp,-iremap,${NETBSDSRCDIR}:/usr/src
-CPPFLAGS+=	-Wp,-iremap,${X11SRCDIR}:/usr/xsrc
 .export NETBSDSRCDIR DESTDIR X11SRCDIR
+
 .if !empty(DESTDIR)
+CPPFLAGS+=	-Wp,-iremap,${DESTDIR}:
 REPROFLAGS+=	-fdebug-prefix-map=\$$DESTDIR=
 .endif
+
+CPPFLAGS+=	-Wp,-iremap,${NETBSDSRCDIR}:/usr/src
+CPPFLAGS+=	-Wp,-iremap,${X11SRCDIR}:/usr/xsrc
 REPROFLAGS+=	-fdebug-prefix-map=\$$NETBSDSRCDIR=/usr/src
 REPROFLAGS+=	-fdebug-prefix-map=\$$X11SRCDIR=/usr/xsrc
+
 REPROFLAGS+=	-fdebug-regex-map='/usr/src/(.*)/obj.${MACHINE}=/usr/obj/\1'
+
 CFLAGS+=	${REPROFLAGS}
 CXXFLAGS+=	${REPROFLAGS}
 .endif



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

2016-01-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 16:49:30 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ehcivar.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.42.14.21 -r1.42.14.22 src/sys/dev/usb/ehcivar.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/ehcivar.h
diff -u src/sys/dev/usb/ehcivar.h:1.42.14.21 src/sys/dev/usb/ehcivar.h:1.42.14.22
--- src/sys/dev/usb/ehcivar.h:1.42.14.21	Sun Oct 25 09:50:06 2015
+++ src/sys/dev/usb/ehcivar.h	Sun Jan 10 16:49:29 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehcivar.h,v 1.42.14.21 2015/10/25 09:50:06 skrll Exp $ */
+/*	$NetBSD: ehcivar.h,v 1.42.14.22 2016/01/10 16:49:29 skrll Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -93,10 +93,10 @@ typedef struct ehci_soft_itd {
 
 struct ehci_xfer {
 	struct usbd_xfer ex_xfer;
-	struct usb_task	ex_aborttask;
+	struct usb_task ex_aborttask;
 	TAILQ_ENTRY(ehci_xfer) ex_next; /* list of active xfers */
 	enum {
-		EX_NONE, 
+		EX_NONE,
 		EX_CTRL,
 		EX_BULK,
 		EX_INTR,



CVS import: src/external/bsd/tmux/dist

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 17:55:41 UTC 2016

Update of /cvsroot/src/external/bsd/tmux/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1401

Log Message:
import new tmux

Status:

Vendor Tag: TMUX
Release Tags:   tmux-2-1

C src/external/bsd/tmux/dist/cmd-paste-buffer.c
C src/external/bsd/tmux/dist/tty-acs.c
C src/external/bsd/tmux/dist/tmux.h
U src/external/bsd/tmux/dist/cmd-refresh-client.c
C src/external/bsd/tmux/dist/tty-keys.c
C src/external/bsd/tmux/dist/cmd-capture-pane.c
C src/external/bsd/tmux/dist/session.c
U src/external/bsd/tmux/dist/cmd-run-shell.c
C src/external/bsd/tmux/dist/tmux.1
C src/external/bsd/tmux/dist/options.c
C src/external/bsd/tmux/dist/format.c
U src/external/bsd/tmux/dist/style.c
U src/external/bsd/tmux/dist/cmd-show-environment.c
U src/external/bsd/tmux/dist/cmd-set-buffer.c
U src/external/bsd/tmux/dist/cmd-list-sessions.c
U src/external/bsd/tmux/dist/cmd-list-windows.c
U src/external/bsd/tmux/dist/osdep-freebsd.c
U src/external/bsd/tmux/dist/cmd-respawn-window.c
U src/external/bsd/tmux/dist/cmd-set-option.c
C src/external/bsd/tmux/dist/window-copy.c
U src/external/bsd/tmux/dist/cmd-kill-window.c
C src/external/bsd/tmux/dist/cmd-wait-for.c
N src/external/bsd/tmux/dist/alerts.c
U src/external/bsd/tmux/dist/cmd-list-keys.c
U src/external/bsd/tmux/dist/compat.h
U src/external/bsd/tmux/dist/osdep-netbsd.c
U src/external/bsd/tmux/dist/server.c
U src/external/bsd/tmux/dist/cfg.c
C src/external/bsd/tmux/dist/screen-write.c
U src/external/bsd/tmux/dist/layout.c
U src/external/bsd/tmux/dist/layout-custom.c
U src/external/bsd/tmux/dist/control.c
C src/external/bsd/tmux/dist/window.c
U src/external/bsd/tmux/dist/cmd-rename-session.c
C src/external/bsd/tmux/dist/screen.c
U src/external/bsd/tmux/dist/key-bindings.c
U src/external/bsd/tmux/dist/cmd-clear-history.c
U src/external/bsd/tmux/dist/cmd-list.c
C src/external/bsd/tmux/dist/server-fn.c
U src/external/bsd/tmux/dist/paste.c
U src/external/bsd/tmux/dist/cmd-kill-pane.c
U src/external/bsd/tmux/dist/screen-redraw.c
U src/external/bsd/tmux/dist/window-clock.c
U src/external/bsd/tmux/dist/mdoc2man.awk
U src/external/bsd/tmux/dist/cmd-resize-pane.c
U src/external/bsd/tmux/dist/cmd-rotate-window.c
U src/external/bsd/tmux/dist/xmalloc.c
U src/external/bsd/tmux/dist/cmd-choose-buffer.c
U src/external/bsd/tmux/dist/osdep-linux.c
U src/external/bsd/tmux/dist/cmd-detach-client.c
U src/external/bsd/tmux/dist/grid-view.c
U src/external/bsd/tmux/dist/osdep-darwin.c
U src/external/bsd/tmux/dist/cmd-choose-client.c
U src/external/bsd/tmux/dist/window-choose.c
U src/external/bsd/tmux/dist/cmd-new-window.c
U src/external/bsd/tmux/dist/cmd-confirm-before.c
U src/external/bsd/tmux/dist/options-table.c
U src/external/bsd/tmux/dist/osdep-hpux.c
U src/external/bsd/tmux/dist/cmd-display-panes.c
U src/external/bsd/tmux/dist/cmd-kill-session.c
U src/external/bsd/tmux/dist/key-string.c
C src/external/bsd/tmux/dist/input.c
C src/external/bsd/tmux/dist/client.c
U src/external/bsd/tmux/dist/cmd-command-prompt.c
U src/external/bsd/tmux/dist/cmd-queue.c
U src/external/bsd/tmux/dist/cmd-list-clients.c
C src/external/bsd/tmux/dist/cmd-display-message.c
U src/external/bsd/tmux/dist/cmd-show-options.c
U src/external/bsd/tmux/dist/cmd-break-pane.c
U src/external/bsd/tmux/dist/xterm-keys.c
C src/external/bsd/tmux/dist/colour.c
U src/external/bsd/tmux/dist/names.c
U src/external/bsd/tmux/dist/cmd-select-window.c
U src/external/bsd/tmux/dist/cmd-find-window.c
U src/external/bsd/tmux/dist/cmd-lock-server.c
U src/external/bsd/tmux/dist/cmd-attach-session.c
U src/external/bsd/tmux/dist/cmd-join-pane.c
U src/external/bsd/tmux/dist/array.h
C src/external/bsd/tmux/dist/tty-term.c
U src/external/bsd/tmux/dist/osdep-unknown.c
U src/external/bsd/tmux/dist/utf8.c
C src/external/bsd/tmux/dist/log.c
C src/external/bsd/tmux/dist/cmd-send-keys.c
U src/external/bsd/tmux/dist/cmd-swap-pane.c
U src/external/bsd/tmux/dist/osdep-aix.c
U src/external/bsd/tmux/dist/osdep-openbsd.c
U src/external/bsd/tmux/dist/cmd-pipe-pane.c
C src/external/bsd/tmux/dist/input-keys.c
U src/external/bsd/tmux/dist/cmd-choose-tree.c
C src/external/bsd/tmux/dist/cmd-string.c
C src/external/bsd/tmux/dist/cmd-show-messages.c
N src/external/bsd/tmux/dist/cmd-find.c
U src/external/bsd/tmux/dist/cmd-set-environment.c
U src/external/bsd/tmux/dist/cmd-new-session.c
U src/external/bsd/tmux/dist/cmd-split-window.c
N src/external/bsd/tmux/dist/osdep-cygwin.c
U src/external/bsd/tmux/dist/osdep-sunos.c
U src/external/bsd/tmux/dist/cmd-source-file.c
C src/external/bsd/tmux/dist/grid.c
U src/external/bsd/tmux/dist/cmd-switch-client.c
C src/external/bsd/tmux/dist/environ.c
C src/external/bsd/tmux/dist/status.c
U src/external/bsd/tmux/dist/notify.c
U src/external/bsd/tmux/dist/cmd-select-layout.c
U src/external/bsd/tmux/dist/cmd-swap-window.c
U src/external/bsd/tmux/dist/arguments.c
C src/external/bsd/tmux/dist/cmd-if-shell.c
U src/external/bsd/tmux/dist/signal.c
U 

CVS commit: src/sys/ufs/lfs

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 16:14:27 UTC 2016

Modified Files:
src/sys/ufs/lfs: lfs_accessors.h

Log Message:
there is no reason to use __unused here.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/lfs/lfs_accessors.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/ufs/lfs/lfs_accessors.h
diff -u src/sys/ufs/lfs/lfs_accessors.h:1.41 src/sys/ufs/lfs/lfs_accessors.h:1.42
--- src/sys/ufs/lfs/lfs_accessors.h:1.41	Sat Jan  9 21:40:21 2016
+++ src/sys/ufs/lfs/lfs_accessors.h	Sun Jan 10 11:14:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_accessors.h,v 1.41 2016/01/10 02:40:21 dholland Exp $	*/
+/*	$NetBSD: lfs_accessors.h,v 1.42 2016/01/10 16:14:27 christos Exp $	*/
 
 /*  from NetBSD: lfs.h,v 1.165 2015/07/24 06:59:32 dholland Exp  */
 /*  from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp  */
@@ -255,7 +255,7 @@
 #define LFS_NEXTDIR(fs, dp) \
 	((LFS_DIRHEADER *)((char *)(dp) + lfs_dir_getreclen(fs, dp)))
 
-static __unused inline char *
+static __inline char *
 lfs_dir_nameptr(const STRUCT_LFS *fs, LFS_DIRHEADER *dh)
 {
 	if (fs->lfs_is64) {
@@ -265,7 +265,7 @@ lfs_dir_nameptr(const STRUCT_LFS *fs, LF
 	}
 }
 
-static __unused inline uint64_t
+static __inline uint64_t
 lfs_dir_getino(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
 	if (fs->lfs_is64) {
@@ -285,7 +285,7 @@ lfs_dir_getino(const STRUCT_LFS *fs, con
 	}
 }
 
-static __unused inline uint16_t
+static __inline uint16_t
 lfs_dir_getreclen(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
 	if (fs->lfs_is64) {
@@ -295,7 +295,7 @@ lfs_dir_getreclen(const STRUCT_LFS *fs, 
 	}
 }
 
-static __unused inline uint8_t
+static __inline uint8_t
 lfs_dir_gettype(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
 	if (fs->lfs_is64) {
@@ -308,7 +308,7 @@ lfs_dir_gettype(const STRUCT_LFS *fs, co
 	}
 }
 
-static __unused inline uint8_t
+static __inline uint8_t
 lfs_dir_getnamlen(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
 	if (fs->lfs_is64) {
@@ -322,7 +322,7 @@ lfs_dir_getnamlen(const STRUCT_LFS *fs, 
 	}
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setino(STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint64_t ino)
 {
 	if (fs->lfs_is64) {
@@ -341,7 +341,7 @@ lfs_dir_setino(STRUCT_LFS *fs, LFS_DIRHE
 	}
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setreclen(STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint16_t reclen)
 {
 	if (fs->lfs_is64) {
@@ -351,7 +351,7 @@ lfs_dir_setreclen(STRUCT_LFS *fs, LFS_DI
 	}
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_settype(const STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint8_t type)
 {
 	if (fs->lfs_is64) {
@@ -365,7 +365,7 @@ lfs_dir_settype(const STRUCT_LFS *fs, LF
 	}
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setnamlen(const STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint8_t namlen)
 {
 	if (fs->lfs_is64) {
@@ -379,7 +379,7 @@ lfs_dir_setnamlen(const STRUCT_LFS *fs, 
 	}
 }
 
-static __unused inline void
+static __inline void
 lfs_copydirname(STRUCT_LFS *fs, char *dest, const char *src,
 		unsigned namlen, unsigned reclen)
 {
@@ -395,7 +395,7 @@ lfs_copydirname(STRUCT_LFS *fs, char *de
 	memset(dest + namlen, '\0', spacelen - namlen);
 }
 
-static __unused inline LFS_DIRHEADER *
+static __inline LFS_DIRHEADER *
 lfs_dirtemplate_dotdot(STRUCT_LFS *fs, union lfs_dirtemplate *dt)
 {
 	/* XXX blah, be nice to have a way to do this w/o casts */
@@ -406,7 +406,7 @@ lfs_dirtemplate_dotdot(STRUCT_LFS *fs, u
 	}
 }
 
-static __unused inline char *
+static __inline char *
 lfs_dirtemplate_dotdotname(STRUCT_LFS *fs, union lfs_dirtemplate *dt)
 {
 	if (fs->lfs_is64) {
@@ -434,7 +434,7 @@ lfs_dirtemplate_dotdotname(STRUCT_LFS *f
 #define DINO_IN_BLOCK(fs, base, ix) \
 	((union lfs_dinode *)((char *)(base) + DINOSIZE(fs) * (ix)))
 
-static __unused inline void
+static __inline void
 lfs_copy_dinode(STRUCT_LFS *fs,
 union lfs_dinode *dst, const union lfs_dinode *src)
 {
@@ -452,7 +452,7 @@ lfs_copy_dinode(STRUCT_LFS *fs,
 }
 
 #define LFS_DEF_DINO_ACCESSOR(type, type32, field) \
-	static __unused inline type\
+	static __inline type\
 	lfs_dino_get##field(STRUCT_LFS *fs, union lfs_dinode *dip) \
 	{			\
 		if (fs->lfs_is64) {\
@@ -461,7 +461,7 @@ lfs_copy_dinode(STRUCT_LFS *fs,
 			return LFS_SWAP_##type32(fs, dip->u_32.di_##field); \
 		}		\
 	}			\
-	static __unused inline void\
+	static __inline void\
 	lfs_dino_set##field(STRUCT_LFS *fs, union lfs_dinode *dip, type val) \
 	{			\
 		if (fs->lfs_is64) {\
@@ -494,7 +494,7 @@ LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t
 /* XXX this should be done differently (it's a fake field) */
 LFS_DEF_DINO_ACCESSOR(uint64_t, int32_t, rdev);
 
-static __unused inline daddr_t
+static __inline daddr_t
 lfs_dino_getdb(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix)
 {
 	KASSERT(ix < ULFS_NDADDR);
@@ -506,7 +506,7 @@ 

CVS commit: src/external/bsd/wpa/bin/wpa_supplicant

2016-01-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 10 20:31:13 UTC 2016

Modified Files:
src/external/bsd/wpa/bin/wpa_supplicant: wpa_supplicant.8

Log Message:
Add arguments to options in description.
Replace manual xref with Xr.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8

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

Modified files:

Index: src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8
diff -u src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.5 src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.6
--- src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.5	Sun Jan 10 15:52:36 2016
+++ src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8	Sun Jan 10 20:31:13 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpa_supplicant.8,v 1.5 2016/01/10 15:52:36 roy Exp $
+.\" $NetBSD: wpa_supplicant.8,v 1.6 2016/01/10 20:31:13 wiz Exp $
 .\"
 .\" Copyright (c) 2005 Sam Leffler 
 .\" All rights reserved.
@@ -108,11 +108,11 @@ The following options are available:
 .It Fl B
 Detach from the controlling terminal and run as a daemon process
 in the background.
-.It Fl b
+.It Fl b Ar br_ifname
 Optional bridge interface name.
-.It Fl C
+.It Fl C Ar ctrl
 Control interface parameter.
-.It Fl D
+.It Fl D Ar driver
 Driver name (can be either bsd or wired)
 .It Fl d
 Enable debugging messages.
@@ -121,19 +121,19 @@ Messages are sent to stdout by default, 
 This can be changed with the
 .Fl f
 flag.
-.It Fl e
+.It Fl e Ar entropy-file
 Specifies a file to store entropy.
-.It Fl f
+.It Fl f Ar debug-file
 Specifies a file to send debug messages to when enabled with the
 .Fl d
 flag.
-.It Fl G
+.It Fl G Ar global-ctrl-group
 Global control interface group.
-.It Fl g
+.It Fl g Ar global-ctrl
 Global control interface.
 .It Fl h
 Show help text.
-.It Fl I
+.It Fl I Ar additional-config-file
 Additional configuration file.
 .It Fl K
 Include key information in debugging output.
@@ -144,20 +144,22 @@ Specify an additional interface and conf
 If multiple interfaces are specified then
 .Nm
 will manage them all with a single process.
-.It Fl O
+.It Fl O Ar override-ctrl
 Override ctrl_interface parameter for new interface.
-.It Fl o
+.It Fl o Ar override-driver
 Override driver paramter for new interface.
-.It Fl P
+.It Fl P Ar pidfile
 File in which to save the process PID.
-.It Fl p
+.It Fl p Ar parameters
 Specify driver parameters.
 .It Fl q
 Decrease debugging verbosity (i.e., counteract the use of the
 .Fl d
 flag).
 .It Fl s
-Send log messages through syslog(3) instead of to the terminal.
+Send log messages through
+.Xr syslog 3
+instead of to the terminal.
 .It Fl t
 Include timestamp in debug messages.
 .It Fl v



CVS import: src/external/gpl2/grep/dist

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 21:36:21 UTC 2016

Update of /cvsroot/src/external/gpl2/grep/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7769

Log Message:
Import latest GPLv2 grep

Status:

Vendor Tag: FSF
Release Tags:   grep-2-5-1a

N src/external/gpl2/grep/dist/ABOUT-NLS
N src/external/gpl2/grep/dist/README
N src/external/gpl2/grep/dist/ChangeLog
N src/external/gpl2/grep/dist/AUTHORS
N src/external/gpl2/grep/dist/Makefile.am
N src/external/gpl2/grep/dist/Makefile.cvs
N src/external/gpl2/grep/dist/NEWS
N src/external/gpl2/grep/dist/README-alpha
N src/external/gpl2/grep/dist/README.DOS
N src/external/gpl2/grep/dist/THANKS
N src/external/gpl2/grep/dist/TODO
N src/external/gpl2/grep/dist/autogen.sh
N src/external/gpl2/grep/dist/configure.in
N src/external/gpl2/grep/dist/grep.spec
N src/external/gpl2/grep/dist/mkinstalldirs
N src/external/gpl2/grep/dist/aclocal.m4
N src/external/gpl2/grep/dist/config.hin
N src/external/gpl2/grep/dist/install-sh
N src/external/gpl2/grep/dist/config.guess
N src/external/gpl2/grep/dist/missing
N src/external/gpl2/grep/dist/config.sub
N src/external/gpl2/grep/dist/INSTALL
N src/external/gpl2/grep/dist/COPYING
N src/external/gpl2/grep/dist/stamp-h.in
N src/external/gpl2/grep/dist/Makefile.in
N src/external/gpl2/grep/dist/depcomp
N src/external/gpl2/grep/dist/configure
N src/external/gpl2/grep/dist/doc/Makefile.am
N src/external/gpl2/grep/dist/doc/grep.1
N src/external/gpl2/grep/dist/doc/grep.texi
N src/external/gpl2/grep/dist/doc/egrep.man
N src/external/gpl2/grep/dist/doc/fgrep.man
N src/external/gpl2/grep/dist/doc/mdate-sh
N src/external/gpl2/grep/dist/doc/texinfo.tex
N src/external/gpl2/grep/dist/doc/Makefile.in
N src/external/gpl2/grep/dist/intl/ChangeLog
N src/external/gpl2/grep/dist/intl/Makefile
N src/external/gpl2/grep/dist/intl/bindtextdom.c
N src/external/gpl2/grep/dist/intl/Makefile.in
N src/external/gpl2/grep/dist/intl/VERSION
N src/external/gpl2/grep/dist/intl/explodename.c
N src/external/gpl2/grep/dist/intl/dcgettext.c
N src/external/gpl2/grep/dist/intl/dgettext.c
N src/external/gpl2/grep/dist/intl/hash-string.h
N src/external/gpl2/grep/dist/intl/finddomain.c
N src/external/gpl2/grep/dist/intl/gettext.c
N src/external/gpl2/grep/dist/intl/gettextP.h
N src/external/gpl2/grep/dist/intl/eval-plural.h
N src/external/gpl2/grep/dist/intl/intl-compat.c
N src/external/gpl2/grep/dist/intl/l10nflist.c
N src/external/gpl2/grep/dist/intl/loadinfo.h
N src/external/gpl2/grep/dist/intl/loadmsgcat.c
N src/external/gpl2/grep/dist/intl/localealias.c
N src/external/gpl2/grep/dist/intl/textdomain.c
N src/external/gpl2/grep/dist/intl/config.charset
N src/external/gpl2/grep/dist/intl/dcigettext.c
N src/external/gpl2/grep/dist/intl/dcngettext.c
N src/external/gpl2/grep/dist/intl/dngettext.c
N src/external/gpl2/grep/dist/intl/libgnuintl.h
N src/external/gpl2/grep/dist/intl/gmo.h
N src/external/gpl2/grep/dist/intl/localcharset.c
N src/external/gpl2/grep/dist/intl/libintl.glibc
N src/external/gpl2/grep/dist/intl/localename.c
N src/external/gpl2/grep/dist/intl/locale.alias
N src/external/gpl2/grep/dist/intl/ngettext.c
N src/external/gpl2/grep/dist/intl/os2compat.c
N src/external/gpl2/grep/dist/intl/os2compat.h
N src/external/gpl2/grep/dist/intl/osdep.c
N src/external/gpl2/grep/dist/intl/plural-exp.c
N src/external/gpl2/grep/dist/intl/plural-exp.h
N src/external/gpl2/grep/dist/intl/plural.c
N src/external/gpl2/grep/dist/intl/plural.y
N src/external/gpl2/grep/dist/intl/ref-add.sin
N src/external/gpl2/grep/dist/intl/ref-del.sin
N src/external/gpl2/grep/dist/lib/hard-locale.c
N src/external/gpl2/grep/dist/lib/Makefile.am
N src/external/gpl2/grep/dist/lib/alloca.c
N src/external/gpl2/grep/dist/lib/atexit.c
N src/external/gpl2/grep/dist/lib/closeout.c
N src/external/gpl2/grep/dist/lib/closeout.h
N src/external/gpl2/grep/dist/lib/error.c
N src/external/gpl2/grep/dist/lib/error.h
N src/external/gpl2/grep/dist/lib/exclude.c
N src/external/gpl2/grep/dist/lib/exclude.h
N src/external/gpl2/grep/dist/lib/fnmatch.c
N src/external/gpl2/grep/dist/lib/fnmatch.h
N src/external/gpl2/grep/dist/lib/getopt.c
N src/external/gpl2/grep/dist/lib/getopt.h
N src/external/gpl2/grep/dist/lib/getopt1.c
N src/external/gpl2/grep/dist/lib/hard-locale.h
N src/external/gpl2/grep/dist/lib/isdir.c
N src/external/gpl2/grep/dist/lib/malloc.c
N src/external/gpl2/grep/dist/lib/memchr.c
N src/external/gpl2/grep/dist/lib/obstack.c
N src/external/gpl2/grep/dist/lib/obstack.h
N src/external/gpl2/grep/dist/lib/quotearg.c
N src/external/gpl2/grep/dist/lib/quotearg.h
N src/external/gpl2/grep/dist/lib/realloc.c
N src/external/gpl2/grep/dist/lib/regex.c
N src/external/gpl2/grep/dist/lib/regex.h
N src/external/gpl2/grep/dist/lib/savedir.c
N src/external/gpl2/grep/dist/lib/savedir.h
N src/external/gpl2/grep/dist/lib/stpcpy.c
N src/external/gpl2/grep/dist/lib/strtol.c
N src/external/gpl2/grep/dist/lib/strtoul.c
N src/external/gpl2/grep/dist/lib/strtoull.c
N 

CVS commit: src/doc

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 19:06:08 UTC 2016

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
update tmux info


To generate a diff of this commit:
cvs rdiff -u -r1.1289 -r1.1290 src/doc/3RDPARTY
cvs rdiff -u -r1.2129 -r1.2130 src/doc/CHANGES

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.1289 src/doc/3RDPARTY:1.1290
--- src/doc/3RDPARTY:1.1289	Sat Jan  9 17:07:53 2016
+++ src/doc/3RDPARTY	Sun Jan 10 14:06:08 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1289 2016/01/09 22:07:53 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1290 2016/01/10 19:06:08 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1299,13 +1299,13 @@ Use src/gnu/dist/texinfo/texinfo2netbsd 
 for the import.
 
 Package:	tmux
-Version:	1.9a
+Version:	2.1
 Current Vers:	2.1
-Maintainer:	Nicholas Marriott <n...@users.sourceforge.net>
-Archive site:	http://downloads.sourceforge.net/tmux/
-Home page:	http://tmux.sourceforge.net/
-Mailing List:	tmux-us...@lists.sourceforge.net
-Responsible:	jmmv
+Maintainer:	Nicholas Marriott <nicholas.marri...@gmail.com>
+Archive site:	https://github.com/tmux/tmux
+Home page:	http://tmux.github.io
+Mailing List:	tmux-us...@googlegroups.com
+Responsible:	christos
 License:	BSD
 Location:	external/bsd/tmux/dist
 Notes:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2129 src/doc/CHANGES:1.2130
--- src/doc/CHANGES:1.2129	Sat Jan  9 17:07:53 2016
+++ src/doc/CHANGES	Sun Jan 10 14:06:08 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2129 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2130 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -242,3 +242,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	flex(1): Import flex-2.6.0 [christos 20160109]
 	acpi(4): Updated ACPICA to 20160108. [christos 20160109]
 	byacc: update to 20150711 [christos 20160109]
+	tmux(1): Import of tmux 2.1 [christos 20160110]



CVS import: src/external/bsd/dhcp/dist

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 19:44:49 UTC 2016

Update of /cvsroot/src/external/bsd/dhcp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3239

Log Message:
import new dhcp

Status:

Vendor Tag: ISC
Release Tags:   DHCP4_3_3

U src/external/bsd/dhcp/dist/aclocal.m4
U src/external/bsd/dhcp/dist/config.guess
U src/external/bsd/dhcp/dist/compile
U src/external/bsd/dhcp/dist/config.sub
U src/external/bsd/dhcp/dist/configure
U src/external/bsd/dhcp/dist/configure.ac
U src/external/bsd/dhcp/dist/depcomp
U src/external/bsd/dhcp/dist/install-sh
U src/external/bsd/dhcp/dist/LICENSE
U src/external/bsd/dhcp/dist/Makefile.am
U src/external/bsd/dhcp/dist/Makefile.in
U src/external/bsd/dhcp/dist/missing
U src/external/bsd/dhcp/dist/README
U src/external/bsd/dhcp/dist/RELNOTES
N src/external/bsd/dhcp/dist/bind/bind.tar.gz
N src/external/bsd/dhcp/dist/bind/Makefile.in
N src/external/bsd/dhcp/dist/bind/version.tmp
U src/external/bsd/dhcp/dist/doc/api+protocol
U src/external/bsd/dhcp/dist/doc/IANA-arp-parameters
U src/external/bsd/dhcp/dist/doc/References.html
U src/external/bsd/dhcp/dist/doc/Makefile
U src/external/bsd/dhcp/dist/doc/References.xml
U src/external/bsd/dhcp/dist/doc/References.txt
U src/external/bsd/dhcp/dist/doc/devel/contrib.dox
U src/external/bsd/dhcp/dist/doc/devel/arch.dox
U src/external/bsd/dhcp/dist/doc/devel/atf.dox
U src/external/bsd/dhcp/dist/doc/devel/debug.dox
U src/external/bsd/dhcp/dist/doc/devel/doxyfile.in
U src/external/bsd/dhcp/dist/doc/devel/isc-logo.jpg
U src/external/bsd/dhcp/dist/doc/devel/mainpage.dox
U src/external/bsd/dhcp/dist/doc/devel/omapi.dox
U src/external/bsd/dhcp/dist/doc/devel/qa.dox
U src/external/bsd/dhcp/dist/doc/examples/dhclient-dhcpv6.conf
U src/external/bsd/dhcp/dist/doc/examples/dhcpd-dhcpv6.conf
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient-script.8
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.8
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.conf.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.leases.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-eval.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-options.5
U src/external/bsd/dhcp/dist/client/dhclient-script.8
U src/external/bsd/dhcp/dist/client/clparse.c
C src/external/bsd/dhcp/dist/client/dhc6.c
U src/external/bsd/dhcp/dist/client/dhclient.conf.5
C src/external/bsd/dhcp/dist/client/dhclient.8
C src/external/bsd/dhcp/dist/client/dhclient.c
U src/external/bsd/dhcp/dist/client/dhclient.conf.example
U src/external/bsd/dhcp/dist/client/dhclient.leases.5
U src/external/bsd/dhcp/dist/client/Makefile.am
U src/external/bsd/dhcp/dist/client/Makefile.in
U src/external/bsd/dhcp/dist/client/scripts/freebsd
U src/external/bsd/dhcp/dist/client/scripts/bsdos
U src/external/bsd/dhcp/dist/client/scripts/macos
U src/external/bsd/dhcp/dist/client/scripts/linux
U src/external/bsd/dhcp/dist/client/scripts/netbsd
U src/external/bsd/dhcp/dist/client/scripts/nextstep
U src/external/bsd/dhcp/dist/client/scripts/openbsd
U src/external/bsd/dhcp/dist/client/scripts/openwrt
U src/external/bsd/dhcp/dist/client/scripts/solaris
N src/external/bsd/dhcp/dist/client/tests/duid0_test.txt
N src/external/bsd/dhcp/dist/client/tests/Atffile
N src/external/bsd/dhcp/dist/client/tests/duid_unittest.c
N src/external/bsd/dhcp/dist/client/tests/duid1_test.txt
N src/external/bsd/dhcp/dist/client/tests/duid2_test.txt
N src/external/bsd/dhcp/dist/client/tests/duid3_test.txt
N src/external/bsd/dhcp/dist/client/tests/Makefile.am
N src/external/bsd/dhcp/dist/client/tests/Makefile.in
C src/external/bsd/dhcp/dist/common/conflex.c
C src/external/bsd/dhcp/dist/common/alloc.c
C src/external/bsd/dhcp/dist/common/bpf.c
U src/external/bsd/dhcp/dist/common/comapi.c
U src/external/bsd/dhcp/dist/common/dhcp-eval.5
U src/external/bsd/dhcp/dist/common/ctrace.c
U src/external/bsd/dhcp/dist/common/parse.c
U src/external/bsd/dhcp/dist/common/dhcp-options.5
C src/external/bsd/dhcp/dist/common/discover.c
U src/external/bsd/dhcp/dist/common/dispatch.c
U src/external/bsd/dhcp/dist/common/dlpi.c
C src/external/bsd/dhcp/dist/common/dns.c
U src/external/bsd/dhcp/dist/common/ethernet.c
U src/external/bsd/dhcp/dist/common/execute.c
U src/external/bsd/dhcp/dist/common/fddi.c
U src/external/bsd/dhcp/dist/common/icmp.c
U src/external/bsd/dhcp/dist/common/inet.c
U src/external/bsd/dhcp/dist/common/lpf.c
U src/external/bsd/dhcp/dist/common/Makefile.am
U src/external/bsd/dhcp/dist/common/Makefile.in
U src/external/bsd/dhcp/dist/common/memory.c
U src/external/bsd/dhcp/dist/common/nit.c
C src/external/bsd/dhcp/dist/common/ns_name.c
U src/external/bsd/dhcp/dist/common/options.c
C src/external/bsd/dhcp/dist/common/packet.c
U src/external/bsd/dhcp/dist/common/print.c
U src/external/bsd/dhcp/dist/common/raw.c
U src/external/bsd/dhcp/dist/common/resolv.c
U src/external/bsd/dhcp/dist/common/socket.c
U src/external/bsd/dhcp/dist/common/tables.c
U src/external/bsd/dhcp/dist/common/tree.c
U 

CVS commit: src/external/gpl2

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:19:41 UTC 2016

Modified Files:
src/external/gpl2: Makefile

Log Message:
build grep from here.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/Makefile

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

Modified files:

Index: src/external/gpl2/Makefile
diff -u src/external/gpl2/Makefile:1.5 src/external/gpl2/Makefile:1.6
--- src/external/gpl2/Makefile:1.5	Wed Apr  8 13:24:55 2009
+++ src/external/gpl2/Makefile	Sun Jan 10 17:19:41 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2009/04/08 17:24:55 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2016/01/10 22:19:41 christos Exp $
 
 .include 
 
@@ -9,4 +9,6 @@ SUBDIR+= xcvs
 SUBDIR+= lvm2
 .endif
 
+SUBDIR+= grep
+
 .include 



CVS commit: src/gnu/dist/grep

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:20:13 UTC 2016

Removed Files:
src/gnu/dist/grep: ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL
Makefile.am Makefile.cvs Makefile.in NEWS README README-alpha
README.DOS THANKS TODO aclocal.m4 autogen.sh config.guess
config.hin config.sub configure configure.in depcomp grep.spec
grep2netbsd install-sh missing mkinstalldirs stamp-h.in
src/gnu/dist/grep/doc: Makefile.am Makefile.in egrep.man fgrep.man
grep.1 grep.texi mdate-sh
src/gnu/dist/grep/intl: ChangeLog Makefile Makefile.in VERSION
bindtextdom.c config.charset dcgettext.c dcigettext.c dcngettext.c
dgettext.c dngettext.c eval-plural.h explodename.c finddomain.c
gettext.c gettextP.h gmo.h hash-string.h intl-compat.c l10nflist.c
libgnuintl.h libintl.glibc loadinfo.h loadmsgcat.c localcharset.c
locale.alias localealias.c localename.c ngettext.c os2compat.c
os2compat.h osdep.c plural-exp.c plural-exp.h plural.c plural.y
ref-add.sin ref-del.sin textdomain.c
src/gnu/dist/grep/lib: Makefile.am Makefile.in alloca.c atexit.c
closeout.c closeout.h error.c error.h exclude.c exclude.h fnmatch.c
fnmatch.h getopt.c getopt.h getopt1.c hard-locale.c hard-locale.h
isdir.c malloc.c memchr.c obstack.c obstack.h quotearg.c quotearg.h
realloc.c regex.c regex.h savedir.c savedir.h stpcpy.c strtol.c
strtoul.c strtoull.c strtoumax.c xalloc.h xmalloc.c xstrtol.c
xstrtol.h xstrtoumax.c
src/gnu/dist/grep/lib/posix: Makefile.am Makefile.in regex.h
src/gnu/dist/grep/po: ChangeLog Makefile.in.in POTFILES.in bg.po ca.po
cat-id-tbl.c cs.gmo cs.po da.po de.gmo de.po el.gmo el.po eo.gmo
eo.po es.gmo es.po et.gmo et.po fr.gmo fr.po gl.gmo gl.po grep.pot
hr.gmo hr.po id.gmo id.po it.gmo it.po ja.gmo ja.po ko.gmo ko.po
nb.po nl.gmo nl.po no.gmo no.po pl.gmo pl.po pt_BR.gmo pt_BR.po
ru.gmo ru.po sl.gmo sl.po sv.gmo sv.po tr.po
src/gnu/dist/grep/src: Makefile.am Makefile.in ansi2knr.1 ansi2knr.c
dfa.c dfa.h dosbuf.c getpagesize.h grep.c grep.h grepmat.c kwset.c
kwset.h search.c system.h vms_fab.c vms_fab.h

Log Message:
moved to external


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/gnu/dist/grep/ABOUT-NLS \
src/gnu/dist/grep/INSTALL src/gnu/dist/grep/Makefile.cvs \
src/gnu/dist/grep/README src/gnu/dist/grep/README-alpha \
src/gnu/dist/grep/README.DOS src/gnu/dist/grep/autogen.sh \
src/gnu/dist/grep/depcomp src/gnu/dist/grep/install-sh
cvs rdiff -u -r1.1.1.2 -r0 src/gnu/dist/grep/AUTHORS \
src/gnu/dist/grep/COPYING src/gnu/dist/grep/TODO \
src/gnu/dist/grep/config.guess src/gnu/dist/grep/config.sub \
src/gnu/dist/grep/grep.spec src/gnu/dist/grep/missing \
src/gnu/dist/grep/mkinstalldirs
cvs rdiff -u -r1.1.1.5 -r0 src/gnu/dist/grep/ChangeLog \
src/gnu/dist/grep/configure.in
cvs rdiff -u -r1.1.1.4 -r0 src/gnu/dist/grep/Makefile.am \
src/gnu/dist/grep/NEWS
cvs rdiff -u -r1.4 -r0 src/gnu/dist/grep/Makefile.in \
src/gnu/dist/grep/configure
cvs rdiff -u -r1.1.1.3 -r0 src/gnu/dist/grep/THANKS
cvs rdiff -u -r1.3 -r0 src/gnu/dist/grep/aclocal.m4 \
src/gnu/dist/grep/config.hin src/gnu/dist/grep/stamp-h.in
cvs rdiff -u -r1.2 -r0 src/gnu/dist/grep/grep2netbsd
cvs rdiff -u -r1.1.1.1 -r0 src/gnu/dist/grep/doc/Makefile.am \
src/gnu/dist/grep/doc/egrep.man src/gnu/dist/grep/doc/fgrep.man
cvs rdiff -u -r1.4 -r0 src/gnu/dist/grep/doc/Makefile.in
cvs rdiff -u -r1.16 -r0 src/gnu/dist/grep/doc/grep.1
cvs rdiff -u -r1.9 -r0 src/gnu/dist/grep/doc/grep.texi
cvs rdiff -u -r1.1.1.2 -r0 src/gnu/dist/grep/doc/mdate-sh
cvs rdiff -u -r1.1.1.2 -r0 src/gnu/dist/grep/intl/ChangeLog \
src/gnu/dist/grep/intl/Makefile src/gnu/dist/grep/intl/Makefile.in \
src/gnu/dist/grep/intl/bindtextdom.c src/gnu/dist/grep/intl/dcgettext.c \
src/gnu/dist/grep/intl/dgettext.c src/gnu/dist/grep/intl/explodename.c \
src/gnu/dist/grep/intl/finddomain.c src/gnu/dist/grep/intl/gettext.c \
src/gnu/dist/grep/intl/gettextP.h src/gnu/dist/grep/intl/hash-string.h \
src/gnu/dist/grep/intl/intl-compat.c src/gnu/dist/grep/intl/l10nflist.c \
src/gnu/dist/grep/intl/loadinfo.h src/gnu/dist/grep/intl/loadmsgcat.c \
src/gnu/dist/grep/intl/localealias.c src/gnu/dist/grep/intl/textdomain.c
cvs rdiff -u -r1.3 -r0 src/gnu/dist/grep/intl/VERSION
cvs rdiff -u -r1.1.1.1 -r0 src/gnu/dist/grep/intl/config.charset \
src/gnu/dist/grep/intl/dcigettext.c src/gnu/dist/grep/intl/dcngettext.c \
src/gnu/dist/grep/intl/dngettext.c src/gnu/dist/grep/intl/eval-plural.h \
src/gnu/dist/grep/intl/gmo.h src/gnu/dist/grep/intl/libgnuintl.h \
src/gnu/dist/grep/intl/libintl.glibc \
src/gnu/dist/grep/intl/localcharset.c 

CVS commit: src/external/gpl2

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:22:16 UTC 2016

Modified Files:
src/external/gpl2: Makefile

Log Message:
protect with MKBSDGREP


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/Makefile

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

Modified files:

Index: src/external/gpl2/Makefile
diff -u src/external/gpl2/Makefile:1.6 src/external/gpl2/Makefile:1.7
--- src/external/gpl2/Makefile:1.6	Sun Jan 10 17:19:41 2016
+++ src/external/gpl2/Makefile	Sun Jan 10 17:22:16 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2016/01/10 22:19:41 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2016/01/10 22:22:16 christos Exp $
 
 .include 
 
@@ -9,6 +9,8 @@ SUBDIR+= xcvs
 SUBDIR+= lvm2
 .endif
 
+.if ${MKBSDGREP} == "no"
 SUBDIR+= grep
+.endif
 
 .include 



CVS commit: src/gnu/usr.bin/grep

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:21:19 UTC 2016

Removed Files:
src/gnu/usr.bin/grep: Makefile Makefile.inc
src/gnu/usr.bin/grep/grep: Makefile
src/gnu/usr.bin/grep/include: config.h version.texi
src/gnu/usr.bin/grep/lib: Makefile

Log Message:
grep moved


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r0 src/gnu/usr.bin/grep/Makefile
cvs rdiff -u -r1.5 -r0 src/gnu/usr.bin/grep/Makefile.inc
cvs rdiff -u -r1.7 -r0 src/gnu/usr.bin/grep/grep/Makefile
cvs rdiff -u -r1.4 -r0 src/gnu/usr.bin/grep/include/config.h
cvs rdiff -u -r1.2 -r0 src/gnu/usr.bin/grep/include/version.texi
cvs rdiff -u -r1.5 -r0 src/gnu/usr.bin/grep/lib/Makefile

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



CVS commit: src/external/gpl2/grep

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:16:40 UTC 2016

Modified Files:
src/external/gpl2/grep/dist/doc: grep.1 grep.texi
src/external/gpl2/grep/dist/lib: getopt.c hard-locale.c regex.c
savedir.c
src/external/gpl2/grep/dist/src: ansi2knr.c dfa.c grep.c search.c
Added Files:
src/external/gpl2/grep: Makefile Makefile.inc grep2netbsd
src/external/gpl2/grep/bin: Makefile
src/external/gpl2/grep/include: config.h
src/external/gpl2/grep/lib: Makefile
src/external/gpl2/grep/po: cs.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo
fr.gmo gl.gmo hr.gmo id.gmo it.gmo ja.gmo ko.gmo nl.gmo no.gmo
pl.gmo pt_BR.gmo ru.gmo sl.gmo sv.gmo

Log Message:
- merge conflicts, enable wide char support.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl2/grep/Makefile \
src/external/gpl2/grep/Makefile.inc src/external/gpl2/grep/grep2netbsd
cvs rdiff -u -r0 -r1.1 src/external/gpl2/grep/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/grep/dist/doc/grep.1 \
src/external/gpl2/grep/dist/doc/grep.texi
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/grep/dist/lib/getopt.c \
src/external/gpl2/grep/dist/lib/hard-locale.c \
src/external/gpl2/grep/dist/lib/regex.c \
src/external/gpl2/grep/dist/lib/savedir.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/grep/dist/src/ansi2knr.c \
src/external/gpl2/grep/dist/src/dfa.c \
src/external/gpl2/grep/dist/src/grep.c \
src/external/gpl2/grep/dist/src/search.c
cvs rdiff -u -r0 -r1.1 src/external/gpl2/grep/include/config.h
cvs rdiff -u -r0 -r1.1 src/external/gpl2/grep/lib/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl2/grep/po/cs.gmo \
src/external/gpl2/grep/po/de.gmo src/external/gpl2/grep/po/el.gmo \
src/external/gpl2/grep/po/eo.gmo src/external/gpl2/grep/po/es.gmo \
src/external/gpl2/grep/po/et.gmo src/external/gpl2/grep/po/fr.gmo \
src/external/gpl2/grep/po/gl.gmo src/external/gpl2/grep/po/hr.gmo \
src/external/gpl2/grep/po/id.gmo src/external/gpl2/grep/po/it.gmo \
src/external/gpl2/grep/po/ja.gmo src/external/gpl2/grep/po/ko.gmo \
src/external/gpl2/grep/po/nl.gmo src/external/gpl2/grep/po/no.gmo \
src/external/gpl2/grep/po/pl.gmo src/external/gpl2/grep/po/pt_BR.gmo \
src/external/gpl2/grep/po/ru.gmo src/external/gpl2/grep/po/sl.gmo \
src/external/gpl2/grep/po/sv.gmo

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

Modified files:

Index: src/external/gpl2/grep/dist/doc/grep.1
diff -u src/external/gpl2/grep/dist/doc/grep.1:1.1.1.1 src/external/gpl2/grep/dist/doc/grep.1:1.2
--- src/external/gpl2/grep/dist/doc/grep.1:1.1.1.1	Sun Jan 10 16:36:16 2016
+++ src/external/gpl2/grep/dist/doc/grep.1	Sun Jan 10 17:16:40 2016
@@ -1,21 +1,8 @@
-.\"	$NetBSD: grep.1,v 1.1.1.1 2016/01/10 21:36:16 christos Exp $
+.\"	$NetBSD: grep.1,v 1.2 2016/01/10 22:16:40 christos Exp $
 .\"
 .\" grep man page
-.if !\n(.g \{\
-.	if !\w|\*(lq| \{\
-.		ds lq ``
-.		if \w'\(lq' .ds lq "\(lq
-.	\}
-.	if !\w|\*(rq| \{\
-.		ds rq ''
-.		if \w'\(rq' .ds rq "\(rq
-.	\}
-.\}
-.de Id
-.ds Dt \\$4
-..
-.Id Id: grep.1,v 1.23 2002/01/22 13:20:04 bero Exp 
-.TH GREP 1 \*(Dt "GNU Project"
+.\"d Id: grep.1,v 1.23 2002/01/22 13:20:04 bero Exp 
+.TH GREP 1 "June 16 2003" "GNU Project"
 .SH NAME
 grep, egrep, fgrep \- print lines matching a pattern
 .SH SYNOPSIS
@@ -81,14 +68,6 @@ Places a line containing
 .B \-\^\-
 between contiguous groups of matches.
 .TP
-.BI \-C " NUM" "\fR,\fP \-\^\-context=" NUM
-Print
-.I NUM
-lines of output context.
-Places a line containing
-.B \-\^\-
-between contiguous groups of matches.
-.TP
 .BR \-b ", " \-\^\-byte-offset
 Print the byte offset within the input file before
 each line of output.
@@ -128,10 +107,13 @@ might output binary garbage,
 which can have nasty side effects if the output is a terminal and if the
 terminal driver interprets some of it as commands.
 .TP
-.BI \-\^\-colour[=\fIWHEN\fR] ", " \-\^\-color[=\fIWHEN\fR]
-Surround the matching string with the marker find in
-.B GREP_COLOR
-environment variable. WHEN may be `never', `always', or `auto'
+.BI \-C " NUM" "\fR,\fP \-\^\-context=" NUM
+Print
+.I NUM
+lines of output context.
+Places a line containing
+.B \-\^\-
+between contiguous groups of matches.
 .TP
 .BR \-c ", " \-\^\-count
 Suppress normal output; instead print a count of
@@ -140,6 +122,11 @@ With the
 .BR \-v ", " \-\^\-invert-match
 option (see below), count non-matching lines.
 .TP
+.BI \-\^\-colour[=\fIWHEN\fR] ", " \-\^\-color[=\fIWHEN\fR]
+Surround the matching string with the marker find in
+.B GREP_COLOR
+environment variable. WHEN may be `never', `always', or `auto'
+.TP
 .BI \-D " ACTION" "\fR,\fP \-\^\-devices=" ACTION
 If an input file is a device, FIFO or socket, use
 .I ACTION
@@ -187,16 +174,13 @@ Use
 .I PATTERN
 as the pattern; useful to protect patterns beginning with
 .BR 

CVS commit: src/sys/dev/fdt

2016-01-10 Thread Marty Fouts
Module Name:src
Committed By:   marty
Date:   Sun Jan 10 23:01:29 UTC 2016

Modified Files:
src/sys/dev/fdt: fdt_intr.c

Log Message:
FDT Interrupt handling - change memory allocation

This version does dynamic allocation of the specifier array.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/fdt/fdt_intr.c

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

Modified files:

Index: src/sys/dev/fdt/fdt_intr.c
diff -u src/sys/dev/fdt/fdt_intr.c:1.6 src/sys/dev/fdt/fdt_intr.c:1.7
--- src/sys/dev/fdt/fdt_intr.c:1.6	Thu Jan  7 04:26:44 2016
+++ src/sys/dev/fdt/fdt_intr.c	Sun Jan 10 23:01:29 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_intr.c,v 1.6 2016/01/07 04:26:44 marty Exp $ */
+/* $NetBSD: fdt_intr.c,v 1.7 2016/01/10 23:01:29 marty Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.6 2016/01/07 04:26:44 marty Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.7 2016/01/10 23:01:29 marty Exp $");
 
 #include 
 #include 
@@ -36,7 +36,6 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v
 #include 
 #include 
 
-#define MAX_SPEC_LENGTH 6
 struct fdtbus_interrupt_controller {
 	device_t ic_dev;
 	int ic_phandle;
@@ -123,33 +122,41 @@ void *
 fdtbus_intr_establish(int phandle, u_int index, int ipl, int flags,
 int (*func)(void *), void *arg)
 {
+	void * result = NULL;
 	u_int *specifier;
-	u_int maxspec[MAX_SPEC_LENGTH];
+	u_int spec_length;
 	int ihandle;
 	struct fdtbus_interrupt_controller *ic;
 
 	if (has_interrupt_map(phandle)) {
-		specifier = get_entry_from_map(phandle, index, maxspec);
+		specifier = get_entry_from_map(phandle, index, _length);
 		ihandle = be32toh(specifier[1]);
 		ihandle = fdtbus_get_phandle_from_native(ihandle);
 		specifier += 2;
 	} else {
-		specifier = get_specifier_by_index(phandle, index, maxspec);
+		specifier = get_specifier_by_index(phandle, index,
+		   _length);
 		ihandle = phandle;
 	}
 	if (specifier == NULL) {
 		printf("%s: Unable to get specifier %d for phandle %d\n",
 		   __func__, index, phandle);
-		return NULL;
+		goto done;
 	}
 	ic = fdtbus_get_interrupt_controller(ihandle);
 	if (ic == NULL) {
 		printf("%s: Unable to get interrupt controller for %d\n",
 		   __func__, ihandle);
-		return NULL;
+		goto done;
 	}
-	return ic->ic_funcs->establish(ic->ic_dev, specifier,
+	result = ic->ic_funcs->establish(ic->ic_dev, specifier,
 	   ipl, flags, func, arg);
+done:
+	if (has_interrupt_map(phandle))
+	specifier -= 2;
+	if (specifier && spec_length > 0)
+		kmem_free(specifier, spec_length);
+	return result;
 }
 
 void
@@ -166,31 +173,40 @@ fdtbus_intr_disestablish(int phandle, vo
 bool
 fdtbus_intr_str(int phandle, u_int index, char *buf, size_t buflen)
 {
+	bool result = false;
 	struct fdtbus_interrupt_controller *ic;
 	int ihandle;
 	u_int *specifier;
-	u_int maxspec[MAX_SPEC_LENGTH];
+	u_int spec_length;
 	if (has_interrupt_map(phandle)) {
-		specifier = get_entry_from_map(phandle, index, maxspec);
+		specifier = get_entry_from_map(phandle, index,
+			_length);
 		ihandle = be32toh(specifier[1]);
 		ihandle = fdtbus_get_phandle_from_native(ihandle);
 		specifier += 2;
 	} else {
 		ihandle = phandle;
-		specifier = get_specifier_by_index(phandle, index, maxspec);
+		specifier = get_specifier_by_index(phandle, index,
+		   _length);
 	}
 	if (specifier == NULL) {
 		printf("%s: Unable to get specifier %d for phandle %d\n",
 		   __func__, index, phandle);
-		return false;
+		goto done;
 	}
 	ic = fdtbus_get_interrupt_controller(ihandle);
 	if (ic == NULL) {
 		printf("%s: Unable to get interrupt controller for %d\n",
 		   __func__, ihandle);
-		return false;
+		goto done;
 	}
-	return ic->ic_funcs->intrstr(ic->ic_dev, specifier, buf, buflen);
+	result = ic->ic_funcs->intrstr(ic->ic_dev, specifier, buf, buflen);
+done:
+	if (has_interrupt_map(phandle))
+	specifier -= 2;
+	if (specifier && spec_length > 0)
+		kmem_free(specifier, spec_length);
+	return result;
 }
 
 /*
@@ -232,7 +248,7 @@ has_interrupt_map(int phandle)
  *
  */
 static u_int *
-get_entry_from_map(int phandle, int pindex, u_int *specifier)
+get_entry_from_map(int phandle, int pindex, u_int *spec_length)
 {
 	int intr_cells;
 	int intr_parent;
@@ -262,9 +278,11 @@ get_entry_from_map(int phandle, int pind
 		u_int pintr_cells;
 		of_getprop_uint32(parent, "#interrupt-cells", _cells);
 		if (index == pindex) {
-			for (int i = 0; i < pintr_cells; i++)
-specifier[i] =  p[i];
-			result = specifier;
+			result = kmem_alloc((pintr_cells + 2) * sizeof(u_int),
+	KM_SLEEP);
+			*spec_length = (pintr_cells + 2) * sizeof (u_int);
+			for (int i = 0; i < pintr_cells + 2; i++)
+result[i] =  p[i];
 			goto done;
 	
 		}
@@ -287,9 +305,11 @@ done:
  * and return a pointer to it.
  *
  */
-static u_int *get_specifier_by_index(int phandle, int 

CVS commit: src/sys/sys

2016-01-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan 11 01:08:09 UTC 2016

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

Log Message:
Divide the list of struct buf ops into three categories:
  the ones that are part of bufferio(9) (or physio(9))
  the ones that are part of buffercache(9)
  the ones that aren't documented and thus aren't clear yet


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/sys/buf.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/buf.h
diff -u src/sys/sys/buf.h:1.122 src/sys/sys/buf.h:1.123
--- src/sys/sys/buf.h:1.122	Mon Jan 11 00:46:21 2016
+++ src/sys/sys/buf.h	Mon Jan 11 01:08:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.122 2016/01/11 00:46:21 dholland Exp $ */
+/* $NetBSD: buf.h,v 1.123 2016/01/11 01:08:09 dholland Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -267,28 +267,44 @@ struct bqueue {
 extern struct bqueue bufqueues[BQUEUES];
 
 __BEGIN_DECLS
-int	allocbuf(buf_t *, int, int);
-void	bawrite(buf_t *);
-void	bdwrite(buf_t *);
+/*
+ * bufferio(9) ops
+ */
 void	biodone(buf_t *);
 int	biowait(buf_t *);
+buf_t	*getiobuf(struct vnode *, bool);
+void	putiobuf(buf_t *);
+void	nestiobuf_setup(buf_t *, buf_t *, int, size_t);
+void	nestiobuf_done(buf_t *, int, int);
+
+void	nestiobuf_iodone(buf_t *);
+int	physio(void (*)(buf_t *), buf_t *, dev_t, int,
+	   void (*)(buf_t *), struct uio *);
+
+/*
+ * buffercache(9) ops
+ */
 int	bread(struct vnode *, daddr_t, int, int, buf_t **);
 int	breadn(struct vnode *, daddr_t, int, daddr_t *, int *, int,
 	   int, buf_t **);
-void	brelsel(buf_t *, int);
-void	brelse(buf_t *, int);
-void	bremfree(buf_t *);
-void	bufinit(void);
-void	bufinit2(void);
 int	bwrite(buf_t *);
+void	bawrite(buf_t *);
+void	bdwrite(buf_t *);
 buf_t	*getblk(struct vnode *, daddr_t, int, int, int);
 buf_t	*geteblk(int);
 buf_t	*incore(struct vnode *, daddr_t);
+int	allocbuf(buf_t *, int, int);
+void	brelsel(buf_t *, int);
+void	brelse(buf_t *, int);
 
+/*
+ * So-far indeterminate ops that might belong to either
+ * bufferio(9) or buffercache(9).
+ */
+void	bremfree(buf_t *);
+void	bufinit(void);
+void	bufinit2(void);
 void	minphys(buf_t *);
-int	physio(void (*)(buf_t *), buf_t *, dev_t, int,
-	   void (*)(buf_t *), struct uio *);
-
 void	brelvp(buf_t *);
 void	reassignbuf(buf_t *, struct vnode *);
 void	bgetvp(struct vnode *, buf_t *);
@@ -300,15 +316,10 @@ int	buf_setvalimit(vsize_t);
 void	vfs_buf_print(buf_t *, int, void (*)(const char *, ...)
 __printflike(1, 2));
 #endif
-buf_t	*getiobuf(struct vnode *, bool);
-void	putiobuf(buf_t *);
 void	buf_init(buf_t *);
 void	buf_destroy(buf_t *);
 int	bbusy(buf_t *, bool, int, kmutex_t *);
 
-void	nestiobuf_iodone(buf_t *);
-void	nestiobuf_setup(buf_t *, buf_t *, int, size_t);
-void	nestiobuf_done(buf_t *, int, int);
 
 __END_DECLS
 #endif /* _KERNEL */



CVS commit: src/sys

2016-01-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan 11 01:22:36 UTC 2016

Modified Files:
src/sys/kern: vfs_bio.c
src/sys/sys: buf.h

Log Message:
Whatever the point of this "biodone_vfs" global function pointer is
(something rumpity?) declare it properly in a header file instead of
in secret where its types can diverge.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/vfs_bio.c
cvs rdiff -u -r1.123 -r1.124 src/sys/sys/buf.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/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.257 src/sys/kern/vfs_bio.c:1.258
--- src/sys/kern/vfs_bio.c:1.257	Fri Jan  1 18:58:58 2016
+++ src/sys/kern/vfs_bio.c	Mon Jan 11 01:22:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_bio.c,v 1.257 2016/01/01 18:58:58 martin Exp $	*/
+/*	$NetBSD: vfs_bio.c,v 1.258 2016/01/11 01:22:36 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.257 2016/01/01 18:58:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.258 2016/01/11 01:22:36 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bufcache.h"
@@ -444,7 +444,6 @@ bufinit(void)
 	struct bqueue *dp;
 	int use_std;
 	u_int i;
-	extern void (*biodone_vfs)(buf_t *);
 
 	biodone_vfs = biodone;
 

Index: src/sys/sys/buf.h
diff -u src/sys/sys/buf.h:1.123 src/sys/sys/buf.h:1.124
--- src/sys/sys/buf.h:1.123	Mon Jan 11 01:08:09 2016
+++ src/sys/sys/buf.h	Mon Jan 11 01:22:36 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.123 2016/01/11 01:08:09 dholland Exp $ */
+/* $NetBSD: buf.h,v 1.124 2016/01/11 01:22:36 dholland Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -88,6 +88,8 @@ struct kauth_cred;
 extern kmutex_t bufcache_lock;
 extern kmutex_t buffer_lock;
 
+extern void (*biodone_vfs)(buf_t *);
+
 /*
  * The buffer header describes an I/O operation in the kernel.
  *



CVS commit: src/gnu/usr.bin

2016-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 10 22:21:44 UTC 2016

Modified Files:
src/gnu/usr.bin: Makefile

Log Message:
greep has moved.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/gnu/usr.bin/Makefile

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

Modified files:

Index: src/gnu/usr.bin/Makefile
diff -u src/gnu/usr.bin/Makefile:1.139 src/gnu/usr.bin/Makefile:1.140
--- src/gnu/usr.bin/Makefile:1.139	Fri Aug  8 15:38:47 2014
+++ src/gnu/usr.bin/Makefile	Sun Jan 10 17:21:44 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.139 2014/08/08 19:38:47 apb Exp $
+#	$NetBSD: Makefile,v 1.140 2016/01/10 22:21:44 christos Exp $
 
 .include 
 
@@ -7,10 +7,6 @@ SUBDIR+=	c89 c99
 SUBDIR+=	dc diffutils
 SUBDIR+=	rcs send-pr texinfo
 
-.if ${MKBSDGREP} == "no"
-SUBDIR+=	grep
-.endif
-
 .if ${MKGROFF} != "no"
 SUBDIR+=	groff
 .endif



CVS commit: src/sys/sys

2016-01-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan 11 00:46:21 UTC 2016

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

Log Message:
Add a CTASSERT for the condition required to make a
conditionally-existing union member sort-of safe.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/sys/buf.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/buf.h
diff -u src/sys/sys/buf.h:1.121 src/sys/sys/buf.h:1.122
--- src/sys/sys/buf.h:1.121	Sat Mar 28 19:24:04 2015
+++ src/sys/sys/buf.h	Mon Jan 11 00:46:21 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.121 2015/03/28 19:24:04 maxv Exp $ */
+/* $NetBSD: buf.h,v 1.122 2016/01/11 00:46:21 dholland Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -101,13 +101,18 @@ extern kmutex_t buffer_lock;
  * For buffers associated with a vnode, b_objlock points to vp->v_interlock.
  * If not associated with a vnode, it points to the generic buffer_lock.
  */
+
+/* required for the conditional union member below to be ~safe */
+__CTASSERT(sizeof(struct work) <= sizeof(TAILQ_ENTRY(buf)));
+
 struct buf {
 	union {
 		TAILQ_ENTRY(buf) u_actq;
 		rb_node_t u_rbnode;
-#if defined(_KERNEL) /* u_work is smaller than u_actq. XXX */
+#if defined(_KERNEL)
+		/* u_work is smaller than u_actq */
 		struct work u_work;
-#endif /* defined(_KERNEL) */
+#endif
 	} b_u;	/* b: device driver queue */
 #define	b_actq	b_u.u_actq
 #define	b_work	b_u.u_work