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

2012-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 16 09:01:35 UTC 2012

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

Log Message:
Don't NULL deref on unknown subop, e.g. PA2.0 instruction.

Print undefined instead of ???.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/hppa/db_disasm.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/db_disasm.c
diff -u src/sys/arch/hppa/hppa/db_disasm.c:1.12 src/sys/arch/hppa/hppa/db_disasm.c:1.13
--- src/sys/arch/hppa/hppa/db_disasm.c:1.12	Tue Nov  3 05:07:26 2009
+++ src/sys/arch/hppa/hppa/db_disasm.c	Mon Jan 16 09:01:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.12 2009/11/03 05:07:26 snj Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.13 2012/01/16 09:01:35 skrll Exp $	*/
 
 /*	$OpenBSD: db_disasm.c,v 1.9 2000/04/18 20:02:45 mickey Exp $	*/
 
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.12 2009/11/03 05:07:26 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.13 2012/01/16 09:01:35 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -2253,16 +2253,18 @@ db_disasm(vaddr_t loc, bool flag)
 		else
 			i = m-subops[ext];
 
-		if (i-dasmfcn != coprDasm  i-dasmfcn != diagDasm 
-		i-dasmfcn != ariDasm  i-dasmfcn != scDasm 
-		i-dasmfcn != ldDasm)
-			db_printf(i-mnem);
-		if (i-dasmfcn)
-			(*i-dasmfcn)(i, ofs, instruct);
-		else if (i-mnem[0] == '?')
-			db_printf(???);
+		if (i) {
+			if (i-dasmfcn != coprDasm  i-dasmfcn != diagDasm 
+			i-dasmfcn != ariDasm  i-dasmfcn != scDasm 
+			i-dasmfcn != ldDasm)
+db_printf(%s, i-mnem);
+			if (i-dasmfcn)
+(*i-dasmfcn)(i, ofs, instruct);
+		} else {
+			db_printf(undefined subop);
+		}
 	} else
-		db_printf(???);
+		db_printf(undefined);
 
 	db_printf(\n);
 	return (loc + sizeof(instruct));



CVS commit: src/sys/ufs/chfs

2012-01-16 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Mon Jan 16 12:17:56 UTC 2012

Modified Files:
src/sys/ufs/chfs: chfs_wbuf.c

Log Message:
cleanup macros


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/ufs/chfs/chfs_wbuf.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/chfs/chfs_wbuf.c
diff -u src/sys/ufs/chfs/chfs_wbuf.c:1.2 src/sys/ufs/chfs/chfs_wbuf.c:1.3
--- src/sys/ufs/chfs/chfs_wbuf.c:1.2	Thu Nov 24 20:50:33 2011
+++ src/sys/ufs/chfs/chfs_wbuf.c	Mon Jan 16 12:17:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_wbuf.c,v 1.2 2011/11/24 20:50:33 agc Exp $	*/
+/*	$NetBSD: chfs_wbuf.c,v 1.3 2012/01/16 12:17:55 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -35,28 +35,19 @@
 #include dev/flash/flash.h
 #include sys/uio.h
 #include chfs.h
-//#include /root/xipffs/netbsd.chfs/chfs.h
 
-#define DBG_WBUF 1
+#define DBG_WBUF 1		/* XXX unused, but should be */
 
 #define PAD(x) (((x)+3)~3)
 
-#define EB_ADDRESS(x) ( ((unsigned long)(x) / chmp-chm_ebh-eb_size) * chmp-chm_ebh-eb_size )
+#define EB_ADDRESS(x) ( rounddown((x), chmp-chm_ebh-eb_size) )
 
-#define PAGE_DIV(x) ( ((unsigned long)(x) / (unsigned long)(chmp-chm_wbuf_pagesize)) * (unsigned long)(chmp-chm_wbuf_pagesize) )
-#define PAGE_MOD(x) ( (unsigned long)(x) % (unsigned long)(chmp-chm_wbuf_pagesize) )
-
-/*
-// test functions
-int wbuf_test(void);
-void wbuf_test_erase_flash(struct chfs_mount*);
-void wbuf_test_callback(struct erase_instruction*);
-*/
+#define PAGE_DIV(x) ( rounddown((x), chmp-chm_wbuf_pagesize) )
+#define PAGE_MOD(x) ( (x) % (chmp-chm_wbuf_pagesize) )
 
 #define NOPAD	0
 #define SETPAD	1
 
