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

2012-10-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Oct  4 00:14:25 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_eth.c

Log Message:
Ethernet driver for BCM53XXX (not quite working).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm53xx_eth.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_eth.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.2
--- src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.1	Sat Sep  1 00:04:44 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_eth.c	Thu Oct  4 00:14:24 2012
@@ -33,27 +33,86 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.1 2012/09/01 00:04:44 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.2 2012/10/04 00:14:24 matt Exp $");
 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
 
+#include 
+
+#include 
+
 #include 
 
 #include 
 #include 
 
+#define	BCMETH_RCVOFFSET	6
+#define	BCMETH_MAXTXMBUFS	32
+#define	BCMETH_NTXSEGS		30
+#define	BCMETH_MAXRXMBUFS	255
+#define	BCMETH_MINRXMBUFS	32
+#define	BCMETH_NRXSEGS		1
+
 static int bcmeth_ccb_match(device_t, cfdata_t, void *);
 static void bcmeth_ccb_attach(device_t, device_t, void *);
 
+struct bcmeth_txqueue {
+	bus_dmamap_t txq_descmap;
+	struct gmac_txdb *txq_consumer;
+	struct gmac_txdb *txq_producer;
+	struct gmac_txdb *txq_first;
+	struct gmac_txdb *txq_last;
+	struct ifqueue txq_mbufs;
+	struct mbuf *txq_next;
+	size_t txq_free;
+	size_t txq_threshold;
+	size_t txq_lastintr;
+	bus_size_t txq_reg_xmtaddrlo;
+	bus_size_t txq_reg_xmtptr;
+	bus_size_t txq_reg_xmtctl;
+	bus_size_t txq_reg_xmtsts0;
+	bus_dma_segment_t txq_descmap_seg;
+};
+
+struct bcmeth_rxqueue {
+	bus_dmamap_t rxq_descmap;
+	struct gmac_rxdb *rxq_consumer;
+	struct gmac_rxdb *rxq_producer;
+	struct gmac_rxdb *rxq_first;
+	struct gmac_rxdb *rxq_last;
+	struct mbuf *rxq_mhead;
+	struct mbuf **rxq_mtail;
+	struct mbuf *rxq_mconsumer;
+	size_t rxq_inuse;
+	size_t rxq_threshold;
+	bus_size_t rxq_reg_rcvaddrlo;
+	bus_size_t rxq_reg_rcvptr;
+	bus_size_t rxq_reg_rcvctl;
+	bus_size_t rxq_reg_rcvsts0;
+	bus_dma_segment_t rxq_descmap_seg;
+};
+
+struct bcmeth_mapcache {
+	u_int dmc_nmaps;
+	u_int dmc_maxseg;
+	u_int dmc_maxmaps;
+	u_int dmc_maxmapsize;
+	bus_dmamap_t dmc_maps[0];
+};
+
 struct bcmeth_softc {
 	device_t sc_dev;
 	bus_space_tag_t sc_bst;
@@ -62,13 +121,76 @@ struct bcmeth_softc {
 	kmutex_t *sc_lock;
 	kmutex_t *sc_hwlock;
 	struct ethercom sc_ec;
-#define	sc_if		sc_ec.ec_if;
-	void *sc_sih;
+#define	sc_if		sc_ec.ec_if
+	struct ifmedia sc_media;
+	void *sc_soft_ih;
 	void *sc_ih;
+
+	struct bcmeth_rxqueue sc_rxq;
+	struct bcmeth_txqueue sc_txq;
+
+	uint32_t sc_maxfrm;
+	uint32_t sc_cmdcfg;
+	uint32_t sc_intmask;
+	volatile uint32_t sc_soft_flags;
+#define	SOFT_RXINTR		0x01
+#define	SOFT_RXUNDERFLOW	0x02
+#define	SOFT_TXINTR		0x04
+#define	SOFT_REINIT		0x08
+
+	struct evcnt sc_ev_intr;
+	struct evcnt sc_ev_soft_intr;
+	struct evcnt sc_ev_tx_stall;
+
+	struct ifqueue sc_rx_bufcache;
+	struct bcmeth_mapcache *sc_rx_mapcache; 
+	struct bcmeth_mapcache *sc_tx_mapcache;
+
+	uint8_t sc_enaddr[ETHER_ADDR_LEN];
 };
 
+static void bcmeth_ifstart(struct ifnet *);
+static void bcmeth_ifwatchdog(struct ifnet *);
+static int bcmeth_ifinit(struct ifnet *);
+static void bcmeth_ifstop(struct ifnet *, int);
+static int bcmeth_ifioctl(struct ifnet *, u_long, void *);
+
+static int bcmeth_mapcache_create(struct bcmeth_softc *,
+struct bcmeth_mapcache **, size_t, size_t, size_t);
+static void bcmeth_mapcache_destroy(struct bcmeth_softc *,
+struct bcmeth_mapcache *);
+static bus_dmamap_t bcmeth_mapcache_get(struct bcmeth_softc *,
+struct bcmeth_mapcache *);
+static void bcmeth_mapcache_put(struct bcmeth_softc *,
+struct bcmeth_mapcache *, bus_dmamap_t);
+
+static int bcmeth_txq_attach(struct bcmeth_softc *,
+struct bcmeth_txqueue *, u_int);
+static void bcmeth_txq_purge(struct bcmeth_softc *,
+struct bcmeth_txqueue *);
+static void bcmeth_txq_reset(struct bcmeth_softc *,
+struct bcmeth_txqueue *);
+static bool bcmeth_txq_consume(struct bcmeth_softc *,
+struct bcmeth_txqueue *);
+static bool bcmeth_txq_produce(struct bcmeth_softc *,
+struct bcmeth_txqueue *, struct mbuf *m);
+static bool bcmeth_txq_active_p(struct bcmeth_softc *,
+struct bcmeth_txqueue *);
+
+static int bcmeth_rxq_attach(struct bcmeth_softc *,
+struct bcmeth_rxqueue *, u_int);
+static bool bcmeth_rxq_produce(struct bcmeth_softc *,
+struct bcmeth_rxqueue *);
+static void bcmeth_rxq_purge(struct bcmeth_softc *,
+struct bcmeth_rxqueue *, bool);
+static void bcmeth_rxq_reset(struct bcmeth_softc *,
+struct bcmeth_rxqueue *);
+
 static int bcmeth_intr(void *);
-static void bcmeth_softint(void *);
+stati

CVS commit: src/sbin/route

2012-10-03 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Oct  4 00:01:48 UTC 2012

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

Log Message:
Fix fallout from 1.129 that converted sou::so_foo from unions to
pointers but missed (char *)&soup->so_foo => (char *)soup->so_foo in
mask_addr().  It worked by luck - unless it didn't: due to pointer
numerology on amd64 route add -net ClassC without explicit /24 prefix
length specification would result into /16 destination instead of /24.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sbin/route/route.c

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

Modified files:

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.138 src/sbin/route/route.c:1.139
--- src/sbin/route/route.c:1.138	Wed Aug  8 14:04:26 2012
+++ src/sbin/route/route.c	Thu Oct  4 00:01:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.138 2012/08/08 14:04:26 christos Exp $	*/
+/*	$NetBSD: route.c,v 1.139 2012/10/04 00:01:48 uwe Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.138 2012/08/08 14:04:26 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.139 2012/10/04 00:01:48 uwe Exp $");
 #endif
 #endif /* not lint */
 
@@ -1648,11 +1648,11 @@ static void
 mask_addr(struct sou *soup)
 {
 	int olen = soup->so_mask->sa.sa_len;
-	char *cp1 = olen + (char *)&soup->so_mask, *cp2;
+	char *cp1 = olen + (char *)soup->so_mask, *cp2;
 
-	for (soup->so_mask->sa.sa_len = 0; cp1 > (char *)&soup->so_mask; )
+	for (soup->so_mask->sa.sa_len = 0; cp1 > (char *)soup->so_mask; )
 		if (*--cp1 != 0) {
-			soup->so_mask->sa.sa_len = 1 + cp1 - (char *)&soup->so_mask;
+			soup->so_mask->sa.sa_len = 1 + cp1 - (char *)soup->so_mask;
 			break;
 		}
 	if ((rtm_addrs & RTA_DST) == 0)
@@ -1674,11 +1674,11 @@ mask_addr(struct sou *soup)
 		break;
 #endif /* SMALL */
 	}
-	cp1 = soup->so_mask->sa.sa_len + 1 + (char *)&soup->so_dst;
-	cp2 = soup->so_dst->sa.sa_len + 1 + (char *)&soup->so_dst;
+	cp1 = soup->so_mask->sa.sa_len + 1 + (char *)soup->so_dst;
+	cp2 = soup->so_dst->sa.sa_len + 1 + (char *)soup->so_dst;
 	while (cp2 > cp1)
 		*--cp2 = 0;
-	cp2 = soup->so_mask->sa.sa_len + 1 + (char *)&soup->so_mask;
+	cp2 = soup->so_mask->sa.sa_len + 1 + (char *)soup->so_mask;
 	while (cp1 > soup->so_dst->sa.sa_data)
 		*--cp1 &= *--cp2;
 #ifndef SMALL



CVS commit: src/sys/dev/hpc/apm

2012-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  3 23:55:22 UTC 2012

Modified Files:
src/sys/dev/hpc/apm: apmdev.c

Log Message:
remove diagnostic printfs to make this compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/hpc/apm/apmdev.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/hpc/apm/apmdev.c
diff -u src/sys/dev/hpc/apm/apmdev.c:1.26 src/sys/dev/hpc/apm/apmdev.c:1.27
--- src/sys/dev/hpc/apm/apmdev.c:1.26	Sun Sep 30 17:36:20 2012
+++ src/sys/dev/hpc/apm/apmdev.c	Wed Oct  3 19:55:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $ */
+/*	$NetBSD: apmdev.c,v 1.27 2012/10/03 23:55:22 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.27 2012/10/03 23:55:22 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_apm.h"
@@ -584,12 +584,6 @@ apm_set_ver(struct apm_softc *sc)
 ok:
 	aprint_normal("Power Management spec V%d.%d", apm_majver, apm_minver);
 	apm_inited = 1;
-#ifdef DIAGNOSTIC
-	if (sc->sc_detail & APM_BIOS_PM_DISABLED)
-		aprint_normal(" (BIOS mgmt disabled)");
-	if (sc->sc_detail & APM_BIOS_PM_DISENGAGED)
-		aprint_normal(" (BIOS managing devices)");
-#endif
 }
 
 static int



CVS commit: src/sys/fs/msdosfs

2012-10-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Oct  3 23:32:43 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
We don't actually want to round the number of elements in the bitmap
down.  Fixes a self-inflicted buffer overrun.

(This was detected by chance that the top of the bitmap coincided with
a page boundary.)


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/fs/msdosfs/msdosfs_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/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.96 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.97
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.96	Sat Jul  7 16:18:50 2012
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Wed Oct  3 23:32:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.96 2012/07/07 16:18:50 tsutsui Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.97 2012/10/03 23:32:43 jakllsch Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.96 2012/07/07 16:18:50 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.97 2012/10/03 23:32:43 jakllsch Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -771,7 +771,7 @@ msdosfs_mountfs(struct vnode *devvp, str
 	 * Allocate memory for the bitmap of allocated clusters, and then
 	 * fill it in.
 	 */
-	pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
+	pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS)
    / N_INUSEBITS)
   * sizeof(*pmp->pm_inusemap),
   M_MSDOSFSFAT, M_WAITOK);



