CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/opcodes

2010-02-17 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Feb 17 08:41:43 UTC 2010

Modified Files:
src/gnu/dist/binutils/opcodes [matt-nb5-mips64]: mips-opc.c

Log Message:
add RMI Coprocessor 2 ops to mips_builtin_opcodes[]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3.32.2 -r1.1.1.3.32.3 \
src/gnu/dist/binutils/opcodes/mips-opc.c

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

Modified files:

Index: src/gnu/dist/binutils/opcodes/mips-opc.c
diff -u src/gnu/dist/binutils/opcodes/mips-opc.c:1.1.1.3.32.2 src/gnu/dist/binutils/opcodes/mips-opc.c:1.1.1.3.32.3
--- src/gnu/dist/binutils/opcodes/mips-opc.c:1.1.1.3.32.2	Mon Nov  9 17:51:53 2009
+++ src/gnu/dist/binutils/opcodes/mips-opc.c	Wed Feb 17 08:41:43 2010
@@ -1200,6 +1200,11 @@
 {mtc2,t,G,H,	0x4880, 0xffe007f8,	COD|RD_t|WR_C2|WR_CC,	0,		I32	},
 {mthc2,   t,i,	0x48e0, 0xffe0,	COD|RD_t|WR_C2|WR_CC,	0,		I33	},
 
+/* RMI Coprocessor 2 ops */
+{msgsnd,  t,	0x4a01, 0xffe0,	COD|RD_t|WR_C2,		0,		I64	},
+{msgld,   t,	0x4a02, 0xffe0,	COD|RD_t|WR_C2,		0,		I64	},
+{msgwait, t,	0x4a03, 0xffe0,	COD|RD_t|WR_C2,		0,		I64	},
+
 /* No hazard protection on coprocessor instructions--they shouldn't
change the state of the processor and if they do it's up to the
user to put in nops as necessary.  These are at the end so that the



CVS commit: src/usr.sbin/btattach

2010-02-17 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb 17 09:49:41 UTC 2010

Modified Files:
src/usr.sbin/btattach: btattach.c

Log Message:
sort entries in structure
clarify init name type for CSR modules


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/btattach/btattach.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/btattach/btattach.c
diff -u src/usr.sbin/btattach/btattach.c:1.5 src/usr.sbin/btattach/btattach.c:1.6
--- src/usr.sbin/btattach/btattach.c:1.5	Sun Dec  6 12:55:46 2009
+++ src/usr.sbin/btattach/btattach.c	Wed Feb 17 09:49:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: btattach.c,v 1.5 2009/12/06 12:55:46 kiyohara Exp $	*/
+/*	$NetBSD: btattach.c,v 1.6 2010/02/17 09:49:41 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008 Iain Hibbert
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008 Iain Hibbert.  All rights reserved.);
-__RCSID($NetBSD: btattach.c,v 1.5 2009/12/06 12:55:46 kiyohara Exp $);
+__RCSID($NetBSD: btattach.c,v 1.6 2010/02/17 09:49:41 plunky Exp $);
 
 #include sys/ioctl.h
 #include sys/param.h
@@ -54,13 +54,6 @@
 
 const struct devtype types[] = {
 {
-	.name = bcsp,
-	.line = bcsp,
-	.descr = Generic BlueCore Serial Protocol,
-	.cflag = CRTSCTS,
-	.speed = B57600,
-},
-{
 	.name = bcm2035,
 	.line = btuart,
 	.descr = Broadcom BCM2035,
@@ -68,6 +61,13 @@
 	.speed = B115200,
 },
 {
+	.name = bcsp,
+	.line = bcsp,
+	.descr = Generic BlueCore Serial Protocol,
+	.cflag = CRTSCTS,
+	.speed = B57600,
+},
+{
 	.name = bgb2xx,
 	.line = btuart,
 	.descr = Philips BGB2xx module,
@@ -83,7 +83,7 @@
 {
 	.name = csr,
 	.line = btuart,
-	.descr = CSR Casira serial adaptor,
+	.descr = Cambridge Silicon Radio based modules (not BCSP),
 	.init = init_csr,
 	.cflag = CRTSCTS,
 	.speed = B57600,



CVS commit: src/sys/arch/hppa/hppa

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 10:03:30 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Add a prototype for pmap_page_physload.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.64 src/sys/arch/hppa/hppa/pmap.c:1.65
--- src/sys/arch/hppa/hppa/pmap.c:1.64	Tue Feb 16 16:56:30 2010
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Feb 17 10:03:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.64 2010/02/16 16:56:30 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.65 2010/02/17 10:03:30 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.64 2010/02/16 16:56:30 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.65 2010/02/17 10:03:30 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -207,6 +207,8 @@
 
 void pmap_copy_page(paddr_t, paddr_t);
 
+static void pmap_page_physload(paddr_t, paddr_t)
+
 #ifdef USE_HPT
 static inline struct hpt_entry *pmap_hash(pmap_t, vaddr_t);
 static inline uint32_t pmap_vtag(pmap_t, vaddr_t);



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

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 11:14:10 UTC 2010

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Add aliasing defines for PA2.0 cpus.

They will cause unnecessary non-equiv alias handling on PA1.x machines if
PA2.0 cpu support is compiled into the kernel.  GENERIC currently doesn't
have this support enabled.

The performance hit of this needs testing.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hp700/include/cpu.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/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.34 src/sys/arch/hp700/include/cpu.h:1.35
--- src/sys/arch/hp700/include/cpu.h:1.34	Wed Jun  3 21:08:51 2009
+++ src/sys/arch/hp700/include/cpu.h	Wed Feb 17 11:14:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.34 2009/06/03 21:08:51 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.35 2010/02/17 11:14:10 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -152,10 +152,17 @@
  * definitions of cpu-dependent requirements
  * referenced in generic code
  */
-
+#if defined(HP8000_CPU) || defined(HP8200_CPU) || \
+defined(HP8500_CPU) || defined(HP8600_CPU)
+#define	HPPA_PGALIAS	0x0040
+#define	HPPA_PGAMASK	0xffc0
+#define	HPPA_PGAOFF	0x003f
+#else
 #define	HPPA_PGALIAS	0x0010
 #define	HPPA_PGAMASK	0xfff0
 #define	HPPA_PGAOFF	0x000f
+#endif
+
 #define	HPPA_SPAMASK	0xf0f0f000
 
 #define	HPPA_IOSPACE	0xf000



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

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 11:21:24 UTC 2010

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hp700/include/cpu.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/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.35 src/sys/arch/hp700/include/cpu.h:1.36
--- src/sys/arch/hp700/include/cpu.h:1.35	Wed Feb 17 11:14:10 2010
+++ src/sys/arch/hp700/include/cpu.h	Wed Feb 17 11:21:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.35 2010/02/17 11:14:10 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.36 2010/02/17 11:21:24 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -57,7 +57,6 @@
 #include machine/frame.h
 #include machine/reg.h
 
-
 #ifndef _LOCORE
 
 /* types */



CVS commit: src/sys/arch/hppa/hppa

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 11:31:39 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Semi-colons help.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.65 src/sys/arch/hppa/hppa/pmap.c:1.66
--- src/sys/arch/hppa/hppa/pmap.c:1.65	Wed Feb 17 10:03:30 2010
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Feb 17 11:31:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.65 2010/02/17 10:03:30 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.66 2010/02/17 11:31:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.65 2010/02/17 10:03:30 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.66 2010/02/17 11:31:39 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -207,7 +207,7 @@
 
 void pmap_copy_page(paddr_t, paddr_t);
 
