CVS commit: xsrc/external/mit/libXfont/dist/src/bitmap

2012-05-18 Thread Aleksey Cheusov
Module Name:xsrc
Committed By:   cheusov
Date:   Sat May 19 05:16:27 UTC 2012

Modified Files:
xsrc/external/mit/libXfont/dist/src/bitmap: pcfread.c

Log Message:
fix in libxfont:
   An uninitialized pointer causes a crash if pcf header is corrupted
   (upstream patch).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c

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

Modified files:

Index: xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c
diff -u xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.1.1.2 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.2
--- xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.1.1.2	Wed Jun 10 07:33:40 2009
+++ xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c	Sat May 19 05:16:27 2012
@@ -408,6 +408,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr f
 
 pFont->info.nprops = 0;
 pFont->info.props = 0;
+pFont->info.isStringProp=0;
+
 if (!(tables = pcfReadTOC(file, &ntables)))
 	goto Bail;
 



CVS commit: src/sys/arch/powerpc/booke/dev

2012-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat May 19 00:11:46 UTC 2012

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3gpio.c

Log Message:
Fix a few compile problems on non-P2020 platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/booke/dev/pq3gpio.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/powerpc/booke/dev/pq3gpio.c
diff -u src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.6 src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.7
--- src/sys/arch/powerpc/booke/dev/pq3gpio.c:1.6	Thu May 17 16:24:09 2012
+++ src/sys/arch/powerpc/booke/dev/pq3gpio.c	Sat May 19 00:11:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3gpio.c,v 1.6 2012/05/17 16:24:09 matt Exp $	*/
+/*	$NetBSD: pq3gpio.c,v 1.7 2012/05/19 00:11:46 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -41,7 +41,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pq3gpio.c,v 1.6 2012/05/17 16:24:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3gpio.c,v 1.7 2012/05/19 00:11:46 matt Exp $");
 
 #include 
 #include 
@@ -163,7 +163,7 @@ pq3gpio_group_create(device_t self, bus_
 #endif
 	gc->gc_tag.gp_pin_read = pq3gpio_pin_read;
 	gc->gc_tag.gp_pin_write = pq3gpio_pin_write;
-	gc->gc_tag.gp_pin_ctl = pq3gpio_pin_ctl;
+	gc->gc_tag.gp_pin_ctl = pin_ctl;
 
 	u_int data = bus_space_read_4(gc->gc_bst, gc->gc_bsh, reg);
 	u_int mask = __BIT(31);
@@ -227,7 +227,7 @@ pq3gpio_mpc8536_attach(device_t self, bu
 	 * Create GPIO pin groups
 	 */
 	aprint_normal_dev(self, "%zu input/output/opendrain pins\n",
-	pincnt, pincnt);
+	pincnt);
 	pq3gpio_group_create(self, bst, bsh, GPDAT, pinmask,
 	GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN,
 	pq3gpio_pin_ctl);



CVS commit: src/usr.bin/login

2012-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 19 00:02:44 UTC 2012

Modified Files:
src/usr.bin/login: common.c common.h

Log Message:
- use __dead consistently.
- more clang build.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/login/common.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/login/common.h

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/login/common.c
diff -u src/usr.bin/login/common.c:1.5 src/usr.bin/login/common.c:1.6
--- src/usr.bin/login/common.c:1.5	Wed May  9 21:25:24 2012
+++ src/usr.bin/login/common.c	Fri May 18 20:02:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.5 2012/05/10 01:25:24 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: common.c,v 1.5 2012/05/10 01:25:24 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $");
 
 #include 
 #include 
@@ -155,7 +155,7 @@ sigint(int signo)
 }
 
 /* ARGSUSED */
-void
+void __dead
 timedout(int signo)
 {
 
@@ -372,7 +372,7 @@ stypeof(const char *ttyid)
 	return (ttyid && (t = getttynam(ttyid)) ? t->ty_type : NULL);
 }
 