CVS commit: src/external/gpl2/xcvs/dist/src

2012-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  3 22:28:20 UTC 2012

Modified Files:
src/external/gpl2/xcvs/dist/src: acl.c

Log Message:
- add more debugging
- don't return memory we did not allocate, which the caller will then free!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/acl.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/acl.c
diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.3 src/external/gpl2/xcvs/dist/src/acl.c:1.4
--- src/external/gpl2/xcvs/dist/src/acl.c:1.3	Fri Mar  9 10:24:34 2012
+++ src/external/gpl2/xcvs/dist/src/acl.c	Wed Oct  3 18:28:20 2012
@@ -279,16 +279,26 @@ access_allowed (const char *file, const 
 			if (debug) fprintf(stderr, "perm %d\n", perm);
 			if (valid_perm (part_perms, perm))
 			{
+if (debug) fprintf(stderr, "signlevel=%d "
+" x=%d, aclconfig_default_used=%d\n",
+signlevel, x, aclconfig_default_used);
 if (signlevel == x)
 {
 if (strcmp(part_tag, "ALL") != 0 &&
-	!aclconfig_default_used)
+	!aclconfig_default_used) {
 	retval = 1;
+	if (debug) fprintf(stderr,
+	"%s, %d: %d\n", __FILE__, __LINE__,
+	retval);
+}
 }
 else if (!aclconfig_default_used)
 {
 signlevel = x;
 retval = 1;
+if (debug) fprintf(stderr,
+	"%s, %d: %d\n", __FILE__, __LINE__,
+	retval);
 }
 else {
 /* nothing... */
@@ -299,13 +309,20 @@ access_allowed (const char *file, const 
 if (signlevel == x)
 {
 if (strcmp(part_tag, "ALL") != 0 &&
-	!aclconfig_default_used)
+	!aclconfig_default_used) {
 	retval = 0;
+	if (debug) fprintf(stderr,
+	"%s, %d: %d\n", __FILE__, __LINE__,
+	retval);
+}
 }
 else if (!aclconfig_default_used)
 {
 signlevel = x;
 retval = 0;
+if (debug) fprintf(stderr,
+	"%s, %d: %d\n", __FILE__, __LINE__,
+	retval);
 
 if (strncmp (part_type, "f", 1) == 0)
 	founddeniedfile = 1;
@@ -334,11 +351,18 @@ access_allowed (const char *file, const 
 			if (valid_perm (part_perms, perm))
 			{
 			retval = 1;
+			if (debug) fprintf(stderr,
+"%s, %d: %d\n", __FILE__, __LINE__,
+retval);
 			if (perm == 8)
 dadmin = 1;
 			}
-			else
+			else {
 			retval = 0;
+			if (debug) fprintf(stderr,
+"%s, %d: %d\n", __FILE__, __LINE__,
+retval);
+			}
 		}
 		}
 
@@ -353,10 +377,17 @@ access_allowed (const char *file, const 
 {
 	if (debug) fprintf(stderr, "not found line\n");
 	/* DEFAULT */
-	if (valid_perm (NULL, perm))
+	if (valid_perm (NULL, perm)) {
 	retval = 1;
-	else
+	if (debug) fprintf(stderr,
+		"%s, %d: %d\n", __FILE__, __LINE__,
+		retval);
+	} else {
 	retval = 0;
+	if (debug) fprintf(stderr,
+		"%s, %d: %d\n", __FILE__, __LINE__,
+		retval);
+	}
 }
 
 /* acl admin rigths 'p' */
@@ -491,7 +522,7 @@ get_perms (const char *part_perms)
 	aclconfig_default_used = 1;
 	if (debug) fprintf (stderr, "default %s\n",
 			cvs_acl_default_permissions);
-	return (cvs_acl_default_permissions);
+	return xstrdup(cvs_acl_default_permissions);
 	}
 	else {
 	if (debug) fprintf (stderr, "early %s\n", xperms);



CVS commit: src/external/mit/xorg/server/xorg-server

2012-10-03 Thread Grégoire Sutre
Module Name:src
Committed By:   gsutre
Date:   Wed Oct  3 21:50:14 UTC 2012

Modified Files:
src/external/mit/xorg/server/xorg-server: Makefile.Xserver
src/external/mit/xorg/server/xorg-server/glx: Makefile.glx
src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg: Makefile

Log Message:
Enable GLX DRI2 support.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/mit/xorg/server/xorg-server/Makefile.Xserver
cvs rdiff -u -r1.9 -r1.10 \
src/external/mit/xorg/server/xorg-server/glx/Makefile.glx
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/xorg-server/Makefile.Xserver
diff -u src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.12 src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.13
--- src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.12	Tue Aug  2 09:11:37 2011
+++ src/external/mit/xorg/server/xorg-server/Makefile.Xserver	Wed Oct  3 21:50:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.Xserver,v 1.12 2011/08/02 09:11:37 mrg Exp $
+#	$NetBSD: Makefile.Xserver,v 1.13 2012/10/03 21:50:14 gsutre Exp $
 
 .for _SL in \
 	mi \
@@ -41,6 +41,7 @@
 	hw/xfree86/dixmods/xtrap \
 	hw/xfree86/doc \
 	hw/xfree86/dri \
+	hw/xfree86/dri2 \
 	hw/xfree86/dummy \
 	hw/xfree86/i2c \
 	hw/xfree86/init \

Index: src/external/mit/xorg/server/xorg-server/glx/Makefile.glx
diff -u src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.9 src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.10
--- src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.9	Tue Aug  2 07:41:01 2011
+++ src/external/mit/xorg/server/xorg-server/glx/Makefile.glx	Wed Oct  3 21:50:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.glx,v 1.9 2011/08/02 07:41:01 mrg Exp $
+#	$NetBSD: Makefile.glx,v 1.10 2012/10/03 21:50:14 gsutre Exp $
 
 .PATH:	${X11SRCDIR.xorg-server}/glx
 .PATH:	${X11SRCDIR.MesaLib}/src/mesa/glapi
@@ -14,6 +14,7 @@ SRCS.glx= \
 glapi_gentable.c \
 glthread.c \
 glxdri.c \
+glxdri2.c \
 extension_string.c \
 indirect_util.c \
 indirect_program.c \
@@ -47,6 +48,8 @@ CPPFLAGS+= \
 	-I${X11SRCDIR.xorg-server}/include \
 	-I${X11SRCDIR.xorg-server}/glx \
 	-I${X11SRCDIR.xorg-server}/Xext \
+	-I${X11SRCDIR.xorg-server}/hw/xfree86/dri \
+	-I${X11SRCDIR.xorg-server}/hw/xfree86/dri2 \
 	-I${X11SRCDIR.MesaLib}/include \
 	-I${X11SRCDIR.MesaLib}/src/glx \
 	-I${X11SRCDIR.MesaLib}/src/mesa \

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.4 src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.5
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.4	Sat Oct 22 14:40:41 2011
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile	Wed Oct  3 21:50:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/10/22 14:40:41 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.5 2012/10/03 21:50:14 gsutre Exp $
 
 .include 
 
@@ -58,6 +58,7 @@ LDADD+=	${LDADD.xkb}
 LDADD+=	${LDADD.os}
 LDADD+=	${LDADD.glx}
 LDADD+=	${LDADD.hw/xfree86/dri}
+LDADD+=	${LDADD.hw/xfree86/dri2}
 LDADD+=	${LDADD.hw/xfree86/dixmods/fb}
 LDADD+=	${LDADD.hw/xfree86/dixmods/xorgxkb}
 LDADD+=	-lpixman-1 -lXfont -lfreetype -lXau -lfontenc -lXdmcp
@@ -99,6 +100,7 @@ DPADD+=	${DPADD.dix} \
 	${DPADD.os} \
 	${DPADD.glx} \
 	${DPADD.hw/xfree86/dri} \
+	${DPADD.hw/xfree86/dri2} \
 	${DPADD.hw/xfree86/dixmods/fb} \
 	${DPADD.hw/xfree86/fb} \
 	${DPADD.hw/xfree86/init} \



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

2012-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct  3 20:54:23 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: RPI

Log Message:
Add a bunch of pseudodevices and LOCKDEBUG. All commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/RPI

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/evbarm/conf/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.8 src/sys/arch/evbarm/conf/RPI:1.9
--- src/sys/arch/evbarm/conf/RPI:1.8	Tue Sep 11 19:43:10 2012
+++ src/sys/arch/evbarm/conf/RPI	Wed Oct  3 20:54:23 2012
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.8 2012/09/11 19:43:10 msaitoh Exp $
+#	$NetBSD: RPI,v 1.9 2012/10/03 20:54:23 skrll Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -135,6 +135,7 @@ options 	KTRACE		# system call tracing, 
 #options 	PERFCTRS	# performance counters
 options 	DIAGNOSTIC	# internally consistency checks
 options 	DEBUG
+#options 	LOCKDEBUG
 #options 	IPKDB		# remote kernel debugging
 options 	VERBOSE_INIT_ARM # verbose bootstraping messages
 options 	DDB		# in-kernel debugger
@@ -215,24 +216,50 @@ options 	WSDISPLAY_DEFAULTSCREENS=4
 options		FONT_QVSS8x15
 #options 	FONT_GALLANT12x22	# the console font
 
-pseudo-device	wsmux			# mouse & keyboard multiplexor
-pseudo-device	wsfont
-
 # Pseudo-Devices
 
 # disk/mass storage pseudo-devices
+#pseudo-device	fss			# file system snapshot device
+
 pseudo-device	md			# memory disk device (ramdisk)
 pseudo-device	vnd			# disk-like interface to files
-#pseudo-device	fss			# file system snapshot device
 #pseudo-device	putter			# for puffs and pud
 
 # network pseudo-devices
 pseudo-device	bpfilter		# Berkeley packet filter
+#pseudo-device	carp			# Common Address Redundancy Protocol
+#pseudo-device	ipfilter		# IP filter (firewall) and NAT
 pseudo-device	loop			# network loopback
 #pseudo-device	kttcp			# network loopback
+#pseudo-device	ppp			# Point-to-Point Protocol
+#pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
+#options 	PPPOE_SERVER		# Enable PPPoE server via link0
+#pseudo-device	sl			# Serial Line IP
+#pseudo-device	strip			# Starmode Radio IP (Metricom)
+#pseudo-device	irframetty		# IrDA frame line discipline
+#pseudo-device	tap			# virtual Ethernet
+#pseudo-device	tun			# network tunneling over tty
+#pseudo-device	gre			# generic L3 over IP tunnel
+#pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC 1933)
+#pseudo-device	faith			# IPv[46] TCP relay translation i/f
+#pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
+#pseudo-device	vlan			# IEEE 802.1q encapsulation
+#pseudo-device	bridge			# simple inter-network bridging
+#options	BRIDGE_IPF		# bridge uses IP/IPv6 pfil hooks too
+#pseudo-device	agr			# IEEE 802.3ad link aggregation
+#pseudo-device	pf			# PF packet filter
+#pseudo-device	pflog			# PF log if
 
 # miscellaneous pseudo-devices
 pseudo-device	pty			# pseudo-terminals
 #options	RND_COM
 #pseudo-device	clockctl		# user control of clock subsystem
 pseudo-device	ksyms			# /dev/ksyms
+
+# wscons pseudo-devices
+pseudo-device	wsmux			# mouse & keyboard multiplexor
+pseudo-device	wsfont
+
+# data mover pseudo-devices
+#pseudo-device	swdmover		# software dmover(9) back-end
+#pseudo-device	dmoverio		# /dev/dmover dmover(9) interface



CVS commit: src/games/wtf

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:50:43 UTC 2012

Modified Files:
src/games/wtf: wtf.6

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/wtf/wtf.6

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

Modified files:

Index: src/games/wtf/wtf.6
diff -u src/games/wtf/wtf.6:1.14 src/games/wtf/wtf.6:1.15
--- src/games/wtf/wtf.6:1.14	Wed Oct  3 19:50:11 2012
+++ src/games/wtf/wtf.6	Wed Oct  3 19:50:43 2012
@@ -1,8 +1,8 @@
-.\"	$NetBSD: wtf.6,v 1.14 2012/10/03 19:50:11 wiz Exp $
+.\"	$NetBSD: wtf.6,v 1.15 2012/10/03 19:50:43 wiz Exp $
 .\"
 .\" Public Domain
 .\"
-.Dd September 25, 2012
+.Dd October 3, 2012
 .Dt WTF 6
 .Os
 .Sh NAME



CVS commit: src/games/wtf

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:50:11 UTC 2012

Modified Files:
src/games/wtf: wtf.6

Log Message:
- improve wording and overall program description (notably for `-f');
- improve macro usage;
- bump date.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/wtf/wtf.6

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

Modified files:

Index: src/games/wtf/wtf.6
diff -u src/games/wtf/wtf.6:1.13 src/games/wtf/wtf.6:1.14
--- src/games/wtf/wtf.6:1.13	Mon May  4 20:37:28 2009
+++ src/games/wtf/wtf.6	Wed Oct  3 19:50:11 2012
@@ -1,26 +1,28 @@
-.\"	$NetBSD: wtf.6,v 1.13 2009/05/04 20:37:28 wiz Exp $
+.\"	$NetBSD: wtf.6,v 1.14 2012/10/03 19:50:11 wiz Exp $
 .\"
 .\" Public Domain
 .\"
-.Dd July 27, 2007
+.Dd September 25, 2012
 .Dt WTF 6
 .Os
 .Sh NAME
 .Nm wtf
-.Nd translates acronyms for you
+.Nd translate acronyms
 .Sh SYNOPSIS
 .Nm
 .Op Fl f Ar dbfile
 .Op Ar is
-.Ar acronym Ar ...
+.Ar acronym ...
 .Sh DESCRIPTION
 The
 .Nm
-utility displays the expansion of the acronyms
+utility displays the expansion of one or more acronyms
 specified on the command line.
-If the acronym is not in any of the acronyms databases,
+If an acronym is not in any of the acronym databases,
+which are expected to be in the format
+.Dq acronym[tab]meaning ,
 .Nm
-will check to see if the acronym is known by
+will check to see if it is known by
 .Xr whatis 1 ,
 .Xr pkg_info 1 ,
 or via pkgsrc's internal help mechanism,
@@ -36,26 +38,29 @@ usage.
 The following options are available:
 .Bl -tag -width flag
 .It Fl f Ar dbfile
-Overrides the default acronym database, bypassing the value of the
+Overrides the default list of acronym databases, bypassing the value of the
 .Ev ACRONYMDB
 variable.
+Unlike this variable the
+.Fl f
+option only accepts one file name as an argument,
+but it may be given multiple times to specify more than one file to use.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width ACRONYMDB
 .It Ev ACRONYMDB
-The default acronym database may be overridden by setting the
+The default list of acronym databases may be overridden by setting the
 environment variable
 .Ev ACRONYMDB
 to the name of one or more space-separated file names of
 acronym databases.
-The files must be in the proper format (acronym[tab]meaning).
 .El
 .Sh FILES
 .Bl -tag -width /usr/share/misc/acronyms. -compact
 .It Pa /usr/share/misc/acronyms
 default acronym database.
 .It Pa /usr/share/misc/acronyms.comp
-computer-related acronym database.
+default computer-related acronym database.
 .El
 .Sh SEE ALSO
 .Xr make 1 ,



CVS commit: src/games/wtf

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:50:07 UTC 2012

Modified Files:
src/games/wtf: wtf

Log Message:
- correct `usage' message;
- improve wording.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/games/wtf/wtf

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

Modified files:

Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.17 src/games/wtf/wtf:1.18
--- src/games/wtf/wtf:1.17	Thu Apr 26 03:16:13 2012
+++ src/games/wtf/wtf	Wed Oct  3 19:50:06 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: wtf,v 1.17 2012/04/26 03:16:13 christos Exp $
+#	$NetBSD: wtf,v 1.18 2012/10/03 19:50:06 wiz Exp $
 #
 # Public domain
 #
@@ -8,7 +8,7 @@
 PROGNAME="$(basename "$0")"
 
 usage() {
-	echo "Usage: $PROGNAME [-f dbfile] [is] "
+	echo "usage: $PROGNAME [-f dbfile] [is]  ..."
 	exit 1
 }
 
@@ -39,21 +39,21 @@ if [ -z "$acronyms" ]; then
 fi
 
 if [ -z "$acronyms" ]; then
-	echo "$PROGNAME: acronyms database not found!" >&2
+	echo "$PROGNAME: acronym database not found!" >&2
 	exit 1
 fi
 
 
 for f in $acronyms; do
 	if [ ! -f $f ]; then
-		echo "$PROGNAME: cannot open acronyms database file \`$f'" >&2
+		echo "$PROGNAME: cannot open acronym database file \`$f'" >&2
 		exit 1
 	fi
 done
 
 rv=0
 for i; do
-	# Search acronyms list first
+	# Search acronym list first
 	target="$(echo "$i" | tr '[a-z]' '[A-Z]')"
 	ans="$(fgrep -h "$target" $acronyms 2>/dev/null \
 	 | sed -ne "\|^$target[[:space:]]|s|^$target[[:space:]]*||p")"



CVS commit: src/games/fortune/datfiles

2012-10-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Oct  3 19:41:46 UTC 2012

Modified Files:
src/games/fortune/datfiles: fortunes

Log Message:
Add a remarkably percipient fortune cookie.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/games/fortune/datfiles/fortunes

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

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.51 src/games/fortune/datfiles/fortunes:1.52
--- src/games/fortune/datfiles/fortunes:1.51	Wed Oct  3 19:04:55 2012
+++ src/games/fortune/datfiles/fortunes	Wed Oct  3 19:41:46 2012
@@ -15626,6 +15626,9 @@ You are here:
 
 		 But you're not all there.
 %
+You are not illiterate.
+		-- a Mary Chung's fortune cookie
+%
 "You are old, Father William," the young man said,
 	"All your papers these days look the same;
 Those William's would be better unread --



CVS commit: src/bin/sh

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:37:36 UTC 2012

Modified Files:
src/bin/sh: sh.1

Log Message:
- Correct macro usage;
- improve wording, including creating more consistency therein.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/bin/sh/sh.1

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

Modified files:

Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.108 src/bin/sh/sh.1:1.109
--- src/bin/sh/sh.1:1.108	Sun Aug 26 14:30:38 2012
+++ src/bin/sh/sh.1	Wed Oct  3 19:37:36 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sh.1,v 1.108 2012/08/26 14:30:38 wiz Exp $
+.\"	$NetBSD: sh.1,v 1.109 2012/10/03 19:37:36 wiz Exp $
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -416,9 +416,9 @@ are stripped off and assigned to the env
 Redirection operators and their arguments (as described below) are
 stripped off and saved for processing.
 .It
-The remaining words are expanded as described in
-the section called
-.Dq Expansions ,
+The remaining words are expanded as described in the
+.Sx Word Expansions
+section below,
 and the first remaining word is considered the command name and the
 command is located.
 The remaining words are considered the arguments of the command.
@@ -484,10 +484,11 @@ All the text on successive lines up to t
 made available to the command on standard input, or file descriptor n if
 it is specified.
 If the delimiter as specified on the initial line is
-quoted, then the here-doc-text is treated literally, otherwise the text is
+quoted, then the here-doc-text is treated literally; otherwise, the text is
 subjected to parameter expansion, command substitution, and arithmetic
-expansion (as described in the section on
-.Dq Expansions ) .
+expansion as described in the
+.Sx Word Expansions
+section below.
 If the operator is
 .Dq \*[Lt]\*[Lt]-
 instead of
@@ -886,7 +887,7 @@ For a pipeline, the process ID is that o
 Expands to the name of the shell or shell script.
 .El
 .Ss Word Expansions
-This clause describes the various expansions that are performed on words.
+This section describes the various expansions that are performed on words.
 Not all expansions are performed on every word, as explained later.
 .Pp
 Tilde expansions, parameter expansions, command substitutions, arithmetic
@@ -1585,8 +1586,9 @@ The prompt is printed if the
 option is specified and the standard input is a terminal.
 Then a line is read from the standard input.
 The trailing newline is deleted from the
-line and the line is split as described in the section on word splitting
-above, and the pieces are assigned to the variables in order.
+line and the line is split as described in the
+.Sx Word Expansions
+section above, and the pieces are assigned to the variables in order.
 If there are more pieces than variables, the remaining pieces
 (along with the characters in
 .Ev IFS
@@ -1629,8 +1631,9 @@ command performs three different functio
 With no arguments, it lists the values of all shell variables.
 .Pp
 If options are given, it sets the specified option
-flags, or clears them as described in the section called
-.Sx Argument List Processing .
+flags, or clears them as described in the
+.Sx Argument List Processing
+section.
 .Pp
 The third use of the set command is to set the values of the shell's
 positional parameters to the specified arguments.
@@ -1827,8 +1830,9 @@ When
 is being used interactively from a terminal, the current command
 and the command history (see
 .Ic fc
-in
-.Sx Built-ins )
+in the
+.Sx Built-ins
+section)
 can be edited using emacs-mode or vi-mode command-line editing.
 The command
 .Ql set -o emacs
@@ -1885,8 +1889,9 @@ This environment variable also functions
 built-in.
 .It Ev PATH
 The default search path for executables.
-See the above section
-.Sx Path Search .
+See the
+.Sx Path Search
+section above.
 .It Ev CDPATH
 The search path used with the
 .Ic cd



CVS commit: src/sbin/mount

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:36:11 UTC 2012

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

Log Message:
- Improve wording;
- remove superfluous `.Pp' macro (fixes mandoc(1) warning).

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sbin/mount/mount.8

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

Modified files:

Index: src/sbin/mount/mount.8
diff -u src/sbin/mount/mount.8:1.76 src/sbin/mount/mount.8:1.77
--- src/sbin/mount/mount.8:1.76	Sat Jun 23 23:41:25 2012
+++ src/sbin/mount/mount.8	Wed Oct  3 19:36:11 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount.8,v 1.76 2012/06/23 23:41:25 wiz Exp $
+.\"	$NetBSD: mount.8,v 1.77 2012/10/03 19:36:11 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -436,8 +436,8 @@ The file system object is to be read and
 The options specific to the various file system types are
 described in the manual pages for those file systems'
 .Nm mount_XXX
-commands.
-For instance the options specific to Berkeley
+commands;
+for instance, the options specific to Berkeley
 Fast File System (FFS) are described in the
 .Xr mount_ffs 8
 manual page.
@@ -453,7 +453,6 @@ file system table
 .El
 .Sh EXAMPLES
 Some useful examples:
-.Pp
 .Bl -hang -offset indent -width "MS-DOS"
 .It Tn CD-ROM
 .br



CVS commit: src/usr.bin/fstat

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:35:08 UTC 2012

Modified Files:
src/usr.bin/fstat: fstat.1

Log Message:
- In the example for `-f', reference a directory that is actually
  available in a default installation (/usr/src isn't);
- put together two lines which belong to the same sentence;
- remove a spurious space character;
- remove unneeded consecutive argument for `.Nm' macro.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/fstat/fstat.1

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

Modified files:

Index: src/usr.bin/fstat/fstat.1
diff -u src/usr.bin/fstat/fstat.1:1.30 src/usr.bin/fstat/fstat.1:1.31
--- src/usr.bin/fstat/fstat.1:1.30	Sat Oct  8 22:16:03 2011
+++ src/usr.bin/fstat/fstat.1	Wed Oct  3 19:35:08 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fstat.1,v 1.30 2011/10/08 22:16:03 jnemeth Exp $
+.\"	$NetBSD: fstat.1,v 1.31 2012/10/03 19:35:08 wiz Exp $
 .\"
 .\" Copyright (c) 1987, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -61,9 +61,9 @@ the named file arguments, or to the file
 current directory if there are no additional filename arguments.
 For example, to find all files open in the file system where the
 directory
-.Pa /usr/src
+.Pa /var/log
 resides, type
-.Dq Li fstat -f /usr/src .
+.Dq Li fstat -f /var/log .
 Please see the
 .Sx BUGS
 section for issues with this option.
@@ -96,8 +96,7 @@ these data structures are dynamically cr
 possible for them to disappear while
 .Nm
 is running.
-This
-is normal and  unavoidable since the rest of the system is running while
+This is normal and unavoidable since the rest of the system is running while
 .Nm
 itself is running.
 .It Ar
@@ -233,7 +232,7 @@ and a full duplex socket shows a double 
 .Pq Dq \*[Lt]-\*[Gt] .
 .Pp
 For internet sockets
-.Nm fstat
+.Nm
 also attempts to print the internet address and port for the
 local end of a connection.
 If the socket is connected, it also prints the remote internet address



CVS commit: src/lib/libc/gen

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:28:44 UTC 2012

Modified Files:
src/lib/libc/gen: isspace.3

Log Message:
Improve wording.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/isspace.3

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/isspace.3
diff -u src/lib/libc/gen/isspace.3:1.14 src/lib/libc/gen/isspace.3:1.15
--- src/lib/libc/gen/isspace.3:1.14	Thu Apr 17 16:25:36 2008
+++ src/lib/libc/gen/isspace.3	Wed Oct  3 19:28:44 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: isspace.3,v 1.14 2008/04/17 16:25:36 apb Exp $
+.\"	$NetBSD: isspace.3,v 1.15 2012/10/03 19:28:44 wiz Exp $
 .\"
 .\" Copyright (c) 1991 The Regents of the University of California.
 .\" All rights reserved.
@@ -68,7 +68,7 @@ Carriage return.
 .It Li \et
 Horizontal tab.
 .It Li \ev
-And vertical tab.
+Vertical tab.
 .El
 .Pp
 In the



CVS commit: src/usr.sbin/mtree

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:27:48 UTC 2012

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
- Sort order of options mentioned in text;
- improve wording;
- remove unneeded macros (fixes mandoc(1) warnings);
- in the `EXAMPLES' section, for `-d', mention the use of `-U'
  besides that of `-u' (as the former is a variant on the latter).

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/mtree/mtree.8

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/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.53 src/usr.sbin/mtree/mtree.8:1.54
--- src/usr.sbin/mtree/mtree.8:1.53	Wed Jan 20 14:00:48 2010
+++ src/usr.sbin/mtree/mtree.8	Wed Oct  3 19:27:48 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.53 2010/01/20 14:00:48 wiz Exp $
+.\"	$NetBSD: mtree.8,v 1.54 2012/10/03 19:27:48 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -104,8 +104,8 @@ The full path name
 (beginning with
 .Dq \&./ )
 is always printed as the first field;
-.Fl k ,
 .Fl K ,
+.Fl k ,
 and
 .Fl R
 can be used to control which other keywords are printed;
@@ -113,6 +113,7 @@ can be used to control which other keywo
 and
 .Fl I
 can be used to control which files are printed;
+and the
 .Fl S
 option can be used to sort the output.
 .It Fl c
@@ -187,13 +188,13 @@ particular, if other bits like the stick
 set either in the specification or the file, exact checking will be
 performed.
 This option may not be set at the same time as the
-.Fl u
-or
 .Fl U
+or
+.Fl u
 option.
 .It Fl M
 Permit merging of specification entries with different types,
-with the last entry take precedence.
+with the last entry taking precedence.
 .It Fl m
 If the schg and/or sappnd flags are specified, reset these flags.
 Note that this is only possible with securelevel less than 1 (i.e.,
@@ -287,9 +288,9 @@ Don't attempt to set various file attrib
 ownership, mode, flags, or time
 when creating new directories or changing existing entries.
 This option will be most useful when used in conjunction with
-.Fl u
+.Fl U
 or
-.Fl U .
+.Fl u .
 .It Fl X Ar exclude-file
 The specified file contains
 .Xr fnmatch 3
@@ -329,7 +330,6 @@ or
 .Sy char
 file types.
 The argument must be one of the following forms:
-.Pp
 .Bl -tag -width 4n
 .It Ar format , Ns Ar major , Ns Ar minor
 A device with
@@ -498,7 +498,6 @@ and
 .Sy uid .
 .Pp
 There are four types of lines in a specification:
-.Pp
 .Bl -enum
 .It
 Set global values for a keyword.
@@ -581,7 +580,7 @@ appropriately.
 Multiple entries for the same full path are permitted if the types
 are the same (unless
 .Fl M
-is given, and then the types may differ);
+is given, in which case the types may differ);
 in this case the settings for the last entry take precedence.
 .Pp
 A path name that does not contain a slash will be treated as a relative path.
@@ -631,10 +630,11 @@ can be used to detect which of the binar
 .Pp
 The
 .Fl d
-and
+option can be used in combination with
+.Fl U
+or
 .Fl u
-options can be used in combination to create directory hierarchies
-for distributions and other such things.
+to create directory hierarchies for, for example, distributions.
 .Sh SEE ALSO
 .Xr chflags 1 ,
 .Xr chgrp 1 ,
@@ -681,8 +681,8 @@ keywords,
 .Fl D ,
 .Fl E ,
 .Fl I ,
-.Fl l ,
 .Fl L ,
+.Fl l ,
 .Fl N ,
 .Fl P ,
 .Fl R ,



CVS commit: src/external/bsd/sljit

2012-10-03 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Wed Oct  3 19:22:18 UTC 2012

Removed Files:
src/external/bsd/sljit: README.import
src/external/bsd/sljit/dist: Makefile README
src/external/bsd/sljit/dist/regex_src: regexJIT.c regexJIT.h
regexMain.c
src/external/bsd/sljit/dist/sljit_src: sljitConfig.h
sljitConfigInternal.h sljitExecAllocator.c sljitLir.c sljitLir.h
sljitNativeARM_Thumb2.c sljitNativeARM_v5.c sljitNativeMIPS_32.c
sljitNativeMIPS_common.c sljitNativePPC_32.c sljitNativePPC_64.c
sljitNativePPC_common.c sljitNativeX86_32.c sljitNativeX86_64.c
sljitNativeX86_common.c sljitUtils.c
src/external/bsd/sljit/dist/test_src: sljitMain.c sljitTest.c

Log Message:
Remove sljit because it was imported to the wrong place.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/external/bsd/sljit/README.import
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/sljit/dist/Makefile \
src/external/bsd/sljit/dist/README
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/sljit/dist/regex_src/regexJIT.c \
src/external/bsd/sljit/dist/regex_src/regexJIT.h \
src/external/bsd/sljit/dist/regex_src/regexMain.c
cvs rdiff -u -r1.2 -r0 src/external/bsd/sljit/dist/sljit_src/sljitConfig.h \
src/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h \
src/external/bsd/sljit/dist/sljit_src/sljitUtils.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c \
src/external/bsd/sljit/dist/sljit_src/sljitLir.c \
src/external/bsd/sljit/dist/sljit_src/sljitLir.h \
src/external/bsd/sljit/dist/sljit_src/sljitNativeARM_Thumb2.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeARM_v5.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c \
src/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/sljit/dist/test_src/sljitMain.c \
src/external/bsd/sljit/dist/test_src/sljitTest.c

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



CVS commit: src/doc

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:19:09 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update 'rcs' package entry.
>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.971 -r1.972 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.971 src/doc/3RDPARTY:1.972
--- src/doc/3RDPARTY:1.971	Thu Sep 27 17:46:46 2012
+++ src/doc/3RDPARTY	Wed Oct  3 19:19:09 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.971 2012/09/27 17:46:46 apb Exp $
+#	$NetBSD: 3RDPARTY,v 1.972 2012/10/03 19:19:09 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1029,13 +1029,13 @@ using the version found in 2.4.1.
 
 Package:	rcs
 Version:	5.7
-Current Vers:	5.8
+Current Vers:	5.8.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/rcs/
 Mailing List:	bug-gnu-ut...@gnu.org
 Home Page:	http://www.gnu.org/software/rcs/
 Responsible:	agc
-License:	GPLv2 (5.7), GPLv3+ (5.8)
+License:	GPLv2+ (5.7), GPLv3+ (5.8 and later)
 Location:	gnu/usr.bin/rcs
 Notes:
 Old versions are available from Purdue (ftp.cs.purdue.edu:/pub/RCS).



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

2012-10-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Oct  3 19:18:41 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c bcm53xx_ccb.c bcm53xx_reg.h
bcm53xx_var.h

Log Message:
Add code to init the SRAB (the switch robot).  Don't configure eth3 by default.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_ccb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/broadcom/bcm53xx_reg.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm53xx_var.h

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.3 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.4
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.3	Tue Sep 18 05:47:27 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Oct  3 19:18:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.3 2012/09/18 05:47:27 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.4 2012/10/03 19:18:40 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.3 2012/09/18 05:47:27 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.4 2012/10/03 19:18:40 matt Exp $");
 
 #include 
 #include 
@@ -43,10 +43,14 @@ __KERNEL_RCSID(1, "$NetBSD: bcm53xx_boar
 
 #include 
 
+#include 
+#include 
+
 #define CRU_PRIVATE
 #define DDR_PRIVATE
 #define DMU_PRIVATE
 #define ARMCORE_PRIVATE
+#define SRAB_PRIVATE
 
 #include 
 #include 
@@ -519,5 +523,122 @@ bcm53xx_device_register(device_t self, v
 prop_dictionary_set_uint32(dict, "frequency",
 		clk_info.clk_cpu / 2);
 		return;
-	}	
+	}
+
+	if (device_is_a(self, "bcmeth")) {
+		const struct bcmccb_attach_args * const ccbaa = aux;
+		const uint8_t enaddr[ETHER_ADDR_LEN] = {
+			0x00, 0x01, 0x02, 0x03, 0x04,
+			0x05 + 2 * ccbaa->ccbaa_loc.loc_port,
+		};
+		prop_data_t pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN);
+		KASSERT(pd != NULL);
+		if (prop_dictionary_set(device_properties(self), "mac-address", pd) == false) {
+			printf("WARNING: Unable to set mac-address property for %s\n", device_xname(self));
+		}
+		prop_object_release(pd);
+	}
+}
+
+static kmutex_t srab_lock __cacheline_aligned;
+
+void
+bcm53xx_srab_init(void)
+{
+	mutex_init(&srab_lock, MUTEX_DEFAULT, IPL_VM);
+
+	bcm53xx_srab_write_4(0x0079, 0x90);	// reset switch 
+	for (u_int port = 0; port < 8; port++) {
+		/* per port control: no stp */
+		bcm53xx_srab_write_4(port, 0x00);
+	}
+	bcm53xx_srab_write_4(0x0008, 0x1c);	// IMP port (enab UC/MC/BC)
+	bcm53xx_srab_write_4(0x000e, 0xbb);	// IMP port force-link 1G
+	bcm53xx_srab_write_4(0x005d, 0x7b);	// port5 force-link 1G
+	bcm53xx_srab_write_4(0x005f, 0x7b);	// port7 force-link 1G
+	bcm53xx_srab_write_4(0x000b, 0x7);	// management mode
+	bcm53xx_srab_write_4(0x0203, 0x0);	// disable BRCM tag
+	bcm53xx_srab_write_4(0x0200, 0x80);	// enable IMP=port8
+}
+
+static inline void
+bcm53xx_srab_busywait(bus_space_tag_t bst, bus_space_handle_t bsh)
+{
+	while (bus_space_read_4(bst, bsh, SRAB_BASE + SRAB_CMDSTAT) & SRA_GORDYN) {
+		delay(10);
+	}
+}
+
+uint32_t
+bcm53xx_srab_read_4(u_int pageoffset)
+{
+	bus_space_tag_t bst = bcm53xx_ioreg_bst;
+	bus_space_handle_t bsh = bcm53xx_ioreg_bsh;
+	uint32_t rv;
+
+	mutex_spin_enter(&srab_lock);
+
+	bcm53xx_srab_busywait(bst, bsh);
+	bus_space_write_4(bst, bsh, SRAB_BASE + SRAB_CMDSTAT,
+	__SHIFTIN(pageoffset, SRA_PAGEOFFSET) | SRA_GORDYN);
+	bcm53xx_srab_busywait(bst, bsh);
+	rv = bus_space_read_4(bst, bsh, SRAB_BASE + SRAB_RDL);
+
+	mutex_spin_exit(&srab_lock);
+	return rv;
+}
+
+uint64_t
+bcm53xx_srab_read_8(u_int pageoffset)
+{
+	bus_space_tag_t bst = bcm53xx_ioreg_bst;
+	bus_space_handle_t bsh = bcm53xx_ioreg_bsh;
+	uint64_t rv;
+
+	mutex_spin_enter(&srab_lock);
+
+	bcm53xx_srab_busywait(bst, bsh);
+	bus_space_write_4(bst, bsh, SRAB_BASE + SRAB_CMDSTAT,
+	__SHIFTIN(pageoffset, SRA_PAGEOFFSET) | SRA_GORDYN);
+	bcm53xx_srab_busywait(bst, bsh);
+	rv = bus_space_read_4(bst, bsh, SRAB_BASE + SRAB_RDH);
+	rv <<= 32;
+	rv |= bus_space_read_4(bst, bsh, SRAB_BASE + SRAB_RDL);
+
+	mutex_spin_exit(&srab_lock);
+	return rv;
+}
+
+void
+bcm53xx_srab_write_4(u_int pageoffset, uint32_t val)
+{
+	bus_space_tag_t bst = bcm53xx_ioreg_bst;
+	bus_space_handle_t bsh = bcm53xx_ioreg_bsh;
+
+	mutex_spin_enter(&srab_lock);
+
+	bcm53xx_srab_busywait(bst, bsh);
+	bus_space_write_4(bst, bsh, SRAB_BASE + SRAB_WDL, val);
+	bus_space_write_4(bst, bsh, SRAB_BASE + SRAB_CMDSTAT,
+	__SHIFTIN(pageoffset, SRA_PAGEOFFSET) | SRA_WRITE | SRA_GORDYN);
+	bcm53xx_srab_busywait(bst, bsh);
+
+	mutex_spin_exit(&srab_lock);
+}
+
+void
+bcm53xx_srab_write_8(u_int pageoffset, uint64_t val)
+{
+	bus_space_tag_t bst = bcm53xx_ioreg_bst;
+	bus_space_

CVS commit: src

2012-10-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct  3 19:17:01 UTC 2012

Modified Files:
src: UPDATING

Log Message:
- Capitalization fixes (``OpenSSL'', not ``openssl'');
- change single to double space in between sentences;
- remove trailing white space.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.240 src/UPDATING:1.241
--- src/UPDATING:1.240	Mon Sep 17 05:56:27 2012
+++ src/UPDATING	Wed Oct  3 19:17:00 2012
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.240 2012/09/17 05:56:27 dholland Exp $
+$NetBSD: UPDATING,v 1.241 2012/10/03 19:17:00 wiz Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -17,14 +17,14 @@ Recent changes:
 ^^^
 
 20120726:
-	The update of openssl requires cleaning both the openssl build
-	directory and DESTDIR. *Even non-update builds require cleaning
+	The update of OpenSSL requires cleaning both the OpenSSL build
+	directory and DESTDIR.  *Even non-update builds require cleaning
 	DESTDIR.* Builds done without taking these steps may fail, or in
-	some cases may succeed and install broken openssl libraries that
+	some cases may succeed and install broken OpenSSL libraries that
 	cause third-party software to link incorrectly and/or crash.
 
 20120507:
-	The database schema for makemandb was changed. You will
+	The database schema for makemandb was changed.  You will
 	need to update the database using 'makemandb -f' or wait
 	for the next weekly run to fix it.
 
@@ -36,10 +36,10 @@ Recent changes:
 	mk.conf.
 
 20120216:
-	Default for MKCATPAGES changed to NO. Update builds will fail
-	unless DESTDIR is cleaned manually. If you built between 20120207
+	Default for MKCATPAGES changed to NO.  Update builds will fail
+	unless DESTDIR is cleaned manually.  If you built between 20120207
 	and 20120216, daily and weekly could have created an unreadable
-	/var/db/man.db index for apropos. Running makemandb -f or
+	/var/db/man.db index for apropos.  Running makemandb -f or
 	the next run of weekly will fix it.
 
 20111227:
@@ -59,11 +59,11 @@ Recent changes:
 	bit compatibility very painful) has been fixed in a
 	non-backwards-compatible way.  If you replace your kernel,
 	replace your rndctl executable too.
-	
+
 20111001:
 	the prop_*_send_syscall() functions from proplib(3) have been
 	changed and their new version is not backward compatible with the old
-	one. So ensure that all consumers of these functions (currently:
+	one.  So ensure that all consumers of these functions (currently:
 	quota2 code and its tests) are updated together with the new lib.
 
 20110817:
@@ -81,19 +81,19 @@ Recent changes:
 	sparc64, mips and powerpc platforms have changed.
 
 20110803:
-	The layout of external/public-domain/xz has changed. To do an
+	The layout of external/public-domain/xz has changed.  To do an
 	update build you will have to remove the contents of the OBJDIR
 	for external/public-domain/xz/bin by hand as the xz entry there
 	is now a directory.
 
 20110410:
-	The configuration of src/tools/gcc has changed. To do an
+	The configuration of src/tools/gcc has changed.  To do an
 	update build you have to clean both tools/binutils and
 	tools/gcc by hand.
 
 20110328:
 	Building the Xorg binary was moved into a subdirectory to fix
-	ordering issues with "make all". It may be necessary to remove
+	ordering issues with "make all".  It may be necessary to remove
 	the OBJDIR for external/mit/xorg/server/xorg-server/hw/xfree86
 	if your update build fails, as the "Xorg" entry there is now a
 	directory.
@@ -106,13 +106,13 @@ Recent changes:
 
 20101217:
 	The tcpdump(8) program was changed to drop privileges and chroot(2)
-	by default. It may be necessary to manually update passwd(5) and
+	by default.  It may be necessary to manually update passwd(5) and
 	group(5) in order to make the program work with existing setups.
 
 20101125:
 	The latest changes to setenv(3) dissallow setting environment
-	variables with names that contain '='. Revision 1.18 of env.c
-	assumed that this was allowed. Installing a new libc with an
+	variables with names that contain '='.  Revision 1.18 of env.c
+	assumed that this was allowed.  Installing a new libc with an
 	old copy of /usr/bin/env causes env x=1 printenv | grep x= to
 	break which affects the autoconf tests for dependency finding,
 	so building gcc will end up printing:
@@ -142,7 +142,7 @@ Recent changes:
 	include ctype_local.h, so you have to make cleandir in tools/mklocale.
 
 20100520:
-	The location of the xkb compiled descriptions has changed. Please
+	The location of the xkb compiled descriptions has changed.  Please
 	remove usr/X11R7/lib/X11/xkb/compiled from your $DESTDIR.
 
 20100222:
@@ -175,7 +175

CVS commit: src/games/fortune/datfiles

2012-10-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Oct  3 19:04:56 UTC 2012

Modified Files:
src/games/fortune/datfiles: fortunes

Log Message:
Fix formatting of Churchill quote on declarations of war.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/games/fortune/datfiles/fortunes

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

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.50 src/games/fortune/datfiles/fortunes:1.51
--- src/games/fortune/datfiles/fortunes:1.50	Tue Jun  5 19:35:44 2012
+++ src/games/fortune/datfiles/fortunes	Wed Oct  3 19:04:55 2012
@@ -15206,8 +15206,8 @@ to a definite problem.  For better or wo
 	In a way, the next move is up to him.
 		-- R. A. Lafferty
 %
-When you have to kill a man it costs nothing to be polite."
-		-- Winston Churchill, On formal declarations of war
+When you have to kill a man it costs nothing to be polite.
+		-- Winston Churchill, on formal declarations of war
 %
 When you know absolutely nothing about the topic, make your forecast by
 asking a carefully selected probability sample of 300 others who don't



CVS commit: src/sys/arch

2012-10-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Oct  3 18:58:33 UTC 2012

Modified Files:
src/sys/arch/i386/conf: ALL Makefile.i386 files.i386
src/sys/arch/i386/i386: autoconf.c machdep.c trap.c
src/sys/arch/xen/conf: files.compat files.xen
src/sys/arch/xen/x86: autoconf.c
Removed Files:
src/sys/arch/i386/i386: kvm86.c kvm86call.S
src/sys/arch/i386/include: kvm86.h

Log Message:
Remove all references to KVM86.
It was only ever used by APMBIOS - and then only if an option was selected.
Probably didn't work well at all!


To generate a diff of this commit:
cvs rdiff -u -r1.345 -r1.346 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/i386/conf/Makefile.i386
cvs rdiff -u -r1.366 -r1.367 src/sys/arch/i386/conf/files.i386
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/i386/i386/autoconf.c
cvs rdiff -u -r1.21 -r0 src/sys/arch/i386/i386/kvm86.c
cvs rdiff -u -r1.10 -r0 src/sys/arch/i386/i386/kvm86call.S
cvs rdiff -u -r1.732 -r1.733 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.264 -r1.265 src/sys/arch/i386/i386/trap.c
cvs rdiff -u -r1.6 -r0 src/sys/arch/i386/include/kvm86.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/xen/conf/files.compat
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/xen/conf/files.xen
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/x86/autoconf.c

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.345 src/sys/arch/i386/conf/ALL:1.346
--- src/sys/arch/i386/conf/ALL:1.345	Sun Sep 30 21:36:18 2012
+++ src/sys/arch/i386/conf/ALL	Wed Oct  3 18:58:30 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.345 2012/09/30 21:36:18 dsl Exp $
+# $NetBSD: ALL,v 1.346 2012/10/03 18:58:30 dsl Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"ALL-$Revision: 1.345 $"
+#ident 		"ALL-$Revision: 1.346 $"
 
 maxusers	64		# estimated number of users
 
@@ -2140,7 +2140,6 @@ options KLOADER_DEBUG
 options KSTACK_DEBUG
 options KSYMS_DEBUG
 options KUE_DEBUG
-options KVM86DEBUG
 options LANA_DEBUG
 options LCD_DEBUG
 options LDT_DEBUG

Index: src/sys/arch/i386/conf/Makefile.i386
diff -u src/sys/arch/i386/conf/Makefile.i386:1.177 src/sys/arch/i386/conf/Makefile.i386:1.178
--- src/sys/arch/i386/conf/Makefile.i386:1.177	Mon Oct  1 17:35:57 2012
+++ src/sys/arch/i386/conf/Makefile.i386	Wed Oct  3 18:58:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.i386,v 1.177 2012/10/01 17:35:57 dsl Exp $
+#	$NetBSD: Makefile.i386,v 1.178 2012/10/03 18:58:31 dsl Exp $
 
 # Makefile for NetBSD
 #
@@ -89,7 +89,7 @@ freebsd_sigcode.o i386func.o ibcs2_sigco
 linux_sigcode.o lock_stubs.o svr4_sigcode.o mach_sigcode.o: assym.h
 cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h
 mptramp.o: assym.h
-acpi_wakeup_low.o busfunc.o kvm86call.o: assym.h
+acpi_wakeup_low.o busfunc.o: assym.h
 
 ##
 ## (7) misc settings

Index: src/sys/arch/i386/conf/files.i386
diff -u src/sys/arch/i386/conf/files.i386:1.366 src/sys/arch/i386/conf/files.i386:1.367
--- src/sys/arch/i386/conf/files.i386:1.366	Sun Sep 30 20:19:51 2012
+++ src/sys/arch/i386/conf/files.i386	Wed Oct  3 18:58:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i386,v 1.366 2012/09/30 20:19:51 dsl Exp $
+#	$NetBSD: files.i386,v 1.367 2012/10/03 18:58:31 dsl Exp $
 #
 # new style config file for i386 architecture
 #
@@ -20,7 +20,6 @@ obsolete defflag	XBOX
 
 # VM86 emulation
 defflag			VM86
-defflag			KVM86
 
 # User-settable LDT (used by WINE)
 defflag			USER_LDT
@@ -329,10 +328,6 @@ include "dev/apm/files.apm"
 # VM86 mode
 file	arch/i386/i386/vm86.c			vm86
 
-# VM86 in kernel
-file	arch/i386/i386/kvm86.c			kvm86
-file	arch/i386/i386/kvm86call.S		kvm86
-
 # Binary compatibility with previous NetBSD releases (COMPAT_XX)
 file	arch/i386/i386/compat_13_machdep.c	compat_13
 file	arch/i386/i386/compat_16_machdep.c	compat_16 | compat_ibcs2

Index: src/sys/arch/i386/i386/autoconf.c
diff -u src/sys/arch/i386/i386/autoconf.c:1.97 src/sys/arch/i386/i386/autoconf.c:1.98
--- src/sys/arch/i386/i386/autoconf.c:1.97	Tue Feb 22 06:37:24 2011
+++ src/sys/arch/i386/i386/autoconf.c	Wed Oct  3 18:58:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.97 2011/02/22 06:37:24 dholland Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.98 2012/10/03 18:58:31 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.97 2011/02/22 06:37:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.98 2012/10/03 18:58:31 dsl Exp $");
 
 #include "opt_compat_oldboot.h"
 #include "opt_intrdebug.h"
@@ -90,11 +90,6 @@ extern void platform_init(void);
 #include 
 #endif
 
-#include "opt_kvm86.h"
-#ifdef KVM86
-#include 
-#endif
-
 /*
  * Determine i/o

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

2012-10-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Oct  3 17:43:22 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
Use db_read_value to read the trapframe fields in db_nextframe.

Fixes SIGSEGV on bt in crash(8) when the stack trace ends in syscall,
and probably other problems as well.

ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64/db_machdep.c
diff -u src/sys/arch/amd64/amd64/db_machdep.c:1.3 src/sys/arch/amd64/amd64/db_machdep.c:1.4
--- src/sys/arch/amd64/amd64/db_machdep.c:1.3	Thu Jul 12 17:14:39 2012
+++ src/sys/arch/amd64/amd64/db_machdep.c	Wed Oct  3 17:43:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.3 2012/07/12 17:14:39 dsl Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.4 2012/10/03 17:43:22 riastradh Exp $	*/
 
 /* 
  * Mach Operating System
@@ -26,7 +26,7 @@
  * rights to redistribute these changes.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.3 2012/07/12 17:14:39 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.4 2012/10/03 17:43:22 riastradh Exp $");
 
 #include 
 #include 
@@ -134,17 +134,20 @@ db_nextframe(long **nextframe, long **re
 		tf = (struct trapframe *)argp;
 		switch (is_trap) {
 		case TRAP:
-			(*pr)("--- trap (number %d) ---\n", tf->tf_trapno);
+			(*pr)("--- trap (number %"DDB_EXPR_FMT"u) ---\n",
+db_get_value((long)&tf->tf_trapno, 8, false));
 			break;
 		case SYSCALL:
-			(*pr)("--- syscall (number %ld) ---\n", tf->tf_rax);
+			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
+db_get_value((long)&tf->tf_rax, 8, false));
 			break;
 		case INTERRUPT:
 			(*pr)("--- interrupt ---\n");
 			break;
 		}
-		*ip = (db_addr_t)tf->tf_rip;
-		fp = (struct x86_64_frame *)tf->tf_rbp;
+		*ip = (db_addr_t)db_get_value((long)&tf->tf_rip, 8, false);
+		fp = (struct x86_64_frame *)
+			db_get_value((long)&tf->tf_rbp, 8, false);
 		if (fp == NULL)
 			return 0;
 		*nextframe = (long *)&fp->f_frame;



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

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 17:04:25 UTC 2012

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

Log Message:
as a workaround for PR 47016, call ioapic_reenable() at the end of
ACPI interrupt routing to fix the settings for the SCI interrupt.
the problem is that after my recent changes, the SCI handler is
installed before the MADT info is parsed, so we don't know what
polarity it should have.  the real fix for this will be to rearrange
the ACPI initialization so that everything is done in a more sensible
order, but that will take some more time.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/x86/x86/mpacpi.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/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.95 src/sys/arch/x86/x86/mpacpi.c:1.96
--- src/sys/arch/x86/x86/mpacpi.c:1.95	Sun Sep 23 00:31:05 2012
+++ src/sys/arch/x86/x86/mpacpi.c	Wed Oct  3 17:04:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.95 2012/09/23 00:31:05 chs Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.96 2012/10/03 17:04:25 chs Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.95 2012/09/23 00:31:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.96 2012/10/03 17:04:25 chs Exp $");
 
 #include "acpica.h"
 #include "opt_acpi.h"
@@ -942,6 +942,13 @@ mpacpi_find_interrupts(void *self)
 		printf("mpacpi: %d PCI busses\n", mpacpi_npci);
 #endif
 	mpacpi_config_irouting(acpi);
+#if NIOAPIC > 0
+	/*
+	 * XXX fix up the SCI interrupt polarity.
+	 * it's installed before we have parsed the MADT.
+	 */
+	ioapic_reenable();
+#endif
 	if (mp_verbose)
 		for (i = 0; i < mp_nintr; i++)
 			mpacpi_print_intr(&mp_intrs[i]);



CVS commit: src/sys/arch/evbarm/iq80310

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 16:51:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c iq80310_intr.c
iq80310var.h

Log Message:
defer evcnt attachment correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80310/iq80310var.h

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

Modified files:

Index: src/sys/arch/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14	Fri Jul  1 20:41:16 2011
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $	*/
+/*	$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $");
 
 #include 
 #include 
@@ -98,6 +98,7 @@ i80312_mainbus_attach(struct device *par
 	psize_t memsize;
 
 	i80312_mainbus_found = 1;
+	iq80310_intr_evcnt_attach();
 
 	/*
 	 * Fill in the space tag for the i80312's own devices,

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31	Tue Aug 14 15:46:21 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $");
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -350,6 +350,19 @@ iq80310_intr_init(void)
 	enable_interrupts(I32_bit);
 }
 
+void
+iq80310_intr_evcnt_attach(void)
+{
+	struct intrq *iq;
+	int i;
+
+	for (i = 0; i < NIRQ; i++) {
+		iq = &intrq[i];
+		evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
+		NULL, "iq80310", iq->iq_name);
+	}
+}
+
 void *
 iq80310_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
 {
@@ -377,8 +390,6 @@ iq80310_intr_establish(int irq, int ipl,
 	oldirqstate = disable_interrupts(I32_bit);
 
 	TAILQ_INSERT_TAIL(&iq->iq_list, ih, ih_list);
-	evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
-	NULL, "iq80310", iq->iq_name);
 
 	iq80310_intr_calculate_masks();
 

Index: src/sys/arch/evbarm/iq80310/iq80310var.h
diff -u src/sys/arch/evbarm/iq80310/iq80310var.h:1.7 src/sys/arch/evbarm/iq80310/iq80310var.h:1.8
--- src/sys/arch/evbarm/iq80310/iq80310var.h:1.7	Tue Oct  8 17:39:17 2002
+++ src/sys/arch/evbarm/iq80310/iq80310var.h	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310var.h,v 1.7 2002/10/08 17:39:17 thorpej Exp $	*/
+/*	$NetBSD: iq80310var.h,v 1.8 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -94,6 +94,7 @@ void	iq80310_7seg_snake(void);
 void	iq80310_pci_init(pci_chipset_tag_t, void *);
 
 void	iq80310_intr_init(void);
+void	iq80310_intr_evcnt_attach(void);
 void	*iq80310_intr_establish(int, int, int (*)(void *), void *);
 void	iq80310_intr_disestablish(void *);
 



CVS commit: src/sys/arch/evbarm/rpi

2012-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct  3 13:13:39 UTC 2012

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Use armreg_ttbr_read instead of local version. No code change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/rpi/rpi_machdep.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.10 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.11
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.10	Wed Oct  3 13:06:06 2012
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Oct  3 13:13:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.10 2012/10/03 13:06:06 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.11 2012/10/03 13:13:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.10 2012/10/03 13:06:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.11 2012/10/03 13:13:38 skrll Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
@@ -108,17 +108,6 @@ int plcomcnmode = PLCONMODE;
 /* Smallest amount of RAM start.elf could give us. */
 #define RPI_MINIMUM_ARM_RAM_SPLIT (128U * 1024 * 1024)
 
-static inline
-pd_entry_t *
-read_ttb(void)
-{
-	long ttb;
-
-	__asm volatile("mrc   p15, 0, %0, c2, c0, 0" : "=r" (ttb));
-
-	return (pd_entry_t *)(ttb & ~((1<<14)-1));
-}
-
 /*
  * Static device mappings. These peripheral registers are mapped at
  * fixed virtual addresses very early in initarm() so that we can use
@@ -231,7 +220,8 @@ initarm(void *arg)
 		panic("cpu not recognized!");
 
 	/* map some peripheral registers */
-	pmap_devmap_bootstrap((vaddr_t)read_ttb(), rpi_devmap);
+	pmap_devmap_bootstrap((vaddr_t)armreg_ttbr_read() & ~(L1_TABLE_SIZE - 1),
+	rpi_devmap);
 
 	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
 



CVS commit: src/sys/arch/evbarm/rpi

2012-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct  3 13:06:06 UTC 2012

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Remove one set of _[AS] defines. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/rpi/rpi_machdep.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.9 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.10
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.9	Wed Oct  3 13:01:27 2012
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Oct  3 13:06:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.9 2012/10/03 13:01:27 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.10 2012/10/03 13:06:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.9 2012/10/03 13:01:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.10 2012/10/03 13:06:06 skrll Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
@@ -108,6 +108,16 @@ int plcomcnmode = PLCONMODE;
 /* Smallest amount of RAM start.elf could give us. */
 #define RPI_MINIMUM_ARM_RAM_SPLIT (128U * 1024 * 1024)
 
+static inline
+pd_entry_t *
+read_ttb(void)
+{
+	long ttb;
+
+	__asm volatile("mrc   p15, 0, %0, c2, c0, 0" : "=r" (ttb));
+
+	return (pd_entry_t *)(ttb & ~((1<<14)-1));
+}
 
 /*
  * Static device mappings. These peripheral registers are mapped at
@@ -123,19 +133,6 @@ int plcomcnmode = PLCONMODE;
  * registers segment-aligned and segment-rounded in order to avoid
  * using the 2nd page tables.
  */
-#define _A(a)	((a) & ~L1_S_OFFSET)
-#define _S(s)	(((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1))
-
-static inline
-pd_entry_t *
-read_ttb(void)
-{
-	long ttb;
-
-	__asm volatile("mrc   p15, 0, %0, c2, c0, 0" : "=r" (ttb));
-
-	return (pd_entry_t *)(ttb & ~((1<<14)-1));
-}
 
 #define _A(a)	((a) & ~L1_S_OFFSET)
 #define _S(s)	(((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1))



CVS commit: src/sys/arch/evbarm/rpi

2012-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct  3 13:01:27 UTC 2012

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Remove some unnecessary headers.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/rpi/rpi_machdep.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.8 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.9
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.8	Wed Oct  3 13:00:47 2012
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Oct  3 13:01:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.8 2012/10/03 13:00:47 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.9 2012/10/03 13:01:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.8 2012/10/03 13:00:47 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.9 2012/10/03 13:01:27 skrll Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
@@ -45,8 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: rpi_machdep.
 
 #include 
 
-#include 
-#include 
 #include 
 
 #include 



CVS commit: src/sys/arch/evbarm/rpi

2012-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct  3 13:00:47 UTC 2012

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Update copyright


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/rpi/rpi_machdep.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.7 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.8
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.7	Sat Sep  1 17:14:56 2012
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Oct  3 13:00:47 2012
@@ -1,37 +1,11 @@
-/*	$NetBSD: rpi_machdep.c,v 1.7 2012/09/01 17:14:56 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.8 2012/10/03 13:00:47 skrll Exp $	*/
 
-/*
- * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
- * Written by Hiroyuki Bessho for Genetec Corporation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- * 3. The name of Genetec Corporation may not be used to endorse or
- *promote products derived from this software without specific prior
- *written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL GENETEC CORPORATION
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright (c) 2001 Wasabi Systems, Inc.
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
- * Written by Jason R. Thorpe for Wasabi Systems, Inc.
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,18 +15,11 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *	This product includes software developed for the NetBSD Project by
- *	Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *or promote products derived from this software without specific prior
- *written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -60,69 +27,10 @@
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright (c) 1997,1998 Mark Brinicombe.
- * Copyright (c) 1997,1998 Causality Limited.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions an

CVS commit: src/sys/net/npf

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 12:24:56 UTC 2012

Modified Files:
src/sys/net/npf: npf_rproc.c

Log Message:
ext_ops does not change during the life cycle and can be fetched without
the mutex held. This avoids confusion in the compiler about an uninitialized
variable ext_ops.
ok rmind@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/net/npf/npf_rproc.c

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

Modified files:

Index: src/sys/net/npf/npf_rproc.c
diff -u src/sys/net/npf/npf_rproc.c:1.3 src/sys/net/npf/npf_rproc.c:1.4
--- src/sys/net/npf/npf_rproc.c:1.3	Sun Sep 16 13:47:41 2012
+++ src/sys/net/npf/npf_rproc.c	Wed Oct  3 12:24:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_rproc.c,v 1.3 2012/09/16 13:47:41 rmind Exp $	*/
+/*	$NetBSD: npf_rproc.c,v 1.4 2012/10/03 12:24:56 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -164,14 +164,16 @@ npf_ext_construct(const char *name, npf_
 	ext = npf_ext_lookup(name);
 	if (ext) {
 		atomic_inc_uint(&ext->ext_refcnt);
-		extops = ext->ext_ops;
-		KASSERT(extops != NULL);
 	}
 	mutex_exit(&ext_lock);
+
 	if (!ext) {
 		return ENOENT;
 	}
 
+	extops = ext->ext_ops;
+	KASSERT(extops != NULL);
+
 	error = extops->ctor(rp, params);
 	if (error) {
 		atomic_dec_uint(&ext->ext_refcnt);



CVS commit: src/sys/kern

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:22:59 UTC 2012

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

Log Message:
Add sanity check to sysctl_kern_maxvnodes.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/kern/init_sysctl.c

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

Modified files:

Index: src/sys/kern/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.190 src/sys/kern/init_sysctl.c:1.191
--- src/sys/kern/init_sysctl.c:1.190	Sat Jun  2 21:36:46 2012
+++ src/sys/kern/init_sysctl.c	Wed Oct  3 07:22:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.190 2012/06/02 21:36:46 dsl Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.191 2012/10/03 07:22:59 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.190 2012/06/02 21:36:46 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.191 2012/10/03 07:22:59 mlelstv Exp $");
 
 #include "opt_sysv.h"
 #include "opt_compat_netbsd.h"
@@ -968,6 +968,13 @@ sysctl_kern_maxvnodes(SYSCTLFN_ARGS)
 	if (error || newp == NULL)
 		return (error);
 
+	/*
+	 * sysctl passes down unsigned values, require them
+	 * to be positive
+	 */
+	if (new_vnodes <= 0)
+		return (EINVAL);
+
 	/* Limits: 75% of KVA and physical memory. */
 	new_max = calc_cache_size(kernel_map, 75, 75) / VNODE_COST;
 	if (new_vnodes > new_max)



CVS commit: src/sys/fs/adosfs

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:20:50 UTC 2012

Modified Files:
src/sys/fs/adosfs: adosfs.h advfsops.c

Log Message:
Use getdisksize() to find out geometry, fetch only other magic values
from disklabel.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/fs/adosfs/adosfs.h
cvs rdiff -u -r1.64 -r1.65 src/sys/fs/adosfs/advfsops.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/adosfs/adosfs.h
diff -u src/sys/fs/adosfs/adosfs.h:1.11 src/sys/fs/adosfs/adosfs.h:1.12
--- src/sys/fs/adosfs/adosfs.h:1.11	Sun Aug 30 12:36:38 2009
+++ src/sys/fs/adosfs/adosfs.h	Wed Oct  3 07:20:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: adosfs.h,v 1.11 2009/08/30 12:36:38 phx Exp $	*/
+/*	$NetBSD: adosfs.h,v 1.12 2012/10/03 07:20:50 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -116,7 +116,6 @@ struct adosfsmount {
 	struct mount *mp;	/* owner mount */
 	u_int32_t dostype;	/* type of volume */
 	u_long rootb;		/* root block number */
-	u_long secsperblk;	/* sectors per block */
 	u_long bsize;		/* size of blocks */
 	u_long nwords;		/* size of blocks in long words */
 	u_long dbsize;		/* data bytes per block */

Index: src/sys/fs/adosfs/advfsops.c
diff -u src/sys/fs/adosfs/advfsops.c:1.64 src/sys/fs/adosfs/advfsops.c:1.65
--- src/sys/fs/adosfs/advfsops.c:1.64	Tue Mar 13 18:40:35 2012
+++ src/sys/fs/adosfs/advfsops.c	Wed Oct  3 07:20:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: advfsops.c,v 1.64 2012/03/13 18:40:35 elad Exp $	*/
+/*	$NetBSD: advfsops.c,v 1.65 2012/10/03 07:20:50 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.64 2012/03/13 18:40:35 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.65 2012/10/03 07:20:50 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: advfsops.c,v
 #include 
 #include 
 #include 
+#include 
 #include 
 #include  /* XXX */
 #include 
@@ -166,45 +167,69 @@ adosfs_mountfs(struct vnode *devvp, stru
 	struct buf *bp;
 	struct vnode *rvp;
 	size_t bitmap_sz = 0;
-	int error, part, i;
+	int error, i;
+	uint64_t numsecs;
+	unsigned secsize;
+	unsigned long secsperblk, blksperdisk, resvblks;
 
-	part = DISKPART(devvp->v_rdev);
 	amp = NULL;
 
 	if ((error = vinvalbuf(devvp, V_SAVE, l->l_cred, l, 0, 0)) != 0)
 		return (error);
 
 	/*
-	 * open blkdev and read root block
+	 * open blkdev and read boot and root block
 	 */
 	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
 	if ((error = VOP_OPEN(devvp, FREAD, NOCRED)) != 0) {
 		VOP_UNLOCK(devvp);
 		return (error);
 	}
-	error = VOP_IOCTL(devvp, DIOCGDINFO, &dl, FREAD, NOCRED);
-	VOP_UNLOCK(devvp);
+
+	error = getdisksize(devvp, &numsecs, &secsize);
 	if (error)
 		goto fail;
 
-	parp = &dl.d_partitions[part];
 	amp = kmem_zalloc(sizeof(struct adosfsmount), KM_SLEEP);
-	amp->mp = mp;
+
+	/*
+	 * compute filesystem parameters from disklabel
+	 * on arch/amiga the disklabel is computed from the native
+	 * partition tables
+	 * - p_fsize is the filesystem block size
+	 * - p_frag is the number of sectors per filesystem block
+	 * - p_cpg is the number of reserved blocks (boot blocks)
+	 * - p_psize is reduced by the number of preallocated blocks
+	 *   at the end of a partition
+	 *
+	 * XXX
+	 * - bsize and secsperblk could be computed from the first sector
+	 *   of the root block
+	 * - resvblks (the number of boot blocks) can only be guessed
+	 *   by scanning for the root block as its position moves
+	 *   with resvblks
+	 */
+	error = VOP_IOCTL(devvp, DIOCGDINFO, &dl, FREAD, NOCRED);
+	VOP_UNLOCK(devvp);
+	if (error)
+		goto fail;
+	parp = &dl.d_partitions[DISKPART(devvp->v_rdev)];
 	if (dl.d_type == DTYPE_FLOPPY) {
-		amp->bsize = dl.d_secsize;
-		amp->secsperblk = 1;
-	}
-	else {
+		amp->bsize = secsize;
+		secsperblk = 1;
+		resvblks   = 2;
+	} else if (parp->p_fsize > 0 && parp->p_frag > 0) {
 		amp->bsize = parp->p_fsize * parp->p_frag;
-		amp->secsperblk = parp->p_frag;
-	}
-
-	/* invalid fs ? */
-	if (amp->secsperblk == 0) {
+		secsperblk = parp->p_frag;
+		resvblks   = parp->p_cpg;
+	} else {
 		error = EINVAL;
 		goto fail;
 	}
+	blksperdisk = numsecs / secsperblk;
 
+
+	/* The filesytem variant ('dostype') is stored in the boot block */
 	bp = NULL;
 	if ((error = bread(devvp, (daddr_t)BBOFF,
 			   amp->bsize, NOCRED, 0, &bp)) != 0) {
@@ -220,20 +245,21 @@ adosfs_mountfs(struct vnode *devvp, stru
 		goto fail;
 	}
 
-	amp->rootb = (parp->p_size / amp->secsperblk - 1 + parp->p_cpg) >> 1;
-	amp->numblks = parp->p_size / amp->secsperblk - parp->p_cpg;
+	amp->rootb = (blksperdisk - 1 + resvblks) / 2;
+	amp->numblks = blksperdisk - resvblks;
 
 	amp->nwords = amp->bsize >> 2;
 	amp->dbsize = amp->bsize - (IS_FFS(amp) ? 0 : OFS_DATA_OFFSET);
 	amp->devvp = devvp;
 
+	amp->mp = mp;
 	mp->mnt_data = am

CVS commit: src/sys/arch/sparc64/dev

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:16:49 UTC 2012

Modified Files:
src/sys/arch/sparc64/dev: sab.c

Log Message:
Only initialize when we are the first opener.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sparc64/dev/sab.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/sparc64/dev/sab.c
diff -u src/sys/arch/sparc64/dev/sab.c:1.48 src/sys/arch/sparc64/dev/sab.c:1.49
--- src/sys/arch/sparc64/dev/sab.c:1.48	Thu Jun  2 00:24:23 2011
+++ src/sys/arch/sparc64/dev/sab.c	Wed Oct  3 07:16:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sab.c,v 1.48 2011/06/02 00:24:23 christos Exp $	*/
+/*	$NetBSD: sab.c,v 1.49 2012/10/03 07:16:49 mlelstv Exp $	*/
 /*	$OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $	*/
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.48 2011/06/02 00:24:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.49 2012/10/03 07:16:49 mlelstv Exp $");
 
 #include "opt_kgdb.h"
 #include 
@@ -677,7 +677,7 @@ sabopen(dev_t dev, int flags, int mode, 
 		return (EBUSY);
 
 	mutex_spin_enter(&tty_lock);
-	if ((tp->t_state & TS_ISOPEN) == 0) {
+	if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
 		ttychars(tp);
 		tp->t_iflag = TTYDEF_IFLAG;
 		tp->t_oflag = TTYDEF_OFLAG;



CVS commit: src/sys/dev/mii

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:08:58 UTC 2012

Modified Files:
src/sys/dev/mii: mii_physubr.c

Log Message:
use media_table instead of replicating code


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/mii/mii_physubr.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/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.74 src/sys/dev/mii/mii_physubr.c:1.75
--- src/sys/dev/mii/mii_physubr.c:1.74	Sun Jul 22 14:33:00 2012
+++ src/sys/dev/mii/mii_physubr.c	Wed Oct  3 07:08:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.74 2012/07/22 14:33:00 matt Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.75 2012/10/03 07:08:58 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.74 2012/07/22 14:33:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.75 2012/10/03 07:08:58 mlelstv Exp $");
 
 #include 
 #include 
@@ -680,26 +680,12 @@ mii_anar(int media)
 {
 	int rv;
 
-	switch (media & (IFM_TMASK|IFM_NMASK|IFM_FDX)) {
-	case IFM_ETHER|IFM_10_T:
-		rv = ANAR_10|ANAR_CSMA;
-		break;
-	case IFM_ETHER|IFM_10_T|IFM_FDX:
-		rv = ANAR_10_FD|ANAR_CSMA;
-		break;
-	case IFM_ETHER|IFM_100_TX:
-		rv = ANAR_TX|ANAR_CSMA;
-		break;
-	case IFM_ETHER|IFM_100_TX|IFM_FDX:
-		rv = ANAR_TX_FD|ANAR_CSMA;
-		break;
-	case IFM_ETHER|IFM_100_T4:
-		rv = ANAR_T4|ANAR_CSMA;
-		break;
-	default:
-		rv = 0;
-		break;
-	}
+#ifdef DIAGNOSTIC
+	if (/* media < 0 || */ media >= MII_NMEDIA)
+		panic("mii_anar");
+#endif
+
+	rv = mii_media_table[media].mm_anar;
 
 	return rv;
 }



CVS commit: src/sys/dev/usb

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:07:04 UTC 2012

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

Log Message:
Attach to PMF.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/umodem.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/umodem.c
diff -u src/sys/dev/usb/umodem.c:1.64 src/sys/dev/usb/umodem.c:1.65
--- src/sys/dev/usb/umodem.c:1.64	Thu Jun 14 05:14:41 2012
+++ src/sys/dev/usb/umodem.c	Wed Oct  3 07:07:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $	*/
+/*	$NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $");
 
 #include 
 #include 
@@ -121,6 +121,9 @@ umodem_attach(device_t parent, device_t 
 	uca.methods = &umodem_methods;
 	uca.info = NULL;
 
+	if (!pmf_device_register(self, NULL, NULL))
+		aprint_error_dev(self, "couldn't establish power handler");
+
 	if (umodem_common_attach(self, sc, uaa, &uca))
 		return;
 	return;
@@ -139,5 +142,7 @@ umodem_detach(device_t self, int flags)
 {
 	struct umodem_softc *sc = device_private(self);
 
+	pmf_device_deregister(self);
+
 	return umodem_common_detach(sc, flags);
 }



CVS commit: src/sys/kern

2012-10-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Oct  3 07:05:51 UTC 2012

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

Log Message:
No longer determine availability of ISO and UDF partitions, we default
to allow access to both. Only use a found ISO header to access the
correct session.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/kern/subr_disk_mbr.c

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

Modified files:

Index: src/sys/kern/subr_disk_mbr.c
diff -u src/sys/kern/subr_disk_mbr.c:1.44 src/sys/kern/subr_disk_mbr.c:1.45
--- src/sys/kern/subr_disk_mbr.c:1.44	Fri Jul 13 16:15:48 2012
+++ src/sys/kern/subr_disk_mbr.c	Wed Oct  3 07:05:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk_mbr.c,v 1.44 2012/07/13 16:15:48 christos Exp $	*/
+/*	$NetBSD: subr_disk_mbr.c,v 1.45 2012/10/03 07:05:51 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.44 2012/07/13 16:15:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.45 2012/10/03 07:05:51 mlelstv Exp $");
 
 #include 
 #include 
@@ -342,10 +342,6 @@ scan_iso_vrs(mbr_args_t *a)
 	&is_iso9660, &is_udf);
 			}
 		}
-		if (is_udf < 0) {
-			/* defaulting udf on the RAW partition */
-			is_udf = 0;
-		}
 	} else {
 		/* try start of disc */
 		sector = 0;
@@ -357,24 +353,16 @@ scan_iso_vrs(mbr_args_t *a)
 
 	strncpy(a->lp->d_typename, "iso partition", 16);
 
-	/* add iso9660 partition if found */
+	/* adjust session information for iso9660 partition */
 	if (is_iso9660 >= 0) {
 		/* set 'a' partition to iso9660 */
 		a->lp->d_partitions[0].p_offset = 0;
 		a->lp->d_partitions[0].p_size   = a->lp->d_secperunit;
 		a->lp->d_partitions[0].p_cdsession = is_iso9660;
 		a->lp->d_partitions[0].p_fstype = FS_ISO9660;
-	} else {
-		a->lp->d_partitions[0].p_size   = 0;
-		a->lp->d_partitions[0].p_fstype = FS_UNUSED;
 	}
 
-	/* add udf partition if found */
-	if (is_udf >= 0) {
-		/* set the RAW partition to UDF for CD/USB stick etc */
-		a->lp->d_partitions[RAW_PART].p_fstype = FS_UDF;
-		/* UDF doesn't care about the cd session specified here */
-	}
+	/* UDF doesn't care about the cd session specified here */
 
 	return SCAN_FOUND;
 }