-static void pmap_page_physload(paddr_t, paddr_t)
+static void pmap_page_physload(paddr_t, paddr_t);
 
 #ifdef USE_HPT
 static inline struct hpt_entry *pmap_hash(pmap_t, vaddr_t);



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

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 11:33:51 UTC 2010

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Add some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/include/cpu.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/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.36 src/sys/arch/hp700/include/cpu.h:1.37
--- src/sys/arch/hp700/include/cpu.h:1.36	Wed Feb 17 11:21:24 2010
+++ src/sys/arch/hp700/include/cpu.h	Wed Feb 17 11:33:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.36 2010/02/17 11:21:24 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.37 2010/02/17 11:33:51 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -153,16 +153,18 @@
  */
 #if defined(HP8000_CPU) || defined(HP8200_CPU) || \
 defined(HP8500_CPU) || defined(HP8600_CPU)
+/* PA2.0 aliases */
 #define	HPPA_PGALIAS	0x0040
-#define	HPPA_PGAMASK	0xffc0
+#define	HPPA_PGAMASK	0xffc0	/* PA bits 0-9 not used in index */
 #define	HPPA_PGAOFF	0x003f
 #else
+/* PA1.x aliases */
 #define	HPPA_PGALIAS	0x0010
-#define	HPPA_PGAMASK	0xfff0
+#define	HPPA_PGAMASK	0xfff0	/* PA bits 0-11 not used in index */
 #define	HPPA_PGAOFF	0x000f
 #endif
 
-#define	HPPA_SPAMASK	0xf0f0f000
+#define	HPPA_SPAMASK	0xf0f0f000	/* PA bits 0-3,8-11,16-19 not used */
 
 #define	HPPA_IOSPACE	0xf000
 #define	HPPA_IOLEN  0x1000



CVS commit: src/sys/rump

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 13:28:40 UTC 2010

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

Log Message:
Invert inverted comment and verbosify it.


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

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.50 src/sys/rump/Makefile.rump:1.51
--- src/sys/rump/Makefile.rump:1.50	Tue Feb 16 20:42:44 2010
+++ src/sys/rump/Makefile.rump	Wed Feb 17 13:28:40 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.50 2010/02/16 20:42:44 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.51 2010/02/17 13:28:40 pooka Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -6,7 +6,8 @@
 
 .include bsd.own.mk
 
-# use kernel ABI instead of rump ABI (needs md code)
+# If RUMPKMOD is _not_ set (only on capable archs, from bsd.own.mk),
+# use rump ABI instead of the NetBSD kernel ABI.
 .ifndef RUMPKMOD
 CPPFLAGS:=	-I${RUMPTOP}/include ${CPPFLAGS}
 .endif



CVS commit: src/sys/arch/hppa/hppa

2010-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 14:16:53 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Fix typo in previous. It's not a good idea to let uvm mess with kernel
text pages.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.66 src/sys/arch/hppa/hppa/pmap.c:1.67
--- src/sys/arch/hppa/hppa/pmap.c:1.66	Wed Feb 17 11:31:39 2010
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Feb 17 14:16:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.66 2010/02/17 11:31:39 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.67 2010/02/17 14:16:53 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.66 2010/02/17 11:31:39 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.67 2010/02/17 14:16:53 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1007,7 +1007,7 @@
 
 	availphysmem = 0;
 
-	pmap_page_physload(resvmem, atop(ksro));	
+	pmap_page_physload(resvmem, atop(ksrx));	
 	pmap_page_physload(atop(kero), atop(ksrw));	
 	pmap_page_physload(atop(kerw), physmem);	
 



CVS commit: src/usr.sbin/puffs/mount_psshfs

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 15:47:36 UTC 2010

Modified Files:
src/usr.sbin/puffs/mount_psshfs: subr.c

Log Message:
Save . attributes in readdir.  This fixes the root link count
after readdir is called for the root dir the first time (yes,
there's still a window of wrong link count after the fs is mounted.
it's currently quite difficult to call sftp_readdir() from outside
the main loop).

Should fix find /mnt problem for a mountpoint with more than the
guessed amount of subdirectories, as reported by dyoung.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/puffs/mount_psshfs/subr.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/puffs/mount_psshfs/subr.c
diff -u src/usr.sbin/puffs/mount_psshfs/subr.c:1.48 src/usr.sbin/puffs/mount_psshfs/subr.c:1.49
--- src/usr.sbin/puffs/mount_psshfs/subr.c:1.48	Thu Jan  7 21:05:50 2010
+++ src/usr.sbin/puffs/mount_psshfs/subr.c	Wed Feb 17 15:47:36 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: subr.c,v 1.48 2010/01/07 21:05:50 pooka Exp $*/
+/*  $NetBSD: subr.c,v 1.49 2010/02/17 15:47:36 pooka Exp $*/
 
 /*
  * Copyright (c) 2006  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: subr.c,v 1.48 2010/01/07 21:05:50 pooka Exp $);
+__RCSID($NetBSD: subr.c,v 1.49 2010/02/17 15:47:36 pooka Exp $);
 #endif /* !lint */
 
 #include assert.h
@@ -344,6 +344,14 @@
 			}
 			free(longname);
 			longname = NULL;
