CVS commit: src/sys/netinet

2010-07-02 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Fri Jul  2 07:02:00 UTC 2010

Modified Files:
src/sys/netinet: ip_icmp.c

Log Message:
manually adjust m_data and m_len so it can later be prepended with a
struct ip in case that a cluster is used. icmp len panic is not valid for
cluster case.

Fixes PR/43548


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/netinet/ip_icmp.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/netinet/ip_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.123 src/sys/netinet/ip_icmp.c:1.124
--- src/sys/netinet/ip_icmp.c:1.123	Sat Jun 26 14:24:29 2010
+++ src/sys/netinet/ip_icmp.c	Fri Jul  2 07:02:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.c,v 1.123 2010/06/26 14:24:29 kefren Exp $	*/
+/*	$NetBSD: ip_icmp.c,v 1.124 2010/07/02 07:02:00 kefren Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.123 2010/06/26 14:24:29 kefren Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.124 2010/07/02 07:02:00 kefren Exp $);
 
 #include opt_ipsec.h
 
@@ -309,6 +309,10 @@
 	m-m_len = icmplen + ICMP_MINLEN;
 	if ((m-m_flags  M_EXT) == 0)
 		MH_ALIGN(m, m-m_len);
+	else {
+		m-m_data += sizeof(struct ip);
+		m-m_len -= sizeof(struct ip);
+	}
 	icp = mtod(m, struct icmp *);
 	if ((u_int)type  ICMP_MAXTYPE)
 		panic(icmp_error);
@@ -337,7 +341,8 @@
 	 * Now, copy old ip header (without options)
 	 * in front of icmp message.
 	 */
-	if (m-m_data - sizeof(struct ip)  m-m_pktdat)
+	if ((m-m_flags  M_EXT) == 0 
+	m-m_data - sizeof(struct ip)  m-m_pktdat)
 		panic(icmp len);
 	m-m_data -= sizeof(struct ip);
 	m-m_len += sizeof(struct ip);



CVS commit: src/distrib/sets/lists

2010-07-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  2 07:43:36 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: shl.mi
src/distrib/sets/lists/xbase: shl.mi
Removed Files:
src/distrib/sets/lists/comp: shl.elf stl.elf
src/distrib/sets/lists/xbase: shl.elf

Log Message:
move the *.elf contents into the *mi* contents.  we're not going to have
non-elf platforms at any thing in the near future, and these extra files
are only making sets handling even worse than necessary.

ok lukem.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r0 src/distrib/sets/lists/comp/shl.elf
cvs rdiff -u -r1.125 -r1.126 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.3 -r0 src/distrib/sets/lists/comp/stl.elf
cvs rdiff -u -r1.29 -r0 src/distrib/sets/lists/xbase/shl.elf
cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xbase/shl.mi

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/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.125 src/distrib/sets/lists/comp/shl.mi:1.126
--- src/distrib/sets/lists/comp/shl.mi:1.125	Wed Jun 30 16:17:13 2010
+++ src/distrib/sets/lists/comp/shl.mi	Fri Jul  2 07:43:36 2010
@@ -1,8 +1,10 @@
-# $NetBSD: shl.mi,v 1.125 2010/06/30 16:17:13 pooka Exp $
+# $NetBSD: shl.mi,v 1.126 2010/07/02 07:43:36 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
+./usr/lib/crtbeginS.ocomp-c-lib
 ./usr/lib/crtbeginT.ocomp-c-lib
+./usr/lib/crtendS.ocomp-c-lib
 ./usr/lib/libarchive_pic.a			comp-c-piclib
 ./usr/lib/libasn1_pic.acomp-c-piclib		kerberos
 ./usr/lib/libatf-c++_pic.a			comp-atf-piclib		atf
@@ -98,8 +100,8 @@
 ./usr/lib/librumpdev_dm_pic.a			comp-c-piclib
 ./usr/lib/librumpdev_fss_pic.a			comp-c-piclib
 ./usr/lib/librumpdev_netsmb_pic.a		comp-c-piclib
-./usr/lib/librumpdev_pic.a			comp-c-piclib
 ./usr/lib/librumpdev_pad_pic.a			comp-c-piclib
+./usr/lib/librumpdev_pic.a			comp-c-piclib
 ./usr/lib/librumpdev_putter_pic.a		comp-c-piclib
 ./usr/lib/librumpdev_raidframe_pic.a		comp-c-piclib
 ./usr/lib/librumpdev_rnd_pic.a			comp-c-piclib
@@ -311,6 +313,9 @@
 ./usr/libdata/debug/usr/lib/librumpfs_udf.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpfs_umap.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpfs_union.so.0.0.debug	comp-rump-debug	debug
+./usr/libdata/debug/usr/lib/librumpkern_ksem.so.0.0.debug	comp-rump-debug	debug
+./usr/libdata/debug/usr/lib/librumpkern_tty.so.0.0.debug	comp-rump-debug	debug
+./usr/libdata/debug/usr/lib/librumpkern_z.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpnet.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpnet_local.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpnet_net.so.0.0.debug	comp-rump-debug	debug
@@ -324,9 +329,6 @@
 ./usr/libdata/debug/usr/lib/librumpvfs.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpvfs_fifofs.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/librumpvfs_layerfs.so.0.0.debug	comp-rump-debug	debug
-./usr/libdata/debug/usr/lib/librumpkern_ksem.so.0.0.debug	comp-rump-debug	debug
-./usr/libdata/debug/usr/lib/librumpkern_tty.so.0.0.debug	comp-rump-debug	debug
-./usr/libdata/debug/usr/lib/librumpkern_z.so.0.0.debug	comp-rump-debug	debug
 ./usr/libdata/debug/usr/lib/libskey.so.2.0.debug	comp-sys-debug	skey,debug
 ./usr/libdata/debug/usr/lib/libsl.so.4.0.debug		comp-krb5-debug	kerberos,debug
 ./usr/libdata/debug/usr/lib/libss.so.6.0.debug		comp-krb5-debug	kerberos,debug

Index: src/distrib/sets/lists/xbase/shl.mi
diff -u src/distrib/sets/lists/xbase/shl.mi:1.37 src/distrib/sets/lists/xbase/shl.mi:1.38
--- src/distrib/sets/lists/xbase/shl.mi:1.37	Sun May 23 04:26:19 2010
+++ src/distrib/sets/lists/xbase/shl.mi	Fri Jul  2 07:43:36 2010
@@ -1,112 +1,332 @@
-# $NetBSD: shl.mi,v 1.37 2010/05/23 04:26:19 mrg Exp $
+# $NetBSD: shl.mi,v 1.38 2010/07/02 07:43:36 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
+./usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2	-unknown-		x11
+./usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2	-unknown-		x11
+./usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2	-unknown-		x11
+./usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2	-unknown-		x11
+./usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2	-unknown-		x11
+./usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2	-unknown-		x11
+./usr/X11R6/lib/libFS.so			-unknown-		x11
+./usr/X11R6/lib/libFS.so.6			-unknown-		x11
 ./usr/X11R6/lib/libFS.so.6.0			-unknown-		x11
+./usr/X11R6/lib/libGL.so			-unknown-		x11
+./usr/X11R6/lib/libGL.so.1			-unknown-		x11
 ./usr/X11R6/lib/libGL.so.1.2			-unknown-		x11
+./usr/X11R6/lib/libGLU.so			-unknown-		x11
+./usr/X11R6/lib/libGLU.so.1			-unknown-		x11
 ./usr/X11R6/lib/libGLU.so.1.3			-unknown-		x11
+./usr/X11R6/lib/libGLw.so			-unknown-		x11

CVS commit: src/sys/fs/union

