CVS commit: src/share/mk

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:19:09 UTC 2013

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

Log Message:
don't make ctfconvert remove original debug info


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/share/mk/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/sys.mk
diff -u src/share/mk/sys.mk:1.115 src/share/mk/sys.mk:1.116
--- src/share/mk/sys.mk:1.115	Sat Jan 26 22:04:18 2013
+++ src/share/mk/sys.mk	Wed Mar  6 11:19:08 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.115 2013/01/26 22:04:18 christos Exp $
+#	$NetBSD: sys.mk,v 1.116 2013/03/06 11:19:08 yamt Exp $
 #	@(#)sys.mk	8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -41,8 +41,8 @@ COMPILE.c?=	${CC} ${CFLAGS} ${CPPFLAGS} 
 LINK.c?=	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
 
 # C Type Format data is required for DTrace
-CTFFLAGS	?=	-L VERSION
-CTFMFLAGS	?=	-t -L VERSION
+CTFFLAGS	?=	-g -L VERSION
+CTFMFLAGS	?=	-g -t -L VERSION
 
 # We don't define these here, we let the bsd.own.mk to do it
 #CTFCONVERT	?=	ctfconvert



CVS commit: src/sys/kern

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:20:10 UTC 2013

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

Log Message:
update comments


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/kern/subr_vmem.c

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

Modified files:

Index: src/sys/kern/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.82 src/sys/kern/subr_vmem.c:1.83
--- src/sys/kern/subr_vmem.c:1.82	Sat Feb  9 00:31:21 2013
+++ src/sys/kern/subr_vmem.c	Wed Mar  6 11:20:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.82 2013/02/09 00:31:21 christos Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.83 2013/03/06 11:20:10 yamt Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.82 2013/02/09 00:31:21 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.83 2013/03/06 11:20:10 yamt Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -988,10 +988,7 @@ vmem_roundup_size(vmem_t *vm, vmem_size_
 }
 
 /*
- * vmem_alloc:
- *
- * = caller must ensure appropriate spl,
- *if the arena can be accessed from interrupt context.
+ * vmem_alloc: allocate resource from the arena.
  */
 
 int
@@ -1221,10 +1218,7 @@ gotit:
 }
 
 /*
- * vmem_free:
- *
- * = caller must ensure appropriate spl,
- *if the arena can be accessed from interrupt context.
+ * vmem_free: free the resource to the arena.
  */
 
 void



CVS commit: src/sys/kern

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:25:01 UTC 2013

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

Log Message:
- use scaled calculations for avgcount
- sched_balance: account lwp which is currently running
- sched_balance: skip cpus w/o migratable lwps


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/kern_runq.c

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

Modified files:

Index: src/sys/kern/kern_runq.c
diff -u src/sys/kern/kern_runq.c:1.36 src/sys/kern/kern_runq.c:1.37
--- src/sys/kern/kern_runq.c:1.36	Sat Feb  9 00:31:21 2013
+++ src/sys/kern/kern_runq.c	Wed Mar  6 11:25:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.37 2013/03/06 11:25:01 yamt Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.37 2013/03/06 11:25:01 yamt Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -90,6 +90,8 @@ typedef struct {
 	struct evcnt	r_ev_localize;
 } runqueue_t;
 
+#define	AVGCOUNT_SHIFT	4	/* shift for r_avgcount */
+
 static void *	sched_getrq(runqueue_t *, const pri_t);
 #ifdef MULTIPROCESSOR
 static lwp_t *	sched_catchlwp(struct cpu_info *);