+			
+			/*
+			 * In case of DOT, copy the attributes (mostly
+			 * because we want the link count for the root dir).
+			 */
+			if (strcmp(psn-dir[idx].entryname, .) == 0) {
+setpnva(pu, pn, psn-dir[idx].va);
+			}
 
 			/*
 			 * Check if we already have a psshfs_dir for the



CVS commit: src/sys/arch/sparc/stand/bootblk

2010-02-17 Thread Eduardo Horvath
Module Name:src
Committed By:   eeh
Date:   Wed Feb 17 15:49:19 UTC 2010

Modified Files:
src/sys/arch/sparc/stand/bootblk: bootblk.fth

Log Message:
Fix ffsv2 support.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/stand/bootblk/bootblk.fth

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/sparc/stand/bootblk/bootblk.fth
diff -u src/sys/arch/sparc/stand/bootblk/bootblk.fth:1.10 src/sys/arch/sparc/stand/bootblk/bootblk.fth:1.11
--- src/sys/arch/sparc/stand/bootblk/bootblk.fth:1.10	Sat Feb 13 23:38:17 2010
+++ src/sys/arch/sparc/stand/bootblk/bootblk.fth	Wed Feb 17 15:49:19 2010
@@ -1,4 +1,4 @@
-\	$NetBSD: bootblk.fth,v 1.10 2010/02/13 23:38:17 eeh Exp $
+\	$NetBSD: bootblk.fth,v 1.11 2010/02/17 15:49:19 eeh Exp $
 \
 \	IEEE 1275 Open Firmware Boot Block
 \
@@ -35,6 +35,8 @@
 
 false value boot-debug?
 
+: KB d# 1024 * ;
+
 \
 \ First some housekeeping:  Open /chosen and set up vectors into
 \	client-services
@@ -610,6 +612,7 @@
   endcase
then	( sb )
\ The FFS magic is at the end of the superblock
+   \ XXX we should check to make sure this is not an alternate SB.
fs_magic l@  case
   fs1_magic_value  of  init-ffs-v1 true  endof
   fs2_magic_value  of  init-ffs-v2 true  endof
@@ -688,6 +691,26 @@
then
 ;
 
+: check-supers ( -- found? )
+   \ Superblocks used to be 8KB into the partition, but ffsv2 changed that.
+   \ See comments in src/sys/ufs/ffs/fs.h
+   \ Put a list of offets to check on the stack, ending with -1
+   -1
+   0
+   d# 128 KB
+   d# 64 KB
+   8 KB
+   
+   begin  dup -1   while			( -1 .. off )
+	 raid-offset dev_bsize * + read-super	( -1 .. )
+	 sb-buf fs-magic?  if			( -1 .. )
+	begin  -1 =  until	 \ Clean out extra stuff from stack
+	true exit
+	 then
+   repeat
+   drop false
+;
+
 : ufs-open ( bootpath len -- )
boot-ihandle -1 =  if
   2dup + 0 swap c!	\ Nul terminate.
@@ -700,13 +723,12 @@
2drop

boot-debug?  if . Try a RAID superblock read cr  then
-   rf_protected dup  to  raid-offset 
-   dev_bsize * sboff + read-super
-   sb-buf fs-magic? invert  if
+   \ RAIDFRAME skips 64 sectors.
+   d# 64  to  raid-offset
+   check-supers invert  if
   boot-debug?  if . Try a normal superblock read cr  then
   0  to  raid-offset 
-  sboff read-super
-  sb-buf fs-magic? invert  abort Invalid superblock magic
+  check-supers 0=  abort Invalid superblock magic
then
sb-buf fs-bsize l@ dup maxbsize   if
   . Superblock bsize space . . too large cr
@@ -857,9 +879,10 @@
 ;
 
 : do-boot ( bootfile -- )
-. NetBSD IEEE 1275 Multi-FS Bootblock cr
-boot-path load-file ( -- load-base )
-dup 0  if   init-program  evaluate  then
+   . NetBSD IEEE 1275 Multi-FS Bootblock cr
+   . Version $NetBSD: bootblk.fth,v 1.11 2010/02/17 15:49:19 eeh Exp $ cr
+   boot-path load-file ( -- load-base )
+   dup 0  if   init-program  evaluate  then
 ; 
 
 



CVS commit: src/sys/arch/sparc/stand/ofwboot

2010-02-17 Thread Eduardo Horvath
Module Name:src
Committed By:   eeh
Date:   Wed Feb 17 15:50:06 UTC 2010

Modified Files:
src/sys/arch/sparc/stand/ofwboot: ofdev.c

Log Message:
Add support for ffsv2 and lfs.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sparc/stand/ofwboot/ofdev.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/sparc/stand/ofwboot/ofdev.c
diff -u src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.25 src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.26
--- src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.25	Wed Jan 27 22:18:37 2010
+++ src/sys/arch/sparc/stand/ofwboot/ofdev.c	Wed Feb 17 15:50:06 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.25 2010/01/27 22:18:37 martin Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.26 2010/02/17 15:50:06 eeh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -41,6 +41,7 @@
 
 #include lib/libsa/stand.h
 #include lib/libsa/ufs.h
+#include lib/libsa/lfs.h
 #include lib/libsa/cd9660.h
 #ifdef NETBOOT
 #include lib/libsa/nfs.h
@@ -188,8 +189,10 @@
 };
 int ndevs = sizeof ofdevsw / sizeof ofdevsw[0];
 
+
 #ifdef SPARC_BOOT_UFS
-static struct fs_ops file_system_ufs = FS_OPS(ufs);
+static struct fs_ops file_system_ufs[] = 
+{ FS_OPS(ufs), FS_OPS(ffsv2), FS_OPS(lfsv1), FS_OPS(lfsv2) };
 #endif
 #ifdef SPARC_BOOT_CD9660
 static struct fs_ops file_system_cd9660 = FS_OPS(cd9660);
@@ -199,7 +202,7 @@
 static struct fs_ops file_system_tftp = FS_OPS(tftp);
 #endif
 
-struct fs_ops file_system[3];
+struct fs_ops file_system[7];
 int nfsys;
 
 static struct of_dev ofdev = {
@@ -515,11 +518,13 @@
 		of-f_dev = ofdevsw;
 		of-f_devdata = ofdev;
 #ifdef SPARC_BOOT_UFS
-		memcpy(file_system[nfsys++], file_system_ufs, sizeof file_system[0]);
+		memcpy(file_system[nfsys++], file_system_ufs[0], sizeof file_system[0]);
+		memcpy(file_system[nfsys++], file_system_ufs[1], sizeof file_system[0]);
+		memcpy(file_system[nfsys++], file_system_ufs[2], sizeof file_system[0]);
+		memcpy(file_system[nfsys++], file_system_ufs[3], sizeof file_system[0]);
 #endif
 #ifdef SPARC_BOOT_CD9660
-		memcpy(file_system[nfsys++], file_system_cd9660,
-		sizeof file_system[0]);
+		memcpy(file_system[nfsys++], file_system_cd9660, sizeof file_system[0]);
 #endif
 		DPRINTF((devopen: return 0\n));
 		return 0;



CVS commit: src/usr.sbin/puffs/mount_psshfs

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 15:50:54 UTC 2010

Modified Files:
src/usr.sbin/puffs/mount_psshfs: psshfs.c

Log Message:
Bump the initial rootdir link count guess to a ludicrous value.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/puffs/mount_psshfs/psshfs.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/puffs/mount_psshfs/psshfs.c
diff -u src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.59 src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.60
--- src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.59	Tue Jan 12 18:43:37 2010
+++ src/usr.sbin/puffs/mount_psshfs/psshfs.c	Wed Feb 17 15:50:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $	*/
+/*	$NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $);
+__RCSID($NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -287,7 +287,15 @@
 
 	rva = pn_root-pn_va;
 	rva-va_fileid = pctx.nextino++;
-	rva-va_nlink = 101; /* XXX */
+
+	/*
+	 * For root link count, just guess something ridiculously high.
+	 * Guessing too high has no known adverse effects, but fsu()
+	 * doesn't like too low values.  This guess will be replaced
+	 * with the real value when readdir is first called for
+	 * the root directory.
+	 */
+	rva-va_nlink = 8811;
 
 	if (detach)
 		if (puffs_daemon(pu, 1, 1) == -1)



CVS commit: src/usr.sbin/puffs/mount_psshfs

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 15:54:10 UTC 2010

Modified Files:
src/usr.sbin/puffs/mount_psshfs: psshfs.c

