CVS commit: src/sys/dev/usb

2012-11-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Nov 27 04:54:58 UTC 2012

Modified Files:
src/sys/dev/usb: usb.c

Log Message:
since usb task add/remove is supposed to be callable in any usb
context, make sure the lock is OK for such.  ie, not a sleeping lock.
fixes PR#47244.


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

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

Modified files:

Index: src/sys/dev/usb/usb.c
diff -u src/sys/dev/usb/usb.c:1.135 src/sys/dev/usb/usb.c:1.136
--- src/sys/dev/usb/usb.c:1.135	Fri Jul 20 23:18:02 2012
+++ src/sys/dev/usb/usb.c	Tue Nov 27 04:54:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.c,v 1.135 2012/07/20 23:18:02 mrg Exp $	*/
+/*	$NetBSD: usb.c,v 1.136 2012/11/27 04:54:58 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.135 2012/07/20 23:18:02 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.136 2012/11/27 04:54:58 mrg Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_usb.h"
@@ -224,7 +224,11 @@ usb_once_init(void)
 		taskq = &usb_taskq[i];
 
 		TAILQ_INIT(&taskq->tasks);
-		mutex_init(&taskq->lock, MUTEX_DEFAULT, IPL_NONE);
+		/*
+		 * Since USB tasks are callable from any context, we have to
+		 * make this lock a spinlock.
+		 */
+		mutex_init(&taskq->lock, MUTEX_DEFAULT, IPL_USB);
 		cv_init(&taskq->cv, "usbtsk");
 		taskq->name = taskq_names[i];
 		if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,



CVS commit: src/share/man/man4/man4.amiga

2012-11-26 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Nov 26 23:02:53 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: z3rambd.4

Log Message:
Note support for more boards.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/z3rambd.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/z3rambd.4
diff -u src/share/man/man4/man4.amiga/z3rambd.4:1.1 src/share/man/man4/man4.amiga/z3rambd.4:1.2
--- src/share/man/man4/man4.amiga/z3rambd.4:1.1	Mon Nov 26 00:36:01 2012
+++ src/share/man/man4/man4.amiga/z3rambd.4	Mon Nov 26 23:02:53 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: z3rambd.4,v 1.1 2012/11/26 00:36:01 rkujawa Exp $
+.\" $NetBSD: z3rambd.4,v 1.2 2012/11/26 23:02:53 rkujawa Exp $
 .\"
 .\" Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -47,6 +47,9 @@ The
 driver supports the following hardware:
 .Bl -tag -offset indent
 .It AmigaKit ZorRAM
+.It DKB 3128
+.It FastLane Z3
+.It Individual Computers BigRamPlus
 .El
 .Sh SEE ALSO
 .Xr altmem 4 ,



CVS commit: src/sys/arch/amiga

2012-11-26 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Nov 26 22:58:25 UTC 2012

Modified Files:
src/sys/arch/amiga/amiga: amiga_init.c
src/sys/arch/amiga/dev: z3rambd.c zbus.c
Added Files:
src/sys/arch/amiga/dev: z3rambdvar.h

Log Message:
Try to make z3rambd less crude. Also support BigRamPlus, FastLane Z3 RAM and
DKB3128.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/z3rambd.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/z3rambdvar.h
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/amiga/dev/zbus.c

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

Modified files:

Index: src/sys/arch/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.128 src/sys/arch/amiga/amiga/amiga_init.c:1.129
--- src/sys/arch/amiga/amiga/amiga_init.c:1.128	Sun Nov 25 23:33:55 2012
+++ src/sys/arch/amiga/amiga/amiga_init.c	Mon Nov 26 22:58:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.128 2012/11/25 23:33:55 rkujawa Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.129 2012/11/26 22:58:24 rkujawa Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -39,7 +39,7 @@
 #include "ser.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.128 2012/11/25 23:33:55 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.129 2012/11/26 22:58:24 rkujawa Exp $");
 
 #include 
 #include 
@@ -68,6 +68,7 @@ __KERNEL_RCSID(0, "$NetBSD: amiga_init.c
 #include 
 #include 
 #include 
+#include 
 
 #define RELOC(v, t)	*((t*)((u_int)&(v) + loadbase))
 
@@ -337,8 +338,10 @@ start_c(int id, u_int fphystart, u_int f
 		(cd->rom.prodid == 100 || cd->rom.prodid == 110)) 
 			RELOC(ZBUSAVAIL, u_int) += m68k_round_page(0x140);
 #if NZ3RAMBD > 0
-		if ( (cd->rom.manid == 3643) && (cd->rom.prodid == 32) ) 
-		{ } else
+		if (z3rambd_match_id(cd->rom.manid, cd->rom.prodid) > 0)
+		{
+			/* XXX: remove board from memlist */
+		} else
 #endif
 		if (bd_type != ERT_ZORROIII &&
 		(bd_type != ERT_ZORROII || isztwopa(cd->addr)))

Index: src/sys/arch/amiga/dev/z3rambd.c
diff -u src/sys/arch/amiga/dev/z3rambd.c:1.1 src/sys/arch/amiga/dev/z3rambd.c:1.2
--- src/sys/arch/amiga/dev/z3rambd.c:1.1	Sun Nov 25 23:33:56 2012
+++ src/sys/arch/amiga/dev/z3rambd.c	Mon Nov 26 22:58:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: z3rambd.c,v 1.1 2012/11/25 23:33:56 rkujawa Exp $ */
+/*	$NetBSD: z3rambd.c,v 1.2 2012/11/26 22:58:24 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: z3rambd.c,v 1.1 2012/11/25 23:33:56 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: z3rambd.c,v 1.2 2012/11/26 22:58:24 rkujawa Exp $");
 
 /*
- * Z3 RAM virtual block device. Supports ZorRAM so far.
+ * Z3 RAM virtual block device. Supports ZorRAM, BigRamPlus and FastLane Z3 so 
+ * far.
  */
 
 #include 
@@ -41,11 +42,11 @@ __KERNEL_RCSID(0, "$NetBSD: z3rambd.c,v 
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -62,34 +63,17 @@ static const struct altmem_memops z3ramb
 	.strategy = z3rambd_altmem_strategy
 };
 
-struct z3rambd_softc {
-	device_t		sc_dev;
-
-	size_t			sc_size;
-
-	struct bus_space_tag	sc_bst;
-
-	bus_space_tag_t		sc_iot;
-	bus_space_handle_t	sc_ioh;
-
-	void			*sc_va;
-};
-
 CFATTACH_DECL_NEW(z3rambd, sizeof(struct z3rambd_softc),
 z3rambd_match, z3rambd_attach, NULL, NULL);
 
-#define ZORRO_MANID_E3B		3643
-#define ZORRO_PRODID_ZORRAM	32
-
 int
 z3rambd_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct zbus_args *zap;
 	zap = aux;
 
-	if (zap->manid == ZORRO_MANID_E3B) 
-		if (zap->prodid == ZORRO_PRODID_ZORRAM)
-			return 100;
+	if (z3rambd_match_id(zap->manid, zap->prodid) > 0)
+		return 100;
 
 	return 0; 
 }