@@ -383,7 +385,7 @@ sched_takecpu(struct lwp *l)
 	/* Make sure that thread is in appropriate processor-set */
 	if (__predict_true(spc-spc_psid == l-l_psid)) {
 		/* If CPU of this thread is idling - run there */
-		if (ci_rq-r_count == 0) {
+		if (ci_rq-r_avgcount = (1  AVGCOUNT_SHIFT)) {
 			ci_rq-r_ev_stay.ev_count++;
 			return ci;
 		}
@@ -522,10 +524,20 @@ sched_balance(void *nocallout)
 
 	/* Make lockless countings */
 	for (CPU_INFO_FOREACH(cii, ci)) {
+		const bool notidle = ci-ci_data.cpu_idlelwp != ci-ci_curlwp;
+		u_int nrunning;
+
 		ci_rq = ci-ci_schedstate.spc_sched_info;
 
 		/* Average count of the threads */
-		ci_rq-r_avgcount = (ci_rq-r_avgcount + ci_rq-r_mcount)  1;
+		nrunning = ci_rq-r_count + notidle;
+		ci_rq-r_avgcount = (ci_rq-r_avgcount +
+		(nrunning  AVGCOUNT_SHIFT))  1;
+
+		/* We are not interested in a CPU without migratable threads */
+		if (ci_rq-r_mcount == 0) {
+			continue;
+		}
 
 		/* Look for CPU with the highest average */
 		if (ci_rq-r_avgcount  highest) {



CVS commit: src/lib/libc/gen

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:27:28 UTC 2013

Modified Files:
src/lib/libc/gen: telldir.c

Log Message:
remove unnecessary casts


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/gen/telldir.c

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

Modified files:

Index: src/lib/libc/gen/telldir.c
diff -u src/lib/libc/gen/telldir.c:1.19 src/lib/libc/gen/telldir.c:1.20
--- src/lib/libc/gen/telldir.c:1.19	Sun May  4 18:53:26 2008
+++ src/lib/libc/gen/telldir.c	Wed Mar  6 11:27:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: telldir.c,v 1.19 2008/05/04 18:53:26 tonnerre Exp $	*/
+/*	$NetBSD: telldir.c,v 1.20 2013/03/06 11:27:28 yamt Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)telldir.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: telldir.c,v 1.19 2008/05/04 18:53:26 tonnerre Exp $);
+__RCSID($NetBSD: telldir.c,v 1.20 2013/03/06 11:27:28 yamt Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -61,11 +61,11 @@ telldir(DIR *dirp)
 #ifdef _REENTRANT
 	if (__isthreaded) {
 		mutex_lock((mutex_t *)dirp-dd_lock);
-		rv = (intptr_t)_telldir_unlocked(dirp);
+		rv = _telldir_unlocked(dirp);
 		mutex_unlock((mutex_t *)dirp-dd_lock);
 	} else
 #endif
-		rv = (intptr_t)_telldir_unlocked(dirp);
+		rv = _telldir_unlocked(dirp);
 	return rv;
 }
 



CVS commit: src/lib/libc/gen

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:27:46 UTC 2013

Modified Files:
src/lib/libc/gen: seekdir.c

Log Message:
wrap a long line


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/seekdir.c

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

Modified files:

Index: src/lib/libc/gen/seekdir.c
diff -u src/lib/libc/gen/seekdir.c:1.14 src/lib/libc/gen/seekdir.c:1.15
--- src/lib/libc/gen/seekdir.c:1.14	Wed May 17 20:36:50 2006
+++ src/lib/libc/gen/seekdir.c	Wed Mar  6 11:27:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: seekdir.c,v 1.14 2006/05/17 20:36:50 christos Exp $	*/
+/*	$NetBSD: seekdir.c,v 1.15 2013/03/06 11:27:46 yamt Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)seekdir.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: seekdir.c,v 1.14 2006/05/17 20:36:50 christos Exp $);
+__RCSID($NetBSD: seekdir.c,v 1.15 2013/03/06 11:27:46 yamt Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -53,7 +53,8 @@ __weak_alias(seekdir,_seekdir)
 
 /*
  * Seek to an entry in a directory.
- * _seekdir_unlocked is in telldir.c so that it can share opaque data structures.
+ * _seekdir_unlocked is in telldir.c so that it can share opaque
+ * data structures.
  */
 void
 seekdir(DIR *dirp, long loc)



CVS commit: src/lib/libc/compat/locale

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:29:01 UTC 2013

Modified Files:
src/lib/libc/compat/locale: compat_setlocale32.c

Log Message:
comment and assertion


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/locale/compat_setlocale32.c

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

Modified files:

Index: src/lib/libc/compat/locale/compat_setlocale32.c
diff -u src/lib/libc/compat/locale/compat_setlocale32.c:1.1 src/lib/libc/compat/locale/compat_setlocale32.c:1.2
--- src/lib/libc/compat/locale/compat_setlocale32.c:1.1	Mon Jun  7 13:52:30 2010
+++ src/lib/libc/compat/locale/compat_setlocale32.c	Wed Mar  6 11:29:01 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $ */
+/* $NetBSD: compat_setlocale32.c,v 1.2 2013/03/06 11:29:01 yamt Exp $ */
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $);
+__RCSID($NetBSD: compat_setlocale32.c,v 1.2 2013/03/06 11:29:01 yamt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -42,6 +42,14 @@ __warn_references(__setlocale_mb_len_max
 warning: reference to compatibility __setlocale_mb_len_max_32();
 include locale.h for correct reference)
 
+/*
+ * MB_LEN_MAX used to be a MD macro.  it was 32 for most ports but 6 for hppa.
+ * hppa uses arch/hppa/locale/compat_setlocale32.c instead of this file.
+ */
+#if defined(__hppa__)
+#error using wrong variant of compat_setlocale32.c
+#endif /* defined(__hppa__) */
+
 char *
 __setlocale_mb_len_max_32(int category, const char *locale)
 {



CVS commit: src/lib/libpthread

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:30:57 UTC 2013

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

Log Message:
add assertions


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libpthread/pthread_specific.c

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

Modified files:

Index: src/lib/libpthread/pthread_specific.c
diff -u src/lib/libpthread/pthread_specific.c:1.24 src/lib/libpthread/pthread_specific.c:1.25
--- src/lib/libpthread/pthread_specific.c:1.24	Wed Nov 21 19:19:24 2012
+++ src/lib/libpthread/pthread_specific.c	Wed Mar  6 11:30:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_specific.c,v 1.24 2012/11/21 19:19:24 christos Exp $	*/
+/*	$NetBSD: pthread_specific.c,v 1.25 2013/03/06 11:30:56 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_specific.c,v 1.24 2012/11/21 19:19:24 christos Exp $);
+__RCSID($NetBSD: pthread_specific.c,v 1.25 2013/03/06 11:30:56 yamt Exp $);
 
 /* Functions and structures dealing with thread-specific data */
 
@@ -75,8 +75,12 @@ pthread_getspecific(pthread_key_t key)
 unsigned int
 pthread_curcpu_np(void)
 {
+	const int curcpu = pthread__self()-pt_lwpctl-lc_curcpu;
 
-	return pthread__self()-pt_lwpctl-lc_curcpu;
+	pthread__assert(curcpu != LWPCTL_CPU_NONE);
+	pthread__assert(curcpu != LWPCTL_CPU_EXITED);
+	pthread__assert(curcpu = 0);
+	return curcpu;
 }
 
 /*



CVS commit: src/lib/libpthread

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:31:34 UTC 2013

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

Log Message:
add comments
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libpthread/pthread_mutex.c

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

Modified files:

Index: src/lib/libpthread/pthread_mutex.c
diff -u src/lib/libpthread/pthread_mutex.c:1.54 src/lib/libpthread/pthread_mutex.c:1.55
--- src/lib/libpthread/pthread_mutex.c:1.54	Thu Aug 16 04:49:47 2012
+++ src/lib/libpthread/pthread_mutex.c	Wed Mar  6 11:31:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_mutex.c,v 1.54 2012/08/16 04:49:47 matt Exp $	*/
+/*	$NetBSD: pthread_mutex.c,v 1.55 2013/03/06 11:31:34 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_mutex.c,v 1.54 2012/08/16 04:49:47 matt Exp $);
+__RCSID($NetBSD: pthread_mutex.c,v 1.55 2013/03/06 11:31:34 yamt Exp $);
 
 #include sys/types.h
 #include sys/lwpctl.h
@@ -130,7 +130,6 @@ pthread_mutex_init(pthread_mutex_t *ptm,
 	return 0;
 }
 
-
 int
 pthread_mutex_destroy(pthread_mutex_t *ptm)
 {
@@ -465,6 +464,12 @@ pthread__mutex_unlock_slow(pthread_mutex
 	return error;
 }
 
+/*
+ * pthread__mutex_wakeup: unpark threads waiting for us
+ *
+ * unpark threads on the ptm-ptm_waiters list and self-pt_waiters.
+ */
+
 static void
 pthread__mutex_wakeup(pthread_t self, pthread_mutex_t *ptm)
 {
@@ -530,6 +535,7 @@ pthread__mutex_wakeup(pthread_t self, pt
 		}
 	}
 }
+
 int
 pthread_mutexattr_init(pthread_mutexattr_t *attr)
 {
@@ -578,6 +584,16 @@ pthread_mutexattr_settype(pthread_mutexa
 	}
 }
 
+/*
+ * pthread__mutex_deferwake: try to defer unparking threads in self-pt_waiters
+ *
+ * In order to avoid unnecessary contention on the interlocking mutex,
+ * we defer waking up threads until we unlock the mutex.  The threads will
+ * be woken up when the calling thread (self) releases the first mutex with
+ * MUTEX_DEFERRED_BIT set.  It likely be the mutex 'ptm', but no problem
+ * even if it isn't.
+ */
+
 void
 pthread__mutex_deferwake(pthread_t self, pthread_mutex_t *ptm)
 {



CVS commit: src/sbin/ping

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:33:08 UTC 2013

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

Log Message:
more precision for F_TIMING64


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sbin/ping/ping.c

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

Modified files:

Index: src/sbin/ping/ping.c
diff -u src/sbin/ping/ping.c:1.105 src/sbin/ping/ping.c:1.106
--- src/sbin/ping/ping.c:1.105	Sun Dec 30 03:19:24 2012
+++ src/sbin/ping/ping.c	Wed Mar  6 11:33:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ping.c,v 1.105 2012/12/30 03:19:24 christos Exp $	*/
+/*	$NetBSD: ping.c,v 1.106 2013/03/06 11:33:08 yamt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ping.c,v 1.105 2012/12/30 03:19:24 christos Exp $);
+__RCSID($NetBSD: ping.c,v 1.106 2013/03/06 11:33:08 yamt Exp $);
 #endif
 
 #include stdio.h
@@ -953,8 +953,11 @@ pr_pack_sub(int cc,
 	if (dupflag)
 		(void)printf( DUP!);
 	(void)printf( ttl=%d, ttl);
-	if (pingflags  (F_TIMING|F_TIMING64))
-		(void)printf( time=%.3f ms, triptime*1000.0);
+	if (pingflags  (F_TIMING|F_TIMING64)) {
+		const unsigned int prec = (pingflags  F_TIMING64) != 0 ? 6 : 3;
+
+		(void)printf( time=%.*f ms, prec, triptime*1000.0);
+	}
 
 	/*
 	 * Send beep to stderr, since that's more likely than stdout
@@ -1340,13 +1343,16 @@ summary(int header)
 		double n = nreceived + nrepeats;
 		double avg = (tsum / n);
 		double variance = 0.0;
+		const unsigned int prec = (pingflags  F_TIMING64) != 0 ? 6 : 3;
 		if (n1)
 			variance = (tsumsq - n*avg*avg) /(n-1);
 
 		printf(round-trip min/avg/max/stddev = 
-			%.3f/%.3f/%.3f/%.3f ms\n,
-			tmin * 1000.0, avg * 1000.0,
-			tmax * 1000.0, sqrt(variance) * 1000.0);
+			%.*f/%.*f/%.*f/%.*f ms\n,
+			prec, tmin * 1000.0,
+			prec, avg * 1000.0,
+			prec, tmax * 1000.0,
+			prec, sqrt(variance) * 1000.0);
 		if (pingflags  F_FLOOD) {
 			double r = diffsec(last_rx, first_rx);
 			double t = diffsec(last_tx, first_tx);



CVS commit: src/sys/arch/i386/stand/pxeboot

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:34:37 UTC 2013

Modified Files:
src/sys/arch/i386/stand/pxeboot: main.c

Log Message:
update help


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/i386/stand/pxeboot/main.c

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

Modified files:

Index: src/sys/arch/i386/stand/pxeboot/main.c
diff -u src/sys/arch/i386/stand/pxeboot/main.c:1.29 src/sys/arch/i386/stand/pxeboot/main.c:1.30
--- src/sys/arch/i386/stand/pxeboot/main.c:1.29	Thu May 26 04:25:27 2011
+++ src/sys/arch/i386/stand/pxeboot/main.c	Wed Mar  6 11:34:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.29 2011/05/26 04:25:27 uebayasi Exp $	*/
+/*	$NetBSD: main.c,v 1.30 2013/03/06 11:34:37 yamt Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -195,7 +195,7 @@ void
 command_help(char *arg)
 {
 	printf(commands are:\n
-	   boot [filename] [-adsqv]\n
+	   boot [filename] [-acdsqv]\n
 	(ex. \netbsd.old -s\\n
 	   consdev {pc|com[0123]|com[0123]kbd|auto}\n
 	   vesa {modenum|on|off|enabled|disabled|list}\n



CVS commit: src/sys/arch/usermode/conf

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:36:22 UTC 2013

Modified Files:
src/sys/arch/usermode/conf: Makefile.usermode

Log Message:
fix include dir
add some dependencies


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/usermode/conf/Makefile.usermode

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/usermode/conf/Makefile.usermode
diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.32 src/sys/arch/usermode/conf/Makefile.usermode:1.33
--- src/sys/arch/usermode/conf/Makefile.usermode:1.32	Sat Jun 30 15:03:57 2012
+++ src/sys/arch/usermode/conf/Makefile.usermode	Wed Mar  6 11:36:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.32 2012/06/30 15:03:57 reinoud Exp $
+# $NetBSD: Makefile.usermode,v 1.33 2013/03/06 11:36:21 yamt Exp $
 
 USETOOLS?=			no
 NEED_OWN_INSTALL_TARGET?=	no
@@ -21,7 +21,8 @@ MACHINE_ARCH!=uname -p
 USERMODE_HOSTOS!=uname -s
 USERMODE_HOSTMACHINE!=uname -m
 USERMODE_LIBS= -L${DESTDIR}/usr/lib -lrt
-USERMODE_CPPFLAGS=${DEBUG} -U_KERNEL -I/usr/include
+USERMODE_CPPFLAGS=${DEBUG} -U_KERNEL
+USERMODE_CPPFLAGS+=-I${DESTDIR}/usr/include
 USERMODE_CPPFLAGS+=${CWARNFLAGS} ${NOGCCERROR:D:U-Werror}
 
 ## XXX hack to make it work under build.sh
@@ -96,6 +97,8 @@ thunk.d: ${USERMODE}/usermode/thunk.c
 thunk.o: ${USERMODE}/usermode/thunk.c
 	${CC} ${COPTS} ${CPPFLAGS.thunk.c} -c -o $@ ${USERMODE}/usermode/thunk.c
 
+cpu_${MACHINE_ARCH}.o:	${USERMODE}/target/${MACHINE_ARCH}/cpu_${MACHINE_ARCH}.c
+
 ##
 ## (7) misc settings
 ##



CVS commit: src/sys/arch/xen/xen

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:37:23 UTC 2013

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
fix debug print


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.50 src/sys/arch/xen/xen/xennetback_xenbus.c:1.51
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.50	Sat Jun 30 23:36:20 2012
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Wed Mar  6 11:37:23 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.50 2012/06/30 23:36:20 jym Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.51 2013/03/06 11:37:23 yamt Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xennetback_xenbus.c,v 1.50 2012/06/30 23:36:20 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: xennetback_xenbus.c,v 1.51 2013/03/06 11:37:23 yamt Exp $);
 
 #include opt_xen.h
 
@@ -1202,7 +1202,7 @@ xennetback_ifsoftstart_copy(void *arg)
 	gnttab_copy_t *gop;
 	int id, offset;
 
-	XENPRINTF((xennetback_ifsoftstart_transfer ));
+	XENPRINTF((xennetback_ifsoftstart_copy ));
 	int s = splnet();
 	if (__predict_false(
 	(ifp-if_flags  (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)) {



CVS commit: src/sys/dev/raidframe

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:38:15 UTC 2013

Modified Files:
src/sys/dev/raidframe: rf_reconstruct.c

Log Message:
fix parens in a message


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/rf_reconstruct.c
diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.118 src/sys/dev/raidframe/rf_reconstruct.c:1.119
--- src/sys/dev/raidframe/rf_reconstruct.c:1.118	Mon Feb 20 22:42:52 2012
+++ src/sys/dev/raidframe/rf_reconstruct.c	Wed Mar  6 11:38:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconstruct.c,v 1.118 2012/02/20 22:42:52 oster Exp $	*/
+/*	$NetBSD: rf_reconstruct.c,v 1.119 2013/03/06 11:38:15 yamt Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  /
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_reconstruct.c,v 1.118 2012/02/20 22:42:52 oster Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_reconstruct.c,v 1.119 2013/03/06 11:38:15 yamt Exp $);
 
 #include sys/param.h
 #include sys/time.h
@@ -1569,7 +1569,7 @@ ReconWriteDoneProc(void *arg, int status
 
 	Dprintf2(Reconstruction completed on psid %ld ru %d\n, rbuf-parityStripeID, rbuf-which_ru);
 	if (status) {
-		printf(raid%d: Recon write failed (status %d(0x%x)!\n, rbuf-raidPtr-raidid,status,status);
+		printf(raid%d: Recon write failed (status %d(0x%x))!\n, rbuf-raidPtr-raidid,status,status);
 		rf_CauseReconEvent(rbuf-raidPtr, rbuf-col, arg, RF_REVENT_WRITE_FAILED);
 		return(0);
 	}



CVS commit: src/sys/fs/puffs

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:39:38 UTC 2013

Modified Files:
src/sys/fs/puffs: puffs_sys.h

Log Message:
comment


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/fs/puffs/puffs_sys.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/fs/puffs/puffs_sys.h
diff -u src/sys/fs/puffs/puffs_sys.h:1.82 src/sys/fs/puffs/puffs_sys.h:1.83
--- src/sys/fs/puffs/puffs_sys.h:1.82	Sat Aug 11 01:10:11 2012
+++ src/sys/fs/puffs/puffs_sys.h	Wed Mar  6 11:39:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_sys.h,v 1.82 2012/08/11 01:10:11 manu Exp $	*/
+/*	$NetBSD: puffs_sys.h,v 1.83 2013/03/06 11:39:37 yamt Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -147,6 +147,10 @@ struct puffs_mount {
 	struct puffs_node_hashlist	*pmp_pnodehash;
 	intpmp_npnodehash;
 
+	/*
+	 * a list of cookies which is going to be puffs_getvnode'd.
+	 * this is merely a loose attempt to prevent races.
+	 */
 	LIST_HEAD(, puffs_newcookie)	pmp_newcookie;
 
 	struct mount			*pmp_mp;



CVS commit: src/sys/fs/puffs

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:40:22 UTC 2013

Modified Files:
src/sys/fs/puffs: puffs_node.c

Log Message:
comments
use sizeof(var) instead of sizeof(type) where possibly confusing


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/puffs/puffs_node.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_node.c
diff -u src/sys/fs/puffs/puffs_node.c:1.28 src/sys/fs/puffs/puffs_node.c:1.29
--- src/sys/fs/puffs/puffs_node.c:1.28	Mon Nov  5 17:27:38 2012
+++ src/sys/fs/puffs/puffs_node.c	Wed Mar  6 11:40:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_node.c,v 1.28 2012/11/05 17:27:38 dholland Exp $	*/
+/*	$NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.28 2012/11/05 17:27:38 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $);
 
 #include sys/param.h
 #include sys/hash.h
@@ -279,7 +279,7 @@ puffs_cookie2hashlist(struct puffs_mount
 {
 	uint32_t hash;
 
-	hash = hash32_buf(ck, sizeof(void *), HASH32_BUF_INIT);
+	hash = hash32_buf(ck, sizeof(ck), HASH32_BUF_INIT);
 	return pmp-pmp_pnodehash[hash % pmp-pmp_npnodehash];
 }
 
@@ -366,11 +366,18 @@ puffs_makeroot(struct puffs_mount *pmp)
 
 /*
  * Locate the in-kernel vnode based on the cookie received given
- * from userspace.  Returns a vnode, if found, NULL otherwise.
+ * from userspace.
  * The parameter lock control whether to lock the possible or
  * not.  Locking always might cause us to lock against ourselves
  * in situations where we want the vnode but don't care for the
  * vnode lock, e.g. file server issued putpages.
+ *
+ * returns 0 on success.  otherwise returns an errno or PUFFS_NOSUCHCOOKIE.
+ *
+ * returns PUFFS_NOSUCHCOOKIE if no vnode for the cookie is found.
+ * in that case, if willcreate=true, the pmp_newcookie list is populated with
+ * the given cookie.  it's the caller's responsibility to consume the entry
+ * with calling puffs_getvnode.
  */
 int
 puffs_cookie2vnode(struct puffs_mount *pmp, puffs_cookie_t ck, int lock,



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

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:42:18 UTC 2013

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

Log Message:
simplify code
add a comment


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

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

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.135 src/sys/rump/librump/rumpkern/vm.c:1.136
--- src/sys/rump/librump/rumpkern/vm.c:1.135	Tue Jan 29 21:26:24 2013
+++ src/sys/rump/librump/rumpkern/vm.c	Wed Mar  6 11:42:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.135 2013/01/29 21:26:24 para Exp $	*/
+/*	$NetBSD: vm.c,v 1.136 2013/03/06 11:42:18 yamt Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.135 2013/01/29 21:26:24 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.136 2013/03/06 11:42:18 yamt Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -252,6 +252,18 @@ uvm_pagezero(struct vm_page *pg)
 }
 
 /*
+ * uvm_page_locked_p: return true if object associated with page is
+ * locked.  this is a weak check for runtime assertions only.
+ */
+
+bool
+uvm_page_locked_p(struct vm_page *pg)
+{
+
+	return mutex_owned(pg-uobject-vmobjlock);
+}
+
+/*
  * Misc routines
  */
 
@@ -361,16 +373,6 @@ uvmspace_init(struct vmspace *vm, struct
 	vm-vm_refcnt = 1;
 }
 
-bool
-uvm_page_locked_p(struct vm_page *pg)
-{
-
-	if (pg-uobject != NULL) {
-		return mutex_owned(pg-uobject-vmobjlock);
-	}
-	return true;
-}
-
 void
 uvm_pagewire(struct vm_page *pg)
 {



CVS commit: src/usr.bin/tee

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:44:11 UTC 2013

Modified Files:
src/usr.bin/tee: tee.c

Log Message:
use more appropriate types
remove unnecessary casts


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/tee/tee.c

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

Modified files:

Index: src/usr.bin/tee/tee.c
diff -u src/usr.bin/tee/tee.c:1.10 src/usr.bin/tee/tee.c:1.11
--- src/usr.bin/tee/tee.c:1.10	Tue Mar 20 20:34:59 2012
+++ src/usr.bin/tee/tee.c	Wed Mar  6 11:44:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tee.c,v 1.10 2012/03/20 20:34:59 matt Exp $	*/
+/*	$NetBSD: tee.c,v 1.11 2013/03/06 11:44:11 yamt Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)tee.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: tee.c,v 1.10 2012/03/20 20:34:59 matt Exp $);
+__RCSID($NetBSD: tee.c,v 1.11 2013/03/06 11:44:11 yamt Exp $);
 #endif
 
 #include sys/types.h
@@ -68,8 +68,8 @@ int
 main(int argc, char *argv[])
 {
 	LIST *p;
-	int n, fd, rval, wval;
-	char *bp;
+	ssize_t rval;
+	int fd;
 	int append, ch, exitval;
 	char *buf;
 #define	BSIZE (8 * 1024)
@@ -93,7 +93,7 @@ main(int argc, char *argv[])
 	argv += optind;
 	argc -= optind;
 
-	if ((buf = malloc((size_t)BSIZE)) == NULL)
+	if ((buf = malloc(BSIZE)) == NULL)
 		err(1, malloc);
 
 	add(STDOUT_FILENO, stdout);
@@ -108,8 +108,10 @@ main(int argc, char *argv[])
 
 	while ((rval = read(STDIN_FILENO, buf, BSIZE))  0)
 		for (p = head; p; p = p-next) {
-			n = rval;
-			bp = buf;
+			const char *bp = buf;
+			size_t n = rval;
+			ssize_t wval;
+
 			do {
 if ((wval = write(p-fd, bp, n)) == -1) {
 	warn(%s, p-name);
@@ -139,7 +141,7 @@ add(int fd, const char *name)
 {
 	LIST *p;
 
-	if ((p = malloc((size_t)sizeof(LIST))) == NULL)
+	if ((p = malloc(sizeof(LIST))) == NULL)
 		err(1, malloc);
 	p-fd = fd;
 	p-name = name;



CVS commit: src/usr.sbin/lockstat

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:49:06 UTC 2013

Modified Files:
src/usr.sbin/lockstat: lockstat.8 main.c

Log Message:
add -d option to disable lockstat


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/lockstat/lockstat.8
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/lockstat/main.c

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

Modified files:

Index: src/usr.sbin/lockstat/lockstat.8
diff -u src/usr.sbin/lockstat/lockstat.8:1.9 src/usr.sbin/lockstat/lockstat.8:1.10
--- src/usr.sbin/lockstat/lockstat.8:1.9	Sat Mar 21 13:02:19 2009
+++ src/usr.sbin/lockstat/lockstat.8	Wed Mar  6 11:49:06 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: lockstat.8,v 1.9 2009/03/21 13:02:19 ad Exp $
+.\	$NetBSD: lockstat.8,v 1.10 2013/03/06 11:49:06 yamt Exp $
 .\
 .\ Copyright (c) 2006, 2007, 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 21, 2009
+.Dd March 6, 2013
 .Dt LOCKSTAT 8
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd display kernel locking statistics
 .Sh SYNOPSIS
 .Nm
-.Op Fl ceflMmpstx
+.Op Fl cdeflMmpstx
 .Op Fl b Ar nbuf
 .Op Fl E Ar event
 .Op Fl F Ar func
@@ -70,6 +70,10 @@ Adjust the number of trace buffers alloc
 Report percentage of total events by count, and sort the output by number
 of events.
 The default is to key on event timings.
+.It Fl d
+Disable lockstat.
+This is useful when a program crashed leaving the lockstat kernel driver
+enabled.
 .It Fl E Ar event
 Limit tracing to one type of event.
 Use the

Index: src/usr.sbin/lockstat/main.c
diff -u src/usr.sbin/lockstat/main.c:1.18 src/usr.sbin/lockstat/main.c:1.19
--- src/usr.sbin/lockstat/main.c:1.18	Tue Aug 30 19:20:20 2011
+++ src/usr.sbin/lockstat/main.c	Wed Mar  6 11:49:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.18 2011/08/30 19:20:20 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.19 2013/03/06 11:49:06 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.18 2011/08/30 19:20:20 joerg Exp $);
+__RCSID($NetBSD: main.c,v 1.19 2013/03/06 11:49:06 yamt Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -135,6 +135,7 @@ static bool		lflag;
 static bool		fflag;
 static int		nbufs;
 static bool		cflag;
+static bool		dflag;
 static bool		xflag;
 static int		lsfd;
 static int		displayed;
@@ -181,7 +182,7 @@ main(int argc, char **argv)
 	mflag = false;
 	Mflag = false;
 
-	while ((ch = getopt(argc, argv, E:F:L:MN:T:b:ceflmo:pstx)) != -1)
+	while ((ch = getopt(argc, argv, E:F:L:MN:T:b:cdeflmo:pstx)) != -1)
 		switch (ch) {
 		case 'E':
 			eventtype = matchname(eventnames, optarg);
@@ -206,6 +207,9 @@ main(int argc, char **argv)
 		case 'c':
 			cflag = true;
 			break;
+		case 'd':
+			dflag = true;
+			break;
 		case 'e':
 			listnames(eventnames);
 			break;
@@ -242,7 +246,7 @@ main(int argc, char **argv)
 	argc -= optind;
 	argv += optind;
 
-	if (*argv == NULL)
+	if (*argv == NULL  !dflag)
 		usage();
 
 	if (outf) {
@@ -308,6 +312,9 @@ main(int argc, char **argv)
 		errx(EXIT_FAILURE,
 		incompatible lockstat interface version (%d, kernel %d),
 			LS_VERSION, ch);
+	if (dflag) {
+		goto disable;
+	}
 	if (ioctl(lsfd, IOC_LOCKSTAT_ENABLE, le))
 		err(EXIT_FAILURE, cannot enable tracing);
 
@@ -316,6 +323,7 @@ main(int argc, char **argv)
 	 */
 	spawn(argc, argv);
 
+disable:
 	/*
 	 * Stop tracing, and read the trace buffers from the kernel.
 	 */
@@ -395,7 +403,8 @@ usage(void)
 	%s [options] command\n\n
 	-b nbuf\t\tset number of event buffers to allocate\n
 	-c\t\treport percentage of total events by count, not time\n
-	-E event\t\tdisplay only one type of event\n
+	-d\t\tdisable lockstat\n
+	-E event\tdisplay only one type of event\n
 	-e\t\tlist event types\n
 	-F func\t\tlimit trace to one function\n
 	-f\t\ttrace only by function\n



CVS commit: src/sys/dev/pci

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:50:32 UTC 2013

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

Log Message:
ppb: fix link speed print


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/ppb.c

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

Modified files:

Index: src/sys/dev/pci/ppb.c
diff -u src/sys/dev/pci/ppb.c:1.50 src/sys/dev/pci/ppb.c:1.51
--- src/sys/dev/pci/ppb.c:1.50	Sat Oct 20 05:57:34 2012
+++ src/sys/dev/pci/ppb.c	Wed Mar  6 11:50:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.50 2012/10/20 05:57:34 matt Exp $	*/
+/*	$NetBSD: ppb.c,v 1.51 2013/03/06 11:50:32 yamt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.50 2012/10/20 05:57:34 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.51 2013/03/06 11:50:32 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -172,7 +172,8 @@ ppb_fix_pcie(device_t self)
 			u_int ls = (reg  16)  0x0f;
 			if (lw != mlw || ls != mls) {
 if (ls  __arraycount(pcie_linkspeed_strings)) {
-	aprint_normal( x%d @ %sGb/s\n,
+	aprint_normal_dev(self,
+	link is x%d @ %sGb/s\n,
 	lw, pcie_linkspeed_strings[ls]);
 } else {
 	aprint_normal_dev(self,



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

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:51:40 UTC 2013

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
some more definitions


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.62 src/sys/arch/x86/include/specialreg.h:1.63
--- src/sys/arch/x86/include/specialreg.h:1.62	Sun Jan  6 22:37:36 2013
+++ src/sys/arch/x86/include/specialreg.h	Wed Mar  6 11:51:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.62 2013/01/06 22:37:36 dsl Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.63 2013/03/06 11:51:40 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -160,6 +160,37 @@
 
 #define CPUID_DSPM_FLAGS1	\20 \1 HWF
 
+/*
+ * Intel Structured Extended Feature leaf
+ * Fn_0007 main leaf - %ebx.
+ */
+#define CPUID_SEF_FSGSBASE	__BIT(0)
+#define CPUID_SEF_BMI1		__BIT(3)
+#define CPUID_SEF_HLE		__BIT(4)
+#define CPUID_SEF_AVX2		__BIT(5)
+#define CPUID_SEF_SMEP		__BIT(7)
+#define CPUID_SEF_BMI2		__BIT(8)
+#define CPUID_SEF_ERMS		__BIT(9)
+#define CPUID_SEF_INVPCID	__BIT(10)
+#define CPUID_SEF_RTM		__BIT(11)
+#define CPUID_SEF_RDSEED	__BIT(18)
+#define CPUID_SEF_ADX		__BIT(19)
+#define CPUID_SEF_SMAP		__BIT(20)
+
+#define CPUID_SEF_FLAGS	\20 \
+	\1 FSGSBASE \
+	\2 BMI1 \
+	\4 HLE \
+	\5 AVX2 \
+	\7 SMEP \
+	\10 BMI2 \
+	\11 ERMS \
+	\12 INVPCID \
+	\13 RTM \
+	\22 RDSEED \
+	\23 ADX \
+	\24 SMAP
+
 /* Intel Fn8001 extended features - %edx */
 #define CPUID_SYSCALL	0x0800	/* SYSCALL/SYSRET */
 #define CPUID_XD	0x0010	/* Execute Disable (like CPUID_NOX) */



CVS commit: src/usr.sbin/cpuctl/arch

2013-03-06 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Mar  6 11:52:54 UTC 2013

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
print some more bits


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.38 src/usr.sbin/cpuctl/arch/i386.c:1.39
--- src/usr.sbin/cpuctl/arch/i386.c:1.38	Mon Jan  7 23:20:42 2013
+++ src/usr.sbin/cpuctl/arch/i386.c	Wed Mar  6 11:52:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.38 2013/01/07 23:20:42 dsl Exp $	*/
+/*	$NetBSD: i386.c,v 1.39 2013/03/06 11:52:53 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.38 2013/01/07 23:20:42 dsl Exp $);
+__RCSID($NetBSD: i386.c,v 1.39 2013/03/06 11:52:53 yamt Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -658,6 +658,7 @@ identifycpu_cpuids(struct cpu_info *ci)
 	u_int core_max = 1;	/* core per package */
 	u_int smt_bits, core_bits;
 	uint32_t descs[4];
+	uint32_t highest_basic_info;
 
 	aprint_verbose(%s: Initial APIC ID %u\n, cpuname, ci-ci_initapicid);
 	ci-ci_packageid = ci-ci_initapicid;
@@ -676,7 +677,8 @@ identifycpu_cpuids(struct cpu_info *ci)
 		lp_max = (descs[1]  16)  0xff;
 	}
 	x86_cpuid(0, descs);
-	if (descs[0] = 4) {
+	highest_basic_info = descs[0];
+	if (highest_basic_info = 4) {
 		x86_cpuid2(4, 0, descs);
 		core_max = (descs[0]  26) + 1;
 	}
@@ -1427,6 +1429,44 @@ identifycpu(int fd, const char *cpuname)
 			print_bits(cpuname, SVM features, CPUID_AMD_SVM_FLAGS,
    data[3]);
 		}
+	} else if (cpu_vendor == CPUVENDOR_INTEL) {
+		uint32_t data[4];
+		uint32_t highest_basic_info;
+		uint32_t bi_index;
+
+		x86_cpuid(0x, data);
+		highest_basic_info = data[0];
+		aprint_verbose(%s: highest basic info %08x\n, cpuname,
+		highest_basic_info);
+		for (bi_index = 1; bi_index = highest_basic_info; bi_index++) {
+			x86_cpuid(bi_index, data);
+			switch (bi_index) {
+			case 6:
+print_bits(cpuname, DSPM-eax,
+CPUID_DSPM_FLAGS, data[0]);
+print_bits(cpuname, DSPM-ecx,
+CPUID_DSPM_FLAGS1, data[2]);
+break;
+			case 7:
+aprint_verbose(%s: SEF highest subleaf %08x\n,
+cpuname, data[0]);
+print_bits(cpuname, SEF-main, CPUID_SEF_FLAGS,
+data[1]);
+break;
+#if 0
+			default:
+aprint_verbose(%s: basic %08x-eax %08x\n,
+cpuname, bi_index, data[0]);
+aprint_verbose(%s: basic %08x-ebx %08x\n,
+cpuname, bi_index, data[1]);
+aprint_verbose(%s: basic %08x-ecx %08x\n,
+cpuname, bi_index, data[2]);
+aprint_verbose(%s: basic %08x-edx %08x\n,
+cpuname, bi_index, data[3]);
+break;
+#endif
+			}
+		}
 	}
 
 #ifdef INTEL_ONDEMAND_CLOCKMOD



CVS commit: src/tests/fs/nfs/nfsservice

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 13:35:22 UTC 2013

Modified Files:
src/tests/fs/nfs/nfsservice: Makefile

Log Message:
don't refer to things that are irrelevant or never existed.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/nfs/nfsservice/Makefile

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

Modified files:

Index: src/tests/fs/nfs/nfsservice/Makefile
diff -u src/tests/fs/nfs/nfsservice/Makefile:1.6 src/tests/fs/nfs/nfsservice/Makefile:1.7
--- src/tests/fs/nfs/nfsservice/Makefile:1.6	Mon Jul 18 23:30:46 2011
+++ src/tests/fs/nfs/nfsservice/Makefile	Wed Mar  6 08:35:22 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/07/19 03:30:46 dholland Exp $
+#	$NetBSD: Makefile,v 1.7 2013/03/06 13:35:22 christos Exp $
 #
 
 NOMAN=	1
@@ -28,12 +28,9 @@ LDADD+=	-lpthread -lutil
 
 CPPFLAGS+=	-DDEBUG -DMOUNT_NOMAIN -D_REENTRANT
 CPPFLAGS+=	-DRUMP_SYS_NETWORKING
-#CPPFLAGS+=	-DSVC_RUN_DEBUG
-CPPFLAGS+=	-I${.CURDIR}/../../common/nfsrpc
 
 .PATH: ${.CURDIR}/rpcbind
 .include rpcbind/Makefile.inc
-#.include rpc/Makefile.inc
 
 WARNS=	2
 



CVS commit: src/tests/fs/nfs/nfsservice/rpcbind

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 13:36:50 UTC 2013

Modified Files:
src/tests/fs/nfs/nfsservice/rpcbind: Makefile.inc

Log Message:
Mystery solved: The build worked for me because the my src tree is in /usr/src.
Refer to the correct source tree instead of the conventionally correct one.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc

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

Modified files:

Index: src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc
diff -u src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.2 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.3
--- src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.2	Tue Aug  3 13:24:45 2010
+++ src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc	Wed Mar  6 08:36:50 2013
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.2 2010/08/03 17:24:45 drochner Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2013/03/06 13:36:50 christos Exp $
 
 SRCS.rumpnfsd+=	check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \
 		rpcb_svc.c rpcb_svc_com.c security.c util.c 
 
-LIBRPCDIR=/usr/src/lib/libc/rpc
+LIBRPCDIR=${NETBSDSRCDIR}/lib/libc/rpc
 
 CPPFLAGS+=	-I${LIBRPCDIR} -DPORTMAP -DLIBWRAP
 



CVS commit: src/tools/gettext

2013-03-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Mar  6 14:34:01 UTC 2013

Modified Files:
src/tools/gettext: Makefile

Log Message:
Prevent the tools/gettext build from trying to run emacs.


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

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

Modified files:

Index: src/tools/gettext/Makefile
diff -u src/tools/gettext/Makefile:1.5 src/tools/gettext/Makefile:1.6
--- src/tools/gettext/Makefile:1.5	Tue Feb 10 19:50:47 2009
+++ src/tools/gettext/Makefile	Wed Mar  6 14:34:01 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2009/02/10 19:50:47 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2013/03/06 14:34:01 apb Exp $
 
 .include bsd.own.mk
 
@@ -6,6 +6,7 @@ MODULE=		gettext
 
 CONFIGURE_ARGS=	--program-transform-name=s,^,${_TOOL_PREFIX}, \
 			--with-included-gettext --disable-csharp
+CONFIGURE_ENV+=	EMACS=no
 MAKE_ARGS=	MAKEINFO=${TOOL_MAKEINFO:Q}
 
 .include ${.CURDIR}/../Makefile.gnuhost



CVS commit: src/sys/dev/pci

2013-03-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar  6 17:03:15 UTC 2013

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

Log Message:
Add ALTIMA AC1003, BROADCOM BCM57782 and BCM57786.


To generate a diff of this commit:
cvs rdiff -u -r1.1150 -r1.1151 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1150 src/sys/dev/pci/pcidevs:1.1151
--- src/sys/dev/pci/pcidevs:1.1150	Sun Mar  3 19:51:13 2013
+++ src/sys/dev/pci/pcidevs	Wed Mar  6 17:03:15 2013
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1150 2013/03/03 19:51:13 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1151 2013/03/06 17:03:15 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -934,6 +934,7 @@ product ALTERA EP4CGX15BF14C8N	0x4c15	EP
 product ALTIMA AC1000	0x03e8	AC1000 Gigabit Ethernet
 product ALTIMA AC1001	0x03e9	AC1001 Gigabit Ethernet
 product ALTIMA AC9100	0x03ea	AC9100 Gigabit Ethernet
+product ALTIMA AC1003	0x03eb	AC1003 Gigabit Ethernet
 
 /* AMD products */
 product AMD AMD64_HT	0x1100	K8 AMD64 HyperTransport Configuration
@@ -1687,9 +1688,11 @@ product BROADCOM BCM5708S	0x16ac	BCM5708
 product BROADCOM BCM57761	0x16b0	BCM57761 10/100/1000 Ethernet
 product BROADCOM BCM57781	0x16b1	BCM57781 10/100/1000 Ethernet
 product BROADCOM BCM57791	0x16b2	BCM57791 10/100/1000 Ethernet
+product BROADCOM BCM57786	0x16b3	BCM57786 10/100/1000 Ethernet
 product BROADCOM BCM57765	0x16b4	BCM57765 Integrated Gigabit Ethernet
 product BROADCOM BCM57785	0x16b5	BCM57785 Integrated Gigabit Ethernet
 product BROADCOM BCM57795	0x16b6	BCM57795 10/100/1000 Ethernet
+product BROADCOM BCM57782	0x16b7	BCM57782 10/100/1000 Ethernet
 product BROADCOM BCM5702_ALT	0x16c6	BCM5702 10/100/1000 Ethernet
 product BROADCOM BCM5703_ALT	0x16c7	BCM5703 10/100/1000 Ethernet
 product BROADCOM BCM5781	0x16dd	BCM5781 Integrated Gigabit Ethernet



CVS commit: src/share/zoneinfo

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 17:32:51 UTC 2013

Modified Files:
src/share/zoneinfo: Makefile

Log Message:
- create the directories if missing
- use $() instead of ``


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/share/zoneinfo/Makefile

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

Modified files:

Index: src/share/zoneinfo/Makefile
diff -u src/share/zoneinfo/Makefile:1.43 src/share/zoneinfo/Makefile:1.44
--- src/share/zoneinfo/Makefile:1.43	Fri Apr 10 12:16:12 2009
+++ src/share/zoneinfo/Makefile	Wed Mar  6 12:32:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.43 2009/04/10 16:16:12 apb Exp $
+#	$NetBSD: Makefile,v 1.44 2013/03/06 17:32:51 christos Exp $
 
 .include bsd.own.mk
 
@@ -97,9 +97,16 @@ afterinstall: ${DATA} ${REDO} ${TABDATA}
 	find . -type f -print | xargs ${TOOL_STAT} -qf '%d,%i %N' | sort \
 	| while read devino tzfile; do \
 		destfile=${DESTDIR}${TZDIR}/$${tzfile#./}; \
+		destdir=$$(dirname $${destfile}); \
+		if [ ! -d $$destdir ]; then \
+			${_MKSHMSG_INSTALL} $$destdir; \
+			${_MKSHECHO} ${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} \
+			$$destdir; \
+			${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} $$destdir; \
+		fi; \
 		if [ $$devino = $$lastdevino ]; then \
-			if  ldevino=`${TOOL_STAT} -qf '%d %i' $$lastfile`  \
-			tdevino=`${TOOL_STAT} -qf '%d %i' $$destfile`  \
+			if  ldevino=$$(${TOOL_STAT} -qf '%d %i' $$lastfile)  \
+			tdevino=$$(${TOOL_STAT} -qf '%d %i' $$destfile)  \
 			[ $$ldevino = $$tdevino ]; then \
 continue; \
 			fi; \



CVS commit: src/sys/sys

2013-03-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Mar  6 18:16:58 UTC 2013

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

Log Message:
Move CTASSERT a few lines down so as to not collide with the CTASSERT
in rtsock.c (relevant for compilers without __COUNTER__).  Yes,
it's a really cheap tweak.  Tweak better if it tickles your tweakybone.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/ucontext.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/ucontext.h
diff -u src/sys/sys/ucontext.h:1.17 src/sys/sys/ucontext.h:1.18
--- src/sys/sys/ucontext.h:1.17	Wed Sep 12 02:00:54 2012
+++ src/sys/sys/ucontext.h	Wed Mar  6 18:16:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucontext.h,v 1.17 2012/09/12 02:00:54 manu Exp $	*/
+/*	$NetBSD: ucontext.h,v 1.18 2013/03/06 18:16:58 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc.
@@ -104,15 +104,15 @@ struct __ucontext {
 #ifdef _KERNEL
 struct lwp;
 
-#ifdef __UCONTEXT_SIZE
-__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
-#endif
-
 void	getucontext(struct lwp *, ucontext_t *);
 int	setucontext(struct lwp *, const ucontext_t *);
 void	cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *);
 int	cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int);
 int	cpu_mcontext_validate(struct lwp *, const mcontext_t *);
+
+#ifdef __UCONTEXT_SIZE
+__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
+#endif
 #endif /* _KERNEL */
 
 #endif /* !_SYS_UCONTEXT_H_ */



CVS commit: src/usr.sbin/zic

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 18:21:41 UTC 2013

Modified Files:
src/usr.sbin/zic: Makefile

Log Message:
remove compiler hacks


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/zic/Makefile

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

Modified files:

Index: src/usr.sbin/zic/Makefile
diff -u src/usr.sbin/zic/Makefile:1.13 src/usr.sbin/zic/Makefile:1.14
--- src/usr.sbin/zic/Makefile:1.13	Tue Mar  5 08:42:04 2013
+++ src/usr.sbin/zic/Makefile	Wed Mar  6 13:21:41 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2013/03/05 13:42:04 apb Exp $
+#	$NetBSD: Makefile,v 1.14 2013/03/06 18:21:41 christos Exp $
 
 .include Makefile.inc
 .include bsd.own.mk
@@ -6,14 +6,6 @@
 COPTS.zic.c	+= -Wno-format-nonliteral
 COPTS.scheck.c	+= -Wno-format-nonliteral
 
-.if defined(HAVE_GCC)  ${HAVE_GCC}  45
-# gcc-4.1 says:
-# warning: comparison is always false due to limited range of data type
-# and there is no -Wno-foo option to suppress that warning.
-#
-COPTS.zic.c+= ${${ACTIVE_CC} == gcc :? -Wno-error :}
-.endif # HAVE_GCC  45
-
 PROG=	zic
 SRCS=	zic.c scheck.c ialloc.c
 MAN=	zic.8



CVS commit: src/lib/libc/time

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 18:40:19 UTC 2013

Modified Files:
src/lib/libc/time: zic.c

Log Message:
Overly aggressive long-zic_t conversion.
I should add zic_t to the dictionary instead.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.39 src/lib/libc/time/zic.c:1.40
--- src/lib/libc/time/zic.c:1.39	Wed Mar  6 13:21:18 2013
+++ src/lib/libc/time/zic.c	Wed Mar  6 13:40:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.39 2013/03/06 18:21:18 christos Exp $	*/
+/*	$NetBSD: zic.c,v 1.40 2013/03/06 18:40:19 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zic.c,v 1.39 2013/03/06 18:21:18 christos Exp $);
+__RCSID($NetBSD: zic.c,v 1.40 2013/03/06 18:40:19 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -792,7 +792,7 @@ infile(const char *name)
 			break;
 		cp = strchr(buf, '\n');
 		if (cp == NULL) {
-			error(_(line too zic_t));
+			error(_(line too long));
 			exit(EXIT_FAILURE);
 		}
 		*cp = '\0';
@@ -2574,7 +2574,7 @@ mp = _(time zone abbreviation differs f
 	}
 	i = strlen(string) + 1;
 	if (charcnt + i  TZ_MAX_CHARS) {
-		error(_(too many, or too zic_t, time zone abbreviations));
+		error(_(too many, or too long, time zone abbreviations));
 		exit(EXIT_FAILURE);
 	}
 	(void)strncpy(chars[charcnt], string, sizeof(chars) - charcnt - 1);



CVS commit: src/lib/libc/time

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 18:21:18 UTC 2013

Modified Files:
src/lib/libc/time: zic.c

Log Message:
change %ld to %jd


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.38 src/lib/libc/time/zic.c:1.39
--- src/lib/libc/time/zic.c:1.38	Wed Mar  6 13:19:07 2013
+++ src/lib/libc/time/zic.c	Wed Mar  6 13:21:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.38 2013/03/06 18:19:07 christos Exp $	*/
+/*	$NetBSD: zic.c,v 1.39 2013/03/06 18:21:18 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zic.c,v 1.38 2013/03/06 18:19:07 christos Exp $);
+__RCSID($NetBSD: zic.c,v 1.39 2013/03/06 18:21:18 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -869,7 +869,6 @@ _(%s: panic: Invalid l_value %d\n),
 static zic_t
 gethms(const char *string, const char *const errstring, const int signable)
 {
-	long 	lhh;
 	zic_t	hh;
 	int	mm, ss, sign;
 
@@ -881,16 +880,15 @@ gethms(const char *string, const char *c
 		sign = -1;
 		++string;
 	} else	sign = 1;
-	if (sscanf(string, scheck(string, %ld), lhh) == 1)
+	if (sscanf(string, scheck(string, %jd), hh) == 1)
 		mm = ss = 0;
-	else if (sscanf(string, scheck(string, %ld:%d), lhh, mm) == 2)
+	else if (sscanf(string, scheck(string, %jd:%d), hh, mm) == 2)
 		ss = 0;
-	else if (sscanf(string, scheck(string, %ld:%d:%d),
-		lhh, mm, ss) != 3) {
+	else if (sscanf(string, scheck(string, %jd:%d:%d),
+		hh, mm, ss) != 3) {
 			error(errstring);
 			return 0;
 	}
-	hh = lhh;
 	if (hh  0 ||
 		mm  0 || mm = MINSPERHOUR ||
 		ss  0 || ss  SECSPERMIN) {



CVS commit: src/lib/libc/time

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 18:19:07 UTC 2013

Modified Files:
src/lib/libc/time: zic.c

Log Message:
- change zic_t to intmax_t and friends suggested by apb
- change long to zic_t suggested by Paul Eggert
- remove unused constants


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.37 src/lib/libc/time/zic.c:1.38
--- src/lib/libc/time/zic.c:1.37	Mon Mar  4 16:18:51 2013
+++ src/lib/libc/time/zic.c	Wed Mar  6 13:19:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.37 2013/03/04 21:18:51 joerg Exp $	*/
+/*	$NetBSD: zic.c,v 1.38 2013/03/06 18:19:07 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zic.c,v 1.37 2013/03/04 21:18:51 joerg Exp $);
+__RCSID($NetBSD: zic.c,v 1.38 2013/03/06 18:19:07 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -20,7 +20,11 @@ __RCSID($NetBSD: zic.c,v 1.37 2013/03/0
 
 #define	ZIC_VERSION	'2'
 
-typedef int_fast64_t	zic_t;
+typedef intmax_t	zic_t;
+#define TIME_T_BITS_IN_FILE	64
+static const zic_t min_time = INTMAX_MIN;
+static const zic_t max_time = INTMAX_MAX;
+
 
 #ifndef ZIC_MAX_ABBR_LEN_WO_WARN
 #define ZIC_MAX_ABBR_LEN_WO_WARN	6
@@ -50,9 +54,6 @@ typedef int_fast64_t	zic_t;
 #define isascii(x) 1
 #endif
 
-#define OFFSET_STRLEN_MAXIMUM	(7 + INT_STRLEN_MAXIMUM(long))
-#define RULE_STRLEN_MAXIMUM	8	/* Mdd.dd.d */
-
 #define end(cp)	(strchr((cp), '\0'))
 
 struct rule {
@@ -72,12 +73,12 @@ struct rule {
 	int		r_dayofmonth;
 	int		r_wday;
 
-	long		r_tod;		/* time from midnight */
+	zic_t		r_tod;		/* time from midnight */
 	int		r_todisstd;	/* above is standard time if TRUE */
 	/* or wall clock time if FALSE */
 	int		r_todisgmt;	/* above is GMT if TRUE */
 	/* or local time if FALSE */
-	long		r_stdoff;	/* offset from standard time */
+	zic_t		r_stdoff;	/* offset from standard time */
 	const char *	r_abbrvar;	/* variable part of abbreviation */
 
 	int		r_todo;		/* a rule to do (used in outzone) */
@@ -97,11 +98,11 @@ struct zone {
 	int		z_linenum;
 
 	const char *	z_name;
-	long		z_gmtoff;
+	zic_t		z_gmtoff;
 	const char *	z_rule;
 	const char *	z_format;
 
-	long		z_stdoff;
+	zic_t		z_stdoff;
 
 	struct rule *	z_rules;
 	int		z_nrules;
@@ -117,15 +118,15 @@ extern char *	optarg;
 extern int	optind;
 
 static void	addtt(zic_t starttime, int type);
-static int	addtype(long gmtoff, const char * abbr, int isdst,
+static int	addtype(zic_t gmtoff, const char * abbr, int isdst,
 int ttisstd, int ttisgmt);
 static void	leapadd(zic_t t, int positive, int rolling, int count);
 static void	adjleap(void);
 static void	associate(void);
 static void	dolink(const char * fromfield, const char * tofield);
-static long	eitol(int i);
+static zic_t	eitol(int i);
 static char **	getfields(char * buf);
-static long	gethms(const char * string, const char * errstrng,
+static zic_t	gethms(const char * string, const char * errstrng,
 			int signable);
 static void	infile(const char * filename);
 static void	inleap(char ** fields, int nfields);
@@ -139,7 +140,7 @@ static int	lowerit(int c);
 int		main(int, char **);
 static int	mkdirs(char * filename);
 static void	newabbr(const char * abbr);
-static long	oadd(long t1, long t2);
+static zic_t	oadd(zic_t t1, zic_t t2);
 static void	outzone(const struct zone * zp, int ntzones);
 static int	rcomp(const void * leftp, const void * rightp);
 static zic_t	rpytime(const struct rule * rp, int wantedy);
@@ -147,7 +148,7 @@ static void	rulesub(struct rule * rp,
 			const char * loyearp, const char * hiyearp,
 			const char * typep, const char * monthp,
 			const char * dayp, const char * timep);
-static zic_t	tadd(zic_t t1, long t2);
+static zic_t	tadd(zic_t t1, zic_t t2);
 static int	yearistype(int year, const char * type);
 static int	atcomp(const void *avp, const void *bvp);
 static void	updateminmax(int x);
@@ -354,14 +355,14 @@ static struct attype {
 	zic_t		at;
 	unsigned char	type;
 }			attypes[TZ_MAX_TIMES];
-static long		gmtoffs[TZ_MAX_TYPES];
+static zic_t		gmtoffs[TZ_MAX_TYPES];
 static char		isdsts[TZ_MAX_TYPES];
 static unsigned char	abbrinds[TZ_MAX_TYPES];
 static char		ttisstds[TZ_MAX_TYPES];
 static char		ttisgmts[TZ_MAX_TYPES];
 static char		chars[TZ_MAX_CHARS];
 static zic_t		trans[TZ_MAX_LEAPS];
-static long		corr[TZ_MAX_LEAPS];
+static zic_t		corr[TZ_MAX_LEAPS];
 static char		roll[TZ_MAX_LEAPS];
 
 /*
@@ -659,10 +660,6 @@ warning(_(hard link failed, symbolic li
 	free(toname);
 }
 
-#define TIME_T_BITS_IN_FILE	64
-static const zic_t min_time = (zic_t) -1  (TIME_T_BITS_IN_FILE - 1);
-static const zic_t max_time = -1 - ((zic_t) -1  (TIME_T_BITS_IN_FILE - 1));
-
 static int
 itsdir(const 

CVS commit: src/usr.bin/mail

2013-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  6 20:49:20 UTC 2013

Modified Files:
src/usr.bin/mail: fio.c

Log Message:
since we are calling realpath() earlier now, we need to expand the name
of the folder in case it contained variables like $HOME.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/mail/fio.c

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

Modified files:

Index: src/usr.bin/mail/fio.c
diff -u src/usr.bin/mail/fio.c:1.38 src/usr.bin/mail/fio.c:1.39
--- src/usr.bin/mail/fio.c:1.38	Wed Feb 20 09:38:13 2013
+++ src/usr.bin/mail/fio.c	Wed Mar  6 15:49:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fio.c,v 1.38 2013/02/20 14:38:13 christos Exp $	*/
+/*	$NetBSD: fio.c,v 1.39 2013/03/06 20:49:20 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)fio.c	8.2 (Berkeley) 4/20/95;
 #else
-__RCSID($NetBSD: fio.c,v 1.38 2013/02/20 14:38:13 christos Exp $);
+__RCSID($NetBSD: fio.c,v 1.39 2013/03/06 20:49:20 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -394,18 +394,21 @@ getfold(char *name, size_t namesize)
 {
 	char unres[PATHSIZE], res[PATHSIZE];
 	char *folder;
+	const char *f;
 
 	if ((folder = value(ENAME_FOLDER)) == NULL)
 		return -1;
-	if (*folder != '/') {
-		(void)snprintf(unres, sizeof(unres), %s/%s, homedir, folder);
-		folder = unres;
+	if ((f = expand(folder)) == NULL)
+		return -1;
+	if (*f != '/') {
+		(void)snprintf(unres, sizeof(unres), %s/%s, homedir, f);
+		f = unres;
 	}
-	if (realpath(folder, res) == NULL)
-		warn(Can't canonicalize folder `%s', folder);
+	if (realpath(f, res) == NULL)
+		warn(Can't canonicalize folder `%s', f);
 	else
-		folder = res;
-	(void)strlcpy(name, folder, namesize);
+		f = res;
+	(void)strlcpy(name, f, namesize);
 	return 0;
 }
 



CVS commit: src

2013-03-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar  6 21:42:47 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: lib.in
src/gnu/usr.bin/groff/tmac: mdoc.local

Log Message:
Add libmandoc.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/mdocml/dist/lib.in
cvs rdiff -u -r1.68 -r1.69 src/gnu/usr.bin/groff/tmac/mdoc.local

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/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.9 src/external/bsd/mdocml/dist/lib.in:1.10
--- src/external/bsd/mdocml/dist/lib.in:1.9	Tue Nov 20 16:24:30 2012
+++ src/external/bsd/mdocml/dist/lib.in	Wed Mar  6 21:42:47 2013
@@ -62,6 +62,7 @@ LINE(libkvm,		Kernel Data Access Libr
 LINE(libm,		Math Library (libm, \\-lm))
 LINE(libm68k,		m68k Architecture Library (libm68k, \\-lm68k))
 LINE(libmagic,	Magic Number Recognition Library (libmagic, \\-lmagic))
+LINE(libmandoc,	Mandoc Macro Compiler Library (libmandoc, \\-lmandoc))
 LINE(libmd,		Message Digest (MD4, MD5, etc.) Support Library (libmd, \\-lmd))
 LINE(libmemstat,	Kernel Memory Allocator Statistics Library (libmemstat, \\-lmemstat))
 LINE(libmenu,		Curses Menu Library (libmenu, \\-lmenu))

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.68 src/gnu/usr.bin/groff/tmac/mdoc.local:1.69
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.68	Sun Jun 10 15:04:47 2012
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Wed Mar  6 21:42:47 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: mdoc.local,v 1.68 2012/06/10 15:04:47 christos Exp $
+.\ $NetBSD: mdoc.local,v 1.69 2013/03/06 21:42:47 wiz Exp $
 .\
 .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -90,6 +90,7 @@
 .ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch)
 .ds doc-str-Lb-libiscsi iSCSI protocol library (libiscsi, \-liscsi)
 .ds doc-str-Lb-libisns  Internet Storage Name Service Library (libisns, \-lisns)
+.ds doc-str-Lb-libmandocMandoc Macro Compiler Library (libmandoc, \-lmandoc)
 .ds doc-str-Lb-libnetpgpNetpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp)
 .ds doc-str-Lb-libperfuse   PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse)
 .ds doc-str-Lb-libppath Property-List Paths Library (libppath, \-lppath)



CVS commit: src/share/man/man9

2013-03-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar  6 22:07:54 UTC 2013

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

Log Message:
Use more markup.


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

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

Modified files:

Index: src/share/man/man9/ioctl.9
diff -u src/share/man/man9/ioctl.9:1.30 src/share/man/man9/ioctl.9:1.31
--- src/share/man/man9/ioctl.9:1.30	Sat Dec 11 17:32:14 2010
+++ src/share/man/man9/ioctl.9	Wed Mar  6 22:07:54 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: ioctl.9,v 1.30 2010/12/11 17:32:14 cegger Exp $
+.\ $NetBSD: ioctl.9,v 1.31 2013/03/06 22:07:54 wiz Exp $
 .\
 .\ Copyright (c) 1999  The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -246,13 +246,17 @@ structure and not a pointer to it or siz
 .El
 .Pp
 In order for the new ioctl to be known to the system it is installed
-in either \*[Lt]sys/ioctl.h\*[Gt] or one of the files that are reached from
-\*[Lt]sys/ioctl.h\*[Gt].
+in either
+.Aq Pa sys/ioctl.h
+or one of the files that are reached from
+.Aq Pa sys/ioctl.h .
 .Sh RETURN VALUES
-All ioctl() routines should return either 0 or a defined error code.
-The use of magic numbers such as -1, to indicate that a given ioctl
+All
+.Fn ioctl
+routines should return either 0 or a defined error code.
+The use of magic numbers such as \-1, to indicate that a given ioctl
 code was not handled is strongly discouraged.
-The value -1 coincides with the historic value for
+The value \-1 coincides with the historic value for
 .Cm ERESTART
 which was shown to produce user space code that never returned from
 a call to
@@ -267,7 +271,7 @@ indicates that no error occurred during 
 but neither was anything processed (it did not succeed).
 This supersedes the use of either
 .Cm ENOTTY
-(which is an explicit failure) or -1 (which has no contextual meaning)
+(which is an explicit failure) or \-1 (which has no contextual meaning)
 as a return value.
 .Cm ENOTTY
 will get passed directly back to user space and bypass any further
@@ -295,7 +299,9 @@ int a = 3;
 error = ioctl(s, FOOICTL, \*[Am]a);
 .Ed
 .Pp
-Within the ioctl()-routine of the driver, it can be then accessed like
+Within the
+.Fn ioctl Ns No -routine
+of the driver, it can be then accessed like
 .Bd -literal -offset indent
 driver_ioctl(..., u_long cmd, void *data)
 {
@@ -313,7 +319,11 @@ driver_ioctl(..., u_long cmd, void *data
 Note that if you for example try to read information from an ethernet
 driver where the name of the card is included in the third argument
 (e.g., ioctl(s, READFROMETH, struct ifreq *)), then you have to use
-the _IOWR() form not the _IOR(), as passing the name of the card to the
+the
+.Fn _IOWR
+form not the
+.Fn _IOR ,
+as passing the name of the card to the
 kernel already consists of writing data.
 .Sh SEE ALSO
 .Xr ioctl 2



CVS commit: src/share/man/man9

2013-03-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar  6 22:18:29 UTC 2013

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

Log Message:
New sentence, new line.


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

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

Modified files:

Index: src/share/man/man9/edid.9
diff -u src/share/man/man9/edid.9:1.4 src/share/man/man9/edid.9:1.5
--- src/share/man/man9/edid.9:1.4	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/edid.9	Wed Mar  6 22:18:29 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: edid.9,v 1.4 2010/12/02 12:54:13 wiz Exp $
+.\	$NetBSD: edid.9,v 1.5 2013/03/06 22:18:29 wiz Exp $
 .\
 .\ Copyright 2006 Itronix Inc.
 .\ All rights reserved.
@@ -60,9 +60,10 @@ The
 .Fn edid_is_valid
 function simply tests if the EDID block in
 .Fa data
-contains valid data.  This test includes a verification of the checksum,
-and that valid vendor and product idenfication data is present.  The data
-block contain at least 128 bytes.
+contains valid data.
+This test includes a verification of the checksum,
+and that valid vendor and product idenfication data is present.
+The data block contain at least 128 bytes.
 .Pp
 The
 .Fn edid_parse



CVS commit: src/share/man/man9

2013-03-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar  6 22:19:03 UTC 2013

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

Log Message:
New sentence, new line.


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

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

Modified files:

Index: src/share/man/man9/ieee80211_radiotap.9
diff -u src/share/man/man9/ieee80211_radiotap.9:1.12 src/share/man/man9/ieee80211_radiotap.9:1.13
--- src/share/man/man9/ieee80211_radiotap.9:1.12	Mon Apr  5 19:34:28 2010
+++ src/share/man/man9/ieee80211_radiotap.9	Wed Mar  6 22:19:03 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: ieee80211_radiotap.9,v 1.12 2010/04/05 19:34:28 joerg Exp $
+.\ $NetBSD: ieee80211_radiotap.9,v 1.13 2013/03/06 22:19:03 wiz Exp $
 .\
 .\ Copyright (c) 2004	Bruce M. Simpson b...@spc.org,
 .\			Darron Broad dar...@kewl.org.
@@ -91,8 +91,8 @@ typically defines a structure embedding 
 .Vt struct ieee80211_radiotap_header
 at the beginning,
 with subsequent fields naturally aligned,
-and in the appropriate order.  Also, a driver defines
-a macro to set the bits of the
+and in the appropriate order.
+Also, a driver defines a macro to set the bits of the
 .Va it_present
 bitmap to indicate which fields exist and are filled in by the driver.
 .\



CVS commit: othersrc/libexec/tnftpd

2013-03-06 Thread Christos Zoulas
Module Name:othersrc
Committed By:   christos
Date:   Wed Mar  6 22:57:45 UTC 2013

Modified Files:
othersrc/libexec/tnftpd: configure.ac

Log Message:
check for tzfile.h


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 othersrc/libexec/tnftpd/configure.ac

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

Modified files:

Index: othersrc/libexec/tnftpd/configure.ac
diff -u othersrc/libexec/tnftpd/configure.ac:1.29 othersrc/libexec/tnftpd/configure.ac:1.30
--- othersrc/libexec/tnftpd/configure.ac:1.29	Wed Mar 24 08:31:39 2010
+++ othersrc/libexec/tnftpd/configure.ac	Wed Mar  6 17:57:44 2013
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.29 2010/03/24 12:31:39 lukem Exp $
+# $NetBSD: configure.ac,v 1.30 2013/03/06 22:57:44 christos Exp $
 #
 # Process this file with autoconf to produce a configure script.
 
@@ -9,7 +9,7 @@ AC_COPYRIGHT([
 Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
 All rights reserved.
 ])
-AC_REVISION([$Revision: 1.29 $])
+AC_REVISION([$Revision: 1.30 $])
 
 AS_SHELL_SANITIZE
 
@@ -200,7 +200,7 @@ AC_CHECK_HEADERS([sys/resource.h \
   fcntl.h fnmatch.h grp.h libutil.h limits.h locale.h \
   netinet/in.h netinet/in_systm.h netinet/ip.h \
   paths.h poll.h pwd.h sys/poll.h \
-  setjmp.h signal.h stddef.h syslog.h termios.h \
+  setjmp.h signal.h stddef.h syslog.h termios.h tzfile.h \
   unistd.h util.h utime.h utmp.h],
   [], [], [$accheck_includes])
 



CVS commit: othersrc/libexec/tnftpd/src

2013-03-06 Thread Christos Zoulas
Module Name:othersrc
Committed By:   christos
Date:   Wed Mar  6 22:58:31 UTC 2013

Modified Files:
othersrc/libexec/tnftpd/src: cmds.c extern.h ftpd.c

Log Message:
merge tzfile.h in one place, and deal with not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 othersrc/libexec/tnftpd/src/cmds.c \
othersrc/libexec/tnftpd/src/extern.h
cvs rdiff -u -r1.31 -r1.32 othersrc/libexec/tnftpd/src/ftpd.c

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

Modified files:

Index: othersrc/libexec/tnftpd/src/cmds.c
diff -u othersrc/libexec/tnftpd/src/cmds.c:1.13 othersrc/libexec/tnftpd/src/cmds.c:1.14
--- othersrc/libexec/tnftpd/src/cmds.c:1.13	Fri Nov  6 22:26:21 2009
+++ othersrc/libexec/tnftpd/src/cmds.c	Wed Mar  6 17:58:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.13 2009/11/07 03:26:21 lukem Exp $	*/
+/*	$NetBSD: cmds.c,v 1.14 2013/03/06 22:58:31 christos Exp $	*/
 /*	from	NetBSD: cmds.c,v 1.30 2009/03/15 07:48:36 lukem Exp	*/
 
 /*
@@ -108,7 +108,6 @@ __RCSID( NetBSD: cmds.c,v 1.30 2009/03/
 #include stdio.h
 #include stdlib.h
 #include string.h
-#include tzfile.h
 #include unistd.h
 #include ctype.h
 
Index: othersrc/libexec/tnftpd/src/extern.h
diff -u othersrc/libexec/tnftpd/src/extern.h:1.13 othersrc/libexec/tnftpd/src/extern.h:1.14
--- othersrc/libexec/tnftpd/src/extern.h:1.13	Fri Nov  6 22:26:21 2009
+++ othersrc/libexec/tnftpd/src/extern.h	Wed Mar  6 17:58:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.13 2009/11/07 03:26:21 lukem Exp $	*/
+/*	$NetBSD: extern.h,v 1.14 2013/03/06 22:58:31 christos Exp $	*/
 /*	from	NetBSD: extern.h,v 1.61 2009/07/13 19:05:40 roy Exp	*/
 
 /*-
@@ -203,6 +203,13 @@ int	ftpd_logoutx(const char *, int, int)
 # define HAVE_SETPROCTITLE		1
 # define HAVE_STRUCT_SOCKADDR_SA_LEN	1
 # define HAVE_SOCKADDR_SNPRINTF		1
+# define HAVE_TZFILE_H			1
+#endif
+
+#ifdef HAVE_TZFILE_H
+#include tzfile.h
+#else
+#define TM_BASE_YEAR	1900
 #endif
 
 struct sockinet {

Index: othersrc/libexec/tnftpd/src/ftpd.c
diff -u othersrc/libexec/tnftpd/src/ftpd.c:1.31 othersrc/libexec/tnftpd/src/ftpd.c:1.32
--- othersrc/libexec/tnftpd/src/ftpd.c:1.31	Fri Nov  6 22:26:21 2009
+++ othersrc/libexec/tnftpd/src/ftpd.c	Wed Mar  6 17:58:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftpd.c,v 1.31 2009/11/07 03:26:21 lukem Exp $	*/
+/*	$NetBSD: ftpd.c,v 1.32 2013/03/06 22:58:31 christos Exp $	*/
 /*	from	NetBSD: ftpd.c,v 1.194 2009/07/13 19:05:40 roy Exp	*/
 
 /*
@@ -151,7 +151,6 @@ __RCSID( NetBSD: ftpd.c,v 1.194 2009/07
 #include string.h
 #include syslog.h
 #include time.h
-#include tzfile.h
 #include unistd.h
 #include util.h
 #ifdef SUPPORT_UTMP



CVS commit: othersrc/libexec/tnftpd

2013-03-06 Thread Christos Zoulas
Module Name:othersrc
Committed By:   christos
Date:   Wed Mar  6 22:58:45 UTC 2013

Modified Files:
othersrc/libexec/tnftpd: Makefile.in aclocal.m4 configure
tnftpd_config.h.in
othersrc/libexec/tnftpd/buildaux: config.guess config.sub install-sh
ltmain.sh
othersrc/libexec/tnftpd/examples: Makefile.in
othersrc/libexec/tnftpd/libnetbsd: Makefile.in
othersrc/libexec/tnftpd/ls: Makefile.in
othersrc/libexec/tnftpd/src: Makefile.in ftpcmd.y

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 othersrc/libexec/tnftpd/Makefile.in
cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/aclocal.m4
cvs rdiff -u -r1.42 -r1.43 othersrc/libexec/tnftpd/configure
cvs rdiff -u -r1.1 -r1.2 othersrc/libexec/tnftpd/tnftpd_config.h.in
cvs rdiff -u -r1.1 -r1.2 othersrc/libexec/tnftpd/buildaux/config.guess \
othersrc/libexec/tnftpd/buildaux/config.sub \
othersrc/libexec/tnftpd/buildaux/ltmain.sh
cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/buildaux/install-sh
cvs rdiff -u -r1.1 -r1.2 othersrc/libexec/tnftpd/examples/Makefile.in
cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/libnetbsd/Makefile.in
cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/ls/Makefile.in
cvs rdiff -u -r1.12 -r1.13 othersrc/libexec/tnftpd/src/Makefile.in
cvs rdiff -u -r1.15 -r1.16 othersrc/libexec/tnftpd/src/ftpcmd.y

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/pci

2013-03-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar  7 04:42:09 UTC 2013

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

Log Message:
Fix a bug that some PCI config register are accessed not using
pci_conf_{read,write}. Registers named BGE_PCI_* are PCI config
registers.


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/sys/dev/pci/if_bge.c

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

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.209 src/sys/dev/pci/if_bge.c:1.210
--- src/sys/dev/pci/if_bge.c:1.209	Thu Mar  7 03:53:35 2013
+++ src/sys/dev/pci/if_bge.c	Thu Mar  7 04:42:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.209 2013/03/07 03:53:35 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.210 2013/03/07 04:42:09 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.209 2013/03/07 03:53:35 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.210 2013/03/07 04:42:09 msaitoh Exp $);
 
 #include vlan.h
 
@@ -1852,7 +1852,8 @@ bge_chipinit(struct bge_softc *sc)
 			uint32_t tmp;
 
 			/* Set ONEDMA_ATONCE for hardware workaround. */
-			tmp = CSR_READ_4(sc, BGE_PCI_CLKCTL)  0x1f;
+			tmp = pci_conf_read(sc-sc_pc, sc-sc_pcitag,
+			BGE_PCI_CLKCTL)  0x1f;
 			if (tmp == 6 || tmp == 7)
 dma_rw_ctl |=
 BGE_PCIDMARWCTL_ONEDMA_ATONCE_GLOBAL;
@@ -3622,7 +3623,8 @@ bge_intr(void *xsc)
 	statusword = sc-bge_rdata-bge_status_block.bge_status;
 
 	if ((statusword  BGE_STATFLAG_UPDATED) ||
-	(!(CSR_READ_4(sc, BGE_PCI_PCISTATE)  BGE_PCISTATE_INTR_NOT_ACTIVE))) {
+	(!(pci_conf_read(sc-sc_pc, sc-sc_pcitag, BGE_PCI_PCISTATE) 
+		BGE_PCISTATE_INTR_NOT_ACTIVE))) {
 		/* Ack interrupt and stop others from occuring. */
 		bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 
@@ -4428,8 +4430,10 @@ bge_init(struct ifnet *ifp)
 	BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP);
 
 	/* Enable host interrupts. */
-	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_CLEAR_INTA);
-	BGE_CLRBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+	PCI_SETBIT(sc-sc_pc, sc-sc_pcitag, BGE_PCI_MISC_CTL,
+	BGE_PCIMISCCTL_CLEAR_INTA);
+	PCI_CLRBIT(sc-sc_pc, sc-sc_pcitag, BGE_PCI_MISC_CTL,
+	BGE_PCIMISCCTL_MASK_PCI_INTR);
 	bge_writembx(sc, BGE_MBX_IRQ0_LO, 0);
 
 	if ((error = bge_ifmedia_upd(ifp)) != 0)
@@ -4690,7 +4694,8 @@ bge_stop(struct ifnet *ifp, int disable)
 	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 
 	/* Disable host interrupts. */
-	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+	PCI_SETBIT(sc-sc_pc, sc-sc_pcitag, BGE_PCI_MISC_CTL,
+	BGE_PCIMISCCTL_MASK_PCI_INTR);
 	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 
 	/*



CVS commit: src

2013-03-06 Thread Masaru OKI
Module Name:src
Committed By:   oki
Date:   Thu Mar  7 04:51:58 UTC 2013

Modified Files:
src: build.sh

Log Message:
fixed typo on comment.


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.264 src/build.sh:1.265
--- src/build.sh:1.264	Wed Feb 13 02:17:54 2013
+++ src/build.sh	Thu Mar  7 04:51:58 2013
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $
+#	$NetBSD: build.sh,v 1.265 2013/03/07 04:51:58 oki Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1434,7 +1434,7 @@ print_tooldir_make()
 #1. build a new version of nbmake in a temporary directory;
 #2. use the temporary nbmake to create the top level obj directory;
 #3. use $(getmakevar TOOLDIR) with the temporary nbmake to
-#   get the corect value of TOOLDIR;
+#   get the correct value of TOOLDIR;
 #4. move the temporary nbmake to ${TOOLDIR}/bin/nbmake.
 #
 # However, people don't like building nbmake unnecessarily if their
@@ -1730,7 +1730,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.265 2013/03/07 04:51:58 oki Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src

2013-03-06 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Mar  7 05:33:13 UTC 2013

Modified Files:
src/external/bsd/mdocml/dist: lib.in
src/gnu/usr.bin/groff/tmac: mdoc.local

Log Message:
Following a prompt from wiz, ensure that explanations for the
minimalist JSON library libmj, and the netpgp verification library,
libnetpgpverify, are in the correct places.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/mdocml/dist/lib.in
cvs rdiff -u -r1.69 -r1.70 src/gnu/usr.bin/groff/tmac/mdoc.local

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/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.10 src/external/bsd/mdocml/dist/lib.in:1.11
--- src/external/bsd/mdocml/dist/lib.in:1.10	Wed Mar  6 21:42:47 2013
+++ src/external/bsd/mdocml/dist/lib.in	Thu Mar  7 05:33:13 2013
@@ -66,6 +66,7 @@ LINE(libmandoc,	Mandoc Macro Compiler
 LINE(libmd,		Message Digest (MD4, MD5, etc.) Support Library (libmd, \\-lmd))
 LINE(libmemstat,	Kernel Memory Allocator Statistics Library (libmemstat, \\-lmemstat))
 LINE(libmenu,		Curses Menu Library (libmenu, \\-lmenu))
+LINE(libmj,		Minimalist JSON library (libmj, \\-lmj))
 LINE(libnetgraph,	Netgraph User Library (libnetgraph, \\-lnetgraph))
 LINE(libnetpgp,	Netpgp signing, verification, encryption and decryption (libnetpgp, \\-lnetpgp))
 LINE(libnetpgpverify,	Netpgp verification (libnetpgpverify, \\-lnetpgpverify))

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.69 src/gnu/usr.bin/groff/tmac/mdoc.local:1.70
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.69	Wed Mar  6 21:42:47 2013
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Thu Mar  7 05:33:13 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: mdoc.local,v 1.69 2013/03/06 21:42:47 wiz Exp $
+.\ $NetBSD: mdoc.local,v 1.70 2013/03/07 05:33:13 agc Exp $
 .\
 .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -90,8 +90,10 @@
 .ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch)
 .ds doc-str-Lb-libiscsi iSCSI protocol library (libiscsi, \-liscsi)
 .ds doc-str-Lb-libisns  Internet Storage Name Service Library (libisns, \-lisns)
+.ds doc-str-Lb-libmjMinimalist JSON library (libmj, \-lmj)
 .ds doc-str-Lb-libmandocMandoc Macro Compiler Library (libmandoc, \-lmandoc)
 .ds doc-str-Lb-libnetpgpNetpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp)
+.ds doc-str-Lb-libnetpgpverify  Netpgp signature verification (libnetpgpverify, \-lnetpgpverify)
 .ds doc-str-Lb-libperfuse   PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse)
 .ds doc-str-Lb-libppath Property-List Paths Library (libppath, \-lppath)
 .ds doc-str-Lb-libprop  Property Container Object Library (libprop, \-lprop)