Log Message:
umgah. meant fts, not fsu


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/puffs/mount_psshfs/psshfs.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/puffs/mount_psshfs/psshfs.c
diff -u src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.60 src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.61
--- src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.60	Wed Feb 17 15:50:54 2010
+++ src/usr.sbin/puffs/mount_psshfs/psshfs.c	Wed Feb 17 15:54:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $	*/
+/*	$NetBSD: psshfs.c,v 1.61 2010/02/17 15:54:10 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $);
+__RCSID($NetBSD: psshfs.c,v 1.61 2010/02/17 15:54:10 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -290,7 +290,7 @@
 
 	/*
 	 * For root link count, just guess something ridiculously high.
-	 * Guessing too high has no known adverse effects, but fsu()
+	 * Guessing too high has no known adverse effects, but fts(3)
 	 * doesn't like too low values.  This guess will be replaced
 	 * with the real value when readdir is first called for
 	 * the root directory.



CVS commit: src/bin/sh

2010-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 15:57:24 UTC 2010

Modified Files:
src/bin/sh: main.c

Log Message:
PR/42828: Richard Hansen: Don't evaluate ${ENV} if not interactive.
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/bin/sh/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/bin/sh/main.c
diff -u src/bin/sh/main.c:1.53 src/bin/sh/main.c:1.54
--- src/bin/sh/main.c:1.53	Sat Jan 17 19:30:54 2009
+++ src/bin/sh/main.c	Wed Feb 17 10:57:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.53 2009/01/18 00:30:54 lukem Exp $	*/
+/*	$NetBSD: main.c,v 1.54 2010/02/17 15:57:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)main.c	8.7 (Berkeley) 7/19/95;
 #else
-__RCSID($NetBSD: main.c,v 1.53 2009/01/18 00:30:54 lukem Exp $);
+__RCSID($NetBSD: main.c,v 1.54 2010/02/17 15:57:24 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -184,7 +184,7 @@
 	}
 state2:
 	state = 3;
-	if (getuid() == geteuid()  getgid() == getegid()) {
+	if (iflag  getuid() == geteuid()  getgid() == getegid()) {
 		if ((shinit = lookupvar(ENV)) != NULL  *shinit != '\0') {
 			state = 3;
 			read_profile(shinit);



CVS commit: src/distrib/utils/sysinst

2010-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 16:09:52 UTC 2010

Modified Files:
src/distrib/utils/sysinst: disks.c

Log Message:
eeh says we should not enable fsck_lfs on lfs partitions


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/distrib/utils/sysinst/disks.c

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

Modified files:

Index: src/distrib/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.110 src/distrib/utils/sysinst/disks.c:1.111
--- src/distrib/utils/sysinst/disks.c:1.110	Sat Jan  2 18:06:57 2010
+++ src/distrib/utils/sysinst/disks.c	Wed Feb 17 16:09:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.110 2010/01/02 18:06:57 dsl Exp $ */
+/*	$NetBSD: disks.c,v 1.111 2010/02/17 16:09:52 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -699,7 +699,10 @@
 			if (!check_lfs_progs())
 s = # ;
 			fstype = lfs;
-			/* FALLTHROUGH */
+			/* XXX fsck_lfs considered harmfull */
+			fsck_pass = 0;
+			dump_freq = 1;
+			break;
 		case FS_BSDFFS:
 			fsck_pass = (strcmp(mp, /) == 0) ? 1 : 2;
 			dump_freq = 1;



CVS commit: src/distrib/utils/sysinst/arch/sparc64

2010-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 16:11:01 UTC 2010

Modified Files:
src/distrib/utils/sysinst/arch/sparc64: md.h

Log Message:
We can now boot from FFSv2, so offer it + even use it as a default.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/sysinst/arch/sparc64/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/sparc64/md.h
diff -u src/distrib/utils/sysinst/arch/sparc64/md.h:1.14 src/distrib/utils/sysinst/arch/sparc64/md.h:1.15
--- src/distrib/utils/sysinst/arch/sparc64/md.h:1.14	Sat Mar 15 18:30:13 2008
+++ src/distrib/utils/sysinst/arch/sparc64/md.h	Wed Feb 17 16:11:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.14 2008/03/15 18:30:13 martin Exp $	*/
+/*	$NetBSD: md.h,v 1.15 2010/02/17 16:11:00 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -56,6 +56,15 @@
 #define DEFUSRSIZE	240	/* Default /usr size, if /home */
 #define XNEEDMB		80	/* Extra megs for full X installation */
 
+/* use UFS2 by default for ffs */
+#define	DEFAULT_UFS2
+
+/* have support for booting from UFS2 */
+#define	HAVE_UFS2_BOOT
+
+/* allow using tmpfs for /tmp instead of mfs */
+#define HAVE_TMPFS
+
 /*
  * Default filesets to fetch and install during installation
  * or upgrade.



CVS commit: src/distrib/sparc64/instfs

2010-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 16:15:15 UTC 2010

Modified Files:
src/distrib/sparc64/instfs: list

Log Message:
add mount_tmpfs


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/sparc64/instfs/list

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

Modified files:

Index: src/distrib/sparc64/instfs/list
diff -u src/distrib/sparc64/instfs/list:1.17 src/distrib/sparc64/instfs/list:1.18
--- src/distrib/sparc64/instfs/list:1.17	Thu Feb 11 09:06:50 2010
+++ src/distrib/sparc64/instfs/list	Wed Feb 17 16:15:15 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.17 2010/02/11 09:06:50 roy Exp $
+#	$NetBSD: list,v 1.18 2010/02/17 16:15:15 martin Exp $
 
 SRCDIRS	bin sbin libexec usr.bin/less usr.bin usr.sbin gnu/usr.bin
 
@@ -37,6 +37,7 @@
 PROG	sbin/mount_lfs
 PROG	sbin/mount_msdos
 PROG	sbin/mount_nfs
+PROG	sbin/mount_tmpfs
 PROG	sbin/newfs		sbin/mount_mfs
 PROG	sbin/newfs_lfs
 PROG	sbin/ping



CVS commit: src/external/cddl/osnet/lib/libnvpair

2010-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 17:36:32 UTC 2010

Modified Files:
src/external/cddl/osnet/lib/libnvpair: Makefile

Log Message:
Fix build issue with our make system building libnvpair.so from libnvpair.c
and libnvpair.so from *.so by renaming libnvpair.c to lib_nvpair.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libnvpair/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/cddl/osnet/lib/libnvpair/Makefile
diff -u src/external/cddl/osnet/lib/libnvpair/Makefile:1.1 src/external/cddl/osnet/lib/libnvpair/Makefile:1.2
--- src/external/cddl/osnet/lib/libnvpair/Makefile:1.1	Fri Aug  7 16:57:56 2009
+++ src/external/cddl/osnet/lib/libnvpair/Makefile	Wed Feb 17 12:36:32 2010
@@ -1,11 +1,17 @@
-#	$NetBSD: Makefile,v 1.1 2009/08/07 20:57:56 haad Exp $
+#	$NetBSD: Makefile,v 1.2 2010/02/17 17:36:32 christos Exp $
 
 .PATH:  ${.CURDIR}/../../dist/lib/libnvpair
 .PATH:  ${.CURDIR}/../../dist/common/nvpair
 
 LIB=	nvpair
 
-SRCS=	libnvpair.c nvpair_alloc_system.c nvpair_alloc_fixed.c nvpair.c
+SRCS=	lib_nvpair.c nvpair_alloc_system.c nvpair_alloc_fixed.c nvpair.c
+
+lib_nvpair.c: libnvpair.c
+	@rm -f ${.TARGET}
+	@ln -s ${.ALLSRC} ${.TARGET}
+
+CLEANFILES+=lib_nvpair.c
 
 .include ../../Makefile.zfs
 .include bsd.lib.mk



CVS commit: src/usr.sbin/repquota

2010-02-17 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Feb 17 18:55:14 UTC 2010

Modified Files:
src/usr.sbin/repquota: repquota.c

Log Message:
Make block fields one char wider; allows to sanely display quotas up to
99.9GB while still fitting 80 columns.
Something else needs to be found for the long term ...


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/repquota/repquota.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/repquota/repquota.c
diff -u src/usr.sbin/repquota/repquota.c:1.24 src/usr.sbin/repquota/repquota.c:1.25
--- src/usr.sbin/repquota/repquota.c:1.24	Sat Apr 18 09:20:40 2009
+++ src/usr.sbin/repquota/repquota.c	Wed Feb 17 18:55:14 2010
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = @(#)repquota.c	8.2 (Berkeley) 11/22/94;
 #else
-__RCSID($NetBSD: repquota.c,v 1.24 2009/04/18 09:20:40 lukem Exp $);
+__RCSID($NetBSD: repquota.c,v 1.25 2010/02/17 18:55:14 bouyer Exp $);
 #endif
 #endif /* not lint */
 