@@ -112,7 +96,14 @@ z3rambd_attach(device_t parent, device_t
 	/* XXX: duh, size of the board does not necessarily equal mem size */
 	sc->sc_size = zap->size;
 
-	aprint_normal(": AmigaKit ZorRAM\n");
+	if (zap->prodid == ZORRO_PRODID_ZORRAM)
+		aprint_normal(": AmigaKit ZorRAM / Individual Computers BigRamPlus\n");
+	else if (zap->prodid == ZORRO_PRODID_3128)
+		aprint_normal(": DKB 3128\n");
+	else if (zap->prodid == ZORRO_PRODID_FLZ3MEM)
+		aprint_normal(": FastLane Z3 memory\n");
+	else
+		aprint_normal("\n");
 
 	if (bus_space_map(sc->sc_iot, 0, sc->sc_size, 0,
 	&sc->sc_ioh)) {

Index: src/sys/arch/amiga/dev/zbus.c
diff -u src/sys/arch/amiga/dev/zbus.c:1.72 src/sys/arch/amiga/dev/zbus.c:1.73
--- src/sys/arch/amiga/dev/zbus.c:1.72	Sun Nov 25 23:33:56 2012
+++ src/sys/arch/amiga/dev/zbus.c	Mon Nov 26 22:58:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zbus.c,v 1.72 2012/11/25 23:33:56 rkujawa Exp $ */
+/*	$NetBSD: zbus.c,v 1.73 2012/11/26 22:58:24 rkujawa Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.72 2012/11/25 23:3

CVS commit: src/sys/dev/usb

2012-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 26 21:15:34 UTC 2012

Modified Files:
src/sys/dev/usb: if_axe.c

Log Message:
put back rest of the lines that got cut off.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/if_axe.c

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

Modified files:

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.59 src/sys/dev/usb/if_axe.c:1.60
--- src/sys/dev/usb/if_axe.c:1.59	Mon Nov 26 12:36:27 2012
+++ src/sys/dev/usb/if_axe.c	Mon Nov 26 16:15:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.59 2012/11/26 17:36:27 christos Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.60 2012/11/26 21:15:34 christos Exp $	*/
 /*	$OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
 
 /*
@@ -89,7 +89,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.59 2012/11/26 17:36:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.60 2012/11/26 21:15:34 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -155,11 +155,11 @@ static const struct axe_type axe_devs[] 
 	{ { USB_VENDOR_COREGA,		USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100}, 0 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
-	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100C1 }, 
+	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100C1 }, AX772 | AX772B },
 	{ { USB_VENDOR_GOODWAY,		USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
 	{ { USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_ETGUS2 }, AX178 },
 	{ { USB_VENDOR_JVC,		USB_PRODUCT_JVC_MP_PRX1}, 0 },
-	{ { USB_VENDOR_LENOVO,		USB_PRODUCT_LENOVO_ETHERNET }, 
+	{ { USB_VENDOR_LENOVO,		USB_PRODUCT_LENOVO_ETHERNET }, AX772 | AX772B },
 	{ { USB_VENDOR_LINKSYS2,	USB_PRODUCT_LINKSYS2_USB200M}, 0 },
 	{ { USB_VENDOR_LINKSYS4,	USB_PRODUCT_LINKSYS4_USB1000 }, AX178 },
 	{ { USB_VENDOR_LOGITEC,		USB_PRODUCT_LOGITEC_LAN_GTJU2}, AX178 },



CVS commit: src/usr.sbin/npf/npfctl

2012-11-26 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Nov 26 20:34:29 UTC 2012

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5 npf_build.c npf_data.c npf_parse.y
npf_scan.l npf_var.h npfctl.h

Log Message:
npfctl: extend syntax for extracting interface IP address(es) by the family.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/npf/npfctl/npf.conf.5
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/npf/npfctl/npf_data.c
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/npf/npfctl/npf_parse.y
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npfctl/npf_scan.l
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/npf/npfctl/npf_var.h
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/npf/npfctl/npfctl.h

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.23 src/usr.sbin/npf/npfctl/npf.conf.5:1.24
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.23	Sun Sep 30 21:15:08 2012
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Mon Nov 26 20:34:28 2012
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.23 2012/09/30 21:15:08 wiz Exp $
+.\"$NetBSD: npf.conf.5,v 1.24 2012/11/26 20:34:28 rmind Exp $
 .\"
 .\" Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 30, 2012
+.Dd November 26, 2012
 .Dt NPF.CONF 5
 .Os
 .Sh NAME
@@ -96,6 +96,18 @@ The file should contain a list of IP add
 .Ed
 .Pp
 Tables of type "hash" can only contain IP addresses.
+.Ss Interfaces
+Interfaces can be specified as the values of the variables:
+.Bd -literal
+$pub_if_list = { ifnet(wm0), ifnet(wm1) }
+.Ed
+In the context of filtering, an interface provides a list of its
+all IP addresses, including IPv4 and IPv6.
+Specific interface addresses can be selected by the family, e.g.:
+.Bd -literal
+$pub_if4 = inet4(wm0)
+$pub_if6 = { inet6(wm0) }
+.Ed
 .Ss Groups
 Groups may have the following options: name, interface, and direction.
 They are defined in the following form:
@@ -151,7 +163,7 @@ bi-directional NAT (combination of inbou
 The following would translate the source to the IP address specified
 by the $pub_ip for the packets on the interface $ext_if.
 .Bd -literal
-map $ext_if dynamic 10.1.1.0/24 -> $pub_if
+map $ext_if dynamic 10.1.1.0/24 -> $pub_ip
 .Ed
 .Pp
 Translations are implicitly filtered by limiting the operation to the
@@ -256,8 +268,8 @@ directory containing further examples
 .\" -
 .Sh EXAMPLES
 .Bd -literal
-$ext_if = "wm0"
-$int_if = "wm1"
+$ext_if = ifnet(wm0)
+$int_if = ifnet(wm1)
 
 table <1> type hash file "/etc/npf_blacklist"
 table <2> type tree dynamic

Index: src/usr.sbin/npf/npfctl/npf_build.c
diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.14 src/usr.sbin/npf/npfctl/npf_build.c:1.15
--- src/usr.sbin/npf/npfctl/npf_build.c:1.14	Sun Sep 16 13:47:41 2012
+++ src/usr.sbin/npf/npfctl/npf_build.c	Mon Nov 26 20:34:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_build.c,v 1.14 2012/09/16 13:47:41 rmind Exp $	*/
+/*	$NetBSD: npf_build.c,v 1.15 2012/11/26 20:34:28 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npf_build.c,v 1.14 2012/09/16 13:47:41 rmind Exp $");
+__RCSID("$NetBSD: npf_build.c,v 1.15 2012/11/26 20:34:28 rmind Exp $");
 
 #include 
 #include 
@@ -145,7 +145,7 @@ npfctl_build_fam(nc_ctx_t *nc, sa_family
 	 * Otherwise, address of invalid family was passed manually.
 	 */
 	if (family != AF_UNSPEC && family != fam->fam_family) {
-		if (!fam->fam_interface) {
+		if (!fam->fam_ifindex) {
 			yyerror("specified address is not of the required "
 			"family %d", family);
 		}

Index: src/usr.sbin/npf/npfctl/npf_data.c
diff -u src/usr.sbin/npf/npfctl/npf_data.c:1.18 src/usr.sbin/npf/npfctl/npf_data.c:1.19
--- src/usr.sbin/npf/npfctl/npf_data.c:1.18	Sun Aug 12 03:35:13 2012
+++ src/usr.sbin/npf/npfctl/npf_data.c	Mon Nov 26 20:34:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_data.c,v 1.18 2012/08/12 03:35:13 rmind Exp $	*/
+/*	$NetBSD: npf_data.c,v 1.19 2012/11/26 20:34:28 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npf_data.c,v 1.18 2012/08/12 03:35:13 rmind Exp $");
+__RCSID("$NetBSD: npf_data.c,v 1.19 2012/11/26 20:34:28 rmind Exp $");
 
 #include 
 #include 
@@ -273,63 +273,60 @@ npfctl_parse_port_range_variable(const c
 }
 
 npfvar_t *
-npfctl_parse_iface(const char *ifname)
+npfctl_parse_ifnet(const char *ifname, const int family)
 {
-	npfvar_t *vp = npfvar_create(".iface");
+	npfvar_t *vpa, *vp;
 	struct ifaddrs *ifa;
-	fam_addr_mask_t fam;
-	bool gotif = false;
+	ifnet_addr_t ifna;
 
 	if (ifs_list == NULL && getifaddrs(&ifs_list) == -1) {
 		err(EXIT_FAILUR

CVS commit: src/usr.sbin/pwd_mkdb

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 20:13:54 UTC 2012

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

Log Message:
Attempt 2 at fixing DragonFly util.h conflicts: include util.h only for
non-tool builds.
(why does the tool build prefer host headers instead of compat headers?)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/pwd_mkdb/pwd_mkdb.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/pwd_mkdb/pwd_mkdb.c
diff -u src/usr.sbin/pwd_mkdb/pwd_mkdb.c:1.55 src/usr.sbin/pwd_mkdb/pwd_mkdb.c:1.56
--- src/usr.sbin/pwd_mkdb/pwd_mkdb.c:1.55	Wed Aug 31 16:24:59 2011
+++ src/usr.sbin/pwd_mkdb/pwd_mkdb.c	Mon Nov 26 20:13:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pwd_mkdb.c,v 1.55 2011/08/31 16:24:59 plunky Exp $	*/
+/*	$NetBSD: pwd_mkdb.c,v 1.56 2012/11/26 20:13:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@ __COPYRIGHT("@(#) Copyright (c) 2000, 20
  The NetBSD Foundation, Inc.  All rights reserved.\
   Copyright (c) 1991, 1993, 1994\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: pwd_mkdb.c,v 1.55 2011/08/31 16:24:59 plunky Exp $");
+__RCSID("$NetBSD: pwd_mkdb.c,v 1.56 2012/11/26 20:13:54 pooka Exp $");
 #endif /* not lint */
 
 #if HAVE_NBTOOL_CONFIG_H
@@ -119,7 +119,10 @@ __RCSID("$NetBSD: pwd_mkdb.c,v 1.55 2011
 #include 
 #include 
 #include 
+
+#ifndef HAVE_NBTOOL_CONFIG_H
 #include 
+#endif
 
 #define	MAX_CACHESIZE	8*1024*1024
 #define	MIN_CACHESIZE	2*1024*1024



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 20:03:40 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
fix previous


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librumpuser/rumpuser_port.h

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

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.9 src/lib/librumpuser/rumpuser_port.h:1.10
--- src/lib/librumpuser/rumpuser_port.h:1.9	Mon Nov 26 19:57:24 2012
+++ src/lib/librumpuser/rumpuser_port.h	Mon Nov 26 20:03:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.9 2012/11/26 19:57:24 pooka Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.10 2012/11/26 20:03:40 pooka Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -51,7 +51,7 @@
 
 /* maybe this should be !__NetBSD__ ? */
 #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)	\
-defined(__DragonFly__)
+|| defined(__DragonFly__)
 #include 
 #include 
 #include 



CVS commit: [netbsd-5-1] src/doc

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 20:02:07 UTC 2012

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.3

Log Message:
Ticket 1821.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.1.3

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

Modified files:

Index: src/doc/CHANGES-5.1.3
diff -u src/doc/CHANGES-5.1.3:1.1.2.32 src/doc/CHANGES-5.1.3:1.1.2.33
--- src/doc/CHANGES-5.1.3:1.1.2.32	Wed Nov 14 20:04:02 2012
+++ src/doc/CHANGES-5.1.3	Mon Nov 26 20:02:07 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.3,v 1.1.2.32 2012/11/14 20:04:02 riz Exp $
+# $NetBSD: CHANGES-5.1.3,v 1.1.2.33 2012/11/26 20:02:07 riz Exp $
 
 A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3
 release:
@@ -2288,3 +2288,10 @@ share/zoneinfo/southamerica			patch
 	Various fixes to documentation and commentary.
 [apb, ticket #1818]
 
+xsrc/external/mit/expat/dist/lib/expat.h		patch
+xsrc/external/mit/expat/dist/lib/xmlparse.c		patch
+xsrc/external/mit/expat/dist/xmlwf/readfilemap.c	patch
+
+	Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
+	[spz, ticket #1821]
+



CVS commit: [netbsd-5-0] src/doc

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 20:01:49 UTC 2012

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
Ticket 1821.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.90 -r1.1.2.91 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.90 src/doc/CHANGES-5.0.3:1.1.2.91
--- src/doc/CHANGES-5.0.3:1.1.2.90	Wed Nov 14 20:02:19 2012
+++ src/doc/CHANGES-5.0.3	Mon Nov 26 20:01:48 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.90 2012/11/14 20:02:19 riz Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.91 2012/11/26 20:01:48 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -5196,3 +5196,10 @@ share/zoneinfo/southamerica			patch
 	Various fixes to documentation and commentary.
 [apb, ticket #1818]
 
+xsrc/external/mit/expat/dist/lib/expat.h		patch
+xsrc/external/mit/expat/dist/lib/xmlparse.c		patch
+xsrc/external/mit/expat/dist/xmlwf/readfilemap.c	patch
+
+	Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
+	[spz, ticket #1821]
+



CVS commit: [netbsd-5] src/doc

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 20:00:35 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket 1821.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.200 -r1.1.2.201 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.200 src/doc/CHANGES-5.2:1.1.2.201
--- src/doc/CHANGES-5.2:1.1.2.200	Mon Nov 26 19:53:04 2012
+++ src/doc/CHANGES-5.2	Mon Nov 26 20:00:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.200 2012/11/26 19:53:04 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.201 2012/11/26 20:00:35 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -8810,3 +8810,10 @@ sys/netsmb/smb_smb.c1.33
 	Make smbfs actually works on big-endian ports.
 	[nakayama, ticket #1820]
 
+xsrc/external/mit/expat/dist/lib/expat.h		patch
+xsrc/external/mit/expat/dist/lib/xmlparse.c		patch
+xsrc/external/mit/expat/dist/xmlwf/readfilemap.c	patch
+
+	Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
+	[spz, ticket #1821]
+



CVS commit: [netbsd-5] xsrc/external/mit/expat/dist

2012-11-26 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Nov 26 20:00:19 UTC 2012

Modified Files:
xsrc/external/mit/expat/dist/lib [netbsd-5]: expat.h xmlparse.c
xsrc/external/mit/expat/dist/xmlwf [netbsd-5]: readfilemap.c

Log Message:
xsrc/external/mit/expat/dist/lib/expat.hpatch
xsrc/external/mit/expat/dist/lib/xmlparse.c patch
xsrc/external/mit/expat/dist/xmlwf/readfilemap.cpatch

Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
[spz, ticket #1821]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/expat.h
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/expat/dist/lib/xmlparse.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/expat/dist/xmlwf/readfilemap.c

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

Modified files:

Index: xsrc/external/mit/expat/dist/lib/expat.h
diff -u xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1.2.1
--- xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1	Tue Jul 29 05:35:06 2008
+++ xsrc/external/mit/expat/dist/lib/expat.h	Mon Nov 26 20:00:18 2012
@@ -883,6 +883,15 @@ XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
   enum XML_ParamEntityParsing parsing);
 
+/* Sets the hash salt to use for internal hash calculations.
+   Helps in preventing DoS attacks based on predicting hash
+   function behavior. This must be called before parsing is started.
+   Returns 1 if successful, 0 when called after parsing has started.
+*/
+XMLPARSEAPI(int)
+XML_SetHashSalt(XML_Parser parser,
+unsigned long hash_salt);
+
 /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
 */

Index: xsrc/external/mit/expat/dist/lib/xmlparse.c
diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.2
--- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1	Wed Jan 27 20:43:00 2010
+++ xsrc/external/mit/expat/dist/lib/xmlparse.c	Mon Nov 26 20:00:19 2012
@@ -5,6 +5,8 @@
 #include 
 #include  /* memset(), memcpy() */
 #include 
+#include  /* UINT_MAX */
+#include/* time() */
 
 #define XML_BUILDING_EXPAT 1
 
@@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
 static void
 dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
 static int
-dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
+dtdCopy(XML_Parser oldParser,
+DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
 static int
-copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
-
+copyEntityTable(XML_Parser oldParser,
+HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
 static NAMED *
-lookup(HASH_TABLE *table, KEY name, size_t createSize);
+lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
 static void FASTCALL
 hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
 static void FASTCALL hashTableClear(HASH_TABLE *);
@@ -429,11 +432,15 @@ static ELEMENT_TYPE *
 getElementType(XML_Parser parser, const ENCODING *enc,
const char *ptr, const char *end);
 
+static unsigned long generate_hash_secret_salt(void);
+static XML_Bool startParsing(XML_Parser parser);
+
 static XML_Parser
 parserCreate(const XML_Char *encodingName,
  const XML_Memory_Handling_Suite *memsuite,
  const XML_Char *nameSep,
  DTD *dtd);
+
 static void
 parserInit(XML_Parser parser, const XML_Char *encodingName);
 
@@ -546,6 +553,7 @@ struct XML_ParserStruct {
   XML_Bool m_useForeignDTD;
   enum XML_ParamEntityParsing m_paramEntityParsing;
 #endif
+  unsigned long m_hash_secret_salt;
 };
 
 #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
@@ -653,6 +661,7 @@ struct XML_ParserStruct {
 #define useForeignDTD (parser->m_useForeignDTD)
 #define paramEntityParsing (parser->m_paramEntityParsing)
 #endif /* XML_DTD */
+#define hash_secret_salt (parser->m_hash_secret_salt)
 
 XML_Parser XMLCALL
 XML_ParserCreate(const XML_Char *encodingName)
@@ -677,22 +686,35 @@ static const XML_Char implicitContext[] 
   ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
 };
 
+static unsigned long
+generate_hash_secret_salt(void)
+{
+  unsigned int seed = time(NULL) % UINT_MAX;
+  srand(seed);
+  return rand();
+}
+
+static XML_Bool  /* only valid for root parser */
+startParsing(XML_Parser parser)
+{
+/* hash functions must be initialized before setContext() is called */
+if (hash_secret_salt == 0)
+  hash_secret_salt = generate_hash_secret_salt();
+if (ns) {
+  /* implicit context only set for root parser, since child
+ parsers (i.e. external entity par

CVS commit: [netbsd-5-1] xsrc/external/mit/expat/dist

2012-11-26 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Nov 26 19:59:57 UTC 2012

Modified Files:
xsrc/external/mit/expat/dist/lib [netbsd-5-1]: expat.h xmlparse.c
xsrc/external/mit/expat/dist/xmlwf [netbsd-5-1]: readfilemap.c

Log Message:
xsrc/external/mit/expat/dist/lib/expat.hpatch
xsrc/external/mit/expat/dist/lib/xmlparse.c patch
xsrc/external/mit/expat/dist/xmlwf/readfilemap.cpatch

Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
[spz, ticket #1821]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.6.1 xsrc/external/mit/expat/dist/lib/expat.h
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 \
xsrc/external/mit/expat/dist/lib/xmlparse.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.6.1 \
xsrc/external/mit/expat/dist/xmlwf/readfilemap.c

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

Modified files:

Index: xsrc/external/mit/expat/dist/lib/expat.h
diff -u xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1.6.1
--- xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1	Tue Jul 29 05:35:06 2008
+++ xsrc/external/mit/expat/dist/lib/expat.h	Mon Nov 26 19:59:57 2012
@@ -883,6 +883,15 @@ XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
   enum XML_ParamEntityParsing parsing);
 
+/* Sets the hash salt to use for internal hash calculations.
+   Helps in preventing DoS attacks based on predicting hash
+   function behavior. This must be called before parsing is started.
+   Returns 1 if successful, 0 when called after parsing has started.
+*/
+XMLPARSEAPI(int)
+XML_SetHashSalt(XML_Parser parser,
+unsigned long hash_salt);
+
 /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
 */

Index: xsrc/external/mit/expat/dist/lib/xmlparse.c
diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1.2.1
--- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1	Wed Jan 27 20:43:00 2010
+++ xsrc/external/mit/expat/dist/lib/xmlparse.c	Mon Nov 26 19:59:57 2012
@@ -5,6 +5,8 @@
 #include 
 #include  /* memset(), memcpy() */
 #include 
+#include  /* UINT_MAX */
+#include/* time() */
 
 #define XML_BUILDING_EXPAT 1
 
@@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
 static void
 dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
 static int
-dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
+dtdCopy(XML_Parser oldParser,
+DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
 static int
-copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
-
+copyEntityTable(XML_Parser oldParser,
+HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
 static NAMED *
-lookup(HASH_TABLE *table, KEY name, size_t createSize);
+lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
 static void FASTCALL
 hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
 static void FASTCALL hashTableClear(HASH_TABLE *);
@@ -429,11 +432,15 @@ static ELEMENT_TYPE *
 getElementType(XML_Parser parser, const ENCODING *enc,
const char *ptr, const char *end);
 
+static unsigned long generate_hash_secret_salt(void);
+static XML_Bool startParsing(XML_Parser parser);
+
 static XML_Parser
 parserCreate(const XML_Char *encodingName,
  const XML_Memory_Handling_Suite *memsuite,
  const XML_Char *nameSep,
  DTD *dtd);
+
 static void
 parserInit(XML_Parser parser, const XML_Char *encodingName);
 
@@ -546,6 +553,7 @@ struct XML_ParserStruct {
   XML_Bool m_useForeignDTD;
   enum XML_ParamEntityParsing m_paramEntityParsing;
 #endif
+  unsigned long m_hash_secret_salt;
 };
 
 #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
@@ -653,6 +661,7 @@ struct XML_ParserStruct {
 #define useForeignDTD (parser->m_useForeignDTD)
 #define paramEntityParsing (parser->m_paramEntityParsing)
 #endif /* XML_DTD */
+#define hash_secret_salt (parser->m_hash_secret_salt)
 
 XML_Parser XMLCALL
 XML_ParserCreate(const XML_Char *encodingName)
@@ -677,22 +686,35 @@ static const XML_Char implicitContext[] 
   ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
 };
 
+static unsigned long
+generate_hash_secret_salt(void)
+{
+  unsigned int seed = time(NULL) % UINT_MAX;
+  srand(seed);
+  return rand();
+}
+
+static XML_Bool  /* only valid for root parser */
+startParsing(XML_Parser parser)
+{
+/* hash functions must be initialized before setContext() is called */
+if (hash_secret_salt == 0)
+  hash_secret_salt = generate_hash_secret_salt();
+if (ns) {
+  /* implicit context only set for root parser, since child
+ parsers (i.e. externa

CVS commit: [netbsd-5-0] xsrc/external/mit/expat/dist

2012-11-26 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Nov 26 19:59:41 UTC 2012

Modified Files:
xsrc/external/mit/expat/dist/lib [netbsd-5-0]: expat.h xmlparse.c
xsrc/external/mit/expat/dist/xmlwf [netbsd-5-0]: readfilemap.c

Log Message:
xsrc/external/mit/expat/dist/lib/expat.hpatch
xsrc/external/mit/expat/dist/lib/xmlparse.c patch
xsrc/external/mit/expat/dist/xmlwf/readfilemap.cpatch

Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
[spz, ticket #1821]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.4.1 xsrc/external/mit/expat/dist/lib/expat.h
cvs rdiff -u -r1.1.1.1.4.1 -r1.1.1.1.4.2 \
xsrc/external/mit/expat/dist/lib/xmlparse.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.4.1 \
xsrc/external/mit/expat/dist/xmlwf/readfilemap.c

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

Modified files:

Index: xsrc/external/mit/expat/dist/lib/expat.h
diff -u xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1.4.1
--- xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1	Tue Jul 29 05:35:06 2008
+++ xsrc/external/mit/expat/dist/lib/expat.h	Mon Nov 26 19:59:40 2012
@@ -883,6 +883,15 @@ XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
   enum XML_ParamEntityParsing parsing);
 
+/* Sets the hash salt to use for internal hash calculations.
+   Helps in preventing DoS attacks based on predicting hash
+   function behavior. This must be called before parsing is started.
+   Returns 1 if successful, 0 when called after parsing has started.
+*/
+XMLPARSEAPI(int)
+XML_SetHashSalt(XML_Parser parser,
+unsigned long hash_salt);
+
 /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
 */

Index: xsrc/external/mit/expat/dist/lib/xmlparse.c
diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.4.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.4.2
--- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.4.1	Wed Jan 27 20:42:42 2010
+++ xsrc/external/mit/expat/dist/lib/xmlparse.c	Mon Nov 26 19:59:40 2012
@@ -5,6 +5,8 @@
 #include 
 #include  /* memset(), memcpy() */
 #include 
+#include  /* UINT_MAX */
+#include/* time() */
 
 #define XML_BUILDING_EXPAT 1
 
@@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
 static void
 dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
 static int
-dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
+dtdCopy(XML_Parser oldParser,
+DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
 static int
-copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
-
+copyEntityTable(XML_Parser oldParser,
+HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
 static NAMED *
-lookup(HASH_TABLE *table, KEY name, size_t createSize);
+lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
 static void FASTCALL
 hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
 static void FASTCALL hashTableClear(HASH_TABLE *);
@@ -429,11 +432,15 @@ static ELEMENT_TYPE *
 getElementType(XML_Parser parser, const ENCODING *enc,
const char *ptr, const char *end);
 
+static unsigned long generate_hash_secret_salt(void);
+static XML_Bool startParsing(XML_Parser parser);
+
 static XML_Parser
 parserCreate(const XML_Char *encodingName,
  const XML_Memory_Handling_Suite *memsuite,
  const XML_Char *nameSep,
  DTD *dtd);
+
 static void
 parserInit(XML_Parser parser, const XML_Char *encodingName);
 
@@ -546,6 +553,7 @@ struct XML_ParserStruct {
   XML_Bool m_useForeignDTD;
   enum XML_ParamEntityParsing m_paramEntityParsing;
 #endif
+  unsigned long m_hash_secret_salt;
 };
 
 #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
@@ -653,6 +661,7 @@ struct XML_ParserStruct {
 #define useForeignDTD (parser->m_useForeignDTD)
 #define paramEntityParsing (parser->m_paramEntityParsing)
 #endif /* XML_DTD */
+#define hash_secret_salt (parser->m_hash_secret_salt)
 
 XML_Parser XMLCALL
 XML_ParserCreate(const XML_Char *encodingName)
@@ -677,22 +686,35 @@ static const XML_Char implicitContext[] 
   ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
 };
 
+static unsigned long
+generate_hash_secret_salt(void)
+{
+  unsigned int seed = time(NULL) % UINT_MAX;
+  srand(seed);
+  return rand();
+}
+
+static XML_Bool  /* only valid for root parser */
+startParsing(XML_Parser parser)
+{
+/* hash functions must be initialized before setContext() is called */
+if (hash_secret_salt == 0)
+  hash_secret_salt = generate_hash_secret_salt();
+if (ns) {
+  /* implicit context only set for root parser, since child
+ parsers (i.e. external entity

CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 19:57:25 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
One more thing required by DragonFly


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librumpuser/rumpuser_port.h

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

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.8 src/lib/librumpuser/rumpuser_port.h:1.9
--- src/lib/librumpuser/rumpuser_port.h:1.8	Mon Nov 26 17:03:15 2012
+++ src/lib/librumpuser/rumpuser_port.h	Mon Nov 26 19:57:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.8 2012/11/26 17:03:15 pooka Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.9 2012/11/26 19:57:24 pooka Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -49,7 +49,9 @@
 #include 
 #include 
 
-#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)
+/* maybe this should be !__NetBSD__ ? */
+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)	\
+defined(__DragonFly__)
 #include 
 #include 
 #include 



CVS commit: src/include

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 19:53:42 UTC 2012

Modified Files:
src/include: pwd.h

Log Message:
revert previous commit since it breaks the build on NetBSD and
apparently that's considered important


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/include/pwd.h

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

Modified files:

Index: src/include/pwd.h
diff -u src/include/pwd.h:1.43 src/include/pwd.h:1.44
--- src/include/pwd.h:1.43	Mon Nov 26 17:18:39 2012
+++ src/include/pwd.h	Mon Nov 26 19:53:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pwd.h,v 1.43 2012/11/26 17:18:39 pooka Exp $	*/
+/*	$NetBSD: pwd.h,v 1.44 2012/11/26 19:53:41 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -61,13 +61,8 @@
  * SUCH DAMAGE.
  */
 
-/* compat stunts to avoid this file defining _PWD_H_ */
-#if !defined(_PWD_H_) && !defined(_COMPAT_PWD_INCLUDED)
-#ifdef _COMPAT_PWD_H_
-#define _COMPAT_PWD_INCLUDED
-#else
+#ifndef _PWD_H_
 #define	_PWD_H_
-#endif
 
 #include 
 #include 



CVS commit: [netbsd-5] src/doc

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 19:53:04 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1819, 1820.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.199 -r1.1.2.200 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.199 src/doc/CHANGES-5.2:1.1.2.200
--- src/doc/CHANGES-5.2:1.1.2.199	Thu Nov 15 13:33:29 2012
+++ src/doc/CHANGES-5.2	Mon Nov 26 19:53:04 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.199 2012/11/15 13:33:29 msaitoh Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.200 2012/11/26 19:53:04 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -8798,3 +8798,15 @@ distrib/sets/lists/base/mi			1.993
 
 	Really mark wake as obsolete
 	[msaitoh]
+
+sys/arch/x86/x86/identcpu.c			1.31 via patch
+
+	MSR fixes for VIA CPUs.  PR#41267.
+	[christos, ticket #1819]
+
+sys/fs/smbfs/smbfs_smb.c			1.43
+sys/netsmb/smb_smb.c1.33
+
+	Make smbfs actually works on big-endian ports.
+	[nakayama, ticket #1820]
+



CVS commit: [netbsd-5] src/sys

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 19:50:12 UTC 2012

Modified Files:
src/sys/fs/smbfs [netbsd-5]: smbfs_smb.c
src/sys/netsmb [netbsd-5]: smb_smb.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1820):
sys/fs/smbfs/smbfs_smb.c: revision 1.43
sys/netsmb/smb_smb.c: revision 1.33
- fix endian cofusion around FID, which is used as is, so no need
  to do byte swapping.
- put right value to ByteCount of SMB_COM_NT_CREATE_ANDX request.
The fix makes smbfs actually works on big-endian port.


To generate a diff of this commit:
cvs rdiff -u -r1.37.6.1 -r1.37.6.2 src/sys/fs/smbfs/smbfs_smb.c
cvs rdiff -u -r1.29.6.1 -r1.29.6.2 src/sys/netsmb/smb_smb.c

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

Modified files:

Index: src/sys/fs/smbfs/smbfs_smb.c
diff -u src/sys/fs/smbfs/smbfs_smb.c:1.37.6.1 src/sys/fs/smbfs/smbfs_smb.c:1.37.6.2
--- src/sys/fs/smbfs/smbfs_smb.c:1.37.6.1	Tue Oct 27 20:46:52 2009
+++ src/sys/fs/smbfs/smbfs_smb.c	Mon Nov 26 19:50:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_smb.c,v 1.37.6.1 2009/10/27 20:46:52 bouyer Exp $	*/
+/*	$NetBSD: smbfs_smb.c,v 1.37.6.2 2012/11/26 19:50:11 riz Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.37.6.1 2009/10/27 20:46:52 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.37.6.2 2012/11/26 19:50:11 riz Exp $");
 
 #include 
 #include 
@@ -689,7 +689,7 @@ smbfs_smb_create(struct smbnode *dnp, co
 			smb_rq_getreply(rqp, &mdp);
 			md_get_uint8(mdp, &wc);
 			if (wc == 1)
-md_get_uint16le(mdp, &fid);
+md_get_uint16(mdp, &fid);
 			else
 error = EBADRPC;
 		}
@@ -1422,8 +1422,6 @@ smbfs_smb_ntcreatex(struct smbnode *np, 
 	mb_put_uint8(mbp, 0);		/* Security tracking mode flags */
 	smb_rq_wend(rqp);
 	smb_rq_bstart(rqp);
-	smb_rq_bend(rqp);
-	mbp->mb_count = 0;
 
 	error = smbfs_fullpath(mbp, SSTOVC(ssp), np, NULL, 0);
 	if (error)
@@ -1435,6 +1433,7 @@ smbfs_smb_ntcreatex(struct smbnode *np, 
 	flen = mbp->mb_count;
 	SMBRQ_PUTLE16(nmlen, flen);
 
+	smb_rq_bend(rqp);
 	error = smb_rq_simple(rqp);
 	if (error)
 		goto bad;

Index: src/sys/netsmb/smb_smb.c
diff -u src/sys/netsmb/smb_smb.c:1.29.6.1 src/sys/netsmb/smb_smb.c:1.29.6.2
--- src/sys/netsmb/smb_smb.c:1.29.6.1	Tue Oct 27 20:31:15 2009
+++ src/sys/netsmb/smb_smb.c	Mon Nov 26 19:50:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: smb_smb.c,v 1.29.6.1 2009/10/27 20:31:15 bouyer Exp $	*/
+/*	$NetBSD: smb_smb.c,v 1.29.6.2 2012/11/26 19:50:11 riz Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.29.6.1 2009/10/27 20:31:15 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.29.6.2 2012/11/26 19:50:11 riz Exp $");
 
 #include 
 #include 
@@ -175,7 +175,7 @@ smb_smb_negotiate(struct smb_vc *vcp, st
 	SMBERROR(("Unexpected length of security blob (%d)\n", sblen));
 	break;
 }
-error = md_get_uint16(mdp, &bc);
+error = md_get_uint16le(mdp, &bc);
 if (error)
 	break;
 if (sp->sv_caps & SMB_CAP_EXT_SECURITY)
@@ -210,7 +210,7 @@ smb_smb_negotiate(struct smb_vc *vcp, st
 if (swlen > SMB_MAXCHALLENGELEN)
 	break;
 md_get_uint16(mdp, NULL);	/* mbz */
-if (md_get_uint16(mdp, &bc) != 0)
+if (md_get_uint16le(mdp, &bc) != 0)
 	break;
 if (bc < swlen)
 	break;



CVS commit: [netbsd-5] src/sys/arch/x86/x86

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 19:44:27 UTC 2012

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: identcpu.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1819):
sys/arch/x86/x86/identcpu.c: revision 1.31
PR/41267: Andrius V: 5.0 RC4 does not detect second CPU in VIA. VIA Eden cpuid
lies about it's ability to do cmpxchg8b. Turn the feature on using the FCR MSR.
Needs pullup to both 5 and 6.


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.6 -r1.10.4.7 src/sys/arch/x86/x86/identcpu.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/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.10.4.6 src/sys/arch/x86/x86/identcpu.c:1.10.4.7
--- src/sys/arch/x86/x86/identcpu.c:1.10.4.6	Thu Apr 22 20:02:48 2010
+++ src/sys/arch/x86/x86/identcpu.c	Mon Nov 26 19:44:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.10.4.6 2010/04/22 20:02:48 snj Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.10.4.7 2012/11/26 19:44:26 riz Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.6 2010/04/22 20:02:48 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.7 2012/11/26 19:44:26 riz Exp $");
 
 #include "opt_enhanced_speedstep.h"
 #include "opt_intel_odcm.h"
@@ -387,13 +387,31 @@ static void
 cpu_probe_winchip(struct cpu_info *ci)
 {
 
-	if (cpu_vendor != CPUVENDOR_IDT ||
-	CPUID2FAMILY(ci->ci_signature) != 5)
+	if (cpu_vendor != CPUVENDOR_IDT)
 		return;
 
-	if (CPUID2MODEL(ci->ci_signature) == 4) {
-		/* WinChip C6 */
-		ci->ci_feature_flags &= ~CPUID_TSC;
+	switch (CPUID2FAMILY(ci->ci_signature)) {
+	case 5:
+ 		/* WinChip C6 */
+		if (CPUID2MODEL(ci->ci_signature) == 4)
+			ci->ci_feature_flags &= ~CPUID_TSC;
+		break;
+	case 6:
+		/*
+		 * VIA Eden ESP 
+		 *
+		 * Quoting from page 3-4 of: "VIA Eden ESP Processor Datasheet"
+		 * http://www.via.com.tw/download/mainboards/6/14/Eden20v115.pdf
+		 * 
+		 * 1. The CMPXCHG8B instruction is provided and always enabled,
+		 *however, it appears disabled in the corresponding CPUID
+		 *function bit 0 to avoid a bug in an early version of
+		 *Windows NT. However, this default can be changed via a
+		 *bit in the FCR MSR.
+		 */
+		ci->ci_feature_flags |= CPUID_CX8;
+		wrmsr(MSR_VIA_FCR, rdmsr(MSR_VIA_FCR) | 0x0001);
+		break;
 	}
 }
 



CVS commit: src/external/lgpl3/gmp/lib/libgmp

2012-11-26 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Nov 26 18:57:36 UTC 2012

Modified Files:
src/external/lgpl3/gmp/lib/libgmp: Makefile
src/external/lgpl3/gmp/lib/libgmp/arch/alpha: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/arm: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/armeb: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/earm: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/hppa: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/i386: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/m68000: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/m68k: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/mips64el: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/mipseb: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/mipsel: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc64: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/sh3eb: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/sh3el: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/sparc: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/sparc64: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/vax: Makefile.inc
src/external/lgpl3/gmp/lib/libgmp/arch/x86_64: Makefile.inc

Log Message:
collect common rules in the shared Makefile, this propagates the .OBJDIR
fix done for i386 last year to all other ports


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/lgpl3/gmp/lib/libgmp/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/alpha/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/arm/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/armeb/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/earm/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/hppa/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 \
src/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/m68000/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl3/gmp/lib/libgmp/arch/m68k/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/mipseb/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/mipsel/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 \
src/external/lgpl3/gmp/lib/libgmp/arch/sh3el/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/sparc/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl3/gmp/lib/libgmp/arch/sparc64/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 \
src/external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc

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

Modified files:

Index: src/external/lgpl3/gmp/lib/libgmp/Makefile
diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.13 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.14
--- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.13	Fri Aug 10 16:05:26 2012
+++ src/external/lgpl3/gmp/lib/libgmp/Makefile	Mon Nov 26 18:57:33 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2012/08/10 16:05:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2012/11/26 18:57:33 drochner Exp $
 
 .include 
 
@@ -181,6 +181,39 @@ CLEANFILES+=	${DPSRCS} gen-fac_ui gen-fi
 
 .include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
 
+# XXX stuff looks for "../config.m4"
+dummy:
+	mkdir dummy
+${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4
+	cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
+
+CLEANFILES+=	config.m4
+clean: cleandummy
+cleandummy: .PHONY
+	-rmdir dummy
+
+BUILD_S_INCS=	-I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn
+
+.for _build _src in ${ASM_SRCS_LIST}
+${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4
+	${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} ${BUILD_S_INCS} \
+		${M4FLAGS} ${M4FLAGS.${.TARGET:R}} \
+		-DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET}
+
+SRCS+=		${_build:R}.s
+CLEANFILES+=	${_build:R}.s
+.endfor
+
+.for _build _src in ${C_SRCS_LIST}
+mpn_${_build}: Makefile
+	echo '#include "${_src}"' >

CVS commit: src/sys/arch/sandpoint

2012-11-26 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Mon Nov 26 17:56:17 UTC 2012

Modified Files:
src/sys/arch/sandpoint: README.NAS

Log Message:
Add another NH-231 clone to the list: Vibe NS-349-S


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sandpoint/README.NAS

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/sandpoint/README.NAS
diff -u src/sys/arch/sandpoint/README.NAS:1.21 src/sys/arch/sandpoint/README.NAS:1.22
--- src/sys/arch/sandpoint/README.NAS:1.21	Sun Nov  6 00:28:12 2011
+++ src/sys/arch/sandpoint/README.NAS	Mon Nov 26 17:56:17 2012
@@ -1,4 +1,4 @@
-$NetBSD: README.NAS,v 1.21 2011/11/06 00:28:12 phx Exp $
+$NetBSD: README.NAS,v 1.22 2012/11/26 17:56:17 phx Exp $
 
  MPC8241/8245 NAS products 
 
@@ -33,7 +33,8 @@ stge.15	acardide.16	D-Link DSM-G600 (Rev
 re.15	iteide.16	Netronix NH-230, Allnet ALL6250, Encore ENNHD-1000,
 			Planex NAS-01G
 re.15	satalink.16	Netronix NH-231, Allnet ALL6260, Longshine LCS-8311,
-			Fujitsu-Siemens AMS150, Fujitsu-Siemens SBLAN2
+			Fujitsu-Siemens AMS150, Fujitsu-Siemens SBLAN2,
+			Vibe NS-349-S
 
 
 PCI line/pin and EPIC IRQ assignments



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 17:55:11 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_dl.c rumpuser_sp.c

Log Message:
Support DragonFly BSD.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librumpuser/rumpuser_dl.c
cvs rdiff -u -r1.49 -r1.50 src/lib/librumpuser/rumpuser_sp.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/librumpuser/rumpuser_dl.c
diff -u src/lib/librumpuser/rumpuser_dl.c:1.9 src/lib/librumpuser/rumpuser_dl.c:1.10
--- src/lib/librumpuser/rumpuser_dl.c:1.9	Mon Nov 26 17:00:54 2012
+++ src/lib/librumpuser/rumpuser_dl.c	Mon Nov 26 17:55:11 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_dl.c,v 1.9 2012/11/26 17:00:54 pooka Exp $	*/
+/*  $NetBSD: rumpuser_dl.c,v 1.10 2012/11/26 17:55:11 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -33,7 +33,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_dl.c,v 1.9 2012/11/26 17:00:54 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_dl.c,v 1.10 2012/11/26 17:55:11 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -53,7 +53,8 @@ __RCSID("$NetBSD: rumpuser_dl.c,v 1.9 20
 #include 
 
 #if defined(__ELF__) && (defined(__NetBSD__) || defined(__FreeBSD__)	\
-|| (defined(__sun__) && defined(__svr4__))) || defined(__linux__)
+|| (defined(__sun__) && defined(__svr4__))) || defined(__linux__)	\
+|| defined(__DragonFly__)
 static size_t symtabsize = 0, strtabsize = 0;
 static size_t symtaboff = 0, strtaboff = 0;
 static uint8_t *symtab = NULL;

Index: src/lib/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.49 src/lib/librumpuser/rumpuser_sp.c:1.50
--- src/lib/librumpuser/rumpuser_sp.c:1.49	Mon Nov 26 17:03:15 2012
+++ src/lib/librumpuser/rumpuser_sp.c	Mon Nov 26 17:55:11 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.50 2012/11/26 17:55:11 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -37,7 +37,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.50 2012/11/26 17:55:11 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -117,7 +117,7 @@ getdisco(void)
 	return discocnt;
 }
 
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
 
 #include 
 #define signaldisco()	atomic_add_int(&disco, 1)



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 17:54:51 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_pth.c

Log Message:
PTHREAD_PROCESS_SHARED private doesn't seem to work on DragonFly, so
init the spin lock _PRIVATE (we don't really care which it is).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librumpuser/rumpuser_pth.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/librumpuser/rumpuser_pth.c
diff -u src/lib/librumpuser/rumpuser_pth.c:1.9 src/lib/librumpuser/rumpuser_pth.c:1.10
--- src/lib/librumpuser/rumpuser_pth.c:1.9	Mon Oct  8 18:02:04 2012
+++ src/lib/librumpuser/rumpuser_pth.c	Mon Nov 26 17:54:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_pth.c,v 1.9 2012/10/08 18:02:04 pooka Exp $	*/
+/*	$NetBSD: rumpuser_pth.c,v 1.10 2012/11/26 17:54:51 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth.c,v 1.9 2012/10/08 18:02:04 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth.c,v 1.10 2012/11/26 17:54:51 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -386,7 +386,7 @@ rumpuser_rw_init(struct rumpuser_rw **rw
 
 	NOFAIL(*rw = malloc(sizeof(struct rumpuser_rw)));
 	NOFAIL_ERRNO(pthread_rwlock_init(&((*rw)->pthrw), NULL));
-	NOFAIL_ERRNO(pthread_spin_init(&((*rw)->spin), PTHREAD_PROCESS_SHARED));
+	NOFAIL_ERRNO(pthread_spin_init(&((*rw)->spin),PTHREAD_PROCESS_PRIVATE));
 	(*rw)->readers = 0;
 	(*rw)->writer = NULL;
 }



CVS commit: [netbsd-6] src/doc

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 17:40:28 UTC 2012

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

Log Message:
Ticket 718


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-6.1

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.44 src/doc/CHANGES-6.1:1.1.2.45
--- src/doc/CHANGES-6.1:1.1.2.44	Sat Nov 24 21:47:28 2012
+++ src/doc/CHANGES-6.1	Mon Nov 26 17:40:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.44 2012/11/24 21:47:28 jdc Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.45 2012/11/26 17:40:28 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -916,7 +916,7 @@ sys/dev/usb/if_urndis.c1.4
 
 lib/libc/arch/arm/sys/__aeabi_read_tp.S		1.3
 
-	Add $NetBSD: CHANGES-6.1,v 1.1.2.44 2012/11/24 21:47:28 jdc Exp $ tag.  Use ip to save r1 instead of the stack.
+	Add $NetBSD: CHANGES-6.1,v 1.1.2.45 2012/11/26 17:40:28 riz Exp $ tag.  Use ip to save r1 instead of the stack.
 	[matt, ticket #701]
 
 sys/net/npf/npf.c1.14
@@ -7014,3 +7014,16 @@ tests/lib/libc/sys/t_kevent.c1.2-1.5
 	Add a test for adding an event to an unsupported fd.
 	[christos, ticket #716]
 
+sys/net/npf/npf_impl.hpatch
+usr.sbin/npf/npfctl/npf_disassemble.c		1.11-1.12
+usr.sbin/npf/npfctl/npf_extmod.c		1.2-1.3
+usr.sbin/npf/npfctl/npf_ncgen.c			1.14-1.15
+usr.sbin/npf/npfctl/npf_parse.y			1.15-1.16 via patch
+usr.sbin/npf/npfctl/npf_scan.l			1.7-1.8
+usr.sbin/npf/npfctl/npf_var.c			1.6-1.7
+usr.sbin/npf/npfctl/npfctl.c			1.22-1.24
+usr.sbin/npf/npfctl/npfctl.h			1.22 via patch
+
+	Various NPF fixes to bring it up-to-date.
+	[rmind, ticket #718]
+



CVS commit: [netbsd-6] src

2012-11-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 26 17:39:29 UTC 2012

Modified Files:
src/sys/net/npf [netbsd-6]: npf_impl.h
src/usr.sbin/npf/npfctl [netbsd-6]: npf_disassemble.c npf_extmod.c
npf_ncgen.c npf_parse.y npf_scan.l npf_var.c npfctl.c npfctl.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #718):
usr.sbin/npf/npfctl/npfctl.c: revision 1.22
usr.sbin/npf/npfctl/npfctl.c: revision 1.23
usr.sbin/npf/npfctl/npf_parse.y: revision 1.15
usr.sbin/npf/npfctl/npfctl.c: revision 1.24
usr.sbin/npf/npfctl/npf_parse.y: revision 1.16
usr.sbin/npf/npfctl/npfctl.h: revision 1.22
usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.14
usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.15
usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.11
usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.12
usr.sbin/npf/npfctl/npf_scan.l: revision 1.7
usr.sbin/npf/npfctl/npf_scan.l: revision 1.8
usr.sbin/npf/npfctl/npf_extmod.c: revision 1.2
usr.sbin/npf/npfctl/npf_extmod.c: revision 1.3
usr.sbin/npf/npfctl/npf_var.c: revision 1.6
usr.sbin/npf/npfctl/npf_var.c: revision 1.7
gcc 4.1 is not smart enough to notice "arg" is only used when 
initialized
correctly and produces a "might be used unintialized" warning.
npfctl: switch to efun(3) routines.
npfctl: switch to ecalloc(3).


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.10 -r1.10.2.11 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.3.2.8 -r1.3.2.9 src/usr.sbin/npf/npfctl/npf_disassemble.c \
src/usr.sbin/npf/npfctl/npf_parse.y
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/usr.sbin/npf/npfctl/npf_extmod.c
cvs rdiff -u -r1.7.2.5 -r1.7.2.6 src/usr.sbin/npf/npfctl/npf_ncgen.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/usr.sbin/npf/npfctl/npf_scan.l
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/npf/npfctl/npf_var.c
cvs rdiff -u -r1.10.2.8 -r1.10.2.9 src/usr.sbin/npf/npfctl/npfctl.c
cvs rdiff -u -r1.11.2.8 -r1.11.2.9 src/usr.sbin/npf/npfctl/npfctl.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/net/npf/npf_impl.h
diff -u src/sys/net/npf/npf_impl.h:1.10.2.10 src/sys/net/npf/npf_impl.h:1.10.2.11
--- src/sys/net/npf/npf_impl.h:1.10.2.10	Sat Nov 24 04:34:42 2012
+++ src/sys/net/npf/npf_impl.h	Mon Nov 26 17:39:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_impl.h,v 1.10.2.10 2012/11/24 04:34:42 riz Exp $	*/
+/*	$NetBSD: npf_impl.h,v 1.10.2.11 2012/11/26 17:39:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -201,7 +201,7 @@ int		npf_match_tcpfl(npf_cache_t *, nbuf
 void		npf_tableset_sysinit(void);
 void		npf_tableset_sysfini(void);
 
-const pt_tree_ops_t npf_table_ptree_ops;
+extern const pt_tree_ops_t npf_table_ptree_ops;
 
 npf_tableset_t *npf_tableset_create(void);
 void		npf_tableset_destroy(npf_tableset_t *);

Index: src/usr.sbin/npf/npfctl/npf_disassemble.c
diff -u src/usr.sbin/npf/npfctl/npf_disassemble.c:1.3.2.8 src/usr.sbin/npf/npfctl/npf_disassemble.c:1.3.2.9
--- src/usr.sbin/npf/npfctl/npf_disassemble.c:1.3.2.8	Sat Nov 24 04:34:43 2012
+++ src/usr.sbin/npf/npfctl/npf_disassemble.c	Mon Nov 26 17:39:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_disassemble.c,v 1.3.2.8 2012/11/24 04:34:43 riz Exp $	*/
+/*	$NetBSD: npf_disassemble.c,v 1.3.2.9 2012/11/26 17:39:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  * FIXME: config generation should be redesigned..
  */
 #include 
-__RCSID("$NetBSD: npf_disassemble.c,v 1.3.2.8 2012/11/24 04:34:43 riz Exp $");
+__RCSID("$NetBSD: npf_disassemble.c,v 1.3.2.9 2012/11/26 17:39:29 riz Exp $");
 
 #include 
 #include 
@@ -48,8 +48,6 @@ __RCSID("$NetBSD: npf_disassemble.c,v 1.
 #include 
 #include 
 
-#include 
-
 #define NPF_OPCODES_STRINGS
 #include 
 
@@ -108,7 +106,7 @@ npfctl_ncode_add_target(nc_inf_t *ni, co
 	/* Grow array, if needed, and add a new target. */
 	if (ni->ni_targidx == ni->ni_targsize) {
 		ni->ni_targsize += 16;
-		ni->ni_targs = xrealloc(ni->ni_targs,
+		ni->ni_targs = erealloc(ni->ni_targs,
 		ni->ni_targsize * sizeof(uint32_t));
 	}
 	assert(ni->ni_targidx < ni->ni_targsize);
@@ -372,7 +370,7 @@ npfctl_ncode_operand(nc_inf_t *ni, char 
 nc_inf_t *
 npfctl_ncode_disinf(FILE *fp)
 {
-	nc_inf_t *ni = zalloc(sizeof(nc_inf_t));
+	nc_inf_t *ni = ecalloc(1, sizeof(nc_inf_t));
 
 	memset(ni, 0, sizeof(nc_inf_t));
 	ni->ni_fp = fp;
Index: src/usr.sbin/npf/npfctl/npf_parse.y
diff -u src/usr.sbin/npf/npfctl/npf_parse.y:1.3.2.8 src/usr.sbin/npf/npfctl/npf_parse.y:1.3.2.9
--- src/usr.sbin/npf/npfctl/npf_parse.y:1.3.2.8	Sun Nov 18 22:38:28 2012
+++ src/usr.sbin/npf/npfctl/npf_parse.y	Mon Nov 26 17:39:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_parse.y,v 1.3.2.8 2012/11/18 22:38:28 riz Exp $	*/
+/*	$NetBSD: npf_parse.y,v 1.3.2.9 2012/11/26 17:39:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The 

CVS commit: src/sys/dev/usb

2012-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 26 17:36:35 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.624 -r1.625 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.625 -r1.626 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.624 src/sys/dev/usb/usbdevs.h:1.625
--- src/sys/dev/usb/usbdevs.h:1.624	Thu Nov  1 20:58:48 2012
+++ src/sys/dev/usb/usbdevs.h	Mon Nov 26 12:36:35 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.624 2012/11/02 00:58:48 jakllsch Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.625 2012/11/26 17:36:35 christos Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.631 2012/11/02 00:57:57 jakllsch Exp
+ *	NetBSD: usbdevs,v 1.632 2012/11/26 17:34:45 christos Exp
  */
 
 /*
@@ -525,6 +525,7 @@
 #define	USB_VENDOR_SWEEX2	0x177f		/* Sweex */
 #define	USB_VENDOR_MISC	0x1781		/* Misc Vendors */
 #define	USB_VENDOR_DISPLAYLINK	0x17e9		/* DisplayLink */
+#define	USB_VENDOR_LENOVO	0x17ef		/* Lenovo */
 #define	USB_VENDOR_E3C	0x18b4		/* E3C Technologies */
 #define	USB_VENDOR_AMIT	0x18c5		/* AMIT */
 #define	USB_VENDOR_QCOM	0x18e8		/* Qcom */
@@ -874,6 +875,7 @@
 #define	USB_PRODUCT_ASIX_AX88772	0x7720		/* AX88772 USB 2.0 10/100 ethernet controller */
 #define	USB_PRODUCT_ASIX_AX88772A	0x772a		/* AX88772A USB 2.0 10/100 Ethernet adapter */
 #define	USB_PRODUCT_ASIX_AX88772B	0x772b		/* AX88772B USB 2.0 10/100 Ethernet adapter */
+#define	USB_PRODUCT_ASIX_AX88772B_1	0x7e2b		/* AX88772B1 USB 2.0 10/100 Ethernet adapter */
 
 /* ASUSTeK computer products */
 #define	USB_PRODUCT_ASUSTEK_WL167G	0x1707		/* WL-167g USB2.0 WLAN Adapter */
@@ -1281,6 +1283,7 @@
 /* D-Link products */
 /*product DLINK DSBS25		0x0100	DSB-S25 serial adapter*/
 #define	USB_PRODUCT_DLINK_DUBE100	0x1a00		/* 10/100 ethernet adapter */
+#define	USB_PRODUCT_DLINK_DUBE100C1	0x1a02		/* DUB-E100 rev C1 */
 #define	USB_PRODUCT_DLINK_DSB650TX4	0x200c		/* 10/100 ethernet adapter */
 #define	USB_PRODUCT_DLINK_DWL120E	0x3200		/* DWL-120 rev E */
 #define	USB_PRODUCT_DLINK_DWA130C	0x3301		/* DWA-130 rev C */
@@ -1890,6 +1893,9 @@
 #define	USB_PRODUCT_LACIE_HD	0xa601		/* Hard Disk */
 #define	USB_PRODUCT_LACIE_CDRW	0xa602		/* CD R/W */
 
+/* Lenovo products */
+#define	USB_PRODUCT_LENOVO_ETHERNET	0x7203		/* USB 2.0 Ethernet */
+
 /* Lexar products */
 #define	USB_PRODUCT_LEXAR_JUMPSHOT	0x0001		/* jumpSHOT CompactFlash Reader */
 #define	USB_PRODUCT_LEXAR_2662WAR	0xa002		/* 2662W-AR */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.625 src/sys/dev/usb/usbdevs_data.h:1.626
--- src/sys/dev/usb/usbdevs_data.h:1.625	Thu Nov  1 20:58:48 2012
+++ src/sys/dev/usb/usbdevs_data.h	Mon Nov 26 12:36:35 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.625 2012/11/02 00:58:48 jakllsch Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.626 2012/11/26 17:36:35 christos Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.631 2012/11/02 00:57:57 jakllsch Exp
+ *	NetBSD: usbdevs,v 1.632 2012/11/26 17:34:45 christos Exp
  */
 
 /*
@@ -1879,6 +1879,10 @@ const struct usb_vendor usb_vendors[] = 
 	"DisplayLink",
 	},
 	{
+	USB_VENDOR_LENOVO,
+	"Lenovo",
+	},
+	{
 	USB_VENDOR_E3C,
 	"E3C Technologies",
 	},
@@ -2111,7 +2115,7 @@ const struct usb_vendor usb_vendors[] = 
 	"GNU Radio USRP",
 	},
 };
-const int usb_nvendors = 518;
+const int usb_nvendors = 519;
 
 const struct usb_product usb_products[] = {
 	{
@@ -2911,6 +2915,10 @@ const struct usb_product usb_products[] 
 	"AX88772B USB 2.0 10/100 Ethernet adapter",
 	},
 	{
+	USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B_1,
+	"AX88772B1 USB 2.0 10/100 Ethernet adapter",
+	},
+	{
 	USB_VENDOR_ASUSTEK, USB_PRODUCT_ASUSTEK_WL167G,
 	"WL-167g USB2.0 WLAN Adapter",
 	},
@@ -4107,6 +4115,10 @@ const struct usb_product usb_products[] 
 	"10/100 ethernet adapter",
 	},
 	{
+	USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100C1,
+	"DUB-E100 rev C1",
+	},
+	{
 	USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4,
 	"10/100 ethernet adapter",
 	},
@@ -5831,6 +5843,10 @@ const struct usb_product usb_products[] 
 	"CD R/W",
 	},
 	{
+	USB_VENDOR_LENOVO, USB_PRODUCT_LENOVO_ETHERNET,
+	"USB 2.0 Ethernet",
+	},
+	{
 	USB_VENDOR_LEXAR, USB_PRODUCT_LEXAR_JUMPSHOT,
 	"jumpSHOT CompactFlash Reader",
 	},
@@ -9839,4 +9855,4 @@ const struct usb_product usb_products[] 
 	"Prestige",
 	},
 };
-const int usb_nproducts = 1931;
+const int usb_nproducts = 1934;



CVS commit: src/sys/dev/usb

2012-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 26 17:36:27 UTC 2012

Modified Files:
src/sys/dev/usb: if_axe.c

Log Message:
PR/47245: Toby Karyadi: more matches for AX88772B usb ethernet.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/usb/if_axe.c

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

Modified files:

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.58 src/sys/dev/usb/if_axe.c:1.59
--- src/sys/dev/usb/if_axe.c:1.58	Sun Nov 25 17:22:39 2012
+++ src/sys/dev/usb/if_axe.c	Mon Nov 26 12:36:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.58 2012/11/25 22:22:39 christos Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.59 2012/11/26 17:36:27 christos Exp $	*/
 /*	$OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
 
 /*
@@ -89,7 +89,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.58 2012/11/25 22:22:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.59 2012/11/26 17:36:27 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -146,6 +146,7 @@ static const struct axe_type axe_devs[] 
 	{ { USB_VENDOR_ASIX,		USB_PRODUCT_ASIX_AX88772}, AX772 },
 	{ { USB_VENDOR_ASIX,		USB_PRODUCT_ASIX_AX88772A}, AX772 },
 	{ { USB_VENDOR_ASIX,		USB_PRODUCT_ASIX_AX88772B}, AX772 | AX772B },
+	{ { USB_VENDOR_ASIX,		USB_PRODUCT_ASIX_AX88772B_1}, AX772 | AX772B },
 	{ { USB_VENDOR_ASIX,		USB_PRODUCT_ASIX_AX88178}, AX178 },
 	{ { USB_VENDOR_ATEN,		USB_PRODUCT_ATEN_UC210T}, 0 },
 	{ { USB_VENDOR_BELKIN,		USB_PRODUCT_BELKIN_F5D5055 }, AX178 },
@@ -154,9 +155,11 @@ static const struct axe_type axe_devs[] 
 	{ { USB_VENDOR_COREGA,		USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100}, 0 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
+	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100C1 }, 
 	{ { USB_VENDOR_GOODWAY,		USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
 	{ { USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_ETGUS2 }, AX178 },
 	{ { USB_VENDOR_JVC,		USB_PRODUCT_JVC_MP_PRX1}, 0 },
+	{ { USB_VENDOR_LENOVO,		USB_PRODUCT_LENOVO_ETHERNET }, 
 	{ { USB_VENDOR_LINKSYS2,	USB_PRODUCT_LINKSYS2_USB200M}, 0 },
 	{ { USB_VENDOR_LINKSYS4,	USB_PRODUCT_LINKSYS4_USB1000 }, AX178 },
 	{ { USB_VENDOR_LOGITEC,		USB_PRODUCT_LOGITEC_LAN_GTJU2}, AX178 },



CVS commit: src/sys/dev/usb

2012-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov 26 17:34:46 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
PR/47245: Toby Karyadi: More identifiers for AX88772B usb ethernet


To generate a diff of this commit:
cvs rdiff -u -r1.631 -r1.632 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.631 src/sys/dev/usb/usbdevs:1.632
--- src/sys/dev/usb/usbdevs:1.631	Thu Nov  1 20:57:57 2012
+++ src/sys/dev/usb/usbdevs	Mon Nov 26 12:34:45 2012
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.631 2012/11/02 00:57:57 jakllsch Exp $
+$NetBSD: usbdevs,v 1.632 2012/11/26 17:34:45 christos Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -518,6 +518,7 @@ vendor ASUSTEK2		0x1761	ASUSTeK Computer
 vendor SWEEX2		0x177f	Sweex
 vendor MISC		0x1781	Misc Vendors
 vendor DISPLAYLINK	0x17e9	DisplayLink
+vendor LENOVO		0x17ef	Lenovo
 vendor E3C		0x18b4	E3C Technologies
 vendor AMIT		0x18c5	AMIT
 vendor QCOM		0x18e8	Qcom
@@ -867,6 +868,7 @@ product ASIX AX88178		0x1780	AX88178 USB
 product ASIX AX88772		0x7720	AX88772 USB 2.0 10/100 ethernet controller
 product ASIX AX88772A		0x772a	AX88772A USB 2.0 10/100 Ethernet adapter
 product ASIX AX88772B		0x772b	AX88772B USB 2.0 10/100 Ethernet adapter
+product ASIX AX88772B_1		0x7e2b	AX88772B1 USB 2.0 10/100 Ethernet adapter
 
 /* ASUSTeK computer products */
 product ASUSTEK WL167G		0x1707	WL-167g USB2.0 WLAN Adapter
@@ -1274,6 +1276,7 @@ product DISPLAYLINK UM7X0	0x401a	nanovis
 /* D-Link products */
 /*product DLINK DSBS25		0x0100	DSB-S25 serial adapter*/
 product DLINK DUBE100		0x1a00	10/100 ethernet adapter
+product DLINK DUBE100C1		0x1a02	DUB-E100 rev C1
 product DLINK DSB650TX4		0x200c	10/100 ethernet adapter
 product DLINK DWL120E		0x3200	DWL-120 rev E
 product DLINK DWA130C		0x3301	DWA-130 rev C
@@ -1883,6 +1886,9 @@ product LACIE PKTDRV		0x0211	PocketDrive
 product LACIE HD		0xa601	Hard Disk
 product LACIE CDRW		0xa602	CD R/W
 
+/* Lenovo products */
+product LENOVO ETHERNET		0x7203	USB 2.0 Ethernet
+
 /* Lexar products */
 product LEXAR JUMPSHOT		0x0001	jumpSHOT CompactFlash Reader
 product LEXAR 2662WAR		0xa002	2662W-AR



CVS commit: src/include

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 17:18:40 UTC 2012

Modified Files:
src/include: pwd.h

Log Message:
When including this from a tools build, avoid defining _PWD_H_ since
that macro causes DragonFly's util.h to define conflicting routines.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/include/pwd.h

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

Modified files:

Index: src/include/pwd.h
diff -u src/include/pwd.h:1.42 src/include/pwd.h:1.43
--- src/include/pwd.h:1.42	Sun Jan 11 03:04:12 2009
+++ src/include/pwd.h	Mon Nov 26 17:18:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pwd.h,v 1.42 2009/01/11 03:04:12 christos Exp $	*/
+/*	$NetBSD: pwd.h,v 1.43 2012/11/26 17:18:39 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -61,8 +61,13 @@
  * SUCH DAMAGE.
  */
 
-#ifndef _PWD_H_
+/* compat stunts to avoid this file defining _PWD_H_ */
+#if !defined(_PWD_H_) && !defined(_COMPAT_PWD_INCLUDED)
+#ifdef _COMPAT_PWD_H_
+#define _COMPAT_PWD_INCLUDED
+#else
 #define	_PWD_H_
+#endif
 
 #include 
 #include 



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 17:03:16 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_port.h rumpuser_sp.c

Log Message:
FreeBSD fixes.

from phi...@freebsd.org


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/librumpuser/rumpuser_port.h
cvs rdiff -u -r1.48 -r1.49 src/lib/librumpuser/rumpuser_sp.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/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.7 src/lib/librumpuser/rumpuser_port.h:1.8
--- src/lib/librumpuser/rumpuser_port.h:1.7	Mon Nov 26 16:30:14 2012
+++ src/lib/librumpuser/rumpuser_port.h	Mon Nov 26 17:03:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.7 2012/11/26 16:30:14 pooka Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.8 2012/11/26 17:03:15 pooka Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -49,7 +49,7 @@
 #include 
 #include 
 
-#if defined(__linux__) || defined(__sun__)
+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)
 #include 
 #include 
 #include 

Index: src/lib/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.48 src/lib/librumpuser/rumpuser_sp.c:1.49
--- src/lib/librumpuser/rumpuser_sp.c:1.48	Fri Sep 21 14:33:03 2012
+++ src/lib/librumpuser/rumpuser_sp.c	Mon Nov 26 17:03:15 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.48 2012/09/21 14:33:03 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -37,7 +37,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.48 2012/09/21 14:33:03 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -117,6 +117,12 @@ getdisco(void)
 	return discocnt;
 }
 
+#elif defined(__FreeBSD__)
+
+#include 
+#define signaldisco()	atomic_add_int(&disco, 1)
+#define getdisco()	atomic_readandclear_int(&disco)
+
 #else /* NetBSD */
 
 #include 



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 17:00:55 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_dl.c

Log Message:
const poison is the cure


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librumpuser/rumpuser_dl.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/librumpuser/rumpuser_dl.c
diff -u src/lib/librumpuser/rumpuser_dl.c:1.8 src/lib/librumpuser/rumpuser_dl.c:1.9
--- src/lib/librumpuser/rumpuser_dl.c:1.8	Fri Jul 27 09:09:05 2012
+++ src/lib/librumpuser/rumpuser_dl.c	Mon Nov 26 17:00:54 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_dl.c,v 1.8 2012/07/27 09:09:05 pooka Exp $	*/
+/*  $NetBSD: rumpuser_dl.c,v 1.9 2012/11/26 17:00:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -33,7 +33,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_dl.c,v 1.8 2012/07/27 09:09:05 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_dl.c,v 1.9 2012/11/26 17:00:54 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -101,11 +101,11 @@ reservespace(void *store, size_t *stores
 #define DYNn_GETMEMBER(base, n, thevar, result)\
 do {	\
 	if (eident == ELFCLASS32) {	\
-		Elf32_Dyn *dyn = base;	\
+		const Elf32_Dyn *dyn = base;\
 		/*LINTED*/		\
 		result = dyn[n].thevar;	\
 	} else {			\
-		Elf64_Dyn *dyn = base;	\
+		const Elf64_Dyn *dyn = base;\
 		/*LINTED*/		\
 		result = dyn[n].thevar;	\
 	}\
@@ -157,7 +157,7 @@ getsymbols(struct link_map *map)
 	char *str_base;
 	void *syms_base = NULL; /* XXXgcc */
 	size_t curstrsize;
-	void *ed_base;
+	const void *ed_base;
 	uint64_t ed_tag;
 	size_t cursymcount;
 	unsigned i;



CVS commit: src/tools

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 16:57:25 UTC 2012

Modified Files:
src/tools: Makefile

Log Message:
Build gmake iff we're going to need it.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.159 src/tools/Makefile:1.160
--- src/tools/Makefile:1.159	Thu Nov 15 23:51:54 2012
+++ src/tools/Makefile	Mon Nov 26 16:57:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.159 2012/11/15 23:51:54 joerg Exp $
+#	$NetBSD: Makefile,v 1.160 2012/11/26 16:57:25 pooka Exp $
 
 .include 
 
@@ -6,11 +6,11 @@
 # plain make.
 .MAIN: build_install
 
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
+.if ${TOOLCHAIN_MISSING} == "no"
+.if defined(HAVE_GCC)
 TOOLCHAIN_BITS= gmake .WAIT
 .endif
 
-.if ${TOOLCHAIN_MISSING} == "no"
 .if defined(HAVE_GCC)
 .if ${HAVE_GCC} >= 45
 TOOLCHAIN_BITS+= gmp .WAIT



CVS commit: src/lib/librumpuser

2012-11-26 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Nov 26 16:30:14 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser_port.h sp_common.c

Log Message:
Since SA_SETLEN() is used only for sockaddr_in, convert it to SIN_SETLEN()
to avoid compiler whining on breaking strict aliasing rules.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librumpuser/rumpuser_port.h
cvs rdiff -u -r1.34 -r1.35 src/lib/librumpuser/sp_common.c

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

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.6 src/lib/librumpuser/rumpuser_port.h:1.7
--- src/lib/librumpuser/rumpuser_port.h:1.6	Thu Nov 22 21:23:08 2012
+++ src/lib/librumpuser/rumpuser_port.h	Mon Nov 26 16:30:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.6 2012/11/22 21:23:08 pooka Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.7 2012/11/26 16:30:14 pooka Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -102,9 +102,9 @@ posix_memalign(void **ptr, size_t align,
 #endif
 
 #if defined(__linux__) || defined(__sun__)
-#define SA_SETLEN(a,b)
+#define SIN_SETLEN(a,b)
 #else /* BSD */
-#define SA_SETLEN(_sa_, _len_) ((struct sockaddr *)_sa_)->sa_len = _len_
+#define SIN_SETLEN(_sin_, _len_) _sin_.sin_len = _len_
 #endif
 
 #ifndef __predict_true

Index: src/lib/librumpuser/sp_common.c
diff -u src/lib/librumpuser/sp_common.c:1.34 src/lib/librumpuser/sp_common.c:1.35
--- src/lib/librumpuser/sp_common.c:1.34	Sun Nov 18 19:29:40 2012
+++ src/lib/librumpuser/sp_common.c	Mon Nov 26 16:30:14 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: sp_common.c,v 1.34 2012/11/18 19:29:40 pooka Exp $	*/
+/*  $NetBSD: sp_common.c,v 1.35 2012/11/26 16:30:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -546,7 +546,7 @@ tcp_parse(const char *addr, struct socka
 	int port;
 
 	memset(&sin, 0, sizeof(sin));
-	SA_SETLEN(&sin, sizeof(sin));
+	SIN_SETLEN(sin, sizeof(sin));
 	sin.sin_family = AF_INET;
 
 	p = strchr(addr, ':');



CVS commit: src/sys

2012-11-26 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Nov 26 16:22:22 UTC 2012

Modified Files:
src/sys/sys: fstypes.h
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
allow to enable ffs "discard" by update mounts, make the flag visible
to userland


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/fstypes.h
cvs rdiff -u -r1.279 -r1.280 src/sys/ufs/ffs/ffs_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/sys/fstypes.h
diff -u src/sys/sys/fstypes.h:1.31 src/sys/sys/fstypes.h:1.32
--- src/sys/sys/fstypes.h:1.31	Fri Oct 19 17:09:07 2012
+++ src/sys/sys/fstypes.h	Mon Nov 26 16:22:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstypes.h,v 1.31 2012/10/19 17:09:07 drochner Exp $	*/
+/*	$NetBSD: fstypes.h,v 1.32 2012/11/26 16:22:21 drochner Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -171,6 +171,7 @@ typedef struct fhandle	fhandle_t;
  MNT_ASYNC | \
  MNT_NOCOREDUMP | \
  MNT_IGNORE | \
+ MNT_DISCARD | \
  MNT_NOATIME | \
  MNT_SYMPERM | \
  MNT_NODEVMTIME | \

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.279 src/sys/ufs/ffs/ffs_vfsops.c:1.280
--- src/sys/ufs/ffs/ffs_vfsops.c:1.279	Fri Oct 19 17:09:08 2012
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon Nov 26 16:22:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.279 2012/10/19 17:09:08 drochner Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.280 2012/11/26 16:22:21 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.279 2012/10/19 17:09:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.280 2012/11/26 16:22:21 drochner Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -580,6 +580,10 @@ ffs_mount(struct mount *mp, const char *
 			}
 		}
 #endif
+
+		if ((mp->mnt_flag & MNT_DISCARD) && !(ump->um_discarddata))
+			ump->um_discarddata = ffs_discard_init(devvp, fs);
+
 		if (args->fspec == NULL)
 			return 0;
 	}



CVS commit: othersrc/external/bsd/mat/dist

2012-11-26 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon Nov 26 16:00:54 UTC 2012

Modified Files:
othersrc/external/bsd/mat/dist: frontends.c mat.c mat.h

Log Message:
+ unmap the mmap'ed memory in the all cases.

+ be consistent with the type of integer when printing

+ add an error count field to the main structure

+ check error count in the frontends

ride previous shlib major bump

with thanks to marc balmer for keeping me honest


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/mat/dist/frontends.c \
othersrc/external/bsd/mat/dist/mat.h
cvs rdiff -u -r1.7 -r1.8 othersrc/external/bsd/mat/dist/mat.c

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

Modified files:

Index: othersrc/external/bsd/mat/dist/frontends.c
diff -u othersrc/external/bsd/mat/dist/frontends.c:1.6 othersrc/external/bsd/mat/dist/frontends.c:1.7
--- othersrc/external/bsd/mat/dist/frontends.c:1.6	Mon Nov 26 05:49:05 2012
+++ othersrc/external/bsd/mat/dist/frontends.c	Mon Nov 26 16:00:54 2012
@@ -287,7 +287,7 @@ mat_tar(int argc, char **argv)
 	if (dir != NULL && chdir(cwd) < 0) {
 		(void) fprintf(stderr, "can't chdir back to '%s'\n", cwd);
 	}
-	return ok;
+	return ok && mat.errorc == 0;
 }
 
 #ifndef MAT_ARGC_MAX
@@ -439,7 +439,7 @@ mat_pax(int argc, char **argv)
 	if (dir != NULL && chdir(cwd) < 0) {
 		(void) fprintf(stderr, "can't chdir back to '%s'\n", cwd);
 	}
-	return ok;
+	return ok && mat.errorc == 0;
 }
 
 /* varargs version of pax */
Index: othersrc/external/bsd/mat/dist/mat.h
diff -u othersrc/external/bsd/mat/dist/mat.h:1.6 othersrc/external/bsd/mat/dist/mat.h:1.7
--- othersrc/external/bsd/mat/dist/mat.h:1.6	Sun Nov 25 20:20:36 2012
+++ othersrc/external/bsd/mat/dist/mat.h	Mon Nov 26 16:00:54 2012
@@ -108,6 +108,7 @@ typedef struct mat_t {
 	char		 from[MAT_PATH_MAX];	/* path to change from */
 	char		 to[MAT_PATH_MAX];	/* path to change to */
 	void		*re;		/* pointer to compiled regexp */
+	unsigned	 errorc;	/* # of errors */
 } mat_t;
 
 int mat_init(mat_t */*mat*/, const char */*f*/, const char */*mode*/);

Index: othersrc/external/bsd/mat/dist/mat.c
diff -u othersrc/external/bsd/mat/dist/mat.c:1.7 othersrc/external/bsd/mat/dist/mat.c:1.8
--- othersrc/external/bsd/mat/dist/mat.c:1.7	Mon Nov 26 05:49:05 2012
+++ othersrc/external/bsd/mat/dist/mat.c	Mon Nov 26 16:00:54 2012
@@ -185,23 +185,28 @@ static int
 memwrite(FILE *fp, uint64_t off, const void *p, size_t size)
 {
 	char	*mapped;
+	int	 ok;
 
+	ok = 1;
 	mapped = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fileno(fp), (off_t)off);
 	if (mapped == MAP_FAILED) {
 		if (write(fileno(fp), p, size) != (ssize_t)size) {
-			fprintf(stderr, "short write %zu chars\n", size);
-			return 0;
+			ok = 0;
 		}
 	} else {
-		lseek(fileno(fp), (off_t)(off + size - 1), SEEK_SET);
-		if (write(fileno(fp), "", 1) != 1) {
-			fprintf(stderr, "short write %" PRIu64 " chars\n", size);
-			return 0;
+		if (lseek(fileno(fp), (off_t)(off + size - 1), SEEK_SET) < 0) {
+			ok = 0;
+		} else if (write(fileno(fp), "", 1) != 1) {
+			ok = 0;
+		} else {
+			memcpy(mapped, p, size);
 		}
-		memcpy(mapped, p, size);
 		munmap(mapped, size);
 	}
-	return 1;
+	if (!ok) {
+		fprintf(stderr, "memwrite: short write %zu chars\n", size);
+	}
+	return ok;
 }
 
 /* write to mat archive */
@@ -212,6 +217,7 @@ archive_write(mat_t *mat, const void *p,
 		mat->off += size;
 		return 1;
 	}
+	mat->errorc += 1;
 	return 0;
 }
 



CVS commit: src/distrib/sets/lists/comp

2012-11-26 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Mon Nov 26 08:05:47 UTC 2012

Modified Files:
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el

Log Message:
Add sljitarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/comp/ad.mips64eb
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/comp/ad.mips64el

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.mips64eb
diff -u src/distrib/sets/lists/comp/ad.mips64eb:1.92 src/distrib/sets/lists/comp/ad.mips64eb:1.93
--- src/distrib/sets/lists/comp/ad.mips64eb:1.92	Tue Nov 20 05:27:22 2012
+++ src/distrib/sets/lists/comp/ad.mips64eb	Mon Nov 26 08:05:47 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.92 2012/11/20 05:27:22 agc Exp $
+# $NetBSD: ad.mips64eb,v 1.93 2012/11/26 08:05:47 alnsn Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
@@ -54,6 +54,7 @@
 ./usr/include/mips/rwlock.h			comp-c-include
 ./usr/include/mips/setjmp.h			comp-c-include
 ./usr/include/mips/signal.h			comp-c-include
+./usr/include/mips/sljitarch.h			comp-c-include
 ./usr/include/mips/stdarg.h			comp-obsolete		obsolete
 ./usr/include/mips/sysarch.h			comp-c-include
 ./usr/include/mips/trap.h			comp-c-include

Index: src/distrib/sets/lists/comp/ad.mips64el
diff -u src/distrib/sets/lists/comp/ad.mips64el:1.94 src/distrib/sets/lists/comp/ad.mips64el:1.95
--- src/distrib/sets/lists/comp/ad.mips64el:1.94	Tue Nov 20 05:27:22 2012
+++ src/distrib/sets/lists/comp/ad.mips64el	Mon Nov 26 08:05:47 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.94 2012/11/20 05:27:22 agc Exp $
+# $NetBSD: ad.mips64el,v 1.95 2012/11/26 08:05:47 alnsn Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
@@ -54,6 +54,7 @@
 ./usr/include/mips/rwlock.h			comp-c-include
 ./usr/include/mips/setjmp.h			comp-c-include
 ./usr/include/mips/signal.h			comp-c-include
+./usr/include/mips/sljitarch.h			comp-c-include
 ./usr/include/mips/stdarg.h			comp-obsolete		obsolete
 ./usr/include/mips/sysarch.h			comp-c-include
 ./usr/include/mips/trap.h			comp-c-include