2010-07-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul  2 07:56:46 UTC 2010

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
LK_INTERLOCK is no longer a valid flag for VOP_LOCK().


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/fs/union/union_vnops.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/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.37 src/sys/fs/union/union_vnops.c:1.38
--- src/sys/fs/union/union_vnops.c:1.37	Thu Jul  1 13:00:56 2010
+++ src/sys/fs/union/union_vnops.c	Fri Jul  2 07:56:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.37 2010/07/01 13:00:56 hannken Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.38 2010/07/02 07:56:46 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.37 2010/07/01 13:00:56 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_vnops.c,v 1.38 2010/07/02 07:56:46 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1630,7 +1630,6 @@
 		flags = (flags  ~LK_SHARED) | LK_EXCLUSIVE;
 	}
 
-	genfs_nolock(ap);
 	/*
 	 * Need to do real lockmgr-style locking here.
 	 * in the mean time, draining won't work quite right,
@@ -1640,7 +1639,6 @@
 	if ((flags  LK_TYPE_MASK) == LK_DRAIN)
 		return (0);
 	 */
-	flags = ~LK_INTERLOCK;
 
 	un = VTOUNION(vp);
 start:
@@ -1734,7 +1732,6 @@
 #ifdef DIAGNOSTIC
 	un-un_pid = 0;
 #endif
-	genfs_nounlock(ap);
 
 	return (0);
 }



CVS commit: src/sys/miscfs/deadfs

2010-07-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul  2 07:58:10 UTC 2010

Modified Files:
src/sys/miscfs/deadfs: dead_vnops.c

Log Message:
LK_INTERLOCK is no longer a valid flag for VOP_LOCK().


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/miscfs/deadfs/dead_vnops.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/miscfs/deadfs/dead_vnops.c
diff -u src/sys/miscfs/deadfs/dead_vnops.c:1.48 src/sys/miscfs/deadfs/dead_vnops.c:1.49
--- src/sys/miscfs/deadfs/dead_vnops.c:1.48	Sat Mar 14 21:04:24 2009
+++ src/sys/miscfs/deadfs/dead_vnops.c	Fri Jul  2 07:58:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dead_vnops.c,v 1.48 2009/03/14 21:04:24 dsl Exp $	*/
+/*	$NetBSD: dead_vnops.c,v 1.49 2010/07/02 07:58:09 hannken Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.48 2009/03/14 21:04:24 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.49 2010/07/02 07:58:09 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -70,7 +70,7 @@
 int	dead_getpages(void *);
 #define dead_putpages	genfs_null_putpages
 
-int	chkvnlock(struct vnode *, bool);
+int	chkvnlock(struct vnode *);
 int	dead_default_error(void *);
 
 int (**dead_vnodeop_p)(void *);
@@ -135,7 +135,7 @@
 		kauth_cred_t a_cred;
 	} */ *ap = v;
 
-	if (chkvnlock(ap-a_vp, false))
+	if (chkvnlock(ap-a_vp))
 		panic(dead_read: lock);
 	/*
 	 * Return EOF for tty devices, EIO for others
@@ -159,7 +159,7 @@
 		kauth_cred_t a_cred;
 	} */ *ap = v;
 
-	if (chkvnlock(ap-a_vp, false))
+	if (chkvnlock(ap-a_vp))
 		panic(dead_write: lock);
 	return (EIO);
 }
@@ -180,7 +180,7 @@
 		struct lwp *a_l;
 	} */ *ap = v;
 
-	if (!chkvnlock(ap-a_vp, false))
+	if (!chkvnlock(ap-a_vp))
 		return (EBADF);
 	return (VCALL(ap-a_vp, VOFFSET(vop_ioctl), ap));
 }
@@ -213,7 +213,7 @@
 		struct buf *a_bp;
 	} */ *ap = v;
 	struct buf *bp;
-	if (ap-a_vp == NULL || !chkvnlock(ap-a_vp, false)) {
+	if (ap-a_vp == NULL || !chkvnlock(ap-a_vp)) {
 		bp = ap-a_bp;
 		bp-b_error = EIO;
 		bp-b_resid = bp-b_bcount;
@@ -234,14 +234,8 @@
 		int a_flags;
 		struct proc *a_p;
 	} */ *ap = v;
-	bool interlock;
 
-	if (ap-a_flags  LK_INTERLOCK) {
-		interlock = true;
-		ap-a_flags = ~LK_INTERLOCK;
-	} else
-		interlock = false;
-	if (!chkvnlock(ap-a_vp, interlock))
+	if (!chkvnlock(ap-a_vp))
 		return (0);
 	return (VCALL(ap-a_vp, VOFFSET(vop_lock), ap));
 }
@@ -260,7 +254,7 @@
 		int *a_runp;
 	} */ *ap = v;
 
-	if (!chkvnlock(ap-a_vp, false))
+	if (!chkvnlock(ap-a_vp))
 		return (EIO);
 	return (VOP_BMAP(ap-a_vp, ap-a_bn, ap-a_vpp, ap-a_bnp, ap-a_runp));
 }
@@ -301,12 +295,11 @@
  * in a state of change.
  */
 int