@@ -216,7 +216,7 @@
 	fclose(qf);
 	printf(Block limits   File limits\n);
 	printf(type == USRQUOTA ? User  : Group);
-	printf(   usedsofthard  grace  usedsofthard  grace\n);
+	printf(used soft hard  grace  usedsofthard  grace\n);
 	for (id = 0; id = highid[type]; id++) {
 		fup = lookup(id, type);
 		if (fup == 0)
@@ -228,7 +228,7 @@
 			printf(%s , fup-fu_name);
 		else
 			printf(%-10s, fup-fu_name);
-		printf(%c%c%8d%8d%8d%7s,
+		printf(%c%c%9d%9d%9d%7s,
 			fup-fu_dqblk.dqb_bsoftlimit  
 			fup-fu_dqblk.dqb_curblocks = 
 			fup-fu_dqblk.dqb_bsoftlimit ? '+' : '-',



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

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 20:39:53 UTC 2010

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

Log Message:
* allow one more request
* print warning if a request which might fail, fails
* report error from bulk transfers


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libugenhc/ugenhc.c

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

Modified files:

Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c
diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.1 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.2
--- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.1	Thu Feb 11 02:22:09 2010
+++ src/sys/rump/dev/lib/libugenhc/ugenhc.c	Wed Feb 17 20:39:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugenhc.c,v 1.1 2010/02/11 02:22:09 pooka Exp $	*/
+/*	$NetBSD: ugenhc.c,v 1.2 2010/02/17 20:39:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugenhc.c,v 1.1 2010/02/11 02:22:09 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugenhc.c,v 1.2 2010/02/17 20:39:53 pooka Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -491,6 +491,7 @@
 	case C(0x22, UT_WRITE_CLASS_INTERFACE):
 	case C(0x0a, UT_WRITE_CLASS_INTERFACE):
 	case C(UR_SET_FEATURE, UT_WRITE_CLASS_OTHER):
+	case C(UR_SET_FEATURE, UT_WRITE_DEVICE):
 	case C(UR_CLEAR_FEATURE, UT_WRITE_CLASS_OTHER):
 	case C(UR_SET_REPORT, UT_WRITE_CLASS_INTERFACE):
 	case C(UR_CLEAR_FEATURE, UT_WRITE_ENDPOINT):
@@ -501,10 +502,12 @@
 		ucr.ucr_data = buf;
 		if (rumpuser_ioctl(sc-sc_ugenfd[UGEN_EPT_CTRL],
 		USB_DO_REQUEST, ucr, ru_error) == -1) {
-			if (!mightfail)
+			if (!mightfail) {
 panic(request failed: %d, ru_error);
-			else
+			} else {
 err = ru_error;
+printf(warning: request failed: %d\n, err);
+			}
 		}
 		}
 		break;
@@ -719,7 +722,9 @@
 	}
  out:
 	val = 0;
+	error = 0;
 	rumpuser_ioctl(sc-sc_ugenfd[endpt], USB_SET_SHORT_XFER, val, error);
+	xfer-status = error;
 	usb_transfer_complete(xfer);
 	return (USBD_IN_PROGRESS);
 }



CVS commit: src/share/examples/rump/sdread

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 20:43:35 UTC 2010

Modified Files:
src/share/examples/rump/sdread: Makefile sdread.c

Log Message:
* support cd devices (@scsibus  @atapibus, per libumass)
* support cd9660
* add probe keyword, which just prints the dmesg in verbose form


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

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

Modified files:

Index: src/share/examples/rump/sdread/Makefile
diff -u src/share/examples/rump/sdread/Makefile:1.4 src/share/examples/rump/sdread/Makefile:1.5
--- src/share/examples/rump/sdread/Makefile:1.4	Wed Feb 10 02:31:00 2010
+++ src/share/examples/rump/sdread/Makefile	Wed Feb 17 20:43:35 2010
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2010/02/10 02:31:00 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2010/02/17 20:43:35 pooka Exp $
 #
 
 PROG=	sdread
 
-LDADD+=	-lrumpfs_ffs -lrumpfs_msdos -lrumpvfs
+LDADD+=	-lrumpfs_cd9660 -lrumpfs_ffs -lrumpfs_msdos -lrumpvfs
 LDADD+=	-lrumpdev_disk -lrumpdev_usb -lrumpdev_ugenhc -lrumpdev_umass -lrumpdev
 LDADD+=	-lrump
 LDADD+=	-lrumpuser -lpthread

Index: src/share/examples/rump/sdread/sdread.c
diff -u src/share/examples/rump/sdread/sdread.c:1.2 src/share/examples/rump/sdread/sdread.c:1.3
--- src/share/examples/rump/sdread/sdread.c:1.2	Tue Oct 13 18:41:06 2009
+++ src/share/examples/rump/sdread/sdread.c	Wed Feb 17 20:43:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdread.c,v 1.2 2009/10/13 18:41:06 pooka Exp $	*/
+/*	$NetBSD: sdread.c,v 1.3 2010/02/17 20:43:35 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -31,6 +31,7 @@
 
 #include ufs/ufs/ufsmount.h
 #include msdosfs/msdosfsmount.h
+#include isofs/cd9660/cd9660_mount.h
 
 #include rump/rump.h
 #include rump/rump_syscalls.h
@@ -56,13 +57,19 @@
 	char buf[2048];
 	struct msdosfs_args args;
 	struct ufs_args uargs;
+	struct iso_args iargs;
 	struct dirent *dp;
 	const char *msg = NULL;
 	int fd, n, fd_h, sverrno;
+	int probeonly = 0;
 
-	if (argc  1  argc != 3) {
-		fprintf(stderr, usage: a.out [src hostdest]\n);
-		exit(1);
+	if (argc  1) {
+		if (argc == 2  strcmp(argv[1], probe) == 0) {
+			probeonly = 1;
+		} else if (argc != 3) {
+			fprintf(stderr, usage: a.out [src hostdest]\n);
+			exit(1);
+		}
 	}
 
 	memset(args, 0, sizeof(args));
@@ -72,7 +79,15 @@
 	memset(uargs, 0, sizeof(uargs));
 	uargs.fspec = strdup(/dev/sd0e);
 
+	memset(iargs, 0, sizeof(iargs));
+	iargs.fspec = strdup(/dev/cd0a);
+
+	if (probeonly)
+		rump_boot_sethowto(RUMP_AB_VERBOSE);
 	rump_init();
+	if (probeonly) {
+		exit(0);
+	}
 
 	if (rump_sys_mkdir(/mp, 0777) == -1)
 		err(1, mkdir);
@@ -80,7 +95,17 @@
 	args, sizeof(args)) == -1) {
 		if (rump_sys_mount(MOUNT_FFS, /mp, MNT_RDONLY,
 		uargs, sizeof(uargs)) == -1) {
-			err(1, mount);
+			printf(Trying CD.  This might fail with 
+			\media not present\.\n);
+			printf(If that happens, wait a while without 
+			unplugging the device and re-run.\n);
+			printf(Some devices apparently need a long time 
+			to settle after they are initialized.\n\n);
+
+			if (rump_sys_mount(MOUNT_CD9660, /mp, MNT_RDONLY,
+			iargs, sizeof(iargs)) == -1) {
+err(1, mount);
+			}
 		}
 	}
 



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

2010-02-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Feb 17 20:44:34 UTC 2010

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

Log Message:
Support SCSIVERBOSE.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libumass/Makefile

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

Modified files:

Index: src/sys/rump/dev/lib/libumass/Makefile
diff -u src/sys/rump/dev/lib/libumass/Makefile:1.3 src/sys/rump/dev/lib/libumass/Makefile:1.4
--- src/sys/rump/dev/lib/libumass/Makefile:1.3	Tue Feb 16 20:42:45 2010
+++ src/sys/rump/dev/lib/libumass/Makefile	Wed Feb 17 20:44:34 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/02/16 20:42:45 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2010/02/17 20:44:34 pooka Exp $
 #
 #
 # umass.  includes scsibus+sd for simplicity due to the umass code
@@ -24,5 +24,10 @@
 
 CPPFLAGS+=	-I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs
 
+.if 1
+SRCS+=		scsipi_verbose.c
+CPPFLAGS+=	-DSCSIVERBOSE
+.endif
+
 .include bsd.lib.mk
 .include bsd.klinks.mk



CVS commit: src/sbin/newfs_ext2fs

2010-02-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 17 21:39:14 UTC 2010

Modified Files:
src/sbin/newfs_ext2fs: newfs_ext2fs.8

Log Message:
Various fixes from Jason McIntyre j...@kerhand.co.uk.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/newfs_ext2fs/newfs_ext2fs.8

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

Modified files:

Index: src/sbin/newfs_ext2fs/newfs_ext2fs.8
diff -u src/sbin/newfs_ext2fs/newfs_ext2fs.8:1.7 src/sbin/newfs_ext2fs/newfs_ext2fs.8:1.8
--- src/sbin/newfs_ext2fs/newfs_ext2fs.8:1.7	Tue Dec  1 08:47:25 2009
+++ src/sbin/newfs_ext2fs/newfs_ext2fs.8	Wed Feb 17 21:39:14 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: newfs_ext2fs.8,v 1.7 2009/12/01 08:47:25 pooka Exp $
+.\	$NetBSD: newfs_ext2fs.8,v 1.8 2010/02/17 21:39:14 wiz Exp $
 .\
 .\ Copyright (c) 1983, 1987, 1991, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 .Os
 .Sh NAME
 .Nm newfs_ext2fs
-.Nd construct a new Ext2 file system
+.Nd construct a new ext2 file system
 .Sh SYNOPSIS
 .Nm
 .Op Fl FINZ
@@ -52,7 +52,7 @@
 .Ar special
 .Sh DESCRIPTION
 .Nm
-is used to initialize and clear Ext2 file systems before first use.
+is used to initialize and clear ext2 file systems before first use.
 Before running
 .Nm
 the disk must be labeled using
@@ -71,11 +71,11 @@
 Bytes; causes no modification.
 (Default)
 .It k
-Kilo; multiply the argument by 1024
+Kilo; multiply the argument by 1024.
 .It m
-Mega; multiply the argument by 1048576
+Mega; multiply the argument by 1048576.
 .It g
-Giga; multiply the argument by 1073741824
+Giga; multiply the argument by 1073741824.
 .El
 .Pp
 The following options define the general layout policies.
@@ -94,7 +94,7 @@
 .It \*[Gt] 512 MB
 4 KB
 .El
-.It Fl D
+.It Fl D Ar inodesize
 Set the inode size.
 Defaults to 128, and can also be set to 256 for
 compatibility with ext4.
@@ -106,11 +106,11 @@
 No attempts to use or update the disk label will be made.
 .It Fl f Ar frag-size
 The fragment size of the file system in bytes.
-It must be the same with blocksize because current ext2fs
+It must be the same with blocksize because the current ext2fs
 implementation doesn't support fragmentation.
 .It Fl I
 Do not require that the file system type listed in the disk label is
-.Ql Linux Ext2 .
+.Ql Linux ext2 .
 .It Fl i Ar bytes-per-inode
 This specifies the density of inodes in the file system.
 If fewer inodes are desired, a larger number should be used;
@@ -134,16 +134,16 @@
 The default number of inodes is calculated from a number of blocks in
 the file system.
 .It Fl O Ar filesystem-format
-Select the filesystem-format
+Select the filesystem-format.
 .Bl -tag -width 3n -offset indent -compact
 .It 0
 .Ql GOOD_OLD_REV ;
-This option is primarily used to build root file systems that can be
+this option is primarily used to build root file systems that can be
 understood by old or dumb firmwares for bootstrap.
 (default)
 .It 1
 .Ql DYNAMIC_REV ;
-Various extended (and sometimes incompatible) features are enabled
+various extended (and sometimes incompatible) features are enabled
 (though not all features are supported on
 .Nx ) .
 Currently only the following features are supported:
@@ -186,7 +186,7 @@
 This controls the amount of information written to stdout:
 .Bl -tag -width 3n -offset indent -compact
 .It 0
-No output
+No output.
 .It 1
 Overall size and cylinder group details.
 .It 2
@@ -200,7 +200,7 @@
 The default is 3.
 If
 .Fl N
-is specifed
+is specified
 .Nm
 stops before outputting the progress bar.
 .It Fl v Ar volname
@@ -231,15 +231,15 @@
 .El
 .Sh NOTES
 There is no option to specify the metadata byte order on the file system
-to be created because native Ext2 file system is always little endian
+to be created the because native ext2 file system is always little endian
 even on big endian hosts.
 .Pp
 The file system is created with
 .Sq random
 inode generation numbers to improve NFS security.
 .Pp
-The owner and group ids of the root node and reserved blocks of the new
-file system are set to the effective uid and gid of the user initializing
+The owner and group IDs of the root node and reserved blocks of the new
+file system are set to the effective UID and GID of the user initializing
 the file system.
 .Pp
 For the
@@ -247,7 +247,7 @@
 command to succeed,
 the disk label should first be updated such that the fstype field for the
 partition is set to
-.Ql Linux Ext2 ,
+.Ql Linux ext2 ,
 unless
 .Fl F
 or
@@ -259,9 +259,9 @@
 .\ utility.
 .\ .Pp
 The partition size is found using
-.Xr fstat 2
-not by inspecting the disklabel.
-The block size and fragment size will be written back to the disklabel
+.Xr fstat 2 ,
+not by inspecting the disk label.
+The block size and fragment size will be written back to the disk label
 only if the last character of
 .Ar special
 references the same partition as the minor device number.
@@ -278,7 +278,7 @@
 

CVS commit: src/share/man/man9

2010-02-17 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed Feb 17 22:04:14 UTC 2010

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

Log Message:
grammar in kprintf.9 (s/or/and/ and add some commas);   ok wiz, pgoyette


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/kprintf.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/kprintf.9
diff -u src/share/man/man9/kprintf.9:1.28 src/share/man/man9/kprintf.9:1.29
--- src/share/man/man9/kprintf.9:1.28	Fri Sep  4 23:29:03 2009
+++ src/share/man/man9/kprintf.9	Wed Feb 17 22:04:14 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: kprintf.9,v 1.28 2009/09/04 23:29:03 apb Exp $
+.\ $NetBSD: kprintf.9,v 1.29 2010/02/17 22:04:14 cnst Exp $
 .\
 .\ Copyright (c) 1998, 2002, 2007 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -217,9 +217,10 @@
 which work like their counterparts without the suffixes, except that
 they take a
 .Ft device_t
-or
-.Ft struct ifnet *
-respectively as first argument and prefix the log message with the
+and
+.Ft struct ifnet * ,
+respectively, as first argument,
+and prefix the log message with the
 corresponding device or interface name.
 .Pp
 The



CVS commit: src/sbin/fsck

2010-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 23:30:21 UTC 2010

Modified Files:
src/sbin/fsck: fsck.8 fsck.c

Log Message:
Add -x mountpoint ``exclude'' option.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sbin/fsck/fsck.8
cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck/fsck.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/fsck/fsck.8
diff -u src/sbin/fsck/fsck.8:1.35 src/sbin/fsck/fsck.8:1.36
--- src/sbin/fsck/fsck.8:1.35	Tue Oct 20 21:07:46 2009
+++ src/sbin/fsck/fsck.8	Wed Feb 17 18:30:21 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: fsck.8,v 1.35 2009/10/21 01:07:46 snj Exp $
+.\	$NetBSD: fsck.8,v 1.36 2010/02/17 23:30:21 christos Exp $
 .\
 .\ Copyright (c) 1996 Christos Zoulas.  All rights reserved.
 .\
@@ -22,7 +22,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 23, 2008
+.Dd February 17, 2010
 .Dt FSCK 8
 .Os
 .Sh NAME
@@ -34,6 +34,7 @@
 .Op Fl l Ar maxparallel
 .Op Fl T Ar fstype:fsoptions
 .Op Fl t Ar fstype
+.Op Fl x Ar mountpoint
 .Op special | node ...
 .Sh DESCRIPTION
 The
@@ -111,6 +112,12 @@
 for the file system types that are not specified in the list.
 .It Fl v
 Print the commands before executing them.
+.It Fl x Ar mountpoint
+Exclude the filesystem which has a
+.Ar mountpoint
+the same as in
+.Pa /etc/fstab .
+Used only in ``preen'' mode.
 .It Fl y
 Causes
 .Nm

Index: src/sbin/fsck/fsck.c
diff -u src/sbin/fsck/fsck.c:1.47 src/sbin/fsck/fsck.c:1.48
--- src/sbin/fsck/fsck.c:1.47	Sat Feb 23 16:41:47 2008
+++ src/sbin/fsck/fsck.c	Wed Feb 17 18:30:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsck.c,v 1.47 2008/02/23 21:41:47 christos Exp $	*/
+/*	$NetBSD: fsck.c,v 1.48 2010/02/17 23:30:21 christos Exp $	*/
 
 /*
  * Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fsck.c,v 1.47 2008/02/23 21:41:47 christos Exp $);
+__RCSID($NetBSD: fsck.c,v 1.48 2010/02/17 23:30:21 christos Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -67,7 +67,7 @@
 
 static enum { IN_LIST, NOT_IN_LIST } which = NOT_IN_LIST;
 
-TAILQ_HEAD(fstypelist, entry) opthead, selhead;
+TAILQ_HEAD(fstypelist, entry) opthead, selhead, omhead;
 
 struct entry {
 	char *type;
@@ -81,6 +81,7 @@
 
 static int checkfs(const char *, const char *, const char *, void *, pid_t *);
 static int selected(const char *);
+static int omitted(const char *);
 static void addoption(char *);
 static const char *getoptions(const char *);
 static void addentry(struct fstypelist *, const char *, const char *);
@@ -105,8 +106,9 @@
 
 	TAILQ_INIT(selhead);
 	TAILQ_INIT(opthead);
+	TAILQ_INIT(omhead);
 
-	while ((i = getopt(argc, argv, dfl:nPpqT:t:vy)) != -1) {
+	while ((i = getopt(argc, argv, dfl:nPpqT:t:vx:y)) != -1) {
 		switch (i) {
 		case 'd':
 			flags |= CHECK_DEBUG;
@@ -152,6 +154,10 @@
 			flags |= CHECK_VERBOSE;
 			continue;
 
+		case 'x':
+			addentry(omhead, optarg, );
+			break;
+
 		case 'y':
 			break;
 
@@ -236,6 +242,9 @@
 	if (!selected(fs-fs_vfstype))
 		return NULL;
 
+	if (omitted(fs-fs_file))
+		return NULL;
+
 	return fs;
 }
 
@@ -391,6 +400,20 @@
 }
 
 
+static int
+omitted(const char *mountedon)
+{
+	struct entry *e;
+
+	/* If no type specified, it's always selected. */
+	TAILQ_FOREACH(e, omhead, entries)
+		if (!strcmp(e-type, mountedon))
+			return 1;
+
+	return 0;
+}
+
+
 static const char *
 getoptions(const char *type)
 {
@@ -558,7 +581,7 @@
 usage(void)
 {
 	static const char common[] =
-	[-dfnPpqvy] [-l maxparallel] [-T fstype:fsoptions]\n\t\t[-t fstype];
+	[-dfnPpqvy] [-x excludemount] [-l maxparallel] [-T fstype:fsoptions]\n\t\t[-t fstype];
 
 	(void)fprintf(stderr, usage: %s %s [special|node]...\n,
 	getprogname(), common);



CVS commit: src/etc/rc.d

2010-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 23:32:08 UTC 2010

Modified Files:
src/etc/rc.d: fsck

Log Message:
Exclude root, since that is done in fsck_root.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/rc.d/fsck

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

Modified files:

Index: src/etc/rc.d/fsck
diff -u src/etc/rc.d/fsck:1.10 src/etc/rc.d/fsck:1.11
--- src/etc/rc.d/fsck:1.10	Fri Jul 10 16:02:21 2009
+++ src/etc/rc.d/fsck	Wed Feb 17 18:32:07 2010
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: fsck,v 1.10 2009/07/10 20:02:21 christos Exp $
+# $NetBSD: fsck,v 1.11 2010/02/17 23:32:07 christos Exp $
 #
 
 # PROVIDE: fsck
@@ -22,7 +22,7 @@
 	trap : 3		# enter single-user mode on failure.
 
 	echo Starting file system checks:
-	fsck $fsck_flags
+	fsck -x / $fsck_flags
 	handle_fsck_error $?
 }
 



CVS commit: src/sys/ufs/lfs

2010-02-17 Thread Eduardo Horvath
Module Name:src
Committed By:   eeh
Date:   Thu Feb 18 01:14:01 UTC 2010

Modified Files:
src/sys/ufs/lfs: lfs_vfsops.c

Log Message:
Fix root filesystem support.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.283 src/sys/ufs/lfs/lfs_vfsops.c:1.284
--- src/sys/ufs/lfs/lfs_vfsops.c:1.283	Tue Feb 16 23:20:30 2010
+++ src/sys/ufs/lfs/lfs_vfsops.c	Thu Feb 18 01:14:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vfsops.c,v 1.283 2010/02/16 23:20:30 mlelstv Exp $	*/
+/*	$NetBSD: lfs_vfsops.c,v 1.284 2010/02/18 01:14:00 eeh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lfs_vfsops.c,v 1.283 2010/02/16 23:20:30 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: lfs_vfsops.c,v 1.284 2010/02/18 01:14:00 eeh Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_lfs.h
@@ -516,8 +516,10 @@
 lfs_mountroot(void)
 {
 	extern struct vnode *rootvp;
+	struct lfs *fs = NULL;/* LFS */
 	struct mount *mp;
 	struct lwp *l = curlwp;
+	struct ufsmount *ump;
 	int error;
 
 	if (device_class(root_device) != DV_DISK)
@@ -537,6 +539,10 @@
 	mutex_enter(mountlist_lock);
 	CIRCLEQ_INSERT_TAIL(mountlist, mp, mnt_list);
 	mutex_exit(mountlist_lock);
+	ump = VFSTOUFS(mp);
+	fs = ump-um_lfs;
+	memset(fs-lfs_fsmnt, 0, sizeof(fs-lfs_fsmnt));
+	(void)copystr(mp-mnt_stat.f_mntonname, fs-lfs_fsmnt, MNAMELEN - 1, 0);
 	(void)lfs_statvfs(mp, mp-mnt_stat);
 	vfs_unbusy(mp, false, NULL);
 	setrootfstime((time_t)(VFSTOUFS(mp)-um_lfs-lfs_tstamp));
@@ -597,8 +603,15 @@
 			 * used for our initial mount
 			 */
 			ump = VFSTOUFS(mp);
-			if (devvp != ump-um_devvp)
-error = EINVAL;
+			if (devvp != ump-um_devvp) {
+if (devvp-v_rdev != ump-um_devvp-v_rdev)
+	error = EINVAL;
+else {
+	vrele(devvp);
+	devvp = ump-um_devvp;
+	vref(devvp);
+}
+			}
 		}
 	} else {
 		if (!update) {



CVS commit: src/sys/dev/sbus

2010-02-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 18 02:21:39 UTC 2010

Modified Files:
src/sys/dev/sbus: dbri.c

Log Message:
Abort setup when we find no audio codec to avoid crashing later on with
ISDN-only cards.
Should fix PR41055


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/sbus/dbri.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/sbus/dbri.c
diff -u src/sys/dev/sbus/dbri.c:1.29 src/sys/dev/sbus/dbri.c:1.30
--- src/sys/dev/sbus/dbri.c:1.29	Thu Jan 14 02:20:07 2010
+++ src/sys/dev/sbus/dbri.c	Thu Feb 18 02:21:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dbri.c,v 1.29 2010/01/14 02:20:07 macallan Exp $	*/
+/*	$NetBSD: dbri.c,v 1.30 2010/02/18 02:21:38 macallan Exp $	*/
 
 /*
  * Copyright (C) 1997 Rudolf Koenig (rfkoe...@immd4.informatik.uni-erlangen.de)
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dbri.c,v 1.29 2010/01/14 02:20:07 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: dbri.c,v 1.30 2010/02/18 02:21:38 macallan Exp $);
 
 #include audio.h
 #if NAUDIO  0
@@ -447,8 +447,12 @@
 	struct dbri_softc *sc = device_private(dev);
 
 	dbri_init(sc);
-	mmcodec_init(sc);
-	
+	if (mmcodec_init(sc) == -1) {
+		printf(%s: no codec detected, aborting\n,
+		device_xname(dev));
+		return;
+	}
+
 	/* Attach ourselves to the high level audio interface */
 	audio_attach_mi(dbri_hw_if, sc, sc-sc_dev);
 



CVS commit: src/sbin/fsck

2010-02-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Feb 18 06:57:18 UTC 2010

Modified Files:
src/sbin/fsck: fsck.8

Log Message:
Use Dq for double quotes; remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sbin/fsck/fsck.8

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

Modified files:

Index: src/sbin/fsck/fsck.8
diff -u src/sbin/fsck/fsck.8:1.36 src/sbin/fsck/fsck.8:1.37
--- src/sbin/fsck/fsck.8:1.36	Wed Feb 17 23:30:21 2010
+++ src/sbin/fsck/fsck.8	Thu Feb 18 06:57:17 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: fsck.8,v 1.36 2010/02/17 23:30:21 christos Exp $
+.\	$NetBSD: fsck.8,v 1.37 2010/02/18 06:57:17 wiz Exp $
 .\
 .\ Copyright (c) 1996 Christos Zoulas.  All rights reserved.
 .\
@@ -47,7 +47,9 @@
 It is normally used in the script
 .Pa /etc/rc
 during automatic reboot.
-If no file systems are specified, and ``preen'' mode is enabled (
+If no file systems are specified, and
+.Dq preen
+mode is enabled (
 .Fl p
 option)
 .Nm
@@ -117,7 +119,9 @@
 .Ar mountpoint
 the same as in
 .Pa /etc/fstab .
-Used only in ``preen'' mode.
+Used only in
+.Dq preen
+mode.
 .It Fl y
 Causes
 .Nm
@@ -126,7 +130,7 @@
 .El
 .Sh EXIT STATUS
 .Nm
-exits with 
+exits with
 .Dv 0
 on success.
 Any major problems will cause
@@ -149,7 +153,7 @@
 .It Dv 8
 The filesystem check has failed, and a subsequent check is required
 that will require human intervention.
-.It Dv 12 
+.It Dv 12
 .Nm
 exited because of the result of a signal (usually
 .Dv SIGINT



CVS commit: src/sys/dev/bluetooth

2010-02-17 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Feb 18 07:24:17 UTC 2010

Modified Files:
src/sys/dev/bluetooth: btuart.c

Log Message:
Remove unnecessary line-feed.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/bluetooth/btuart.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/bluetooth/btuart.c
diff -u src/sys/dev/bluetooth/btuart.c:1.23 src/sys/dev/bluetooth/btuart.c:1.24
--- src/sys/dev/bluetooth/btuart.c:1.23	Tue May 12 12:10:46 2009
+++ src/sys/dev/bluetooth/btuart.c	Thu Feb 18 07:24:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: btuart.c,v 1.23 2009/05/12 12:10:46 cegger Exp $	*/
+/*	$NetBSD: btuart.c,v 1.24 2010/02/18 07:24:16 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: btuart.c,v 1.23 2009/05/12 12:10:46 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: btuart.c,v 1.24 2010/02/18 07:24:16 kiyohara Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -351,8 +351,7 @@
 			/* new packet */
 			MGETHDR(m, M_DONTWAIT, MT_DATA);
 			if (m == NULL) {
-aprint_error_dev(sc-sc_dev,
-out of memory\n);
+aprint_error_dev(sc-sc_dev, out of memory\n);
 sc-sc_stats.err_rx++;
 return 0;	/* (lost sync) */
 			}
@@ -367,8 +366,7 @@
 			/* extend mbuf */
 			MGET(m-m_next, M_DONTWAIT, MT_DATA);
 			if (m-m_next == NULL) {
-aprint_error_dev(sc-sc_dev,
-out of memory\n);
+aprint_error_dev(sc-sc_dev, out of memory\n);
 sc-sc_stats.err_rx++;
 return 0;	/* (lost sync) */
 			}