-void
+void __dead
 sleepexit(int eval)
 {
 

Index: src/usr.bin/login/common.h
diff -u src/usr.bin/login/common.h:1.3 src/usr.bin/login/common.h:1.4
--- src/usr.bin/login/common.h:1.3	Sat Apr 28 21:26:56 2012
+++ src/usr.bin/login/common.h	Fri May 18 20:02:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.h,v 1.3 2012/04/29 01:26:56 wiz Exp $	*/
+/*	$NetBSD: common.h,v 1.4 2012/05/19 00:02:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -37,10 +37,10 @@ char	*trimloginname(char *);
 char	*getloginname(void);
 void	 motd(const char *);
 int	 rootterm(char *);
-void	 sigint(int) __attribute__((__noreturn__));
-void	 sleepexit(int) __attribute__((__noreturn__));
+void	 __dead sigint(int);
+void	 __dead sleepexit(int);
 const	 char *stypeof(const char *);
-void	 timedout(int) __attribute__((__noreturn__));
+void	 __dead timedout(int);
 void	 decode_ss(const char *);
 
 extern u_int	timeout;



CVS commit: src/sys/arch/arm/iomd

2012-05-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 18 21:09:50 UTC 2012

Modified Files:
src/sys/arch/arm/iomd: iomd_clock.c

Log Message:
Replace a __cpu_simple_lock_t with a kmutex_t.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/iomd/iomd_clock.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/arm/iomd/iomd_clock.c
diff -u src/sys/arch/arm/iomd/iomd_clock.c:1.28 src/sys/arch/arm/iomd/iomd_clock.c:1.29
--- src/sys/arch/arm/iomd/iomd_clock.c:1.28	Tue May 15 05:45:37 2012
+++ src/sys/arch/arm/iomd/iomd_clock.c	Fri May 18 21:09:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iomd_clock.c,v 1.28 2012/05/15 05:45:37 skrll Exp $	*/
+/*	$NetBSD: iomd_clock.c,v 1.29 2012/05/18 21:09:50 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -47,7 +47,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: iomd_clock.c,v 1.28 2012/05/15 05:45:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iomd_clock.c,v 1.29 2012/05/18 21:09:50 skrll Exp $");
 
 #include 
 #include 
@@ -86,13 +86,12 @@ static void checkdelay(void);
 
 static u_int iomd_timecounter0_get(struct timecounter *tc);
 
-
 static volatile uint32_t timer0_lastcount;
 static volatile uint32_t timer0_offset;
 static volatile int timer0_ticked;
 /* TODO: Get IRQ status */
 
-static __cpu_simple_lock_t tmr_lock = __SIMPLELOCK_UNLOCKED;
+static kmutex_t tmr_lock;
 
 static struct timecounter iomd_timecounter = {
 	iomd_timecounter0_get,
@@ -144,9 +143,10 @@ clockattach(device_t parent, device_t se
 	sc->sc_ioh = ca->ca_ioh; /* This is a handle for the whole IOMD */
 
 	clock_sc = sc;
+	mutex_init(&tmr_lock, MUTEX_DEFAULT, IPL_CLOCK);
 
 	/* Cannot do anything until cpu_initclocks() has been called */
-	
+
 	aprint_normal("\n");
 }
 
@@ -156,14 +156,14 @@ tickle_tc(void)
 {
 	if (timer0_count && 
 	timecounter->tc_get_timecount == iomd_timecounter0_get) {
-		__cpu_simple_lock(&tmr_lock);
+		mutex_spin_enter(&tmr_lock);
 		if (timer0_ticked)
 			timer0_ticked= 0;
 		else {
 			timer0_offset   += timer0_count;
 			timer0_lastcount = 0;
 		}
-		__cpu_simple_unlock(&tmr_lock);
+		mutex_spin_exit(&tmr_lock);
 	}
 
 }
@@ -323,10 +323,9 @@ static u_int iomd_timecounter0_get(struc
 	tm += (bus_space_read_1(clock_sc->sc_iot, clock_sc->sc_ioh,
 	IOMD_T0HIGH) << 8);
 	splx(s);
-	simple_lock(&tmr_lock);
 
+	mutex_spin_enter(&tmr_lock);
 	tm = timer0_count - tm;
-	
 
 	if (timer0_count &&
 	(tm < timer0_lastcount || (!timer0_ticked && false/* XXX: clkintr_pending */))) {
@@ -336,8 +335,8 @@ static u_int iomd_timecounter0_get(struc
 
 	timer0_lastcount = tm;
 	tm += timer0_offset;
+	mutex_spin_exit(&tmr_lock);
 
-	simple_unlock(&tmr_lock);
 	return tm;
 }
 



CVS commit: src/sys/arch/amiga/clockport

2012-05-18 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Fri May 18 20:52:02 UTC 2012

Modified Files:
src/sys/arch/amiga/clockport: clockport.c

Log Message:
Cosmetic change - print newline during autoconf.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/clockport/clockport.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/amiga/clockport/clockport.c
diff -u src/sys/arch/amiga/clockport/clockport.c:1.1 src/sys/arch/amiga/clockport/clockport.c:1.2
--- src/sys/arch/amiga/clockport/clockport.c:1.1	Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/clockport.c	Fri May 18 20:52:02 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: clockport.c,v 1.1 2012/04/17 09:59:03 rkujawa Exp $ */
+/*  $NetBSD: clockport.c,v 1.2 2012/05/18 20:52:02 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -61,6 +61,8 @@ clockport_attach(device_t parent, device
 {
 	struct clockportbus_softc *sc;
 
+aprint_normal("\n");
+
 	sc = (struct clockportbus_softc *) self;
 	sc->cpb_aa = (struct clockportbus_attach_args *) aux;
 



CVS commit: [netbsd-6] src/doc

2012-05-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri May 18 17:05:16 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Tickets 256-258.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.101 src/doc/CHANGES-6.0:1.1.2.102
--- src/doc/CHANGES-6.0:1.1.2.101	Thu May 17 19:04:13 2012
+++ src/doc/CHANGES-6.0	Fri May 18 17:05:16 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.101 2012/05/17 19:04:13 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.102 2012/05/18 17:05:16 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -2389,3 +2389,19 @@ tests/modules/t_abi_uvm.sh			1.1
 	PR #46041.
 	[jmmv, ticket #8]
 
+external/gpl2/lvm2/lib/liblvm/Makefile		1.6
+external/gpl2/lvm2/sbin/lvm/Makefile		1.11
+
+	Fix build failure if USE_FORT=YES.
+	[cheusov, ticket #256]
+
+usr.bin/login/common.c1.5
+
+	Fix clang build issue in login.
+	[christos, ticket #257]
+
+sys/net/if_ethersubr.c1.189
+
+	Fix crash when detaching some network interfaces.  PR#42982.
+	[chs, ticket #258]
+



CVS commit: [netbsd-6] src/sys/net

2012-05-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri May 18 17:04:28 UTC 2012

Modified Files:
src/sys/net [netbsd-6]: if_ethersubr.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #258):
sys/net/if_ethersubr.c: revision 1.189
in ether_ifdetach(), clear if_mowner before releasing what it points to.
fixes PR 42982.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.188.8.1 src/sys/net/if_ethersubr.c

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

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.188 src/sys/net/if_ethersubr.c:1.188.8.1
--- src/sys/net/if_ethersubr.c:1.188	Thu Jun 16 19:47:30 2011
+++ src/sys/net/if_ethersubr.c	Fri May 18 17:04:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.188.8.1 2012/05/18 17:04:28 riz Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.1 2012/05/18 17:04:28 riz Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -1168,6 +1168,7 @@ ether_ifdetach(struct ifnet *ifp)
 	if_free_sadl(ifp);
 #endif
 
+	ifp->if_mowner = NULL;
 	MOWNER_DETACH(&ec->ec_rx_mowner);
 	MOWNER_DETACH(&ec->ec_tx_mowner);
 }



CVS commit: [netbsd-6] src/usr.bin/login

2012-05-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri May 18 17:02:31 UTC 2012

Modified Files:
src/usr.bin/login [netbsd-6]: common.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #257):
usr.bin/login/common.c: revision 1.5
dead for sigint


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.1 -r1.3.8.2 src/usr.bin/login/common.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/login/common.c
diff -u src/usr.bin/login/common.c:1.3.8.1 src/usr.bin/login/common.c:1.3.8.2
--- src/usr.bin/login/common.c:1.3.8.1	Mon May  7 16:24:07 2012
+++ src/usr.bin/login/common.c	Fri May 18 17:02:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.3.8.1 2012/05/07 16:24:07 riz Exp $	*/
+/*	$NetBSD: common.c,v 1.3.8.2 2012/05/18 17:02:31 riz Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: common.c,v 1.3.8.1 2012/05/07 16:24:07 riz Exp $");
+__RCSID("$NetBSD: common.c,v 1.3.8.2 2012/05/18 17:02:31 riz Exp $");
 
 #include 
 #include 
@@ -147,7 +147,7 @@ motd(const char *fname)
 }
 
 /* ARGSUSED */
-void
+void __dead
 sigint(int signo)
 {
 



CVS commit: [netbsd-6] src/external/gpl2/lvm2

2012-05-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri May 18 16:56:26 UTC 2012

Modified Files:
src/external/gpl2/lvm2/lib/liblvm [netbsd-6]: Makefile
src/external/gpl2/lvm2/sbin/lvm [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by veego in ticket #256):
external/gpl2/lvm2/lib/liblvm/Makefile: revision 1.6
external/gpl2/lvm2/sbin/lvm/Makefile: revision 1.11
Add .include  for initializing USE_SSP.
   This fixes build failure if USE_FORT=YES
   Approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/external/gpl2/lvm2/lib/liblvm/Makefile
cvs rdiff -u -r1.10 -r1.10.6.1 src/external/gpl2/lvm2/sbin/lvm/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/lvm2/lib/liblvm/Makefile
diff -u src/external/gpl2/lvm2/lib/liblvm/Makefile:1.5 src/external/gpl2/lvm2/lib/liblvm/Makefile:1.5.6.1
--- src/external/gpl2/lvm2/lib/liblvm/Makefile:1.5	Thu May 26 12:56:26 2011
+++ src/external/gpl2/lvm2/lib/liblvm/Makefile	Fri May 18 16:56:26 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2011/05/26 12:56:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.5.6.1 2012/05/18 16:56:26 riz Exp $
 
 LIBISPRIVATE=	yes
 
@@ -14,6 +14,9 @@ CWARNFLAGS+=	-Wno-parentheses
 CPPFLAGS+=	-I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
 		-I. 
 
+.include 
+.include  # for USE_SSP
+
 # Some parts of liblvm can't be protected because if its
 # alloca() usage.
 #

Index: src/external/gpl2/lvm2/sbin/lvm/Makefile
diff -u src/external/gpl2/lvm2/sbin/lvm/Makefile:1.10 src/external/gpl2/lvm2/sbin/lvm/Makefile:1.10.6.1
--- src/external/gpl2/lvm2/sbin/lvm/Makefile:1.10	Thu May 26 12:56:26 2011
+++ src/external/gpl2/lvm2/sbin/lvm/Makefile	Fri May 18 16:56:26 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2011/05/26 12:56:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.10.6.1 2012/05/18 16:56:26 riz Exp $
 
 USE_FORT?=	no
 NOLINT=		#defined
@@ -30,6 +30,9 @@ CPPFLAGS+=	-I${LVM2_DISTDIR}/lib -I${LVM
 
 CPPFLAGS+=	-DLVM_SHARED_PATH=\"$(BINDIR)/lvm\"
 
+.include 
+.include  # for USE_SSP
+
 # Some parts of the code can't be protected because if its
 # alloca() usage.
 #



CVS commit: src/tests

2012-05-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri May 18 15:36:21 UTC 2012

Modified Files:
src/tests: README

Log Message:
Clarify this a little.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/README

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

Modified files:

Index: src/tests/README
diff -u src/tests/README:1.3 src/tests/README:1.4
--- src/tests/README:1.3	Mon Feb 13 08:55:20 2012
+++ src/tests/README	Fri May 18 15:36:21 2012
@@ -1,11 +1,20 @@
-$NetBSD: README,v 1.3 2012/02/13 08:55:20 wiz Exp $
+$NetBSD: README,v 1.4 2012/05/18 15:36:21 jruoho Exp $
 
-When adding new tests, please try to follow the directory structure of
-the real source tree. For instance, interfaces available via the C library
-should follow:
+When adding new tests, please try to follow the following conventions.
+
+1. For library routines, including system calls, the directory structure of
+   the tests should follow the directory structure of the real source tree.
+   For instance, interfaces available via the C library should follow:
 
 	src/lib/libc/gen -> src/tests/lib/libc/gen
 	src/lib/libc/sys -> src/tests/lib/libc/sys
+	...
+
+2. Equivalently, all tests for userland utilities should try to follow their
+   location in the source tree. If this can not be satisfied, the tests for
+   a utility should be located under the directory to which the utility is
+   installed. Thus, a test for env(1) should go to src/tests/usr.bin/env.
+   Likewise, a test for tcpdump(8) should be in src/tests/usr.sbin/tcpdump,
+   even though the source code for the program is located under src/external.
 
-Equivalently, tests for a program residing in src/usr.bin/program should be
-added to the src/tests/usr.bin/program subdirectory.
+3. Otherwise use your own discretion.



CVS commit: src

2012-05-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri May 18 15:25:26 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/tmux: Makefile t_tmux.sh

Log Message:
Add a test case for PR kern/46463. From Richard Hansen.


To generate a diff of this commit:
cvs rdiff -u -r1.467 -r1.468 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.75 -r1.76 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/tmux/Makefile \
src/tests/usr.bin/tmux/t_tmux.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.467 src/distrib/sets/lists/tests/mi:1.468
--- src/distrib/sets/lists/tests/mi:1.467	Mon Apr 30 13:47:51 2012
+++ src/distrib/sets/lists/tests/mi	Fri May 18 15:25:25 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.467 2012/04/30 13:47:51 njoly Exp $
+# $NetBSD: mi,v 1.468 2012/05/18 15:25:25 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3178,6 +3178,9 @@
 ./usr/tests/usr.bin/sort/d_any_char_iflag_out.txt	tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/sort/d_any_char_in.txt		tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/sort/t_sorttests-usr.bin-tests	atf
+./usr/tests/usr.bin/tmux			tests-usr.bin-tests
+./usr/tests/usr.bin/tmux/Atffile		tests-usr.bin-tests	atf	atf
+./usr/tests/usr.bin/tmux/t_tmux			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/unifdef			tests-usr.bin-tests
 ./usr/tests/usr.bin/unifdef/Atffile		tests-usr.bin-tests	atf	atf
 ./usr/tests/usr.bin/unifdef/d_basic.in		tests-usr.bin-tests	atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.75 src/etc/mtree/NetBSD.dist.tests:1.76
--- src/etc/mtree/NetBSD.dist.tests:1.75	Thu Apr 19 18:51:36 2012
+++ src/etc/mtree/NetBSD.dist.tests	Fri May 18 15:25:26 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.75 2012/04/19 18:51:36 jruoho Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.76 2012/05/18 15:25:26 jruoho Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -293,6 +293,7 @@
 ./usr/tests/usr.bin/sed
 ./usr/tests/usr.bin/shmif_dumpbus
 ./usr/tests/usr.bin/sort
+./usr/tests/usr.bin/tmux
 ./usr/tests/usr.bin/unifdef
 ./usr/tests/usr.bin/xlint
 ./usr/tests/usr.bin/xlint/lint1

Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.13 src/tests/usr.bin/Makefile:1.14
--- src/tests/usr.bin/Makefile:1.13	Tue Mar 20 06:18:33 2012
+++ src/tests/usr.bin/Makefile	Fri May 18 15:25:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2012/03/20 06:18:33 jruoho Exp $
+#	$NetBSD: Makefile,v 1.14 2012/05/18 15:25:25 jruoho Exp $
 #
 
 .include 
@@ -7,6 +7,6 @@ TESTSDIR=   ${TESTSBASE}/usr.bin
 
 TESTS_SUBDIRS=	awk basename bzip2 cc cmp config cut \
 		diff dirname find grep gzip id jot m4 make mkdep \
-		pr rump_server shmif_dumpbus sdiff sed sort unifdef xlint
+		pr rump_server shmif_dumpbus sdiff sed sort tmux unifdef xlint
 
 .include 

Added files:

Index: src/tests/usr.bin/tmux/Makefile
diff -u /dev/null src/tests/usr.bin/tmux/Makefile:1.1
--- /dev/null	Fri May 18 15:25:26 2012
+++ src/tests/usr.bin/tmux/Makefile	Fri May 18 15:25:25 2012
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2012/05/18 15:25:25 jruoho Exp $
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/usr.bin/tmux
+TESTS_SH=	t_tmux
+
+.include 
Index: src/tests/usr.bin/tmux/t_tmux.sh
diff -u /dev/null src/tests/usr.bin/tmux/t_tmux.sh:1.1
--- /dev/null	Fri May 18 15:25:26 2012
+++ src/tests/usr.bin/tmux/t_tmux.sh	Fri May 18 15:25:25 2012
@@ -0,0 +1,49 @@
+# $NetBSD: t_tmux.sh,v 1.1 2012/05/18 15:25:25 jruoho Exp $
+#
+# Copyright (c) 2012 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jukka Ruohonen.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# 

CVS commit: src/doc

2012-05-18 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Fri May 18 15:24:45 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note xsurf(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1701 -r1.1702 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/CHANGES
diff -u src/doc/CHANGES:1.1701 src/doc/CHANGES:1.1702
--- src/doc/CHANGES:1.1701	Wed May  9 12:04:27 2012
+++ src/doc/CHANGES	Fri May 18 15:24:45 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1701 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1702 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -56,3 +56,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	kernel: Add support for 256 CPUs on amd64. [rmind 20120420]
 	OpenSSH: Imported 6.0 [christos 20120501]
 	bzip2: Imported 1.0.6 [wiz 20120507]
+	amiga: Rework X-Surf driver as xsurf(4). Add support for clockport(4)
+		on top of xsurf(4). [rkujawa 20120515]



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 14:01:35 UTC 2012

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

Log Message:
Don't exit on ioctl failure, instead let the caller handle it.
This is needed so that we can detect failure of the 40LD firmware
interface and fall back to the 8LD interface.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.8 src/sbin/amrctl/amrctl.c:1.9
--- src/sbin/amrctl/amrctl.c:1.8	Fri May 18 13:59:23 2012
+++ src/sbin/amrctl/amrctl.c	Fri May 18 14:01:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $	*/
+/*	$NetBSD: amrctl.c,v 1.9 2012/05/18 14:01:34 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2002, Pierre David 
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $");
+__RCSID("$NetBSD: amrctl.c,v 1.9 2012/05/18 14:01:34 jakllsch Exp $");
 #endif
 
 #include 
@@ -178,7 +178,8 @@ amr_ioctl_enquiry(int fd, uint8_t cmd, u
 		r = ioctl(fd, AMR_IO_COMMAND, &am);
 		if (r == -1) {
 			if (errno != EBUSY) {
-err(EXIT_FAILURE, "ioctl enquiry");
+warn("ioctl enquiry");
+return -1;
 			} else
 usleep(sleeptime);
 		}



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 13:59:23 UTC 2012

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

Log Message:
Add $NetBSD$ to header, and add __RCSID.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.7 src/sbin/amrctl/amrctl.c:1.8
--- src/sbin/amrctl/amrctl.c:1.7	Fri May 18 13:55:15 2012
+++ src/sbin/amrctl/amrctl.c	Fri May 18 13:59:23 2012
@@ -1,3 +1,5 @@
+/*	$NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $	*/
+
 /*-
  * Copyright (c) 2002, Pierre David 
  * Copyright (c) 2006, Jung-uk Kim 
@@ -26,6 +28,9 @@
  */
 
 #include 
+#ifndef lint
+__RCSID("$NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $");
+#endif
 
 #include 
 #include 



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 13:55:15 UTC 2012

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

Log Message:
Use C99 fixed width integer types.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.6 src/sbin/amrctl/amrctl.c:1.7
--- src/sbin/amrctl/amrctl.c:1.6	Fri May 18 13:51:17 2012
+++ src/sbin/amrctl/amrctl.c	Fri May 18 13:55:15 2012
@@ -56,7 +56,7 @@ static char	enq_buffer[AMR_BUFSIZE];
 #define AMR_MAX_NCTRLS	16
 #define AMR_MAX_NSDEVS	16
 
-static u_int8_t	nschan = 0;
+static uint8_t	nschan = 0;
 
 /*
  * Include lookup tables, and a function to match a code to a string.
@@ -68,14 +68,14 @@ static u_int8_t	nschan = 0;
 /* #define AMR_DEFINE_TABLES */
 /* #include "amr_tables.h" */
 
-static int amr_ioctl_enquiry(int, u_int8_t, u_int8_t, u_int8_t);
+static int amr_ioctl_enquiry(int, uint8_t, uint8_t, uint8_t);
 __dead static void usage(const char *);
 static int describe_card(int, int, int);
-static char * describe_property(u_int8_t, char *);
-static const char * describe_state(int, u_int8_t);
+static char * describe_property(uint8_t, char *);
+static const char * describe_state(int, uint8_t);
 static void describe_battery(int, int, int, int, int);
-static void describe_one_volume(int, int, u_int32_t, u_int8_t, u_int8_t);
-static void describe_one_drive(int, int, u_int8_t);
+static void describe_one_volume(int, int, uint32_t, uint8_t, uint8_t);
+static void describe_one_drive(int, int, uint8_t);
 static void describe_drive(int, int, int, int, int);
 
 /*
@@ -131,7 +131,7 @@ static const struct {
 };
 
 static const struct {
-	const u_int8_t	code;
+	const uint8_t	code;
 	const char		*status;
 } battable[] = {
 	{	AMR_BATT_MODULE_MISSING,	"not present"		},
@@ -142,7 +142,7 @@ static const struct {
 };
 
 static const struct {
-	const u_int8_t	code;
+	const uint8_t	code;
 	const char		*status;
 } bcstatble[] = {
 	{	AMR_BATT_CHARGE_DONE,		"charge done"		},
@@ -151,7 +151,7 @@ static const struct {
 };
 
 static int
-amr_ioctl_enquiry(int fd, u_int8_t cmd, u_int8_t cmdsub, u_int8_t cmdqual)
+amr_ioctl_enquiry(int fd, uint8_t cmd, uint8_t cmdsub, uint8_t cmdqual)
 {
 	struct amr_user_ioctl am;
 	int	r, i;
@@ -344,7 +344,7 @@ describe_card(int fd, int verbosity, int
 }
 
 static char *
-describe_property(u_int8_t prop, char *buffer)
+describe_property(uint8_t prop, char *buffer)
 {
 	size_t	i;
 
@@ -363,7 +363,7 @@ describe_property(u_int8_t prop, char *b
 }
 
 static const char *
-describe_state(int verbosity, u_int8_t state)
+describe_state(int verbosity, uint8_t state)
 {
 	size_t	i;
 
@@ -384,7 +384,7 @@ describe_state(int verbosity, u_int8_t s
 static void
 describe_battery(int fd, int verbosity, int fwint, int bflags, int globalparam)
 {
-	u_int8_t batt_status;
+	uint8_t batt_status;
 	size_t i;
 
 	if (fwint == FIRMWARE_40LD) {
@@ -432,7 +432,7 @@ describe_battery(int fd, int verbosity, 
 
 static void
 describe_one_volume(int ldrv, int verbosity,
-		u_int32_t size, u_int8_t state, u_int8_t prop)
+		uint32_t size, uint8_t state, uint8_t prop)
 {
 	float	szgb;
 	int	raid_level;
@@ -459,7 +459,7 @@ describe_one_volume(int ldrv, int verbos
  */
 
 static void
-describe_one_drive(int pdrv, int verbosity, u_int8_t state)
+describe_one_drive(int pdrv, int verbosity, uint8_t state)
 {
 	const char *statestr;
 



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 13:51:17 UTC 2012

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

Log Message:
Use err(3) instead of perror(3) + exit(3).
Additionally, use symbolic EXIT_FAILURE.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.5 src/sbin/amrctl/amrctl.c:1.6
--- src/sbin/amrctl/amrctl.c:1.5	Fri May 18 13:47:33 2012
+++ src/sbin/amrctl/amrctl.c	Fri May 18 13:51:17 2012
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -172,8 +173,7 @@ amr_ioctl_enquiry(int fd, u_int8_t cmd, 
 		r = ioctl(fd, AMR_IO_COMMAND, &am);
 		if (r == -1) {
 			if (errno != EBUSY) {
-perror("ioctl enquiry");
-exit(1);
+err(EXIT_FAILURE, "ioctl enquiry");
 			} else
 usleep(sleeptime);
 		}
@@ -643,12 +643,10 @@ main(int argc, char *argv[])
 		
 	fd = open(filename, O_RDONLY);
 	if (fd == -1) {
-		perror("open");
-		exit(1);
+		err(EXIT_FAILURE, "open");
 	}
 	if (ioctl(fd, AMR_IO_VERSION, &i) == -1) {
-		perror("ioctl version");
-		exit(1);
+		err(EXIT_FAILURE, "ioctl version");
 	}
 
 	if (sflags) {



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 13:47:33 UTC 2012

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

Log Message:
Use __arraycount instead of identical local macro.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.4 src/sbin/amrctl/amrctl.c:1.5
--- src/sbin/amrctl/amrctl.c:1.4	Fri May 18 13:41:37 2012
+++ src/sbin/amrctl/amrctl.c	Fri May 18 13:47:33 2012
@@ -149,8 +149,6 @@ static const struct {
 	{	AMR_BATT_CHARGE_FAIL,		"charge failed"		}
 };
 
-#define NTAB(tab)	(sizeof tab / sizeof tab [0])
-
 static int
 amr_ioctl_enquiry(int fd, u_int8_t cmd, u_int8_t cmdsub, u_int8_t cmdqual)
 {
@@ -269,7 +267,7 @@ describe_card(int fd, int verbosity, int
 			char	bios[100], firmware[100];
 			size_t	i;
 
-			for (i = 0; i < NTAB(prodtable); i++) {
+			for (i = 0; i < __arraycount(prodtable); i++) {
 if (cardtype == prodtable[i].signature) {
 	product = prodtable[i].product;
 	break;
@@ -351,7 +349,7 @@ describe_property(u_int8_t prop, char *b
 	size_t	i;
 
 	strcpy(buffer, "<");
-	for (i = 0; i < NTAB(proptable); i++) {
+	for (i = 0; i < __arraycount(proptable); i++) {
 		if (i > 0)
 			strcat(buffer, ",");
 		if (prop & proptable[i].code)
@@ -373,7 +371,7 @@ describe_state(int verbosity, u_int8_t s
 	(AMR_DRV_CURSTATE(state) == AMR_DRV_OFFLINE) && verbosity == 0)
 		return NULL;
 
-	for (i = 0; i < NTAB(statetable); i++)
+	for (i = 0; i < __arraycount(statetable); i++)
 		if (AMR_DRV_CURSTATE(state) == statetable[i].code)
 			return (statetable[i].status);
 
@@ -399,13 +397,14 @@ describe_battery(int fd, int verbosity, 
 			if (bflags || globalparam) {
 batt_status = ae3->ae_batterystatus;
 printf("Battery status\t\t");
-for (i = 0; i < NTAB(battable); i++) {
+for (i = 0; i < __arraycount(battable); i++) {
 	if (batt_status & battable[i].code)
 		printf("%s, ", battable[i].status);
 }
 if (!(batt_status &
 (AMR_BATT_MODULE_MISSING|AMR_BATT_PACK_MISSING))) {
-	for (i = 0; i < NTAB(bcstatble); i++)
+	for (i = 0;
+	 i < __arraycount(bcstatble); i++)
 		if (bcstatble[i].code ==
 		(batt_status & AMR_BATT_CHARGE_MASK))
 			printf("%s", bcstatble[i].status);



CVS commit: src/sbin/amrctl

2012-05-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri May 18 13:41:37 UTC 2012

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

Log Message:
constify number to string lookup tables


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/amrctl/amrctl.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/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.3 src/sbin/amrctl/amrctl.c:1.4
--- src/sbin/amrctl/amrctl.c:1.3	Sat Aug 27 16:05:27 2011
+++ src/sbin/amrctl/amrctl.c	Fri May 18 13:41:37 2012
@@ -90,7 +90,7 @@ static void describe_drive(int, int, int
 #define FIRMWARE_40LD	1
 #define FIRMWARE_8LD	2
 
-static struct {
+static const struct {
 	const char	*product;
 	const uint32_t	signature;
 } prodtable[] = {
@@ -104,7 +104,7 @@ static struct {
 	{	"Series 490",			AMR_SIG_490	}
 };
 
-static struct {
+static const struct {
 	const int	code;
 	const char	*ifyes, *ifno;
 } proptable[] = {
@@ -116,7 +116,7 @@ static struct {
 		"adaptative-io",	"no-adaptative-io"	}
 };
 
-static struct {
+static const struct {
 	const int	code;
 	const char	*status;
 } statetable[] = {
@@ -129,7 +129,7 @@ static struct {
 	{	AMR_DRV_HOTSPARE,	"hotspare"	}
 };
 
-static struct {
+static const struct {
 	const u_int8_t	code;
 	const char		*status;
 } battable[] = {
@@ -140,7 +140,7 @@ static struct {
 	{	AMR_BATT_CYCLES_EXCEEDED,	"cycle exceeded"	}
 };
 
-static struct {
+static const struct {
 	const u_int8_t	code;
 	const char		*status;
 } bcstatble[] = {



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

2012-05-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 18 12:45:43 UTC 2012

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

Log Message:
Remove an '@' to hopefully see what's going on with the daily builds.


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

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/arm/conf/Makefile.arm
diff -u src/sys/arch/arm/conf/Makefile.arm:1.33 src/sys/arch/arm/conf/Makefile.arm:1.34
--- src/sys/arch/arm/conf/Makefile.arm:1.33	Mon Mar 19 05:38:26 2012
+++ src/sys/arch/arm/conf/Makefile.arm	Fri May 18 12:45:43 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.arm,v 1.33 2012/03/19 05:38:26 bsh Exp $
+#	$NetBSD: Makefile.arm,v 1.34 2012/05/18 12:45:43 skrll Exp $
 
 # Makefile for NetBSD
 #
@@ -63,7 +63,7 @@ LINKFLAGS_NORMAL=	-X
 # Strip ARM mapping symbols from the kernel image, as they interfere
 # with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified.
 .if !defined(DEBUG) || empty(DEBUG:M-g*)
-SYSTEM_LD_TAIL?=	@${SYSTEM_LD_TAIL_DBSYM} ; \
+SYSTEM_LD_TAIL?=	${SYSTEM_LD_TAIL_DBSYM} ; \
 			${OBJCOPY} --strip-symbol='$$a'	 \
 --strip-symbol='$$t'	 \
 --strip-symbol='$$d' $@	;\



CVS commit: src/sys/dev/usb

2012-05-18 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri May 18 07:52:55 UTC 2012

Modified Files:
src/sys/dev/usb: uaudio.c uaudioreg.h umidi.c umidi_quirks.c

Log Message:
Increase the number of frequencies in the usb_audio_streaming_type1_descriptor
to be the same number that we support elsewhere (AUFMT_MAX_FREQUENCIES).
Set frequency_type to be AUFMT_MAX_FREQUENCIES in the case where a uaudio
device reports more frequencies than we handle.
Fixes a crash in uaudio_chan_ptransfer() because we read uninitialised data
in uaudio_identify_as().


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/uaudio.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uaudioreg.h
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/umidi.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/umidi_quirks.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.131 src/sys/dev/usb/uaudio.c:1.132
--- src/sys/dev/usb/uaudio.c:1.131	Sun Apr 22 01:31:48 2012
+++ src/sys/dev/usb/uaudio.c	Fri May 18 07:52:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.131 2012/04/22 01:31:48 jakllsch Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.132 2012/05/18 07:52:54 jdc Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.131 2012/04/22 01:31:48 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.132 2012/05/18 07:52:54 jdc Exp $");
 
 #include 
 #include 
@@ -1847,12 +1847,8 @@ uaudio_identify_as(struct uaudio_softc *
 	aprint_error("%s: please increase "
 	   "AUFMT_MAX_FREQUENCIES to %d\n",
 	   __func__, t1desc->bSamFreqType);
-	break;
-}
-if (j >= 2) {
-	aprint_error("%s: too much tSamFreq: "
-	   "%d\n",
-	   __func__, t1desc->bSamFreqType);
+	auf->frequency_type =
+	AUFMT_MAX_FREQUENCIES;
 	break;
 }
 auf->frequency[j] = UA_GETSAMP(t1desc, j);

Index: src/sys/dev/usb/uaudioreg.h
diff -u src/sys/dev/usb/uaudioreg.h:1.15 src/sys/dev/usb/uaudioreg.h:1.16
--- src/sys/dev/usb/uaudioreg.h:1.15	Mon Apr 28 20:23:59 2008
+++ src/sys/dev/usb/uaudioreg.h	Fri May 18 07:52:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudioreg.h,v 1.15 2008/04/28 20:23:59 martin Exp $	*/
+/*	$NetBSD: uaudioreg.h,v 1.16 2012/05/18 07:52:54 jdc Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -113,7 +113,7 @@ struct usb_audio_streaming_type1_descrip
 	uByte		bBitResolution;
 	uByte		bSamFreqType;
 #define UA_SAMP_CONTNUOUS 0
-	uByte		tSamFreq[3*2]; /* room for low and high */
+	uByte		tSamFreq[3*AUFMT_MAX_FREQUENCIES];
 #define UA_GETSAMP(p, n) ((p)->tSamFreq[(n)*3+0] | ((p)->tSamFreq[(n)*3+1] << 8) | ((p)->tSamFreq[(n)*3+2] << 16))
 #define UA_SAMP_LO(p) UA_GETSAMP(p, 0)
 #define UA_SAMP_HI(p) UA_GETSAMP(p, 1)

Index: src/sys/dev/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.61 src/sys/dev/usb/umidi.c:1.62
--- src/sys/dev/usb/umidi.c:1.61	Sun Mar 11 01:06:07 2012
+++ src/sys/dev/usb/umidi.c	Fri May 18 07:52:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.61 2012/03/11 01:06:07 mrg Exp $	*/
+/*	$NetBSD: umidi.c,v 1.62 2012/05/18 07:52:54 jdc Exp $	*/
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.61 2012/03/11 01:06:07 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.62 2012/05/18 07:52:54 jdc Exp $");
 
 #include 
 #include 
@@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 

Index: src/sys/dev/usb/umidi_quirks.c
diff -u src/sys/dev/usb/umidi_quirks.c:1.17 src/sys/dev/usb/umidi_quirks.c:1.18
--- src/sys/dev/usb/umidi_quirks.c:1.17	Sat Feb 11 05:28:30 2012
+++ src/sys/dev/usb/umidi_quirks.c	Fri May 18 07:52:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi_quirks.c,v 1.17 2012/02/11 05:28:30 plunky Exp $	*/
+/*	$NetBSD: umidi_quirks.c,v 1.18 2012/05/18 07:52:54 jdc Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umidi_quirks.c,v 1.17 2012/02/11 05:28:30 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi_quirks.c,v 1.18 2012/05/18 07:52:54 jdc Exp $");
 
 #include 
 #include 
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: umidi_quirks
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include