-
 /**
  * chfs_flush_wbuf - write wbuf to the flash
  * @chmp: super block info



CVS commit: src/sys/ufs/chfs

2012-01-16 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Mon Jan 16 12:28:47 UTC 2012

Modified Files:
src/sys/ufs/chfs: chfs_wbuf.c

Log Message:
use enum instead of macros
add some input validation
cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/chfs/chfs_wbuf.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/chfs/chfs_wbuf.c
diff -u src/sys/ufs/chfs/chfs_wbuf.c:1.3 src/sys/ufs/chfs/chfs_wbuf.c:1.4
--- src/sys/ufs/chfs/chfs_wbuf.c:1.3	Mon Jan 16 12:17:55 2012
+++ src/sys/ufs/chfs/chfs_wbuf.c	Mon Jan 16 12:28:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_wbuf.c,v 1.3 2012/01/16 12:17:55 ahoka Exp $	*/
+/*	$NetBSD: chfs_wbuf.c,v 1.4 2012/01/16 12:28:47 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -45,54 +45,65 @@
 #define PAGE_DIV(x) ( rounddown((x), chmp-chm_wbuf_pagesize) )
 #define PAGE_MOD(x) ( (x) % (chmp-chm_wbuf_pagesize) )
 
-#define NOPAD	0
-#define SETPAD	1
+enum {
+	WBUF_NOPAD,
+	WBUF_SETPAD
+};
 
 /**
  * chfs_flush_wbuf - write wbuf to the flash
  * @chmp: super block info
- * @pad: padding (NOPAD / SETPAD)
+ * @pad: padding (WBUF_NOPAD / WBUF_SETPAD)
  * Returns zero in case of success.
  */
 static int
 chfs_flush_wbuf(struct chfs_mount *chmp, int pad)
 {
-	int ret=0;
-	size_t retlen = 0;
+	int ret;
+	size_t retlen;
+	struct chfs_node_ref *nref;
+	struct chfs_flash_padding_node* padnode;
 
 	KASSERT(mutex_owned(chmp-chm_lock_mountfields));
 	KASSERT(mutex_owned(chmp-chm_lock_sizes));
 	KASSERT(rw_write_held(chmp-chm_lock_wbuf));
+	KASSERT(pad == WBUF_SETPAD || pad == WBUF_NOPAD);
 
-	if (pad) {
+	if (pad == WBUF_SETPAD) {
 		chmp-chm_wbuf_len = PAD(chmp-chm_wbuf_len);
-		memset(chmp-chm_wbuf + chmp-chm_wbuf_len, 0, chmp-chm_wbuf_pagesize - chmp-chm_wbuf_len);
+		memset(chmp-chm_wbuf + chmp-chm_wbuf_len, 0,
+		chmp-chm_wbuf_pagesize - chmp-chm_wbuf_len);
 
-		struct chfs_flash_padding_node* padnode = (void*)(chmp-chm_wbuf + chmp-chm_wbuf_len);
+		padnode = (void *)(chmp-chm_wbuf + chmp-chm_wbuf_len);
 		padnode-magic = htole16(CHFS_FS_MAGIC_BITMASK);
 		padnode-type = htole16(CHFS_NODETYPE_PADDING);
-		padnode-length = htole32(chmp-chm_wbuf_pagesize - chmp-chm_wbuf_len);
-		padnode-hdr_crc = htole32(crc32(0, (uint8_t *)padnode, sizeof(*padnode)-4));
+		padnode-length = htole32(chmp-chm_wbuf_pagesize
+		- chmp-chm_wbuf_len);
+		padnode-hdr_crc = htole32(crc32(0, (uint8_t *)padnode,
+			sizeof(*padnode)-4));
 
-		struct chfs_node_ref *nref;
 		nref = chfs_alloc_node_ref(chmp-chm_nextblock);
 		nref-nref_offset = chmp-chm_wbuf_ofs + chmp-chm_wbuf_len;
 		nref-nref_offset = CHFS_GET_OFS(nref-nref_offset) |
 		CHFS_OBSOLETE_NODE_MASK;
 		chmp-chm_wbuf_len = chmp-chm_wbuf_pagesize;
 
-		chfs_change_size_free(chmp, chmp-chm_nextblock, -padnode-length);
-		chfs_change_size_wasted(chmp, chmp-chm_nextblock, padnode-length);
+		chfs_change_size_free(chmp, chmp-chm_nextblock,
+		-padnode-length);
+		chfs_change_size_wasted(chmp, chmp-chm_nextblock,
+		padnode-length);
 	}
 
-	ret = chfs_write_leb(chmp, chmp-chm_nextblock-lnr, chmp-chm_wbuf, chmp-chm_wbuf_ofs, chmp-chm_wbuf_len, retlen);
-	if(ret) {
+	ret = chfs_write_leb(chmp, chmp-chm_nextblock-lnr, chmp-chm_wbuf,
+	chmp-chm_wbuf_ofs, chmp-chm_wbuf_len, retlen);
+	if (ret) {
 		return ret;
 	}
 
-	memset(chmp-chm_wbuf,0xff,chmp-chm_wbuf_pagesize);
+	memset(chmp-chm_wbuf, 0xff, chmp-chm_wbuf_pagesize);
 	chmp-chm_wbuf_ofs += chmp-chm_wbuf_pagesize;
 	chmp-chm_wbuf_len = 0;
+
 	return 0;
 }
 
@@ -156,7 +167,7 @@ chfs_write_wbuf(struct chfs_mount* chmp,
 
 	if (EB_ADDRESS(to) != EB_ADDRESS(chmp-chm_wbuf_ofs)) {
 		if (chmp-chm_wbuf_len) {
-			ret = chfs_flush_wbuf(chmp, SETPAD);
+			ret = chfs_flush_wbuf(chmp, WBUF_SETPAD);
 			if (ret)
 goto outerr;
 		}
@@ -179,7 +190,7 @@ chfs_write_wbuf(struct chfs_mount* chmp,
 		/* take care of alignement to next page*/
 		if (!chmp-chm_wbuf_len) {
 			chmp-chm_wbuf_len += chmp-chm_wbuf_pagesize;
-			ret = chfs_flush_wbuf(chmp, NOPAD);
+			ret = chfs_flush_wbuf(chmp, WBUF_NOPAD);
 			if (ret)
 goto outerr;
 		}
@@ -193,7 +204,7 @@ chfs_write_wbuf(struct chfs_mount* chmp,
 
 		wbuf_retlen = chfs_fill_wbuf(chmp, v, vlen);
 		if (chmp-chm_wbuf_len == chmp-chm_wbuf_pagesize) {
-			ret = chfs_flush_wbuf(chmp, NOPAD);
+			ret = chfs_flush_wbuf(chmp, WBUF_NOPAD);
 			if (ret) {
 goto outerr;
 			}
@@ -213,14 +224,14 @@ chfs_write_wbuf(struct chfs_mount* chmp,
 		}
 		wbuf_retlen = chfs_fill_wbuf(chmp, v, vlen);
 		if (chmp-chm_wbuf_len == chmp-chm_wbuf_pagesize) {
-			ret = chfs_flush_wbuf(chmp, NOPAD);
+			ret = chfs_flush_wbuf(chmp, WBUF_NOPAD);
 			if (ret)
 goto outerr;
 		}
 
 		// if we write the last vector, we flush with padding
 		/*if (invec == count-1) {
-		  ret = chfs_flush_wbuf(chmp, SETPAD);
+		  ret = chfs_flush_wbuf(chmp, WBUF_SETPAD);
 		  if (ret)
 		  goto outerr;
 		  }*/
@@ -243,7 

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

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 14:43:10 UTC 2012

Modified Files:
src/sys/arch/i386/conf: GENERIC

Log Message:
add cir@emdtv


To generate a diff of this commit:
cvs rdiff -u -r1.1064 -r1.1065 src/sys/arch/i386/conf/GENERIC

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

Modified files:

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1064 src/sys/arch/i386/conf/GENERIC:1.1065
--- src/sys/arch/i386/conf/GENERIC:1.1064	Sun Jan 15 15:05:06 2012
+++ src/sys/arch/i386/conf/GENERIC	Mon Jan 16 14:43:09 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1064 2012/01/15 15:05:06 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.1065 2012/01/16 14:43:09 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1064 $
+#ident 		GENERIC-$Revision: 1.1065 $
 
 maxusers	64		# estimated number of users
 
@@ -1435,6 +1435,7 @@ auvitek* at uhub?			# Auvitek AU0828 USB
 coram*	at pci? dev ? function ?	# Conexant CX23885 PCI-E TV
 cxdtv*	at pci? dev ? function ?	# Conexant CX2388[0-3] PCI TV
 emdtv*	at uhub?			# Empia EM28xx USB TV
+cir*	at emdtv?
 pseye*	at uhub?			# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?			# USB Video Class capture devices
 



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

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 14:44:07 UTC 2012

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
add irmce(4), cir@irmce, and cir@emdtv


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/amd64/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.344 src/sys/arch/amd64/conf/GENERIC:1.345
--- src/sys/arch/amd64/conf/GENERIC:1.344	Sun Jan 15 15:05:07 2012
+++ src/sys/arch/amd64/conf/GENERIC	Mon Jan 16 14:44:07 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.344 2012/01/15 15:05:07 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.345 2012/01/16 14:44:07 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/amd64/conf/std.amd64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.344 $
+#ident 		GENERIC-$Revision: 1.345 $
 
 maxusers	64		# estimated number of users
 
@@ -882,6 +882,10 @@ irframe* at stuirda?
 ustir*	at uhub? port ?
 irframe* at ustir?
 
+# Windows Media Center IR transceiver
+irmce*	at uhub? port ?
+cir*	at irmce?
+
 # USB Ethernet adapters
 aue*	at uhub? port ?		# ADMtek AN986 Pegasus based adapters
 axe*	at uhub? port ?		# ASIX AX88172 based adapters
@@ -1052,6 +1056,7 @@ auvitek* at uhub?			# Auvitek AU0828 USB
 coram*	at pci? dev ? function ?	# Conexant CX23885 PCI-E TV
 cxdtv*	at pci? dev ? function ?	# Conexant CX2388[0-3] PCI TV
 emdtv*	at uhub?			# Empia EM28xx USB TV
+cir*	at emdtv?
 pseye*	at uhub?			# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?			# USB Video Class capture devices
 



CVS commit: src/lib/libedit

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 14:57:46 UTC 2012

Modified Files:
src/lib/libedit: vi.c

Log Message:
PR/45843: Henning Petersen: Fix resource leak on error.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/vi.c

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

Modified files:

Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.42 src/lib/libedit/vi.c:1.43
--- src/lib/libedit/vi.c:1.42	Fri Nov 18 15:24:21 2011
+++ src/lib/libedit/vi.c	Mon Jan 16 09:57:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vi.c,v 1.42 2011/11/18 20:24:21 christos Exp $	*/
+/*	$NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)vi.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: vi.c,v 1.42 2011/11/18 20:24:21 christos Exp $);
+__RCSID($NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -1006,9 +1006,9 @@ vi_histedit(EditLine *el, Int c __attrib
 	ssize_t st;
 	int status;
 	char tempfile[] = /tmp/histedit.XX;
-	char *cp;
+	char *cp = NULL;
 	size_t len;
-	Char *line;
+	Char *line = NULL;
 
 	if (el-el_state.doingarg) {
 		if (vi_to_history_line(el, 0) == CC_ERROR)
@@ -1021,16 +1021,11 @@ vi_histedit(EditLine *el, Int c __attrib
 	len = (size_t)(el-el_line.lastchar - el-el_line.buffer);
 #define TMP_BUFSIZ (EL_BUFSIZ * MB_LEN_MAX)
 	cp = el_malloc(TMP_BUFSIZ * sizeof(*cp));
-	if (cp == NULL) {
-		unlink(tempfile);
-		close(fd);
-		return CC_ERROR;
-	}
+	if (cp == NULL)
+		goto error;
 	line = el_malloc(len * sizeof(*line) + 1);
-	if (line == NULL) {
-		el_free(cp);
-		return CC_ERROR;
-	}
+	if (line == NULL)
+		goto error;
 	Strncpy(line, el-el_line.buffer, len);
 	line[len] = '\0';
 	ct_wcstombs(cp, line, TMP_BUFSIZ - 1);
@@ -1041,11 +1036,7 @@ vi_histedit(EditLine *el, Int c __attrib
 	pid = fork();
 	switch (pid) {
 	case -1:
-		close(fd);
-		unlink(tempfile);
-		el_free(cp);
-el_free(line);
-		return CC_ERROR;
+		goto error;
 	case 0:
 		close(fd);
 		execlp(vi, vi, tempfile, (char *)NULL);
@@ -1076,6 +1067,12 @@ vi_histedit(EditLine *el, Int c __attrib
 	unlink(tempfile);
 	/* return CC_REFRESH; */
 	return ed_newline(el, 0);
+error:
+	el_free(line);
+	el_free(cp);
+	close(fd);
+	unlink(tempfile);
+	return CC_ERROR;
 }
 
 /* vi_history_word():



CVS commit: src/sys/dev/pci

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 15:33:50 UTC 2012

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

Log Message:
Only match supported boards.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/cxdtv.c

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

Modified files:

Index: src/sys/dev/pci/cxdtv.c
diff -u src/sys/dev/pci/cxdtv.c:1.9 src/sys/dev/pci/cxdtv.c:1.10
--- src/sys/dev/pci/cxdtv.c:1.9	Mon Sep 26 18:07:37 2011
+++ src/sys/dev/pci/cxdtv.c	Mon Jan 16 15:33:50 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cxdtv.c,v 1.9 2011/09/26 18:07:37 jakllsch Exp $ */
+/* $NetBSD: cxdtv.c,v 1.10 2012/01/16 15:33:50 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cxdtv.c,v 1.9 2011/09/26 18:07:37 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: cxdtv.c,v 1.10 2012/01/16 15:33:50 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -161,20 +161,21 @@ static int
 cxdtv_match(device_t parent, cfdata_t match, void *aux)
 {
 	const struct pci_attach_args *pa;
+	pcireg_t reg;
 
 	pa = aux;
 
 	if (PCI_VENDOR(pa-pa_id) != PCI_VENDOR_CONEXANT)
 		return 0;
 
-	switch (PCI_PRODUCT(pa-pa_id)) {
-	case PCI_PRODUCT_CONEXANT_CX2388XMPEG:
-		return 1;
-	}
+	if (PCI_PRODUCT(pa-pa_id) != PCI_PRODUCT_CONEXANT_CX2388XMPEG)
+		return 0;
 
-	/* XXX only match supported boards */
+	reg = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_SUBSYS_ID_REG);
+	if (cxdtv_board_lookup(PCI_VENDOR(reg), PCI_PRODUCT(reg)) == NULL)
+		return 0;
 
-	return 0;
+	return 1;
 }
 
 static void
@@ -201,11 +202,8 @@ cxdtv_attach(device_t parent, device_t s
 	sc-sc_product = PCI_PRODUCT(reg);
 
 	sc-sc_board = cxdtv_board_lookup(sc-sc_vendor, sc-sc_product);
+	KASSERT(sc-sc_board != NULL);
 
-	if (sc-sc_board == NULL) {
-		aprint_error_dev(self ,unsupported device 0x%08x\n, reg);
-		return;
-	}
 
 	pci_devinfo(reg, pa-pa_class, 0, devinfo, sizeof(devinfo));
 	aprint_normal(: %s (rev. 0x%02x)\n, devinfo, PCI_REVISION(pa-pa_class));



CVS commit: src

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:38:16 UTC 2012

Modified Files:
src/games/battlestar: getcom.c
src/sbin/routed: parms.c
src/usr.bin/mail: edit.c
src/usr.bin/tftp: main.c
src/usr.sbin/timed/timedc: timedc.c

Log Message:
PR/45842: Henning Petersen: compare fgets with NULL not 0


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/battlestar/getcom.c
cvs rdiff -u -r1.25 -r1.26 src/sbin/routed/parms.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/mail/edit.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/tftp/main.c
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/timed/timedc/timedc.c

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

Modified files:

Index: src/games/battlestar/getcom.c
diff -u src/games/battlestar/getcom.c:1.13 src/games/battlestar/getcom.c:1.14
--- src/games/battlestar/getcom.c:1.13	Fri Jul  1 02:04:54 2005
+++ src/games/battlestar/getcom.c	Mon Jan 16 12:38:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $	*/
+/*	$NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)getcom.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $);
+__RCSID($NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $);
 #endif
 #endif/* not lint */
 
@@ -45,7 +45,7 @@ getcom(char *buf, int size, const char *
 {
 	for (;;) {
 		fputs(prompt, stdout);
-		if (fgets(buf, size, stdin) == 0) {
+		if (fgets(buf, size, stdin) == NULL) {
 			if (feof(stdin))
 die();
 			clearerr(stdin);

Index: src/sbin/routed/parms.c
diff -u src/sbin/routed/parms.c:1.25 src/sbin/routed/parms.c:1.26
--- src/sbin/routed/parms.c:1.25	Tue May 24 08:03:04 2011
+++ src/sbin/routed/parms.c	Mon Jan 16 12:38:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $	*/
+/*	$NetBSD: parms.c,v 1.26 2012/01/16 17:38:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #include sys/stat.h
 
 #ifdef __NetBSD__
-__RCSID($NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $);
+__RCSID($NetBSD: parms.c,v 1.26 2012/01/16 17:38:16 christos Exp $);
 #elif defined(__FreeBSD__)
 __RCSID($FreeBSD$);
 #else
@@ -192,7 +192,7 @@ gwkludge(void)
 	}
 
 	for (lnum = 1; ; lnum++) {
-		if (0 == fgets(lbuf, sizeof(lbuf), fp))
+		if (fgets(lbuf, sizeof(lbuf), fp) == NULL)
 			break;
 		lptr = lbuf;
 		while (*lptr == ' ')

Index: src/usr.bin/mail/edit.c
diff -u src/usr.bin/mail/edit.c:1.25 src/usr.bin/mail/edit.c:1.26
--- src/usr.bin/mail/edit.c:1.25	Fri Apr 10 09:08:24 2009
+++ src/usr.bin/mail/edit.c	Mon Jan 16 12:38:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: edit.c,v 1.25 2009/04/10 13:08:24 christos Exp $	*/
+/*	$NetBSD: edit.c,v 1.26 2012/01/16 17:38:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)edit.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: edit.c,v 1.25 2009/04/10 13:08:24 christos Exp $);
+__RCSID($NetBSD: edit.c,v 1.26 2012/01/16 17:38:16 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -172,7 +172,7 @@ edit1(int *msgvec, int editortype)
 			char *p;
 
 			(void)printf(Edit message %d [ynq]? , msgvec[i]);
-			if (fgets(buf, (int)sizeof(buf), stdin) == 0)
+			if (fgets(buf, (int)sizeof(buf), stdin) == NULL)
 break;
 			p = skip_WSP(buf);
 			if (*p == 'q')

Index: src/usr.bin/tftp/main.c
diff -u src/usr.bin/tftp/main.c:1.29 src/usr.bin/tftp/main.c:1.30
--- src/usr.bin/tftp/main.c:1.29	Sat Sep 17 11:15:46 2011
+++ src/usr.bin/tftp/main.c	Mon Jan 16 12:38:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.29 2011/09/17 15:15:46 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: main.c,v 1.29 2011/09/17 15:15:46 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -662,7 +662,7 @@ command(void)
 
 	for (;;) {
 		(void)printf(%s , prompt);
-		if (fgets(line, LBUFLEN, stdin) == 0) {
+		if (fgets(line, LBUFLEN, stdin) == NULL) {
 			if (feof(stdin)) {
 exit(0);
 			} else {

Index: src/usr.sbin/timed/timedc/timedc.c
diff -u src/usr.sbin/timed/timedc/timedc.c:1.21 src/usr.sbin/timed/timedc/timedc.c:1.22
--- src/usr.sbin/timed/timedc/timedc.c:1.21	Mon Jul 21 09:37:00 2008
+++ src/usr.sbin/timed/timedc/timedc.c	Mon Jan 16 12:38:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: timedc.c,v 1.21 2008/07/21 13:37:00 lukem Exp $	*/
+/*	$NetBSD: timedc.c,v 1.22 2012/01/16 17:38:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1985, 19
 #if 0
 static char sccsid[] = 

CVS commit: src/sys/dev/ic

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jan 16 17:58:03 UTC 2012

Modified Files:
src/sys/dev/ic: tulipreg.h

Log Message:
Add DECchip EB140 reference design GPIO definitions.
From document EC-QD2SA-TE.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/tulipreg.h

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

Modified files:

Index: src/sys/dev/ic/tulipreg.h
diff -u src/sys/dev/ic/tulipreg.h:1.36 src/sys/dev/ic/tulipreg.h:1.37
--- src/sys/dev/ic/tulipreg.h:1.36	Fri Aug 28 15:29:16 2009
+++ src/sys/dev/ic/tulipreg.h	Mon Jan 16 17:58:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tulipreg.h,v 1.36 2009/08/28 15:29:16 dyoung Exp $	*/
+/*	$NetBSD: tulipreg.h,v 1.37 2012/01/16 17:58:02 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -908,6 +908,23 @@ struct tulip_desc {
 #define GPP_COGENT_EM1x0_PINS	0x3f	/* General Purpose Pin directions */
 #define GPP_COGENT_EM1x0_INIT	0x09	/* No loopback --- point-to-point */
 
+/*
+ * Digital EB140 21140 reference design.
+ * MC68832 + ML6671 for 100Mb/s.  LXT901 for 10Mb/s.
+ *
+ * (From document EC-QD2SA-TE, figure 1-3.)
+ */
+#define	GPP_EB140_OUTPUTS	0x1f	/* these GPP pins are driven */
+#define	GPP_EB140_MC68832_LB	0x01	/* 100Mb/s loopback disable 1 */
+#define	GPP_EB140_ML6671_LB	0x02	/* 100Mb/s loopback disable 2 */
+#define	GPP_EB140_LXT901_ILB	0x04	/* 10Mb/s internal LB enable */
+#define	GPP_EB140_LXT901_ELB	0x08	/* 10Mb/s external LB disable */
+#define	GPP_EB140_RESERVED	0x10	/* media switch relay on other boards */
+#define	GPP_EB140_MC68836_SYNC	0x20	/* synced to 100Mb/s PHY */
+#define	GPP_EB140_MC68836_LINK	0x40	/* 100Mb/s signal detect */
+#define	GPP_EB140_LXT901_LINK	0x80	/* 10Mb/s link pass */
+
+#define	GPP_EB140_INIT	(GPP_EB140_LXT901_ELB|GPP_EB140_ML6671_LB|GPP_EB140_MC68832_LB)
 
 /*
  * Digital Semiconductor 21040 registers.



CVS commit: src/sys/lib/libsa

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 18:44:13 UTC 2012

Modified Files:
src/sys/lib/libsa: Makefile ext2fs.c stand.h ufs.c
Added Files:
src/sys/lib/libsa: fnmatch.c minixfs3.c minixfs3.h

Log Message:
PR/45796: Evgeniy Ivanov minixfs3 support.
Split out fn_match since we have 3 copies now.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/lib/libsa/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libsa/ext2fs.c
cvs rdiff -u -r0 -r1.1 src/sys/lib/libsa/fnmatch.c \
src/sys/lib/libsa/minixfs3.c src/sys/lib/libsa/minixfs3.h
cvs rdiff -u -r1.74 -r1.75 src/sys/lib/libsa/stand.h
cvs rdiff -u -r1.56 -r1.57 src/sys/lib/libsa/ufs.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/lib/libsa/Makefile
diff -u src/sys/lib/libsa/Makefile:1.76 src/sys/lib/libsa/Makefile:1.77
--- src/sys/lib/libsa/Makefile:1.76	Sun Dec 25 01:09:08 2011
+++ src/sys/lib/libsa/Makefile	Mon Jan 16 13:44:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.76 2011/12/25 06:09:08 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.77 2012/01/16 18:44:13 christos Exp $
 
 LIB=	sa
 NOPIC=	# defined
@@ -75,6 +75,8 @@ SRCS+=	cd9660.c
 SRCS+=	ustarfs.c
 SRCS+=	dosfs.c
 SRCS+=	ext2fs.c
+SRCS+=	minixfs3.c
+SRCS+=	fnmatch.c
 # for historic compatibility ufs == ffsv1
 SRCS+=	ufs.c
 

Index: src/sys/lib/libsa/ext2fs.c
diff -u src/sys/lib/libsa/ext2fs.c:1.11 src/sys/lib/libsa/ext2fs.c:1.12
--- src/sys/lib/libsa/ext2fs.c:1.11	Sun Dec 25 01:09:08 2011
+++ src/sys/lib/libsa/ext2fs.c	Mon Jan 16 13:44:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs.c,v 1.11 2011/12/25 06:09:08 tsutsui Exp $	*/
+/*	$NetBSD: ext2fs.c,v 1.12 2012/01/16 18:44:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.
@@ -169,34 +169,6 @@ static const char*const typestr[] = 
 	LNK
 };
 
-static int
-fn_match(const char *fname, const char *pattern)
-{
-	char fc, pc;
-
-	do {
-		fc = *fname++;
-		pc = *pattern++;
-		if (!fc  !pc)
-			return 1;
-		if (pc == '?'  fc)
-			pc = fc;
-	} while (fc == pc);
-
-	if (pc != '*')
-		return 0;
-	/*
-	 * Too hard (and unnecessary really) too check for *?name etc
-	 * ** will look for a '*' and *? a '?'
-	 */
-	pc = *pattern++;
-	if (!pc)
-		return 1;
-	while ((fname = strchr(fname, pc)))
-		if (fn_match(++fname, pattern))
-			return 1;
-	return 0;
-}
 #endif /* LIBSA_ENABLE_LS_OP */
 
 static int read_inode(ino32_t, struct open_file *);
@@ -903,7 +875,7 @@ ext2fs_ls(struct open_file *f, const cha
 printf(bad dir entry\n);
 goto out;
 			}
-			if (pattern  !fn_match(dp-e2d_name, pattern))
+			if (pattern  !fnmatch(dp-e2d_name, pattern))
 continue;
 			n = alloc(sizeof *n + strlen(dp-e2d_name));
 			if (!n) {

Index: src/sys/lib/libsa/stand.h
diff -u src/sys/lib/libsa/stand.h:1.74 src/sys/lib/libsa/stand.h:1.75
--- src/sys/lib/libsa/stand.h:1.74	Sun Dec 25 01:09:08 2011
+++ src/sys/lib/libsa/stand.h	Mon Jan 16 13:44:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stand.h,v 1.74 2011/12/25 06:09:08 tsutsui Exp $	*/
+/*	$NetBSD: stand.h,v 1.75 2012/01/16 18:44:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -320,6 +320,8 @@ off_t	olseek(int, off_t, int);
 
 extern const char hexdigits[];
 
+int	fnmatch(const char *, const char *);
+
 /* XXX: These should be removed eventually. */
 void	bcopy(const void *, void *, size_t);
 void	bzero(void *, size_t);

Index: src/sys/lib/libsa/ufs.c
diff -u src/sys/lib/libsa/ufs.c:1.56 src/sys/lib/libsa/ufs.c:1.57
--- src/sys/lib/libsa/ufs.c:1.56	Sun Dec 25 01:09:08 2011
+++ src/sys/lib/libsa/ufs.c	Mon Jan 16 13:44:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs.c,v 1.56 2011/12/25 06:09:08 tsutsui Exp $	*/
+/*	$NetBSD: ufs.c,v 1.57 2012/01/16 18:44:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -208,35 +208,6 @@ static const char*const typestr[] = 
 	0,
 	WHT
 };
-
-static int
-fn_match(const char *fname, const char *pattern)
-{
-	char fc, pc;
-
-	do {
-		fc = *fname++;
-		pc = *pattern++;
-		if (!fc  !pc)
-			return 1;
-		if (pc == '?'  fc)
-			pc = fc;
-	} while (fc == pc);
-
-	if (pc != '*')
-		return 0;
-	/*
-	 * Too hard (and unnecessary really) too check for *?name etc
-	 * ** will look for a '*' and *? a '?'
-	 */
-	pc = *pattern++;
-	if (!pc)
-		return 1;
-	while ((fname = strchr(fname, pc)))
-		if (fn_match(++fname, pattern))
-			return 1;
-	return 0;
-}
 #endif /* LIBSA_ENABLE_LS_OP */
 
 #ifdef LIBSA_LFS
@@ -954,7 +925,7 @@ ufs_ls(struct open_file *f, const char *
 printf(bad dir entry\n);
 goto out;
 			}
-			if (pattern  !fn_match(dp-d_name, pattern))
+			if (pattern  !fnmatch(dp-d_name, pattern))
 continue;
 			n = alloc(sizeof *n + strlen(dp-d_name));
 			if (!n) {

Added files:

Index: src/sys/lib/libsa/fnmatch.c
diff -u /dev/null src/sys/lib/libsa/fnmatch.c:1.1
--- /dev/null	Mon Jan 16 13:44:13 2012
+++ src/sys/lib/libsa/fnmatch.c	Mon Jan 16 13:44:13 2012
@@ -0,0 

CVS commit: src

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 18:47:58 UTC 2012

Modified Files:
src/common/lib/libutil: getfstypename.c
src/sys/arch/i386/stand/lib: biosdisk.c
src/sys/lib/libkern: xlat_mbr_fstype.c
src/sys/sys: disk.h disklabel.h

Log Message:
PR/45796: Evgeniy Ivanov minixfs3 support.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libutil/getfstypename.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/xlat_mbr_fstype.c
cvs rdiff -u -r1.55 -r1.56 src/sys/sys/disk.h
cvs rdiff -u -r1.111 -r1.112 src/sys/sys/disklabel.h

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

Modified files:

Index: src/common/lib/libutil/getfstypename.c
diff -u src/common/lib/libutil/getfstypename.c:1.5 src/common/lib/libutil/getfstypename.c:1.6
--- src/common/lib/libutil/getfstypename.c:1.5	Mon Nov 14 11:21:44 2011
+++ src/common/lib/libutil/getfstypename.c	Mon Jan 16 13:47:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $	*/
+/*	$NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -39,10 +39,10 @@
 # include sys/cdefs.h
 # ifndef _KERNEL
 #  if !defined(lint)
-__RCSID($NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $);
+__RCSID($NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $);
 #  endif
 # else
-__KERNEL_RCSID(0, $NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $);
 # endif /* _KERNEL */
 
 # define FSTYPE_ENUMNAME fstype_enum
@@ -121,6 +121,8 @@ getfstypename(int fstype)
 		return DKW_PTYPE_CGD;
 	case FSMAXTYPES:
 		return DKW_PTYPE_UNKNOWN;
+	case FS_MINIXFS3:
+		return DKW_PTYPE_MINIXFS3;
 	}
 	/* Stupid gcc, should know it is impossible to get here */
 	return DKW_PTYPE_UNKNOWN;

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.39 src/sys/arch/i386/stand/lib/biosdisk.c:1.40
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.39	Wed Sep 21 04:57:12 2011
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Mon Jan 16 13:47:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.39 2011/09/21 08:57:12 gsutre Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.40 2012/01/16 18:47:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -404,6 +404,40 @@ check_label(struct biosdisk *d, daddr_t 
 }
 
 static int
+read_minix_subp(struct biosdisk *d, struct disklabel* dflt_lbl,
+			int this_ext, daddr_t sector)
+{
+	struct mbr_partition mbr[MBR_PART_COUNT];
+	int i;
+	int typ;
+	struct partition *p;
+
+	if (readsects(d-ll, sector, 1, d-buf, 0)) {
+#ifdef DISK_DEBUG
+		printf(Error reading MFS sector %d\n, sector);
+#endif
+		return EIO;
+	}
+	if ((uint8_t)d-buf[510] != 0x55 || (uint8_t)d-buf[511] != 0xAA) {
+		return -1;
+	}
+	memcpy(mbr, ((struct mbr_sector *)d-buf)-mbr_parts, sizeof(mbr));
+	for (i = 0; i  MBR_PART_COUNT; i++) {
+		typ = mbr[i].mbrp_type;
+		if (typ == 0)
+			continue;
+		sector = this_ext + mbr[i].mbrp_start;
+		if (dflt_lbl-d_npartitions = MAXPARTITIONS)
+			continue;
+		p = dflt_lbl-d_partitions[dflt_lbl-d_npartitions++];
+		p-p_offset = sector;
+		p-p_size = mbr[i].mbrp_size;
+		p-p_fstype = xlat_mbr_fstype(typ);
+	}
+	return 0;
+}
+
+static int
 read_label(struct biosdisk *d)
 {
 	struct disklabel dflt_lbl;
@@ -452,6 +486,13 @@ read_label(struct biosdisk *d)
 #ifdef DISK_DEBUG
 			printf(ptn type %d in sector %d\n, typ, sector);
 #endif
+if (typ == MBR_PTYPE_MINIX_14B) {
+if (!read_minix_subp(d, dflt_lbl,
+		   this_ext, sector)) {
+	/* Don't add container partition */
+	continue;
+}
+			}
 			if (typ == MBR_PTYPE_NETBSD) {
 error = check_label(d, sector);
 if (error = 0)

Index: src/sys/lib/libkern/xlat_mbr_fstype.c
diff -u src/sys/lib/libkern/xlat_mbr_fstype.c:1.7 src/sys/lib/libkern/xlat_mbr_fstype.c:1.8
--- src/sys/lib/libkern/xlat_mbr_fstype.c:1.7	Mon Apr 28 16:24:06 2008
+++ src/sys/lib/libkern/xlat_mbr_fstype.c	Mon Jan 16 13:47:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xlat_mbr_fstype.c,v 1.7 2008/04/28 20:24:06 martin Exp $	*/
+/*	$NetBSD: xlat_mbr_fstype.c,v 1.8 2012/01/16 18:47:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0,$NetBSD: xlat_mbr_fstype.c,v 1.7 2008/04/28 20:24:06 martin Exp $);
+__KERNEL_RCSID(0,$NetBSD: xlat_mbr_fstype.c,v 1.8 2012/01/16 18:47:57 christos Exp $);
 
 
 #include sys/disklabel.h
@@ -55,6 +55,7 @@ xlat_mbr_fstype(int mbr_type)
 		{ MBR_PTYPE_LNXSWAP,	FS_SWAP },
 		{ MBR_PTYPE_NETBSD,	FS_BSDFFS },
 		{ MBR_PTYPE_NTFS,	FS_NTFS },
+		{ MBR_PTYPE_MINIX_14B,	FS_MINIXFS3 },
 		{ 0,			FS_OTHER }
 	};
 	const struct ptn_types *pt;

Index: src/sys/sys/disk.h
diff 

CVS commit: src/sys/kern

2012-01-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 16 19:42:40 UTC 2012

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

Log Message:
Include autoconfig info interface-attributes, locators) in device property
dictionaries.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/kern/subr_autoconf.c

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

Modified files:

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.220 src/sys/kern/subr_autoconf.c:1.221
--- src/sys/kern/subr_autoconf.c:1.220	Wed Aug 31 18:31:02 2011
+++ src/sys/kern/subr_autoconf.c	Mon Jan 16 19:42:40 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.220 2011/08/31 18:31:02 plunky Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.221 2012/01/16 19:42:40 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.220 2011/08/31 18:31:02 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.221 2012/01/16 19:42:40 pgoyette Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddb.h
@@ -169,6 +169,7 @@ static void config_alldevs_unlock(int);
 static int config_alldevs_lock(void);
 static void config_alldevs_enter(struct alldevs_foray *);
 static void config_alldevs_exit(struct alldevs_foray *);
+static void config_add_attrib_dict(device_t);
 
 static void config_collect_garbage(struct devicelist *);
 static void config_dump_garbage(struct devicelist *);
@@ -1390,10 +1391,92 @@ config_devalloc(const device_t parent, c
 	prop_dictionary_set_uint16(dev-dv_properties,
 	device-unit, dev-dv_unit);
 
+	if (dev-dv_cfdriver-cd_attrs != NULL)
+		config_add_attrib_dict(dev);
+
 	return dev;
 }
 
 /*
+ * Create an array of device attach attributes and add it
+ * to the device's dv_properties dictionary.
+ *
+ * keyinterface-attributes/key
+ * array
+ *dict
+ *   keyattribute-name/key
+ *   stringfoo/string
+ *   keylocators/key
+ *   array
+ *  dict
+ * keyloc-name/key
+ * stringfoo-loc1/string
+ *  /dict
+ *  dict
+ * keyloc-name/key
+ * stringfoo-loc2/string
+ * keydefault/key
+ * stringfoo-loc2-default/string
+ *  /dict
+ *  ...
+ *   /array
+ */dict
+ *...
+ * /array
+ */
+
+static void
+config_add_attrib_dict(device_t dev)
+{
+	int i, j;
+	const struct cfiattrdata *ci;
+	prop_dictionary_t attr_dict, loc_dict;
+	prop_array_t attr_array, loc_array;
+
+	if ((attr_array = prop_array_create()) == NULL)
+		return;
+
+	for (i = 0; ; i++) {
+		if ((ci = dev-dv_cfdriver-cd_attrs[i]) == NULL)
+			break;
+		if ((attr_dict = prop_dictionary_create()) == NULL)
+			break;
+		prop_dictionary_set_cstring_nocopy(attr_dict, attribute-name,
+		ci-ci_name);
+
+		/* Create an array of the locator names and defaults */
+
+		if (ci-ci_loclen != 0 
+		(loc_array = prop_array_create()) != NULL) {
+			for (j = 0; j  ci-ci_loclen; j++) {
+loc_dict = prop_dictionary_create();
+if (loc_dict == NULL)
+	continue;
+prop_dictionary_set_cstring_nocopy(loc_dict,
+loc-name, ci-ci_locdesc[j].cld_name);
+if (ci-ci_locdesc[j].cld_defaultstr != NULL)
+	prop_dictionary_set_cstring_nocopy(
+	loc_dict, default,
+	ci-ci_locdesc[j].cld_defaultstr);
+prop_array_set(loc_array, j, loc_dict);
+prop_object_release(loc_dict);
+			}
+			prop_dictionary_set_and_rel(attr_dict, locators,
+			loc_array);
+		}
+		prop_array_add(attr_array, attr_dict);
+		prop_object_release(attr_dict);
+	}
+	if (i == 0)
+		prop_object_release(attr_array);
+	else
+		prop_dictionary_set_and_rel(dev-dv_properties,
+		interface-attributes, attr_array);
+
+	return;
+}
+
+/*
  * Attach a found device.
  */
 device_t



CVS commit: src/sbin/drvctl

2012-01-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 16 19:43:50 UTC 2012

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

Log Message:
Enhance drvctl -p processing to handle new autoconfig info in property
dictionaries.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/drvctl/drvctl.8
cvs rdiff -u -r1.14 -r1.15 src/sbin/drvctl/drvctl.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/drvctl/drvctl.8
diff -u src/sbin/drvctl/drvctl.8:1.12 src/sbin/drvctl/drvctl.8:1.13
--- src/sbin/drvctl/drvctl.8:1.12	Sun Aug  7 13:00:35 2011
+++ src/sbin/drvctl/drvctl.8	Mon Jan 16 19:43:50 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: drvctl.8,v 1.12 2011/08/07 13:00:35 jmcneill Exp $
+.\ $NetBSD: drvctl.8,v 1.13 2012/01/16 19:43:50 pgoyette Exp $
 .\
 .\ Copyright (c) 2004
 .\ 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd August 7, 2011
+.Dd January 16, 2012
 .Dt DRVCTL 8
 .Os
 .Sh NAME
@@ -44,6 +44,7 @@
 .Fl l
 .Op Ar device
 .Nm
+.Op Fl n
 .Fl p
 .Ar device
 .Op Ar property ...
@@ -72,6 +73,13 @@ attached to (and which defines the inter
 the locator information).
 This will only be needed in rare cases where the bus
 has multiple attributes.
+If there are multiple attributes, and one is not specified,
+.Nm
+will return an Invalid argument.
+In such cases, the
+.Fl p
+option can be used to determine the available interface
+attributes.
 .It Fl d
 Detach the device driver from the device given by the
 .Ar device
@@ -96,6 +104,9 @@ The second column is the child.
 Suppress first column in
 .Fl l
 output.
+Suppress non-XML headers in
+.Fl p
+output.
 .It Fl p
 Get properties for the device specified by the
 .Ar device
@@ -143,4 +154,4 @@ output.
 Currently, there is no good way to get information about locator
 lengths and default values (which is present at kernel configuration
 time) out of a running kernel.
-Thus the locator handling is less intelligent as it could be.
+Thus the locator handling is less intelligent than it could be.

Index: src/sbin/drvctl/drvctl.c
diff -u src/sbin/drvctl/drvctl.c:1.14 src/sbin/drvctl/drvctl.c:1.15
--- src/sbin/drvctl/drvctl.c:1.14	Wed Oct 19 22:13:46 2011
+++ src/sbin/drvctl/drvctl.c	Mon Jan 16 19:43:50 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: drvctl.c,v 1.14 2011/10/19 22:13:46 dyoung Exp $ */
+/* $NetBSD: drvctl.c,v 1.15 2012/01/16 19:43:50 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2004
@@ -44,7 +44,8 @@
 	  : O_RDONLY)
 
 __dead static void usage(void);
-static void extract_property(prop_dictionary_t, const char *);
+static void extract_property(prop_dictionary_t, const char *, bool);
+static void display_object(prop_object_t, bool);
 static void list_children(int, char *, bool, bool, int);
 
 static void
@@ -208,7 +209,7 @@ main(int argc, char **argv)
 			free(xml);
 		} else {
 			for (i = 1; i  argc; i++)
-extract_property(data_dict, argv[i]);
+extract_property(data_dict, argv[i], nflag);
 		}
 
 		prop_object_release(results_dict);
@@ -221,9 +222,9 @@ main(int argc, char **argv)
 }
 
 static void
-extract_property(prop_dictionary_t dict, const char *prop)
+extract_property(prop_dictionary_t dict, const char *prop, bool nflag)
 {
-	char *s, *p, *cur, *ep = NULL, *xml;
+	char *s, *p, *cur, *ep = NULL;
 	prop_object_t obj;
 
 	s = strdup(prop);
@@ -236,31 +237,7 @@ extract_property(prop_dictionary_t dict,
 exit(EXIT_FAILURE);
 		} else {
 			obj = prop_dictionary_get(dict, cur);
-			if (obj == NULL)
-exit(EXIT_FAILURE);
-			switch (prop_object_type(obj)) {
-			case PROP_TYPE_BOOL:
-printf(%s\n,
-prop_bool_true(obj) ? true : false);
-break;
-			case PROP_TYPE_NUMBER:
-printf(% PRId64 \n,
-prop_number_integer_value(obj));
-break;
-			case PROP_TYPE_STRING:
-printf(%s\n,
-prop_string_cstring_nocopy(obj));
-break;
-			case PROP_TYPE_DICTIONARY:
-xml = prop_dictionary_externalize(obj);
-printf(%s, xml);
-free(xml);
-break;
-			default:
-fprintf(stderr, unhandled type %d\n,
-prop_object_type(obj));
-exit(EXIT_FAILURE);
-			}
+			display_object(obj, nflag);
 		}
 	}
 
@@ -268,6 +245,43 @@ extract_property(prop_dictionary_t dict,
 }
 
 static void
+display_object(prop_object_t obj, bool nflag)
+{
+	char *xml;
+	prop_object_t next_obj;
+	prop_object_iterator_t iter;
+
+	if (obj == NULL)
+		exit(EXIT_FAILURE);
+	switch (prop_object_type(obj)) {
+	case PROP_TYPE_BOOL:
+		printf(%s\n, prop_bool_true(obj) ? true : false);
+		break;
+	case PROP_TYPE_NUMBER:
+		printf(% PRId64 \n, prop_number_integer_value(obj));
+		break;
+	case PROP_TYPE_STRING:
+		printf(%s\n, prop_string_cstring_nocopy(obj));
+		break;
+	case PROP_TYPE_DICTIONARY:
+		xml = prop_dictionary_externalize(obj);
+		printf(%s, xml);
+		free(xml);
+		break;
+	case PROP_TYPE_ARRAY:
+		iter = 

CVS commit: src/etc

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 22:12:41 UTC 2012

Modified Files:
src/etc: ntp.conf

Log Message:
Instead of using the general servers, use the ones allocated specifically
for the NetBSD project.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.12 src/etc/ntp.conf:1.13
--- src/etc/ntp.conf:1.12	Thu Jul 28 18:28:07 2011
+++ src/etc/ntp.conf	Mon Jan 16 17:12:41 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.12 2011/07/28 22:28:07 simonb Exp $
+# $NetBSD: ntp.conf,v 1.13 2012/01/16 22:12:41 christos Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -65,23 +65,12 @@ mdnstries	0
 #	http://www.pool.ntp.org/ 
 #
 
-# The country codes can help you find servers that are net-wise close.
-# As explained above, closer is better...
-
-# Northern U.S.A
-#server		ca.pool.ntp.org
-#server		0.us.pool.ntp.org
-#server		1.us.pool.ntp.org
-
-# Northern Europe
-#server		0.de.pool.ntp.org
-#server		1.de.pool.ntp.org
-#server		dk.pool.ntp.org
-
 # Depending on the vagaries of DNS can occasionally pull in the same
 # server twice. The following CNAMES are guaranteed to be disjoint, at
-# least over some short interval.
+# least over some short interval. The following servers are allocated
+# to the NetBSD project.
 
-server		0.pool.ntp.org
-server		1.pool.ntp.org
-server		2.pool.ntp.org
+server		0.netbsd.pool.ntp.org
+server		1.netbsd.pool.ntp.org
+server		2.netbsd.pool.ntp.org
+server		3.netbsd.pool.ntp.org



CVS commit: src/etc

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 22:20:45 UTC 2012

Modified Files:
src/etc: ntp.conf

Log Message:
use the join URL.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.13 src/etc/ntp.conf:1.14
--- src/etc/ntp.conf:1.13	Mon Jan 16 17:12:41 2012
+++ src/etc/ntp.conf	Mon Jan 16 17:20:45 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.13 2012/01/16 22:12:41 christos Exp $
+# $NetBSD: ntp.conf,v 1.14 2012/01/16 22:20:45 christos Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -62,7 +62,7 @@ mdnstries	0
 # join are a nailed-up connection and a static IP address. For details,
 # see the web page:
 #
-#	http://www.pool.ntp.org/ 
+#	http://www.pool.ntp.org/join.html
 #
 
 # Depending on the vagaries of DNS can occasionally pull in the same



CVS commit: src/external/bsd/atf/dist

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:37:01 UTC 2012

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

Log Message:
Import atf 0.15: the major goal of this import is to reconcile any local
changes to the atf codebase with upstream code.  All local changes should
have been backported, with appropriate portability workarounds where
necessary.

This new release also includes other changes though, such as performance
improvements and bug fixes, and also a major new feature partially
implemented by pgoyette@: the time to execute each test cases and test
program is now recorded and included in the output reports.

The import into NetBSD has been tested natively on amd64 and macppc, and
the full test suite has also been run through anita on amd64 and i386.
No regressions observed... but you never know.

From the NEWS file, the changes in this version are as follows:

Experimental version released on January 16th, 2012.

* Respect stdin in atf-check.  The previous release silenced stdin for any
  processes spawned by atf, not only test programs, which caused breakage
  in tests that pipe data through atf-check.

* Performance improvements to atf-sh.

* Enabled detection of unused parameters and variables in the code and
  fixed all warnings.

* Changed the behavior of developer mode.  Compiler warnings are now
  enabled unconditionally regardless of whether we are in developer mode or
  not; developer mode is now only used to perform strict warning checks and
  to enable assertions.  Additionally, developer mode is now only
  automatically enabled when building from the repository, not for formal
  releases.

* Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and
  ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag
  in configure scripts and detecting the presence of any of the ATF
  bindings.  Note that ATF_CHECK_SH was already introduced in 0.14, but it
  has now been modified to also honor --with-atf if instantiated.

* Added timing support to atf-run / atf-report.

* Added support for a 'require.memory' property, to specify the minimum
  amount of physical memory needed by the test case to yield valid results.

* PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by
  atf-report so that invalid data in the output of test cases does not
  mangle our report.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-15

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
C src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
C src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
C src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
C src/external/bsd/atf/dist/atf-c/detail/process.c
C src/external/bsd/atf/dist/atf-c/detail/process.h
U 

CVS commit: src/external/bsd/atf

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:42:40 UTC 2012

Modified Files:
src/external/bsd/atf: prepare-import.sh
src/external/bsd/atf/lib/libatf-c: Makefile bconfig.h
src/external/bsd/atf/lib/libatf-c++: Makefile
src/external/bsd/atf/usr.bin/atf-sh: Makefile

Log Message:
Update reachover build files and scripts to deal with the just-imported
atf 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/prepare-import.sh
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/atf/lib/libatf-c/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/lib/libatf-c/bconfig.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/usr.bin/atf-sh/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/bsd/atf/prepare-import.sh
diff -u src/external/bsd/atf/prepare-import.sh:1.5 src/external/bsd/atf/prepare-import.sh:1.6
--- src/external/bsd/atf/prepare-import.sh:1.5	Tue Jun 14 15:27:11 2011
+++ src/external/bsd/atf/prepare-import.sh	Mon Jan 16 22:42:40 2012
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: prepare-import.sh,v 1.5 2011/06/14 15:27:11 jmmv Exp $
+# $NetBSD: prepare-import.sh,v 1.6 2012/01/16 22:42:40 jmmv Exp $
 #
 # Use this script to recreate the 'dist' subdirectory from a newly released
 # distfile.  The script takes care of unpacking the distfile, removing any
@@ -16,7 +16,7 @@ CLEAN_PATTERNS=${CLEAN_PATTERNS} *.m4
 CLEAN_PATTERNS=${CLEAN_PATTERNS} INSTALL TODO
 CLEAN_PATTERNS=${CLEAN_PATTERNS} Makefile* */Makefile* */*/Makefile*
 CLEAN_PATTERNS=${CLEAN_PATTERNS} admin
-CLEAN_PATTERNS=${CLEAN_PATTERNS} atf-sh/atf-sh.m4
+CLEAN_PATTERNS=${CLEAN_PATTERNS} atf-*/atf-*.m4
 CLEAN_PATTERNS=${CLEAN_PATTERNS} bconfig.h.in
 CLEAN_PATTERNS=${CLEAN_PATTERNS} bootstrap
 CLEAN_PATTERNS=${CLEAN_PATTERNS} configure*

Index: src/external/bsd/atf/lib/libatf-c/Makefile
diff -u src/external/bsd/atf/lib/libatf-c/Makefile:1.13 src/external/bsd/atf/lib/libatf-c/Makefile:1.14
--- src/external/bsd/atf/lib/libatf-c/Makefile:1.13	Fri Sep 16 16:41:20 2011
+++ src/external/bsd/atf/lib/libatf-c/Makefile	Mon Jan 16 22:42:40 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2011/09/16 16:41:20 joerg Exp $
+# $NetBSD: Makefile,v 1.14 2012/01/16 22:42:40 jmmv Exp $
 
 NOLINT=		# defined
 
@@ -80,6 +80,7 @@ defs.h: defs.h.in
 	${TOOL_SED} \
 	-e 's|@ATTRIBUTE_FORMAT_PRINTF@|__attribute__((__format__(__printf__, a, b)))|g' \
 	-e 's|@ATTRIBUTE_NORETURN@|__attribute__((__noreturn__))|g' \
+	-e 's|@ATTRIBUTE_UNUSED@|__attribute__((__unused__))|g' \
 	 ${.ALLSRC}  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
@@ -89,7 +90,7 @@ FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c.pc
 atf-c.pc: Makefile atf-c.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.14,g' \
+	${TOOL_SED} -e 's,__ATF_VERSION__,0.15,g' \
 	-e 's,__CC__,gcc,g' \
 	-e 's,__INCLUDEDIR__,/usr/include,g' \
 	-e 's,__LIBDIR__,/usr/lib,g' \

Index: src/external/bsd/atf/lib/libatf-c/bconfig.h
diff -u src/external/bsd/atf/lib/libatf-c/bconfig.h:1.9 src/external/bsd/atf/lib/libatf-c/bconfig.h:1.10
--- src/external/bsd/atf/lib/libatf-c/bconfig.h:1.9	Tue Jun 14 15:27:11 2011
+++ src/external/bsd/atf/lib/libatf-c/bconfig.h	Mon Jan 16 22:42:40 2012
@@ -90,13 +90,13 @@
 #define PACKAGE_BUGREPORT atf-de...@netbsd.org
 
 /* Define to the copyright string applicable to this package. */
-#define PACKAGE_COPYRIGHT Copyright (c) 2007-2011 The NetBSD Foundation, Inc.
+#define PACKAGE_COPYRIGHT Copyright (c) 2007-2012 The NetBSD Foundation, Inc.
 
 /* Define to the full name of this package. */
 #define PACKAGE_NAME Automated Testing Framework
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING Automated Testing Framework 0.14
+#define PACKAGE_STRING Automated Testing Framework 0.15
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME atf
@@ -105,10 +105,10 @@
 #define PACKAGE_URL http://www.NetBSD.org/~jmmv/atf/;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 0.14
+#define PACKAGE_VERSION 0.15
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION 0.14
+#define VERSION 0.15

Index: src/external/bsd/atf/lib/libatf-c++/Makefile
diff -u src/external/bsd/atf/lib/libatf-c++/Makefile:1.11 src/external/bsd/atf/lib/libatf-c++/Makefile:1.12
--- src/external/bsd/atf/lib/libatf-c++/Makefile:1.11	Tue Jun 14 15:27:11 2011
+++ src/external/bsd/atf/lib/libatf-c++/Makefile	Mon Jan 16 22:42:40 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/06/14 15:27:11 jmmv Exp $
+# $NetBSD: Makefile,v 1.12 2012/01/16 22:42:40 jmmv Exp $
 
 NOLINT=		# defined
 
@@ -55,7 +55,7 @@ FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c++.pc
 atf-c++.pc: Makefile atf-c++.pc.in
-	${TOOL_SED} -e 

CVS commit: src/doc

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:44:15 UTC 2012

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of atf 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.895 -r1.896 src/doc/3RDPARTY
cvs rdiff -u -r1.1646 -r1.1647 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.895 src/doc/3RDPARTY:1.896
--- src/doc/3RDPARTY:1.895	Sat Jan 14 13:46:56 2012
+++ src/doc/3RDPARTY	Mon Jan 16 22:44:15 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.895 2012/01/14 13:46:56 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.896 2012/01/16 22:44:15 jmmv Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -52,8 +52,8 @@ Fix symbolic links before import.
 Check src/usr.sbin/amd/include/config.h is correct after import.
 
 Package:	Automated Testing Framework (ATF)
-Version:	0.14
-Current Vers:	0.14
+Version:	0.15
+Current Vers:	0.15
 Maintainer:	Julio Merino j...@netbsd.org
 Archive site:	ftp://ftp.NetBSD.org/pub/NetBSD/misc/jmmv/atf/
 Home page:	http://www.NetBSD.org/~jmmv/atf/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1646 src/doc/CHANGES:1.1647
--- src/doc/CHANGES:1.1646	Sat Jan 14 22:40:29 2012
+++ src/doc/CHANGES	Mon Jan 16 22:44:15 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1646 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1647 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1201,3 +1201,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	x86, xen: Add cpu ucode loading support via cpuctl(8). [cegger 20120113]
 	sandpoint: Netronix NH-230/231 and compatible NAS are supported.
 		[phx 20120114]
+	atf(7): Import 0.15.  [jmmv 20120116]



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:01:39 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
drop trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/x86/via_padlock.c

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

Modified files:

Index: src/sys/arch/x86/x86/via_padlock.c
diff -u src/sys/arch/x86/x86/via_padlock.c:1.17 src/sys/arch/x86/x86/via_padlock.c:1.18
--- src/sys/arch/x86/x86/via_padlock.c:1.17	Mon Nov 28 15:22:41 2011
+++ src/sys/arch/x86/x86/via_padlock.c	Tue Jan 17 03:01:39 2012
@@ -1,5 +1,5 @@
 /*	$OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $	*/
-/*	$NetBSD: via_padlock.c,v 1.17 2011/11/28 15:22:41 tls Exp $ */
+/*	$NetBSD: via_padlock.c,v 1.18 2012/01/17 03:01:39 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2003 Jason Wright
@@ -20,7 +20,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.17 2011/11/28 15:22:41 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.18 2012/01/17 03:01:39 jakllsch Exp $);
 
 #ifdef _KERNEL_OPT
 # include rnd.h
@@ -101,7 +101,7 @@ via_c3_rnd(void *arg)
 	 */
 	kpreempt_disable();
 	x86_disable_intr();
-	creg0 = rcr0();	
+	creg0 = rcr0();
 	lcr0(creg0  ~(CR0_EM|CR0_TS));	/* Permit access to SIMD/FPU path */
 	/*
 	 * Collect the random data from the C3 RNG into our buffer.
@@ -118,7 +118,7 @@ via_c3_rnd(void *arg)
 	rnd_add_data(sc-sc_rnd_source, buffer, len * sizeof(int),
 		 len * sizeof(int));
 	callout_reset(sc-sc_rnd_co, sc-sc_rnd_hz, via_c3_rnd, sc);
-}	
+}
 
 static void
 via_c3_rnd_init(struct via_padlock_softc *sc)



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:06:33 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
leading whitespace too!


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/x86/via_padlock.c

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

Modified files:

Index: src/sys/arch/x86/x86/via_padlock.c
diff -u src/sys/arch/x86/x86/via_padlock.c:1.18 src/sys/arch/x86/x86/via_padlock.c:1.19
--- src/sys/arch/x86/x86/via_padlock.c:1.18	Tue Jan 17 03:01:39 2012
+++ src/sys/arch/x86/x86/via_padlock.c	Tue Jan 17 03:06:33 2012
@@ -1,5 +1,5 @@
 /*	$OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $	*/
-/*	$NetBSD: via_padlock.c,v 1.18 2012/01/17 03:01:39 jakllsch Exp $ */
+/*	$NetBSD: via_padlock.c,v 1.19 2012/01/17 03:06:33 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2003 Jason Wright
@@ -20,7 +20,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.18 2012/01/17 03:01:39 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.19 2012/01/17 03:06:33 jakllsch Exp $);
 
 #ifdef _KERNEL_OPT
 # include rnd.h
@@ -93,7 +93,7 @@ via_c3_rnd(void *arg)
 	 * registers, which are really for the FPU, in order to read
 	 * from the RNG.
 	 *
- 	 * Don't remove CR0_TS from the call below -- comments in the Linux
+	 * Don't remove CR0_TS from the call below -- comments in the Linux
 	 * driver indicate that the xstorerng instruction can generate
 	 * spurious DNA faults though no FPU or SIMD state is changed
 	 * even if such a fault is generated.



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:39:33 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
In addition to %[er]ax,  rep xstore-rng  also clobbers %[er]cx and %[er]di.
As such, mark them as outputs, as is done in the VIA Padlock example code.
Additionally, let's assume that VIAC3_RNG_BUFSIZ is in bytes and not DWords.
Furthermore assume that there are not 1 but NBBY bits of entropy per byte.

Fixes PR kern/45847 for me.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/via_padlock.c

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

Modified files:

Index: src/sys/arch/x86/x86/via_padlock.c
diff -u src/sys/arch/x86/x86/via_padlock.c:1.19 src/sys/arch/x86/x86/via_padlock.c:1.20
--- src/sys/arch/x86/x86/via_padlock.c:1.19	Tue Jan 17 03:06:33 2012
+++ src/sys/arch/x86/x86/via_padlock.c	Tue Jan 17 03:39:33 2012
@@ -1,5 +1,5 @@
 /*	$OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $	*/
-/*	$NetBSD: via_padlock.c,v 1.19 2012/01/17 03:06:33 jakllsch Exp $ */
+/*	$NetBSD: via_padlock.c,v 1.20 2012/01/17 03:39:33 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2003 Jason Wright
@@ -20,7 +20,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.19 2012/01/17 03:06:33 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: via_padlock.c,v 1.20 2012/01/17 03:39:33 jakllsch Exp $);
 
 #ifdef _KERNEL_OPT
 # include rnd.h
@@ -85,8 +85,9 @@ via_c3_rnd(void *arg)
 {
 	struct via_padlock_softc *sc = arg;
 
-	unsigned int rv, creg0, len = VIAC3_RNG_BUFSIZ;
-	static uint32_t buffer[VIAC3_RNG_BUFSIZ + 2];	/* XXX 2? */
+	uint32_t creg0, len = VIAC3_RNG_BUFSIZ;
+	uint32_t buffer[VIAC3_RNG_BUFSIZ/4 + 1]; /* CPU goes 3 bytes beyond */
+	uint32_t eax, ecx, edi; /* XXX write-only, but necessary it seems */
 
 	/*
 	 * Sadly, we have to monkey with the coprocessor enable and fault
@@ -109,14 +110,14 @@ via_c3_rnd(void *arg)
 	 * if we will feed the data to SHA1?) (%edx[0,1] = 11).
 	 */
 	__asm __volatile(rep xstorerng
-			 : =a (rv) : d (3), D (buffer),
-			 c (len * sizeof(int)) : memory, cc);
+			 : =a (eax), =c (ecx), =D (edi)
+			 : d (3), D (buffer), c (len)
+			 : memory, cc);
 	/* Put CR0 back how it was */
 	lcr0(creg0);
 	x86_enable_intr();
 	kpreempt_enable();
-	rnd_add_data(sc-sc_rnd_source, buffer, len * sizeof(int),
-		 len * sizeof(int));
+	rnd_add_data(sc-sc_rnd_source, buffer, len, len * NBBY);
 	callout_reset(sc-sc_rnd_co, sc-sc_rnd_hz, via_c3_rnd, sc);
 }
 



CVS commit: src/sys/dev/pci

2012-01-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan 17 07:48:48 UTC 2012

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

Log Message:
get rid of HAVE_OPENFIRMWARE


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/voodoofb.c

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

Modified files:

Index: src/sys/dev/pci/voodoofb.c
diff -u src/sys/dev/pci/voodoofb.c:1.29 src/sys/dev/pci/voodoofb.c:1.30
--- src/sys/dev/pci/voodoofb.c:1.29	Wed Jan 11 16:02:30 2012
+++ src/sys/dev/pci/voodoofb.c	Tue Jan 17 07:48:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: voodoofb.c,v 1.29 2012/01/11 16:02:30 macallan Exp $	*/
+/*	$NetBSD: voodoofb.c,v 1.30 2012/01/17 07:48:48 macallan Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.29 2012/01/11 16:02:30 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.30 2012/01/17 07:48:48 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -42,15 +42,6 @@ __KERNEL_RCSID(0, $NetBSD: voodoofb.c,v
 #include sys/callout.h
 #include sys/kauth.h
 
-#if defined(macppc) || defined (sparc64) || defined(ofppc)
-#define HAVE_OPENFIRMWARE
-#endif
-
-#ifdef HAVE_OPENFIRMWARE
-#include dev/ofw/openfirm.h
-#include dev/ofw/ofw_pci.h
-#endif
-
 #include dev/videomode/videomode.h
 
 #include dev/pci/pcivar.h
@@ -311,10 +302,8 @@ voodoofb_attach(device_t parent, device_
 #endif
 	ulong defattr;
 	int console, width, height, i, j;
-#ifdef HAVE_OPENFIRMWARE
 	prop_dictionary_t dict;
 	int linebytes, depth;
-#endif
 	uint32_t bg, fg, ul;
 
 	sc-sc_dev = self;
@@ -355,7 +344,6 @@ voodoofb_attach(device_t parent, device_
 	/* we should read these from the chip instead of depending on OF */
 	width = height = -1;
 	
-#ifdef HAVE_OPENFIRMWARE
 	dict = device_properties(self);
 	if (!prop_dictionary_get_uint32(dict, width, width)) {
 		aprint_error_dev(self, no width property\n);
@@ -380,7 +368,6 @@ voodoofb_attach(device_t parent, device_
 	sc-linebytes = linebytes;
 	printf(%s: initial resolution %dx%d, %d bit\n, device_xname(self),
 	sc-width, sc-height, sc-bits_per_pixel);
-#endif
 
 	/* XXX this should at least be configurable via kernel config */
 	if ((sc-sc_videomode = pick_mode_by_ref(1024, 768, 60)) != NULL)
@@ -596,17 +583,12 @@ voodoofb_getcmap(struct voodoofb_softc *
 static bool
 voodoofb_is_console(struct voodoofb_softc *sc)
 {
-#ifdef HAVE_OPENFIRMWARE
 	prop_dictionary_t dict;
 	bool console;
 
 	dict = device_properties(sc-sc_dev);
 	prop_dictionary_get_bool(dict, is_console, console);
 	return console;
-#else
-	/* XXX how do we know we're console on i386? */
-	return true;
-#endif
 }
 
 static void



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

2012-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 16 09:01:35 UTC 2012

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

Log Message:
Don't NULL deref on unknown subop, e.g. PA2.0 instruction.

Print undefined instead of ???.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/hppa/db_disasm.c

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



CVS commit: src/sys/sys

2012-01-16 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Jan 16 10:36:16 UTC 2012

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

Log Message:
include limits.h for PATH_MAX. Reported by njoly@.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/cpuio.h

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



CVS commit: src/sys/ufs/chfs

2012-01-16 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Mon Jan 16 12:17:56 UTC 2012

Modified Files:
src/sys/ufs/chfs: chfs_wbuf.c

Log Message:
cleanup macros


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/ufs/chfs/chfs_wbuf.c

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



CVS commit: src/sys/ufs/chfs

2012-01-16 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Mon Jan 16 12:28:47 UTC 2012

Modified Files:
src/sys/ufs/chfs: chfs_wbuf.c

Log Message:
use enum instead of macros
add some input validation
cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/chfs/chfs_wbuf.c

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



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

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 14:43:10 UTC 2012

Modified Files:
src/sys/arch/i386/conf: GENERIC

Log Message:
add cir@emdtv


To generate a diff of this commit:
cvs rdiff -u -r1.1064 -r1.1065 src/sys/arch/i386/conf/GENERIC

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



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

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 14:44:07 UTC 2012

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
add irmce(4), cir@irmce, and cir@emdtv


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/amd64/conf/GENERIC

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



CVS commit: src/lib/libedit

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 14:57:46 UTC 2012

Modified Files:
src/lib/libedit: vi.c

Log Message:
PR/45843: Henning Petersen: Fix resource leak on error.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/vi.c

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



CVS commit: src/sys/dev/pci

2012-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 16 15:33:50 UTC 2012

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

Log Message:
Only match supported boards.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/cxdtv.c

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



CVS commit: src/share/man/man4

2012-01-16 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Jan 16 16:27:59 UTC 2012

Modified Files:
src/share/man/man4: ipsec.4 kame_ipsec.4

Log Message:
move kame_ipsec.4 almost completely into ipsec.4 because it is valid
for fast_ipsec as well


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man4/ipsec.4
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/kame_ipsec.4

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



CVS commit: src/external/bsd/tcpdump/dist

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:34:19 UTC 2012

Modified Files:
src/external/bsd/tcpdump/dist: print-eigrp.c print-ldp.c print-lmp.c
print-lspping.c print-rsvp.c print-slow.c

Log Message:
PR/45841: Henning Petersen: One sizeof is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-eigrp.c \
src/external/bsd/tcpdump/dist/print-ldp.c \
src/external/bsd/tcpdump/dist/print-lmp.c \
src/external/bsd/tcpdump/dist/print-lspping.c \
src/external/bsd/tcpdump/dist/print-rsvp.c \
src/external/bsd/tcpdump/dist/print-slow.c

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



CVS commit: src

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 17:38:16 UTC 2012

Modified Files:
src/games/battlestar: getcom.c
src/sbin/routed: parms.c
src/usr.bin/mail: edit.c
src/usr.bin/tftp: main.c
src/usr.sbin/timed/timedc: timedc.c

Log Message:
PR/45842: Henning Petersen: compare fgets with NULL not 0


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/battlestar/getcom.c
cvs rdiff -u -r1.25 -r1.26 src/sbin/routed/parms.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/mail/edit.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/tftp/main.c
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/timed/timedc/timedc.c

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



CVS commit: src/sys/dev/ic

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jan 16 17:58:03 UTC 2012

Modified Files:
src/sys/dev/ic: tulipreg.h

Log Message:
Add DECchip EB140 reference design GPIO definitions.
From document EC-QD2SA-TE.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/tulipreg.h

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



CVS commit: src/sys/lib/libsa

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 18:44:13 UTC 2012

Modified Files:
src/sys/lib/libsa: Makefile ext2fs.c stand.h ufs.c
Added Files:
src/sys/lib/libsa: fnmatch.c minixfs3.c minixfs3.h

Log Message:
PR/45796: Evgeniy Ivanov minixfs3 support.
Split out fn_match since we have 3 copies now.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/lib/libsa/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libsa/ext2fs.c
cvs rdiff -u -r0 -r1.1 src/sys/lib/libsa/fnmatch.c \
src/sys/lib/libsa/minixfs3.c src/sys/lib/libsa/minixfs3.h
cvs rdiff -u -r1.74 -r1.75 src/sys/lib/libsa/stand.h
cvs rdiff -u -r1.56 -r1.57 src/sys/lib/libsa/ufs.c

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



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

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 18:46:20 UTC 2012

Modified Files:
src/sys/arch/i386/stand/boot: Makefile.boot conf.c

Log Message:
PR/45796: Evgeniy Ivanov minixfs3 support.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/stand/boot/Makefile.boot
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/stand/boot/conf.c

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



CVS commit: src

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 18:47:58 UTC 2012

Modified Files:
src/common/lib/libutil: getfstypename.c
src/sys/arch/i386/stand/lib: biosdisk.c
src/sys/lib/libkern: xlat_mbr_fstype.c
src/sys/sys: disk.h disklabel.h

Log Message:
PR/45796: Evgeniy Ivanov minixfs3 support.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libutil/getfstypename.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/xlat_mbr_fstype.c
cvs rdiff -u -r1.55 -r1.56 src/sys/sys/disk.h
cvs rdiff -u -r1.111 -r1.112 src/sys/sys/disklabel.h

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



CVS commit: src/sys/kern

2012-01-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 16 19:42:40 UTC 2012

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

Log Message:
Include autoconfig info interface-attributes, locators) in device property
dictionaries.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/kern/subr_autoconf.c

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



CVS commit: src/sbin/drvctl

2012-01-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 16 19:43:50 UTC 2012

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

Log Message:
Enhance drvctl -p processing to handle new autoconfig info in property
dictionaries.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/drvctl/drvctl.8
cvs rdiff -u -r1.14 -r1.15 src/sbin/drvctl/drvctl.c

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



CVS commit: src/etc

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 22:12:41 UTC 2012

Modified Files:
src/etc: ntp.conf

Log Message:
Instead of using the general servers, use the ones allocated specifically
for the NetBSD project.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/etc/ntp.conf

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



CVS commit: src/etc

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 16 22:20:45 UTC 2012

Modified Files:
src/etc: ntp.conf

Log Message:
use the join URL.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/ntp.conf

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



CVS commit: src/external/bsd/atf/dist

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:37:01 UTC 2012

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

Log Message:
Import atf 0.15: the major goal of this import is to reconcile any local
changes to the atf codebase with upstream code.  All local changes should
have been backported, with appropriate portability workarounds where
necessary.

This new release also includes other changes though, such as performance
improvements and bug fixes, and also a major new feature partially
implemented by pgoyette@: the time to execute each test cases and test
program is now recorded and included in the output reports.

The import into NetBSD has been tested natively on amd64 and macppc, and
the full test suite has also been run through anita on amd64 and i386.
No regressions observed... but you never know.

From the NEWS file, the changes in this version are as follows:

Experimental version released on January 16th, 2012.

* Respect stdin in atf-check.  The previous release silenced stdin for any
  processes spawned by atf, not only test programs, which caused breakage
  in tests that pipe data through atf-check.

* Performance improvements to atf-sh.

* Enabled detection of unused parameters and variables in the code and
  fixed all warnings.

* Changed the behavior of developer mode.  Compiler warnings are now
  enabled unconditionally regardless of whether we are in developer mode or
  not; developer mode is now only used to perform strict warning checks and
  to enable assertions.  Additionally, developer mode is now only
  automatically enabled when building from the repository, not for formal
  releases.

* Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and
  ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag
  in configure scripts and detecting the presence of any of the ATF
  bindings.  Note that ATF_CHECK_SH was already introduced in 0.14, but it
  has now been modified to also honor --with-atf if instantiated.

* Added timing support to atf-run / atf-report.

* Added support for a 'require.memory' property, to specify the minimum
  amount of physical memory needed by the test case to yield valid results.

* PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by
  atf-report so that invalid data in the output of test cases does not
  mangle our report.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-15

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
C src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
C src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
U src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
C src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
C src/external/bsd/atf/dist/atf-c/detail/process.c
C src/external/bsd/atf/dist/atf-c/detail/process.h
U 

CVS commit: src/external/bsd/atf/dist

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:41:31 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-c: defs.h.in tc.c tc.h
src/external/bsd/atf/dist/atf-c++: tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-c++/detail: process.hpp text.cpp text.hpp
src/external/bsd/atf/dist/atf-c/detail: process.c process.h
process_test.c test_helpers.c
src/external/bsd/atf/dist/atf-config: integration_test.sh
src/external/bsd/atf/dist/atf-report: atf-report.cpp tests-results.css
tests-results.xsl
src/external/bsd/atf/dist/atf-run: atf-run.cpp fs.cpp
integration_test.sh io_test.cpp requirements.cpp test-program.cpp
test_program_test.cpp timer.cpp timer.hpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp atf-check_test.sh
src/external/bsd/atf/dist/atf-version: atf-version.cpp
src/external/bsd/atf/dist/doc: atf-test-case.4

Log Message:
Resolve conflicts after the import of atf 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/defs.h.in
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/tc.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-c++/tests.hpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c++/detail/process.hpp \
src/external/bsd/atf/dist/atf-c++/detail/text.cpp \
src/external/bsd/atf/dist/atf-c++/detail/text.hpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-c/detail/process.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/detail/process.h \
src/external/bsd/atf/dist/atf-c/detail/process_test.c \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/dist/atf-config/integration_test.sh
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-report/atf-report.cpp \
src/external/bsd/atf/dist/atf-report/tests-results.xsl
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-report/tests-results.css
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/atf/dist/atf-run/atf-run.cpp
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-run/fs.cpp \
src/external/bsd/atf/dist/atf-run/requirements.cpp \
src/external/bsd/atf/dist/atf-run/timer.hpp
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-run/integration_test.sh \
src/external/bsd/atf/dist/atf-run/io_test.cpp \
src/external/bsd/atf/dist/atf-run/test_program_test.cpp
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/dist/atf-run/test-program.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-run/timer.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/atf/dist/atf-version/atf-version.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/doc/atf-test-case.4

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



CVS commit: src/external/bsd/atf

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:42:40 UTC 2012

Modified Files:
src/external/bsd/atf: prepare-import.sh
src/external/bsd/atf/lib/libatf-c: Makefile bconfig.h
src/external/bsd/atf/lib/libatf-c++: Makefile
src/external/bsd/atf/usr.bin/atf-sh: Makefile

Log Message:
Update reachover build files and scripts to deal with the just-imported
atf 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/prepare-import.sh
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/atf/lib/libatf-c/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/lib/libatf-c/bconfig.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/usr.bin/atf-sh/Makefile

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



CVS commit: src/doc

2012-01-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Mon Jan 16 22:44:15 UTC 2012

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of atf 0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.895 -r1.896 src/doc/3RDPARTY
cvs rdiff -u -r1.1646 -r1.1647 src/doc/CHANGES

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



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:01:39 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
drop trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/x86/via_padlock.c

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



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:06:33 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
leading whitespace too!


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/x86/via_padlock.c

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



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

2012-01-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan 17 03:39:33 UTC 2012

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
In addition to %[er]ax,  rep xstore-rng  also clobbers %[er]cx and %[er]di.
As such, mark them as outputs, as is done in the VIA Padlock example code.
Additionally, let's assume that VIAC3_RNG_BUFSIZ is in bytes and not DWords.
Furthermore assume that there are not 1 but NBBY bits of entropy per byte.

Fixes PR kern/45847 for me.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/via_padlock.c

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



CVS commit: src

2012-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 17 03:49:20 UTC 2012

Modified Files:
src/lib/libusbhid: usb_hid_usages
src/share/man/man4: Makefile wsmouse.4
src/sys/arch/amd64/conf: GENERIC
src/sys/dev/usb: FILES files.usb usbdevices.config usbhid.h
Added Files:
src/share/man/man4: uts.4
src/sys/dev/usb: uts.c

Log Message:
PR/45850: Pierre Pronchery: USB multi-touch panels are not supported


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libusbhid/usb_hid_usages
cvs rdiff -u -r1.577 -r1.578 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/uts.4
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/wsmouse.4
cvs rdiff -u -r1.345 -r1.346 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/FILES \
src/sys/dev/usb/usbdevices.config
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/usbhid.h
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/uts.c

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



CVS commit: src/share/man/man4

2012-01-16 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Tue Jan 17 07:04:08 UTC 2012

Modified Files:
src/share/man/man4: Makefile

Log Message:
Remove trailing whitespace.  Reported by Brad Harder.


To generate a diff of this commit:
cvs rdiff -u -r1.578 -r1.579 src/share/man/man4/Makefile

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



CVS commit: src/sys/dev/pci

2012-01-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan 17 07:48:48 UTC 2012

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

Log Message:
get rid of HAVE_OPENFIRMWARE


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/voodoofb.c

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