-chkvnlock(struct vnode *vp, bool interlock)
+chkvnlock(struct vnode *vp)
 {
 	int locked = 0;
 
-	if (!interlock)
-		mutex_enter(vp-v_interlock);
+	mutex_enter(vp-v_interlock);
 	while (vp-v_iflag  VI_XLOCK) {
 		vwait(vp, VI_XLOCK);
 		locked = 1;



CVS commit: src/sys/miscfs

2010-07-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul  2 08:09:51 UTC 2010

Modified Files:
src/sys/miscfs/genfs: layer_extern.h layer_vnops.c
src/sys/miscfs/nullfs: null_vnops.c
src/sys/miscfs/overlay: overlay_vnops.c
src/sys/miscfs/umapfs: umap_vnops.c

Log Message:
LK_INTERLOCK is no longer a valid flag for VOP_LOCK().  This makes
layer_*lock*() obsolete.  Remove them and handle lock operations
with the generic bypass function.

Ride 5.99.34.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/miscfs/genfs/layer_extern.h
cvs rdiff -u -r1.42 -r1.43 src/sys/miscfs/genfs/layer_vnops.c
cvs rdiff -u -r1.35 -r1.36 src/sys/miscfs/nullfs/null_vnops.c
cvs rdiff -u -r1.16 -r1.17 src/sys/miscfs/overlay/overlay_vnops.c
cvs rdiff -u -r1.49 -r1.50 src/sys/miscfs/umapfs/umap_vnops.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/miscfs/genfs/layer_extern.h
diff -u src/sys/miscfs/genfs/layer_extern.h:1.25 src/sys/miscfs/genfs/layer_extern.h:1.26
--- src/sys/miscfs/genfs/layer_extern.h:1.25	Fri Jul  2 03:16:00 2010
+++ src/sys/miscfs/genfs/layer_extern.h	Fri Jul  2 08:09:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: layer_extern.h,v 1.25 2010/07/02 03:16:00 rmind Exp $	*/
+/*	$NetBSD: layer_extern.h,v 1.26 2010/07/02 08:09:51 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics  Space Administration
@@ -106,9 +106,6 @@
 int	layer_print(void *);
 int	layer_bwrite(void *);
 int	layer_bmap(void *);
-int	layer_lock(void *);
-int	layer_unlock(void *);
-int	layer_islocked(void *);
 int	layer_fsync(void *);
 int	layer_lookup(void *);
 int	layer_setattr(void *);

Index: src/sys/miscfs/genfs/layer_vnops.c
diff -u src/sys/miscfs/genfs/layer_vnops.c:1.42 src/sys/miscfs/genfs/layer_vnops.c:1.43
--- src/sys/miscfs/genfs/layer_vnops.c:1.42	Fri Jul  2 03:16:01 2010
+++ src/sys/miscfs/genfs/layer_vnops.c	Fri Jul  2 08:09:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: layer_vnops.c,v 1.42 2010/07/02 03:16:01 rmind Exp $	*/
+/*	$NetBSD: layer_vnops.c,v 1.43 2010/07/02 08:09:51 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics  Space Administration
@@ -170,7 +170,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: layer_vnops.c,v 1.42 2010/07/02 03:16:01 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: layer_vnops.c,v 1.43 2010/07/02 08:09:51 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -523,51 +523,6 @@
 }
 
 /*
- * We need to clear the interlock flag as it applies only to our vnode,
- * not the vnodes below us on the stack.
- */
-int
-layer_lock(void *v)
-{
-	struct vop_lock_args /* {
-		struct vnode *a_vp;
-		int a_flags;
-		struct proc *a_p;
-	} */ *ap = v;
-	struct vnode *vp = ap-a_vp;
-
-	if (ap-a_flags  LK_INTERLOCK) {
-		mutex_exit(vp-v_interlock);
-		ap-a_flags = ~LK_INTERLOCK;
-	}
-	return LAYERFS_DO_BYPASS(vp, ap);
-}
-
-int
-layer_unlock(void *v)
-{
-	struct vop_unlock_args /* {
-		struct vnode *a_vp;
-		int a_flags;
-		struct proc *a_p;
-	} */ *ap = v;
-	struct vnode *vp = ap-a_vp;
-
-	return LAYERFS_DO_BYPASS(vp, ap);
-}
-
-int
-layer_islocked(void *v)
-{
-	struct vop_islocked_args /* {
-		struct vnode *a_vp;
-	} */ *ap = v;
-	struct vnode *vp = ap-a_vp;
-
-	return LAYERFS_DO_BYPASS(vp, ap);
-}
-
-/*
  * If vinvalbuf is calling us, it's a shallow fsync -- don't bother
  * syncing the underlying vnodes, since they'll be fsync'ed when
  * reclaimed; otherwise, pass it through to the underlying layer.

Index: src/sys/miscfs/nullfs/null_vnops.c
diff -u src/sys/miscfs/nullfs/null_vnops.c:1.35 src/sys/miscfs/nullfs/null_vnops.c:1.36
--- src/sys/miscfs/nullfs/null_vnops.c:1.35	Fri Jul  2 03:16:01 2010
+++ src/sys/miscfs/nullfs/null_vnops.c	Fri Jul  2 08:09:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vnops.c,v 1.35 2010/07/02 03:16:01 rmind Exp $	*/
+/*	$NetBSD: null_vnops.c,v 1.36 2010/07/02 08:09:51 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics  Space Administration
@@ -80,7 +80,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: null_vnops.c,v 1.35 2010/07/02 03:16:01 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: null_vnops.c,v 1.36 2010/07/02 08:09:51 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -103,9 +103,6 @@
 	{ vop_setattr_desc,	layer_setattr },
 	{ vop_getattr_desc,	layer_getattr },
 	{ vop_access_desc,	layer_access },
-	{ vop_lock_desc,	layer_lock },
-	{ vop_unlock_desc,	layer_unlock },
-	{ vop_islocked_desc,	layer_islocked },
 	{ vop_fsync_desc,	layer_fsync },
 	{ vop_inactive_desc,	layer_inactive },
 	{ vop_reclaim_desc,	layer_reclaim },

Index: src/sys/miscfs/overlay/overlay_vnops.c
diff -u src/sys/miscfs/overlay/overlay_vnops.c:1.16 src/sys/miscfs/overlay/overlay_vnops.c:1.17
--- src/sys/miscfs/overlay/overlay_vnops.c:1.16	Sun Dec 11 12:24:51 2005
+++ src/sys/miscfs/overlay/overlay_vnops.c	Fri Jul  2 08:09:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: overlay_vnops.c,v 1.16 2005/12/11 

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

2010-07-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  2 08:09:58 UTC 2010

Modified Files:
src/distrib/sets/lists/base: shl.mi
Removed Files:
src/distrib/sets/lists/base: shl.elf

Log Message:
move the *.elf contents into the *mi* contents.  we're not going to have
non-elf platforms at any thing in the near future, and these extra files
are only making sets handling even worse than necessary.

ok lukem.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r0 src/distrib/sets/lists/base/shl.elf
cvs rdiff -u -r1.544 -r1.545 src/distrib/sets/lists/base/shl.mi

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/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.544 src/distrib/sets/lists/base/shl.mi:1.545
--- src/distrib/sets/lists/base/shl.mi:1.544	Wed Jun 30 17:41:55 2010
+++ src/distrib/sets/lists/base/shl.mi	Fri Jul  2 08:09:58 2010
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.544 2010/06/30 17:41:55 pooka Exp $
+# $NetBSD: shl.mi,v 1.545 2010/07/02 08:09:58 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -13,201 +13,595 @@
 #
 # Note:	libtermcap and libtermlib are hardlinked and share the same version.
 #
+./lib/libc.so	base-sys-shlib		dynamicroot
+./lib/libc.so.12base-sys-shlib		dynamicroot
 ./lib/libc.so.12.173base-sys-shlib		dynamicroot
+./lib/libcrypt.sobase-sys-shlib		dynamicroot
+./lib/libcrypt.so.1base-sys-shlib		dynamicroot
 ./lib/libcrypt.so.1.0base-sys-shlib		dynamicroot
+./lib/libcrypto.sobase-crypto-shlib	crypto,dynamicroot
+./lib/libcrypto.so.6base-crypto-shlib	crypto,dynamicroot
 ./lib/libcrypto.so.6.1base-crypto-shlib	crypto,dynamicroot
+./lib/libdevmapper.sobase-lvm-shlib		lvm,dynamicroot
+./lib/libdevmapper.so.1base-lvm-shlib		lvm,dynamicroot
 ./lib/libdevmapper.so.1.0			base-lvm-shlib		lvm,dynamicroot
+./lib/libedit.sobase-sys-shlib		dynamicroot
+./lib/libedit.so.3base-sys-shlib		dynamicroot
 ./lib/libedit.so.3.0base-sys-shlib		dynamicroot
+./lib/libevent.sobase-sys-shlib		dynamicroot
+./lib/libevent.so.3base-sys-shlib		dynamicroot
 ./lib/libevent.so.3.2base-sys-shlib		dynamicroot
+./lib/libgcc_s.sobase-sys-shlib		gcc
+./lib/libgcc_s.so.1base-sys-shlib		gcc 
 ./lib/libgcc_s.so.1.0base-sys-shlib		gcc
+./lib/libipsec.sobase-net-shlib		dynamicroot
+./lib/libipsec.so.3base-net-shlib		dynamicroot
 ./lib/libipsec.so.3.0base-net-shlib		dynamicroot
+./lib/libkvm.so	base-sys-shlib		dynamicroot
+./lib/libkvm.so.6base-sys-shlib		dynamicroot
 ./lib/libkvm.so.6.0base-sys-shlib		dynamicroot
+./lib/liblzf.so	base-sys-shlib		dynamicroot
+./lib/liblzf.so.0base-sys-shlib		dynamicroot
 ./lib/liblzf.so.0.0base-sys-shlib		dynamicroot
+./lib/libm.so	base-sys-shlib		dynamicroot
+./lib/libm.so.0	base-sys-shlib		dynamicroot
 ./lib/libm.so.0.8base-sys-shlib		dynamicroot
+./lib/libprop.sobase-sys-shlib		dynamicroot
+./lib/libprop.so.1base-sys-shlib		dynamicroot
 ./lib/libprop.so.1.1base-sys-shlib		dynamicroot
+./lib/libradius.sobase-sys-shlib		dynamicroot
+./lib/libradius.so.4base-sys-shlib		dynamicroot
 ./lib/libradius.so.4.0base-sys-shlib		dynamicroot
+./lib/libtermcap.sobase-sys-shlib		dynamicroot
+./lib/libtermcap.so.0base-sys-shlib		dynamicroot
 ./lib/libtermcap.so.0.6base-sys-shlib		dynamicroot
+./lib/libterminfo.sobase-sys-shlib		dynamicroot
+./lib/libterminfo.so.1base-sys-shlib		dynamicroot
 ./lib/libterminfo.so.1.0			base-sys-shlib		dynamicroot
+./lib/libtermlib.sobase-sys-shlib		dynamicroot
+./lib/libtermlib.so.0base-sys-shlib		dynamicroot
 ./lib/libtermlib.so.0.6base-sys-shlib		dynamicroot
+./lib/libutil.sobase-sys-shlib		dynamicroot
+./lib/libutil.so.7base-sys-shlib		dynamicroot
 ./lib/libutil.so.7.17base-sys-shlib		dynamicroot
+./lib/libz.so	base-sys-shlib		dynamicroot
+./lib/libz.so.1	base-sys-shlib		dynamicroot
 ./lib/libz.so.1.0base-sys-shlib		dynamicroot
+./libexec/ld.elf_sobase-sys-shlib		dynamicroot
+./usr/lib/i18n/libBIG5.so			base-i18n-shlib
+./usr/lib/i18n/libBIG5.so.5			base-i18n-shlib
 ./usr/lib/i18n/libBIG5.so.5.0			base-i18n-shlib
+./usr/lib/i18n/libDECHanyu.so			base-i18n-shlib
+./usr/lib/i18n/libDECHanyu.so.5			base-i18n-shlib
 ./usr/lib/i18n/libDECHanyu.so.5.0		base-i18n-shlib
+./usr/lib/i18n/libEUC.so			base-i18n-shlib
+./usr/lib/i18n/libEUC.so.5			base-i18n-shlib
 ./usr/lib/i18n/libEUC.so.5.0			base-i18n-shlib
+./usr/lib/i18n/libEUCTW.so			base-i18n-shlib
+./usr/lib/i18n/libEUCTW.so.5			base-i18n-shlib
 ./usr/lib/i18n/libEUCTW.so.5.0			base-i18n-shlib
+./usr/lib/i18n/libGBK2K.so			base-i18n-shlib
+./usr/lib/i18n/libGBK2K.so.5			base-i18n-shlib
 ./usr/lib/i18n/libGBK2K.so.5.0			base-i18n-shlib
+./usr/lib/i18n/libHZ.sobase-i18n-shlib
+./usr/lib/i18n/libHZ.so.5		

CVS commit: src/sys/dev/pci

2010-07-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  2 08:25:05 UTC 2010

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

Log Message:
add NetMOS 9901 PCI-E uart


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1035 src/sys/dev/pci/pcidevs:1.1036
--- src/sys/dev/pci/pcidevs:1.1035	Wed Jun 16 03:27:48 2010
+++ src/sys/dev/pci/pcidevs	Fri Jul  2 08:25:05 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1035 2010/06/16 03:27:48 riz Exp $
+$NetBSD: pcidevs,v 1.1036 2010/07/02 08:25:05 mrg Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3241,6 +3241,7 @@
 product NETMOS NM9835	0x9835	Dual UART and 1284 Printer Port
 product NETMOS NM9845	0x9845	Quad UART and 1284 Printer Port
 product NETMOS NM9855	0x9855	9855 Quad UART and 1284 Printer Port
+product NETMOS NM9901	0x9901	Dual PCI-E UART
 
 /* Network Security Technologies */
 product NETSEC 7751		0x7751	7751



CVS commit: src/sys/dev/pci

2010-07-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  2 08:25:30 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1032 -r1.1033 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1031 -r1.1032 src/sys/dev/pci/pcidevs_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/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1032 src/sys/dev/pci/pcidevs.h:1.1033
--- src/sys/dev/pci/pcidevs.h:1.1032	Wed Jun 16 03:28:49 2010
+++ src/sys/dev/pci/pcidevs.h	Fri Jul  2 08:25:30 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1032 2010/06/16 03:28:49 riz Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1033 2010/07/02 08:25:30 mrg Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1035 2010/06/16 03:27:48 riz Exp
+ *	NetBSD: pcidevs,v 1.1036 2010/07/02 08:25:05 mrg Exp
  */
 
 /*
@@ -3248,6 +3248,7 @@
 #define	PCI_PRODUCT_NETMOS_NM9835	0x9835		/* Dual UART and 1284 Printer Port */
 #define	PCI_PRODUCT_NETMOS_NM9845	0x9845		/* Quad UART and 1284 Printer Port */
 #define	PCI_PRODUCT_NETMOS_NM9855	0x9855		/* 9855 Quad UART and 1284 Printer Port */
+#define	PCI_PRODUCT_NETMOS_NM9901	0x9901		/* Dual PCI-E UART */
 
 /* Network Security Technologies */
 #define	PCI_PRODUCT_NETSEC_7751	0x7751		/* 7751 */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1031 src/sys/dev/pci/pcidevs_data.h:1.1032
--- src/sys/dev/pci/pcidevs_data.h:1.1031	Wed Jun 16 03:28:49 2010
+++ src/sys/dev/pci/pcidevs_data.h	Fri Jul  2 08:25:30 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1031 2010/06/16 03:28:49 riz Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1032 2010/07/02 08:25:30 mrg Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1035 2010/06/16 03:27:48 riz Exp
+ *	NetBSD: pcidevs,v 1.1036 2010/07/02 08:25:05 mrg Exp
  */
 
 /*
@@ -5120,6 +5120,8 @@
 	12000, 10098, 558, 19943, 19948, 9414, 0,
 	PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9855, 
 	19956, 12000, 10098, 558, 19943, 19948, 9414, 0,
+	PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9901, 
+	9455, 14070, 10098, 0,
 	PCI_VENDOR_NETSEC, PCI_PRODUCT_NETSEC_7751, 
 	14414, 0,
 	PCI_VENDOR_NEXGEN, PCI_PRODUCT_NEXGEN_NX82C501, 
@@ -8735,7 +8737,7 @@
 	(NB-SB\0 /* 2 refs @ 9436 */
 	Link)\0 /* 2 refs @ 9443 */
 	RD890\0 /* 17 refs @ 9449 */
-	Dual\0 /* 26 refs @ 9455 */
+	Dual\0 /* 27 refs @ 9455 */
 	Slot\0 /* 3 refs @ 9460 */
 	2x16\0 /* 1 refs @ 9465 */
 	GFX\0 /* 3 refs @ 9470 */
@@ -8832,7 +8834,7 @@
 	bridge\0 /* 1 refs @ 10069 */
 	single-channel\0 /* 2 refs @ 10076 */
 	RS-485\0 /* 8 refs @ 10091 */
-	UART\0 /* 15 refs @ 10098 */
+	UART\0 /* 16 refs @ 10098 */
 	dual-channel\0 /* 3 refs @ 10103 */
 	quad-channel\0 /* 3 refs @ 10116 */
 	octal-channel\0 /* 3 refs @ 10129 */
@@ -9343,7 +9345,7 @@
 	PATA133\0 /* 1 refs @ 14044 */
 	88SE6121\0 /* 1 refs @ 14052 */
 	88SE614X\0 /* 1 refs @ 14061 */
-	PCI-E\0 /* 3 refs @ 14070 */
+	PCI-E\0 /* 4 refs @ 14070 */
 	88SE6145\0 /* 1 refs @ 14076 */
 	88F6180\0 /* 1 refs @ 14085 */
 	Kirkwood\0 /* 3 refs @ 14093 */



CVS commit: src/sys/dev/usb

2010-07-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Jul  2 08:35:42 UTC 2010

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

Log Message:
Add id for Samsung GT-B3730 LTE/4G datacard


To generate a diff of this commit:
cvs rdiff -u -r1.560 -r1.561 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.560 src/sys/dev/usb/usbdevs:1.561
--- src/sys/dev/usb/usbdevs:1.560	Sun Jun 27 10:32:13 2010
+++ src/sys/dev/usb/usbdevs	Fri Jul  2 08:35:41 2010
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.560 2010/06/27 10:32:13 kardel Exp $
+$NetBSD: usbdevs,v 1.561 2010/07/02 08:35:41 tnn Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2100,6 +2100,7 @@
 product SAMSUNG MIGHTYDRIVE	0x1623	Mighty Drive
 product SAMSUNG ML6060		0x3008	ML-6060 laser printer
 product SAMSUNG GTB3710		0x6876	GT-B3710 LTE/4G datacard
+product SAMSUNG GTB3730		0x689a	GT-B3730 LTE/4G datacard
 
 /* SanDisk products */
 product SANDISK SDDR05A		0x0001	ImageMate SDDR-05a



CVS commit: src/sys/dev/usb

2010-07-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Jul  2 08:36:57 UTC 2010

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.553 -r1.554 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.554 -r1.555 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.553 src/sys/dev/usb/usbdevs.h:1.554
--- src/sys/dev/usb/usbdevs.h:1.553	Sun Jun 27 10:32:13 2010
+++ src/sys/dev/usb/usbdevs.h	Fri Jul  2 08:36:57 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.553 2010/06/27 10:32:13 kardel Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.554 2010/07/02 08:36:57 tnn Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.559 2010/06/19 22:41:32 kardel Exp
+ *	NetBSD: usbdevs,v 1.561 2010/07/02 08:35:41 tnn Exp
  */
 
 /*
@@ -2107,6 +2107,7 @@
 #define	USB_PRODUCT_SAMSUNG_MIGHTYDRIVE	0x1623		/* Mighty Drive */
 #define	USB_PRODUCT_SAMSUNG_ML6060	0x3008		/* ML-6060 laser printer */
 #define	USB_PRODUCT_SAMSUNG_GTB3710	0x6876		/* GT-B3710 LTE/4G datacard */
+#define	USB_PRODUCT_SAMSUNG_GTB3730	0x689a		/* GT-B3730 LTE/4G datacard */
 
 /* SanDisk products */
 #define	USB_PRODUCT_SANDISK_SDDR05A	0x0001		/* ImageMate SDDR-05a */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.554 src/sys/dev/usb/usbdevs_data.h:1.555
--- src/sys/dev/usb/usbdevs_data.h:1.554	Sun Jun 27 10:32:13 2010
+++ src/sys/dev/usb/usbdevs_data.h	Fri Jul  2 08:36:57 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.554 2010/06/27 10:32:13 kardel Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.555 2010/07/02 08:36:57 tnn Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.559 2010/06/19 22:41:32 kardel Exp
+ *	NetBSD: usbdevs,v 1.561 2010/07/02 08:35:41 tnn Exp
  */
 
 /*
@@ -6155,6 +6155,10 @@
 	GT-B3710 LTE/4G datacard,
 	},
 	{
+	USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_GTB3730,
+	GT-B3730 LTE/4G datacard,
+	},
+	{
 	USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR05A,
 	ImageMate SDDR-05a,
 	},
@@ -7319,4 +7323,4 @@
 	Prestige,
 	},
 };
-const int usb_nproducts = 1347;
+const int usb_nproducts = 1348;



CVS commit: src/sys/rump/include/rump

2010-07-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul  2 10:44:26 UTC 2010

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
LK_* flags moved to sys/vnode.h


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/rump/makerumpdefs.sh

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

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.5 src/sys/rump/include/rump/makerumpdefs.sh:1.6
--- src/sys/rump/include/rump/makerumpdefs.sh:1.5	Tue Nov  3 18:22:44 2009
+++ src/sys/rump/include/rump/makerumpdefs.sh	Fri Jul  2 10:44:26 2010
@@ -8,7 +8,7 @@
 rm -f rumpdefs.h
 exec  rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.5 2009/11/03 18:22:44 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.6 2010/07/02 10:44:26 hannken Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -27,16 +27,14 @@
 printf '#ifndef __VTYPE_DEFINED\n#define __VTYPE_DEFINED\n'
 sed -n '/enum vtype.*{/p'  ../../../sys/vnode.h
 printf '#endif /* __VTYPE_DEFINED */\n'
+sed -n '/#define.*LK_[A-Z]/s/LK_/RUMP_LK_/gp' ../../../sys/vnode.h	\
+| sed 's,/\*.*$,,'
 
 fromvers ../../../sys/errno.h
 printf '#ifndef EJUSTRETURN\n'
 sed -n '/EJUSTRETURN/p'	 ../../../sys/errno.h
 printf '#endif /* EJUSTRETURN */\n'
 
-fromvers ../../../sys/lock.h
-sed -n '/#define.*LK_[A-Z]/s/LK_/RUMP_LK_/gp' ../../../sys/lock.h	\
-| sed 's,/\*.*$,,'
-
 fromvers ../../../sys/reboot.h
 sed -n '/#define.*RB_[A-Z]/s/RB_/RUMP_RB_/gp' ../../../sys/reboot.h	\
 | sed 's,/\*.*$,,'



CVS commit: src/sys/rump/include/rump

2010-07-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jul  2 10:45:16 UTC 2010

Modified Files:
src/sys/rump/include/rump: rumpdefs.h

Log Message:
Regen.  LK_TYPEMASK and LK_RELEASE are gone.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/include/rump/rumpdefs.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.7 src/sys/rump/include/rump/rumpdefs.h:1.8
--- src/sys/rump/include/rump/rumpdefs.h:1.7	Thu Jun 24 07:56:22 2010
+++ src/sys/rump/include/rump/rumpdefs.h	Fri Jul  2 10:45:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.7 2010/06/24 07:56:22 hannken Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.8 2010/07/02 10:45:16 hannken Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -29,26 +29,22 @@
 #define	RUMP_O_DIRECT	0x0008	/* direct I/O hint */
 #define	RUMP_O_NOCTTY	0x8000	/* don't assign controlling terminal */
 
-/*	NetBSD: vnode.h,v 1.220 2010/06/18 16:29:02 hannken Exp 	*/
+/*	NetBSD: vnode.h,v 1.221 2010/07/01 13:00:57 hannken Exp 	*/
 #ifndef __VTYPE_DEFINED
 #define __VTYPE_DEFINED
 enum vtype	{ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
 #endif /* __VTYPE_DEFINED */
-
-/*	NetBSD: errno.h,v 1.39 2006/10/31 00:38:07 cbiere Exp 	*/
-#ifndef EJUSTRETURN
-#define	EJUSTRETURN	-2		/* don't modify regs, just return */
-#endif /* EJUSTRETURN */
-
-/*	NetBSD: lock.h,v 1.85 2010/06/24 07:54:47 hannken Exp 	*/
-#define	RUMP_LK_TYPE_MASK	0x000f	
 #define	RUMP_LK_SHARED	0x0001	
 #define	RUMP_LK_EXCLUSIVE	0x0002	
-#define	RUMP_LK_RELEASE	0x0006	
 #define	RUMP_LK_NOWAIT	0x0010	
 #define	RUMP_LK_INTERLOCK	0x0001	
 #define	RUMP_LK_RETRY	0x0002	
 
+/*	NetBSD: errno.h,v 1.39 2006/10/31 00:38:07 cbiere Exp 	*/
+#ifndef EJUSTRETURN
+#define	EJUSTRETURN	-2		/* don't modify regs, just return */
+#endif /* EJUSTRETURN */
+
 /*	NetBSD: reboot.h,v 1.25 2007/12/25 18:33:48 perry Exp 	*/
 #define	RUMP_RB_AUTOBOOT	0	
 #define	RUMP_RB_ASKNAME	0x0001	



CVS commit: src/sys/sys

2010-07-02 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jul  2 11:38:20 UTC 2010

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

Log Message:
don't propagate __read_mostly and __cacheline_aligned to userland.
Uncovered by Xen build failures. Xen includes this header
through stdarg.h, but COHERENCY_UNIT is undefined.

'this fix should be done in HEAD' mjf@


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/cdefs_elf.h

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

Modified files:

Index: src/sys/sys/cdefs_elf.h
diff -u src/sys/sys/cdefs_elf.h:1.31 src/sys/sys/cdefs_elf.h:1.32
--- src/sys/sys/cdefs_elf.h:1.31	Tue Jun  1 22:13:30 2010
+++ src/sys/sys/cdefs_elf.h	Fri Jul  2 11:38:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs_elf.h,v 1.31 2010/06/01 22:13:30 mjf Exp $	*/
+/*	$NetBSD: cdefs_elf.h,v 1.32 2010/07/02 11:38:20 cegger Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -160,6 +160,9 @@
 #define	__link_set_count(set)		\
 	(__link_set_end(set) - __link_set_start(set))
 
+
+#ifdef _KERNEL
+
 /*
  * On multiprocessor systems we can gain an improvement in performance
  * by being mindful of which cachelines data is placed in.
@@ -194,4 +197,6 @@
 __attribute__((__aligned__(COHERENCY_UNIT)			\
 		 __section__(.data.cacheline_aligned)))
 
+#endif /* _KERNEL */
+
 #endif /* !_SYS_CDEFS_ELF_H_ */



CVS commit: src/usr.sbin/traceroute

2010-07-02 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Fri Jul  2 12:13:11 UTC 2010

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

Log Message:
Fix incomplete extensions sanity checks


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/traceroute/traceroute.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/traceroute/traceroute.c
diff -u src/usr.sbin/traceroute/traceroute.c:1.74 src/usr.sbin/traceroute/traceroute.c:1.75
--- src/usr.sbin/traceroute/traceroute.c:1.74	Mon Jul 21 13:37:00 2008
+++ src/usr.sbin/traceroute/traceroute.c	Fri Jul  2 12:13:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: traceroute.c,v 1.74 2008/07/21 13:37:00 lukem Exp $	*/
+/*	$NetBSD: traceroute.c,v 1.75 2010/07/02 12:13:11 kefren Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@@ -29,7 +29,7 @@
 #else
 __COPYRIGHT(@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\
  The Regents of the University of California.  All rights reserved.);
-__RCSID($NetBSD: traceroute.c,v 1.74 2008/07/21 13:37:00 lukem Exp $);
+__RCSID($NetBSD: traceroute.c,v 1.75 2010/07/02 12:13:11 kefren Exp $);
 #endif
 #endif
 
@@ -1128,7 +1128,8 @@
 
 ip = (struct ip *)buf;
 
-if (ip_len = sizeof(struct ip) + ICMP_EXT_OFFSET) {
+if (ip_len  (ip-ip_hl  2) + ICMP_EXT_OFFSET +
+	sizeof(struct icmp_ext_cmn_hdr)) {
 		/*
 		 * No support for ICMP extensions on this host
 		 */
@@ -1166,16 +1167,15 @@
 buf += sizeof(*cmn_hdr);
 datalen -= sizeof(*cmn_hdr);
  
-while (datalen  0) {
+while (datalen = sizeof(struct icmp_ext_obj_hdr)) {
 		obj_hdr = (struct icmp_ext_obj_hdr *)buf;
 		obj_len = ntohs(obj_hdr-length);
 
 		/*
 		 * Sanity check the length field
 		 */
-		if (obj_len  datalen) {
+		if (obj_len  datalen)
 			return;
-		}
 
 		datalen -= obj_len;
  



CVS commit: src/sys/netmpls

2010-07-02 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Fri Jul  2 12:25:54 UTC 2010

Modified Files:
src/sys/netmpls: mpls_ttl.c

Log Message:
* correct packet size
* fix crash when cluster was involved
* extension offset is constant
* fix endianess issues in BoS loop
* free cluster if INET not defined but icmp_respond sysctl != 1


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/netmpls/mpls_ttl.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/netmpls/mpls_ttl.c
diff -u src/sys/netmpls/mpls_ttl.c:1.1 src/sys/netmpls/mpls_ttl.c:1.2
--- src/sys/netmpls/mpls_ttl.c:1.1	Sat Jun 26 14:24:29 2010
+++ src/sys/netmpls/mpls_ttl.c	Fri Jul  2 12:25:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpls_ttl.c,v 1.1 2010/06/26 14:24:29 kefren Exp $ */
+/*	$NetBSD: mpls_ttl.c,v 1.2 2010/07/02 12:25:54 kefren Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpls_ttl.c,v 1.1 2010/06/26 14:24:29 kefren Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpls_ttl.c,v 1.2 2010/07/02 12:25:54 kefren Exp $);
 
 #include opt_inet.h
 #include opt_mpls.h
@@ -131,9 +131,8 @@
 /* ICMP Extensions */
 
 #define ICMP_EXT_VERSION 2
-#define ICMP_EXT_OFFSET	(ICMP_MINLEN + 128)	/* 128 bytes from original
-		 * datagram required */
-#define MPLS_ICMP_LEN	(ICMP_EXT_OFFSET + sizeof(struct mpls_extension))
+#define	MPLS_RETURN_DATA 128
+#define	ICMP_EXT_OFFSET	128
 
 struct icmp_ext_cmn_hdr {
 #if BYTE_ORDER == BIG_ENDIAN
@@ -172,12 +171,11 @@
 mpls_icmp_error(struct mbuf *n, int type, int code, n_long dest,
 int destmtu, union mpls_shim *shim)
 {
-struct ip *oip = mtod(n, struct ip *), *nip;
-unsigned oiplen = oip-ip_hl  2;
-struct icmp *icp;
-struct mbuf *m;
-unsigned icmplen, mblen;
-
+	struct ip *oip = mtod(n, struct ip *), *nip;
+	unsigned oiplen = oip-ip_hl  2;
+	struct icmp *icp;
+	struct mbuf *m;
+	unsigned icmplen, mblen, packetlen;
 	struct mpls_extension mpls_icmp_ext;
 	
 	memset(mpls_icmp_ext, 0, sizeof(mpls_icmp_ext));
@@ -238,6 +236,8 @@
 		mblen += m-m_len;
 	icmplen = min(mblen, icmplen);
 
+	packetlen = sizeof(struct ip) + ICMP_EXT_OFFSET + sizeof(mpls_icmp_ext);
+
 	/*
 	 * As we are not required to return everything we have,
 	 * we return whatever we can return at ease.
@@ -247,15 +247,10 @@
 	 * icmp_sysctl will keep things below that limit.
 	 */
 
-	/* XXX: should we leave this here ? MCLBYTES should be  200 anyway
-	 * XXX: but it's arch dependant after all and let's keep
-	 * XXX: surprises out
-	 */
-	KASSERT (MPLS_ICMP_LEN + ICMP_MINLEN = MCLBYTES);
+	KASSERT (packetlen = MCLBYTES);
 
 	m = m_gethdr(M_DONTWAIT, MT_HEADER);
-	/* XXX: MPLS_ICMP_LEN + ICMP_MINLEN should be always  MHLEN but ... */
-	if (m  (MPLS_ICMP_LEN + ICMP_MINLEN  MHLEN)) {
+	if (m  (packetlen  MHLEN)) {
 		MCLGET(m, M_DONTWAIT);
 		if ((m-m_flags  M_EXT) == 0) {
 			m_freem(m);
@@ -265,9 +260,13 @@
 	if (m == NULL)
 		goto freeit;
 	MCLAIM(m, n-m_owner);
-	m-m_len = MPLS_ICMP_LEN;
+	m-m_len = packetlen;
 	if ((m-m_flags  M_EXT) == 0)
 		MH_ALIGN(m, m-m_len);
+	else {
+		m-m_data += sizeof(struct ip);
+		m-m_len -= sizeof(struct ip);
+	}
 	icp = mtod(m, struct icmp *);
 	if ((u_int)type  ICMP_MAXTYPE)
 		panic(icmp error);
@@ -290,20 +289,21 @@
 	}
 
 	icp-icmp_code = code;
-	
-	/* Zero padding in case icmplen  ICMP_EXT_OFFSET */
-	memset(icp-icmp_ip, 0, MPLS_ICMP_LEN);
+
+	memset(icp-icmp_ip, 0, ICMP_EXT_OFFSET);
 	m_copydata(n, 0, icmplen, (char *)icp-icmp_ip);
 
-	/* Copy the extension structures */
-	memcpy(((char*)icp-icmp_ip) + ICMP_EXT_OFFSET - ICMP_MINLEN,
+	/* Append the extension structure */
+	memcpy(((char*)icp-icmp_ip) + ICMP_EXT_OFFSET,
 	mpls_icmp_ext, sizeof(mpls_icmp_ext));
 
 	/*
 	 * Now, copy old ip header (without options)
 	 * in front of icmp message.
 	*/
-	KASSERT(m-m_data - sizeof(struct ip) = m-m_pktdat);
+	if ((m-m_flags  M_EXT) == 0 
+	m-m_data - sizeof(struct ip)  m-m_pktdat)
+		panic(icmp len);
 	m-m_data -= sizeof(struct ip);
 	m-m_len += sizeof(struct ip);
 	m-m_pkthdr.len = m-m_len;
@@ -351,11 +351,11 @@
 
 #ifdef INET
 		/*
-		 * shim ttl exceed 
+		 * shim ttl exceeded
 		 * send back ICMP type 11 code 0
 		 */
-		bossh.s_addr = top_shim.s_addr =
-			ntohl(mtod(m, union mpls_shim *)-s_addr);
+		bossh.s_addr = mshim-s_addr;
+		top_shim.s_addr = htonl(mshim-s_addr);
 		m_adj(m, sizeof(union mpls_shim));
 
 		/* Goto BOS */
@@ -371,6 +371,8 @@
 
 		mpls_icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS,
 		0, 0, top_shim);
+#else
+		m_freem(m);
 #endif
 		return NULL;
 	}



CVS commit: src/sys/dev/pci

2010-07-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul  2 14:47:25 UTC 2010

Modified Files:
src/sys/dev/pci: if_iwn.c if_iwnvar.h

Log Message:
- Fix the recursive iwn_init() call problem properly.
- Don't print the scan request while scanning all the time. Perhaps I will
  remove this completely.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/if_iwn.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_iwnvar.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/pci/if_iwn.c
diff -u src/sys/dev/pci/if_iwn.c:1.46 src/sys/dev/pci/if_iwn.c:1.47
--- src/sys/dev/pci/if_iwn.c:1.46	Fri Jun 18 17:10:23 2010
+++ src/sys/dev/pci/if_iwn.c	Fri Jul  2 10:47:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwn.c,v 1.46 2010/06/18 21:10:23 christos Exp $	*/
+/*	$NetBSD: if_iwn.c,v 1.47 2010/07/02 14:47:25 christos Exp $	*/
 /*	$OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.46 2010/06/18 21:10:23 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.47 2010/07/02 14:47:25 christos Exp $);
 
 #define IWN_USE_RBUF	/* Use local storage for RX */
 #undef IWN_HWCRYPTO	/* XXX does not even compile yet */
@@ -416,6 +416,7 @@
 	sc-sc_pct = pa-pa_pc;
 	sc-sc_pcitag = pa-pa_tag;
 	sc-sc_dmat = pa-pa_dmat;
+	mutex_init(sc-sc_mtx, MUTEX_DEFAULT, IPL_NONE);
 
 	callout_init(sc-calib_to, 0);
 	callout_setfunc(sc-calib_to, iwn_calib_timeout, sc);
@@ -1836,8 +1837,10 @@
 	case IEEE80211_S_SCAN:
 		/* XXX Do not abort a running scan. */
 		if (sc-sc_flags  IWN_FLAG_SCANNING) {
-			aprint_error_dev(sc-sc_dev,
-			scan request while scanning ignored\n);
+			if (ic-ic_state != nstate)
+aprint_error_dev(sc-sc_dev, scan request(%d) 
+while scanning(%d) ignored\n, nstate,
+ic-ic_state);
 			break;
 		}
 
@@ -3161,22 +3164,6 @@
 	int s, error = 0;
 
 	s = splnet();
-	/*
-	 * Prevent processes from entering this function while another
-	 * process is tsleep'ing in it.
-	 */
-	if (sc-sc_flags  IWN_FLAG_BUSY) {
-		switch (cmd) {
-		case SIOCSIFADDR:
-			/* FALLTHROUGH */
-		case SIOCSIFFLAGS:
-			splx(s);
-			aprint_normal_dev(sc-sc_dev,
-			ioctl while busy cmd = 0x%lx\n, cmd);
-			return EBUSY;
-		}
-	}
-	sc-sc_flags |= IWN_FLAG_BUSY;
 
 	switch (cmd) {
 	case SIOCSIFADDR:
@@ -3224,7 +3211,6 @@
 		}
 	}
 
-	sc-sc_flags = ~IWN_FLAG_BUSY;
 	splx(s);
 	return error;
 }
@@ -5856,6 +5842,9 @@
 	struct ieee80211com *ic = sc-sc_ic;
 	int error;
 
+	mutex_spin_enter(sc-sc_mtx);
+	if (sc-sc_flags  IWN_FLAG_HW_INITED)
+		return 0;
 	if ((error = iwn_hw_prepare(sc)) != 0) {
 		aprint_error_dev(sc-sc_dev,
 		hardware not ready\n);
@@ -5908,9 +5897,12 @@
 	else
 		ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
 
+	sc-sc_flags |= IWN_FLAG_HW_INITED;
+	mutex_spin_exit(sc-sc_mtx);
 	return 0;
 
-fail:	iwn_stop(ifp, 1);
+fail:	mutex_spin_exit(sc-sc_mtx);
+	iwn_stop(ifp, 1);
 	return error;
 }
 
@@ -5920,6 +5912,8 @@
 	struct iwn_softc *sc = ifp-if_softc;
 	struct ieee80211com *ic = sc-sc_ic;
 
+	mutex_spin_enter(sc-sc_mtx);
+	sc-sc_flags = ~IWN_FLAG_HW_INITED;
 	ifp-if_timer = sc-sc_tx_timer = 0;
 	ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
 
@@ -5933,6 +5927,7 @@
 	sc-sc_sensor.value_cur = 0;
 	sc-sc_sensor.state = ENVSYS_SINVALID;
 #endif
+	mutex_spin_exit(sc-sc_mtx);
 }
 
 /*

Index: src/sys/dev/pci/if_iwnvar.h
diff -u src/sys/dev/pci/if_iwnvar.h:1.11 src/sys/dev/pci/if_iwnvar.h:1.12
--- src/sys/dev/pci/if_iwnvar.h:1.11	Fri Jun 18 17:10:23 2010
+++ src/sys/dev/pci/if_iwnvar.h	Fri Jul  2 10:47:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwnvar.h,v 1.11 2010/06/18 21:10:23 christos Exp $	*/
+/*	$NetBSD: if_iwnvar.h,v 1.12 2010/07/02 14:47:25 christos Exp $	*/
 /*	$OpenBSD: if_iwnvar.h,v 1.19 2010/05/05 19:47:43 damien Exp $	*/
 
 /*-
@@ -226,9 +226,9 @@
 #define IWN_FLAG_CALIB_DONE	(1  2)
 #define IWN_FLAG_USE_ICT	(1  3)
 #define IWN_FLAG_INTERNAL_PA	(1  4)
-#define IWN_FLAG_BUSY		(1  5)
 /* Added for NetBSD */
 #define IWN_FLAG_SCANNING	(1  8)
+#define IWN_FLAG_HW_INITED	(1  9)
 
 	uint8_t 		hw_type;
 	const struct iwn_hal	*sc_hal;
@@ -321,5 +321,8 @@
 	} sc_txtapu;
 #define sc_txtap	sc_txtapu.th
 	int			sc_txtap_len;
+
+	kmutex_t		sc_mtx; /* mutex for init/stop */
+
 };
 



CVS commit: src/lib/libc/gen

2010-07-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul  2 21:13:10 UTC 2010

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

Log Message:
Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x


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

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

Modified files:

Index: src/lib/libc/gen/glob.c
diff -u src/lib/libc/gen/glob.c:1.24 src/lib/libc/gen/glob.c:1.25
--- src/lib/libc/gen/glob.c:1.24	Wed Apr  8 12:28:50 2009
+++ src/lib/libc/gen/glob.c	Fri Jul  2 17:13:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: glob.c,v 1.24 2009/04/08 16:28:50 christos Exp $	*/
+/*	$NetBSD: glob.c,v 1.25 2010/07/02 21:13:10 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)glob.c	8.3 (Berkeley) 10/13/93;
 #else
-__RCSID($NetBSD: glob.c,v 1.24 2009/04/08 16:28:50 christos Exp $);
+__RCSID($NetBSD: glob.c,v 1.25 2010/07/02 21:13:10 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -155,7 +155,7 @@
 static DIR	*g_opendir(Char *, glob_t *);
 static Char	*g_strchr(const Char *, int);
 static int	 g_stat(Char *, __gl_stat_t *, glob_t *);
-static int	 glob0(const Char *, glob_t *);
+static int	 glob0(const Char *, glob_t *, size_t *);
 static int	 glob1(Char *, glob_t *, size_t *);
 static int	 glob2(Char *, Char *, Char *, Char *, glob_t *,
 size_t *);
@@ -163,8 +163,9 @@
 size_t *);
 static int	 globextend(const Char *, glob_t *, size_t *);
 static const Char *globtilde(const Char *, Char *, size_t, glob_t *);
-static int	 globexp1(const Char *, glob_t *);
-static int	 globexp2(const Char *, const Char *, glob_t *, int *);
+static int	 globexp1(const Char *, glob_t *, size_t *);
+static int	 globexp2(const Char *, const Char *, glob_t *, int *,
+size_t *);
 static int	 match(Char *, Char *, Char *);
 #ifdef DEBUG
 static void	 qprintf(const char *, Char *);
@@ -177,6 +178,7 @@
 	const u_char *patnext;
 	int c;
 	Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
+	size_t limit = 0;
 
 	_DIAGASSERT(pattern != NULL);
 
@@ -212,9 +214,9 @@
 	*bufnext = EOS;
 
 	if (flags  GLOB_BRACE)
-	return globexp1(patbuf, pglob);
+	return globexp1(patbuf, pglob, limit);
 	else
-	return glob0(patbuf, pglob);
+	return glob0(patbuf, pglob, limit);
 }
 
 /*
@@ -223,7 +225,7 @@
  * characters
  */
 static int
-globexp1(const Char *pattern, glob_t *pglob)
+globexp1(const Char *pattern, glob_t *pglob, size_t *limit)
 {
 	const Char* ptr = pattern;
 	int rv;
@@ -233,13 +235,13 @@
 
 	/* Protect a single {}, for find(1), like csh */
 	if (pattern[0] == LBRACE  pattern[1] == RBRACE  pattern[2] == EOS)
-		return glob0(pattern, pglob);
+		return glob0(pattern, pglob, limit);
 
 	while ((ptr = (const Char *) g_strchr(ptr, LBRACE)) != NULL)
-		if (!globexp2(ptr, pattern, pglob, rv))
+		if (!globexp2(ptr, pattern, pglob, rv, limit))
 			return rv;
 
-	return glob0(pattern, pglob);
+	return glob0(pattern, pglob, limit);
 }
 
 
@@ -249,7 +251,8 @@
  * If it fails then it tries to glob the rest of the pattern and returns.
  */
 static int
-globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv)
+globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv,
+size_t *limit)
 {
 	int i;
 	Char   *lm, *ls;
@@ -294,7 +297,7 @@
 		 * we use `pattern', not `patbuf' here so that that
 		 * unbalanced braces are passed to the match
 		 */
-		*rv = glob0(pattern, pglob);
+		*rv = glob0(pattern, pglob, limit);
 		return 0;
 	}
 
@@ -341,7 +344,7 @@
 #ifdef DEBUG
 qprintf(globexp2:, patbuf);
 #endif
-*rv = globexp1(patbuf, pglob);
+*rv = globexp1(patbuf, pglob, limit);
 
 /* move after the comma, to the next string */
 pl = pm + 1;
@@ -454,13 +457,12 @@
  * to find no matches.
  */
 static int
-glob0(const Char *pattern, glob_t *pglob)
+glob0(const Char *pattern, glob_t *pglob, size_t *limit)
 {
 	const Char *qpatnext;
 	int c, error;
 	__gl_size_t oldpathc;
 	Char *bufnext, patbuf[MAXPATHLEN+1];
-	size_t limit = 0;
 
 	_DIAGASSERT(pattern != NULL);
 	_DIAGASSERT(pglob != NULL);
@@ -523,7 +525,7 @@
 	qprintf(glob0:, patbuf);
 #endif
 
-	if ((error = glob1(patbuf, pglob, limit)) != 0)
+	if ((error = glob1(patbuf, pglob, limit)) != 0)
 		return error;
 
 	if (pglob-gl_pathc == oldpathc) {	
@@ -537,7 +539,7 @@
 		if ((pglob-gl_flags  GLOB_NOCHECK) ||
 		((pglob-gl_flags  (GLOB_NOMAGIC|GLOB_MAGCHAR))
 		 == GLOB_NOMAGIC)) {
-			return globextend(pattern, pglob, limit);
+			return globextend(pattern, pglob, limit);
 		} else {
 			return GLOB_NOMATCH;
 		}



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

2010-07-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jul  2 21:19:00 UTC 2010

Added Files:
src/distrib/sets/lists/comp: stl.mi

Log Message:
add stl.mi, was previously stl.elf.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/comp/stl.mi

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

Added files:

Index: src/distrib/sets/lists/comp/stl.mi
diff -u /dev/null src/distrib/sets/lists/comp/stl.mi:1.1
--- /dev/null	Fri Jul  2 21:19:00 2010
+++ src/distrib/sets/lists/comp/stl.mi	Fri Jul  2 21:19:00 2010
@@ -0,0 +1,5 @@
+# $NetBSD: stl.mi,v 1.1 2010/07/02 21:19:00 mrg Exp $
+./usr/lib/crtbegin.ocomp-c-lib
+./usr/lib/crtend.ocomp-c-lib
+./usr/lib/crti.ocomp-c-lib
+./usr/lib/crtn.ocomp-c-lib