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

2013-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 28 08:03:14 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Move and tweak an #if 0 printf


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/arm/arm32/bus_dma.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/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.71 src/sys/arch/arm/arm32/bus_dma.c:1.72
--- src/sys/arch/arm/arm32/bus_dma.c:1.71	Sun Jan 27 19:00:08 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Mon Jan 28 08:03:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.71 2013/01/27 19:00:08 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.72 2013/01/28 08:03:13 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.71 2013/01/27 19:00:08 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.72 2013/01/28 08:03:13 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -169,16 +169,17 @@ _bus_dmamap_load_paddr(bus_dma_tag_t t, 
 		 * If this region is coherent, mark the segment as coherent.
 		 */
 		_ds_flags |= dr-dr_flags  _BUS_DMAMAP_COHERENT;
-#if 0
-		printf(%p: %#lx: range %#lx/%#lx/%#lx/%#x: %#x\n,
-		t, paddr, dr-dr_sysbase, dr-dr_busbase,
-		dr-dr_len, dr-dr_flags, _ds_flags);
-#endif
+
 		/*
 		 * In a valid DMA range.  Translate the physical
 		 * memory address to an address in the DMA window.
 		 */
 		curaddr = (paddr - dr-dr_sysbase) + dr-dr_busbase;
+#if 0
+		printf(%p: %#lx: range %#lx/%#lx/%#lx/%#x: %#x -- %#lx\n,
+		t, paddr, dr-dr_sysbase, dr-dr_busbase,
+		dr-dr_len, dr-dr_flags, _ds_flags, curaddr);
+#endif
 	} else
 		curaddr = paddr;
 



CVS commit: src/sys/dev/usb

2013-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 28 08:19:34 UTC 2013

Modified Files:
src/sys/dev/usb: dwc_otg.c dwc_otgreg.h

Log Message:
Fix up device mode vs host mode register naming confusion.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/usb/dwc_otg.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/dwc_otgreg.h

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

Modified files:

Index: src/sys/dev/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.38 src/sys/dev/usb/dwc_otg.c:1.39
--- src/sys/dev/usb/dwc_otg.c:1.38	Wed Jan 23 03:32:39 2013
+++ src/sys/dev/usb/dwc_otg.c	Mon Jan 28 08:19:33 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.38 2013/01/23 03:32:39 jmcneill Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.39 2013/01/28 08:19:33 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.38 2013/01/23 03:32:39 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.39 2013/01/28 08:19:33 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -2223,7 +2223,7 @@ dwc_otg_host_channel_wait(struct dwc_otg
 
 		/* ack any pending messages */
 		if (sc-sc_last_rx_status != 0 
-		GRXSTSRD_CHNUM_GET(sc-sc_last_rx_status) == td-channel) {
+		GRXSTSRH_CHNUM_GET(sc-sc_last_rx_status) == td-channel) {
 			/* get rid of message */
 			dwc_otg_common_rx_ack(sc);
 		}
@@ -2335,7 +2335,7 @@ dwc_otg_host_channel_free(struct dwc_otg
 
 	/* ack any pending messages */
 	if (sc-sc_last_rx_status != 0 
-	GRXSTSRD_CHNUM_GET(sc-sc_last_rx_status) == x) {
+	GRXSTSRH_CHNUM_GET(sc-sc_last_rx_status) == x) {
 		dwc_otg_common_rx_ack(sc);
 	}
 
@@ -2622,10 +2622,10 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 	if (sc-sc_last_rx_status == 0)
 		goto check_state;
 
-	if (GRXSTSRD_CHNUM_GET(sc-sc_last_rx_status) != td-channel)
+	if (GRXSTSRH_CHNUM_GET(sc-sc_last_rx_status) != td-channel)
 		goto check_state;
 
-	switch (sc-sc_last_rx_status  GRXSTSRD_PKTSTS_MASK) {
+	switch (sc-sc_last_rx_status  GRXSTSRH_PKTSTS_MASK) {
 	case GRXSTSRH_IN_DATA:
 
 		DPRINTF(DATA ST=%d STATUS=0x%08x\n,
@@ -2643,7 +2643,7 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 		td-toggle ^= 1;
 
 		/* get the packet byte count */
-		count = GRXSTSRD_BCNT_GET(sc-sc_last_rx_status);
+		count = GRXSTSRH_BCNT_GET(sc-sc_last_rx_status);
 
 		/* verify the packet byte count */
 		if (count != td-max_packet_size) {
@@ -3277,13 +3277,13 @@ repeat:
 
 			/* non-data messages we simply skip */
 			if (temp != GRXSTSRD_STP_DATA 
-			temp != GRXSTSRD_OUT_DATA) {
+			temp != GRXSTSRH_IN_DATA) {
 dwc_otg_common_rx_ack(sc);
 goto repeat;
 			}
 
-			bcnt = GRXSTSRD_BCNT_GET(sc-sc_last_rx_status);
-			ep_no = GRXSTSRD_CHNUM_GET(sc-sc_last_rx_status);
+			bcnt = GRXSTSRH_BCNT_GET(sc-sc_last_rx_status);
+			ep_no = GRXSTSRH_CHNUM_GET(sc-sc_last_rx_status);
 
 			/* receive data, if any */
 			if (bcnt != 0) {
@@ -3317,7 +3317,7 @@ repeat:
 	} else {
 		uint8_t ep_no;
 
-		ep_no = GRXSTSRD_CHNUM_GET(sc-sc_last_rx_status);
+		ep_no = GRXSTSRH_CHNUM_GET(sc-sc_last_rx_status);
 		DPRINTF(%s: ep_no %d\n, __func__, ep_no);
 
 		/* check if we should dump the data */

Index: src/sys/dev/usb/dwc_otgreg.h
diff -u src/sys/dev/usb/dwc_otgreg.h:1.3 src/sys/dev/usb/dwc_otgreg.h:1.4
--- src/sys/dev/usb/dwc_otgreg.h:1.3	Sat Jan 19 14:33:51 2013
+++ src/sys/dev/usb/dwc_otgreg.h	Mon Jan 28 08:19:34 2013
@@ -263,11 +263,17 @@
 /* Core Receive Status Queue Read Register (Host mode) */
 #define	GRXSTSRH_PKTSTS_MASK		0x001e
 #define	GRXSTSRH_PKTSTS_SHIFT		17
+#define	 GRXSTSRH_IN_DATA		(217)
+#define	 GRXSTSRH_IN_COMPLETE		(317)
+#define	 GRXSTSRH_DT_ERROR		(517)
+#define	 GRXSTSRH_HALTED		(717)
 #define	GRXSTSRH_DPID_MASK		0x00018000
 #define	GRXSTSRH_DPID_SHIFT		15
 #define	GRXSTSRH_BCNT_MASK		0x7ff0
+#define	GRXSTSRH_BCNT_GET(x)		(((x)  4)  0x7FF)
 #define	GRXSTSRH_BCNT_SHIFT		4
 #define	GRXSTSRH_CHNUM_MASK		0x000f
+#define	GRXSTSRH_CHNUM_GET(x)		((x)  15)
 #define	GRXSTSRH_CHNUM_SHIFT		0
 
 /* Core Receive Status Queue Read Register (Device mode) */
@@ -276,27 +282,23 @@
 #define	GRXSTSRD_FN_SHIFT		21
 #define	GRXSTSRD_PKTSTS_MASK		0x001e
 #define	GRXSTSRD_PKTSTS_SHIFT		17
-#define	GRXSTSRH_IN_DATA		(217)
-#define	GRXSTSRH_IN_COMPLETE		(317)
-#define	GRXSTSRH_DT_ERROR		(517)
-#define	GRXSTSRH_HALTED			(717)
-#define	GRXSTSRD_GLOB_OUT_NAK		(117)
-#define	GRXSTSRD_OUT_DATA		(217)
-#define	GRXSTSRD_OUT_COMPLETE		(317)
-#define	GRXSTSRD_STP_COMPLETE		(417)
-#define	GRXSTSRD_STP_DATA		(617)
+#define	 GRXSTSRD_GLOB_OUT_NAK		(117)
+#define	 GRXSTSRD_OUT_DATA		(217)
+#define	 GRXSTSRD_OUT_COMPLETE		(317)
+#define	 GRXSTSRD_STP_COMPLETE		(417)
+#define	 GRXSTSRD_STP_DATA		(617)
 #define	GRXSTSRD_DPID_MASK		0x00018000
 #define	GRXSTSRD_DPID_SHIFT		15
-#define	GRXSTSRD_DPID_DATA0		(015)
-#define	

CVS commit: src/sys/dev/usb

2013-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 28 08:22:02 UTC 2013

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

Log Message:
Getting HCINT_SOFTWARE_ONLY from the hardware is an error. KASSERT that
it doesn't happen.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/dwc_otg.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/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.39 src/sys/dev/usb/dwc_otg.c:1.40
--- src/sys/dev/usb/dwc_otg.c:1.39	Mon Jan 28 08:19:33 2013
+++ src/sys/dev/usb/dwc_otg.c	Mon Jan 28 08:22:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.39 2013/01/28 08:19:33 skrll Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.40 2013/01/28 08:22:01 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.39 2013/01/28 08:19:33 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.40 2013/01/28 08:22:01 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3255,7 +3255,8 @@ repeat:
 // 			DPRINTF(ch %d intrs %08x\n, ch, intrs);
 
 			DWC_OTG_WRITE_4(sc, DOTG_HCINT(ch), intrs);
-			intrs = ~HCINT_SOFTWARE_ONLY;
+
+			KASSERT((intrs  HCINT_SOFTWARE_ONLY) == 0);
 			sc-sc_chan_state[ch].hcint |= intrs;
 		}
 	}



CVS commit: src/distrib/utils/embedded/conf

2013-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 28 09:06:20 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: beagleboard.conf evbarm.conf

Log Message:
Move mdnsd to beagleboard only. RPI doesn't like it at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/conf/beagleboard.conf \
src/distrib/utils/embedded/conf/evbarm.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/beagleboard.conf
diff -u src/distrib/utils/embedded/conf/beagleboard.conf:1.3 src/distrib/utils/embedded/conf/beagleboard.conf:1.4
--- src/distrib/utils/embedded/conf/beagleboard.conf:1.3	Wed Jan 16 23:27:34 2013
+++ src/distrib/utils/embedded/conf/beagleboard.conf	Mon Jan 28 09:06:19 2013
@@ -1,4 +1,4 @@
-# $NetBSD: beagleboard.conf,v 1.3 2013/01/16 23:27:34 christos Exp $
+# $NetBSD: beagleboard.conf,v 1.4 2013/01/28 09:06:19 skrll Exp $
 # BeagleBoard customization script used by mkimage
 #
 board=beagleboard
@@ -22,7 +22,9 @@ make_fstab() {
 
 customize() {
 	customize_evbarm
-
+	${sudo} cat  ${mnt}/etc/rc.conf  EOF
+mdnsd=YES
+EOF  
 	${sudo} cat  ${mnt}/boot/uEnv.txt  EOF
 loaduimage=fatload mmc 0 ${loadaddr} ${kernelimg}; bootm ${loadaddr} root=ld0a
 EOF
Index: src/distrib/utils/embedded/conf/evbarm.conf
diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.3 src/distrib/utils/embedded/conf/evbarm.conf:1.4
--- src/distrib/utils/embedded/conf/evbarm.conf:1.3	Wed Jan 23 21:59:37 2013
+++ src/distrib/utils/embedded/conf/evbarm.conf	Mon Jan 28 09:06:19 2013
@@ -1,4 +1,4 @@
-# $NetBSD: evbarm.conf,v 1.3 2013/01/23 21:59:37 skrll Exp $
+# $NetBSD: evbarm.conf,v 1.4 2013/01/28 09:06:19 skrll Exp $
 # evbarm shared config
 #
 image=$HOME/${board}.img
@@ -87,7 +87,6 @@ customize_evbarm() {
 	${sudo} cat  ${mnt}/etc/rc.conf  EOF
 sshd=YES
 dhcpcd=YES
-mdnsd=YES
 EOF
 	if [ ! -f ${mnt}/dev/MAKEDEV ]; then
 		echo ${PROG}: Missing ${mnt}/dev/MAKEDEV 12



CVS commit: src/usr.sbin/makefs/ffs

2013-01-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Jan 28 10:16:35 UTC 2013

Modified Files:
src/usr.sbin/makefs/ffs: buf.c

Log Message:
Do not use *bp after freeing it in brelse.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/makefs/ffs/buf.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs/buf.c
diff -u src/usr.sbin/makefs/ffs/buf.c:1.15 src/usr.sbin/makefs/ffs/buf.c:1.16
--- src/usr.sbin/makefs/ffs/buf.c:1.15	Sun Jan 27 20:05:46 2013
+++ src/usr.sbin/makefs/ffs/buf.c	Mon Jan 28 10:16:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.15 2013/01/27 20:05:46 christos Exp $	*/
+/*	$NetBSD: buf.c,v 1.16 2013/01/28 10:16:35 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: buf.c,v 1.15 2013/01/27 20:05:46 christos Exp $);
+__RCSID($NetBSD: buf.c,v 1.16 2013/01/28 10:16:35 mlelstv Exp $);
 #endif	/* !__lint */
 
 #include sys/param.h
@@ -136,20 +136,22 @@ bwrite(struct buf *bp)
 {
 	off_t	offset;
 	ssize_t	rv;
+	int	bytes;
 
 	assert (bp != NULL);
 	offset = bp-b_blkno * sectorsize;	/* XXX */
+	bytes  = bp-b_bcount;
 	if (debug  DEBUG_BUF_BWRITE)
-		printf(bwrite: blkno %lld offset %lld bcount %ld\n,
-		(long long)bp-b_blkno, (long long) offset, bp-b_bcount);
+		printf(bwrite: blkno %lld offset %lld bcount %d\n,
+		(long long)bp-b_blkno, (long long) offset, bytes);
 	if (lseek(bp-b_fd, offset, SEEK_SET) == -1)
 		return (errno);
-	rv = write(bp-b_fd, bp-b_data, bp-b_bcount);
+	rv = write(bp-b_fd, bp-b_data, bytes);
 	if (debug  DEBUG_BUF_BWRITE)
 		printf(bwrite: write %ld (offset %lld) returned %lld\n,
 		bp-b_bcount, (long long)offset, (long long)rv);
 	brelse(bp, 0);
-	if (rv == bp-b_bcount)
+	if (rv == bytes)
 		return (0);
 	else if (rv == -1)		/* write error */
 		return (errno);



CVS commit: src/distrib/sets

2013-01-28 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Mon Jan 28 13:46:47 UTC 2013

Modified Files:
src/distrib/sets: mkvars.mk sets.subr

Log Message:
Follow the change from HAS_SSP to HAVE_SSP.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/mkvars.mk
cvs rdiff -u -r1.142 -r1.143 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/mkvars.mk
diff -u src/distrib/sets/mkvars.mk:1.7 src/distrib/sets/mkvars.mk:1.8
--- src/distrib/sets/mkvars.mk:1.7	Mon Nov  5 00:57:39 2012
+++ src/distrib/sets/mkvars.mk	Mon Jan 28 13:46:47 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mkvars.mk,v 1.7 2012/11/05 00:57:39 alnsn Exp $
+# $NetBSD: mkvars.mk,v 1.8 2013/01/28 13:46:47 nakayama Exp $
 
 MKEXTRAVARS= \
 	MACHINE \
@@ -6,7 +6,7 @@ MKEXTRAVARS= \
 	MACHINE_CPU \
 	HAVE_GCC \
 	HAVE_GDB \
-	HAS_SSP \
+	HAVE_SSP \
 	OBJECT_FMT \
 	TOOLCHAIN_MISSING \
 	EXTSRCS \

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.142 src/distrib/sets/sets.subr:1.143
--- src/distrib/sets/sets.subr:1.142	Wed Jan 16 21:11:05 2013
+++ src/distrib/sets/sets.subr	Mon Jan 28 13:46:47 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.142 2013/01/16 21:11:05 christos Exp $
+#	$NetBSD: sets.subr,v 1.143 2013/01/28 13:46:47 nakayama Exp $
 #
 
 #
@@ -19,7 +19,7 @@
 #	HAVE_BINUTILS
 #	HAVE_GCC
 #	HAVE_GDB
-#	HAS_SSP
+#	HAVE_SSP
 #	TOOLCHAIN_MISSING
 #	OBJECT_FMT
 # as well as:
@@ -179,7 +179,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.142 2013/01/16 21:11:05 christos Exp $
+# 	# $NetBSD: sets.subr,v 1.143 2013/01/28 13:46:47 nakayama Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -248,7 +248,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 #	skey			${MKSKEY} != no
 #	sljit			${MKSLJIT} != no
 #	solaris			${MKDTRACE} != no or ${MKZFS} != no
-#	ssp			${HAS_SSP} != no
+#	ssp			${HAVE_SSP} != no
 #	tpm			${MKTPM} != no
 #	x11			${MKX11} != no  ${X11FLAVOUR} != Xorg
 #	xorg			${MKX11} != no  ${X11FLAVOUR} == Xorg
@@ -287,7 +287,7 @@ list_set_files()
 nv = needvars[vi]
 kw = tolower(nv)
 sub(/^mk/, , kw)
-sub(/^has_/, , kw)
+sub(/^have_/, , kw)
 if (ENVIRON[nv] != no)
 	wanted[kw] = 1 
 			}



CVS commit: src/usr.bin/netstat

2013-01-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 28 13:49:09 UTC 2013

Modified Files:
src/usr.bin/netstat: main.c netstat.h route.c

Log Message:
Use sysctl based code netstat -r. Remove support for post-mortem
analysis.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/netstat/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/usr.bin/netstat/main.c
diff -u src/usr.bin/netstat/main.c:1.83 src/usr.bin/netstat/main.c:1.84
--- src/usr.bin/netstat/main.c:1.83	Thu Mar 22 20:34:43 2012
+++ src/usr.bin/netstat/main.c	Mon Jan 28 13:49:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.83 2012/03/22 20:34:43 drochner Exp $	*/
+/*	$NetBSD: main.c,v 1.84 2013/01/28 13:49:08 joerg Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = from: @(#)main.c	8.4 (Berkeley) 3/1/94;
 #else
-__RCSID($NetBSD: main.c,v 1.83 2012/03/22 20:34:43 drochner Exp $);
+__RCSID($NetBSD: main.c,v 1.84 2013/01/28 13:49:08 joerg Exp $);
 #endif
 #endif /* not lint */
 
@@ -393,7 +393,6 @@ prepare(const char *nf, const char *mf, 
 		/* If we have -M and -N, we're not dealing with live memory. */
 		use_sysctl = 0;
 	} else if (qflag ||
-		   rflag ||
 		   iflag ||
 #ifndef SMALL
 		   gflag ||
@@ -661,10 +660,10 @@ main(int argc, char *argv[])
 		if (sflag)
 			rt_stats(use_sysctl ? 0 : nl[N_RTSTAT].n_value);
 		else {
-			if (use_sysctl)
-p_rttables(af);
-			else
-routepr(nl[N_RTREE].n_value);
+			if (!use_sysctl)
+err(1, -r is not supported 
+for post-mortem analysis.);
+			p_rttables(af);
 		}
 		exit(0);
 	}

Index: src/usr.bin/netstat/netstat.h
diff -u src/usr.bin/netstat/netstat.h:1.44 src/usr.bin/netstat/netstat.h:1.45
--- src/usr.bin/netstat/netstat.h:1.44	Thu Mar 22 20:34:43 2012
+++ src/usr.bin/netstat/netstat.h	Mon Jan 28 13:49:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: netstat.h,v 1.44 2012/03/22 20:34:43 drochner Exp $	*/
+/*	$NetBSD: netstat.h,v 1.45 2013/01/28 13:49:08 joerg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -118,7 +118,6 @@ void	pr_rthdr __P((int, int));
 void	pr_family __P((int));
 void	rt_stats __P((u_long));
 char	*ns_phost __P((struct sockaddr *));
-void	upHex __P((char *));
 
 void	p_rttables(int);
 void	p_flags(int, const char *);
@@ -139,7 +138,6 @@ const char *atalk_print __P((const struc
 const char *atalk_print2 __P((const struct sockaddr *, const struct sockaddr *,
 int));
 char	*ns_print __P((struct sockaddr *));
-void	routepr __P((u_long));
 
 void	nsprotopr __P((u_long, const char *));
 void	spp_stats __P((u_long, const char *));

Index: src/usr.bin/netstat/route.c
diff -u src/usr.bin/netstat/route.c:1.79 src/usr.bin/netstat/route.c:1.80
--- src/usr.bin/netstat/route.c:1.79	Tue Mar 20 20:34:58 2012
+++ src/usr.bin/netstat/route.c	Mon Jan 28 13:49:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.79 2012/03/20 20:34:58 matt Exp $	*/
+/*	$NetBSD: route.c,v 1.80 2013/01/28 13:49:08 joerg Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -30,287 +30,15 @@
  */
 
 #include sys/cdefs.h
-#ifndef lint
-#if 0
-static char sccsid[] = from: @(#)route.c	8.3 (Berkeley) 3/9/94;
-#else
-__RCSID($NetBSD: route.c,v 1.79 2012/03/20 20:34:58 matt Exp $);
-#endif
-#endif /* not lint */
 
-#include stdbool.h
-#include sys/param.h
-#include sys/protosw.h
-#include sys/socket.h
-#include sys/mbuf.h
-#include sys/un.h
-
-#include net/if.h
-#include net/if_dl.h
-#include net/if_types.h
-#include net/route.h
-#include netinet/in.h
-#include netatalk/at.h
-#include netiso/iso.h
-#include netmpls/mpls.h
+__RCSID($NetBSD: route.c,v 1.80 2013/01/28 13:49:08 joerg Exp $);
 
 #include sys/sysctl.h
-
-#include arpa/inet.h
-
+#include net/route.h
 #include err.h
-#include kvm.h
-#include netdb.h
-#include stdio.h
-#include stdlib.h
-#include string.h
-#include unistd.h
 
 #include netstat.h
 
-#define kget(p, d) (kread((u_long)(p), (char *)(d), sizeof (d)))
-
-/*
- * XXX we put all of the sockaddr types in here to force the alignment
- * to be correct.
- */
-static union sockaddr_union {
-	struct	sockaddr u_sa;
-	struct	sockaddr_in u_in;
-	struct	sockaddr_un u_un;
-	struct	sockaddr_iso u_iso;
-	struct	sockaddr_at u_at;
-	struct	sockaddr_dl u_dl;
-	u_short	u_data[128];
-	int u_dummy;		/* force word-alignment */
-} pt_u;
-
-int	do_rtent = 0;
-struct	rtentry rtentry;
-struct	radix_node rnode;
-struct	radix_mask rmask;
-
-static struct sockaddr *kgetsa(const struct sockaddr *);
-static void p_tree(struct radix_node *);
-static void p_rtnode(void);
-static void p_krtentry(struct rtentry *);
-
-/*
- * Print routing tables.
- */
-void
-routepr(u_long rtree)
-{
-	struct radix_node_head *rnh, head;
-	struct radix_node_head *rt_nodes[AF_MAX+1];
-	int i;
-
-	printf(Routing tables\n);
-

CVS commit: src/lib/libm/src

2013-01-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 28 14:09:43 UTC 2013

Modified Files:
src/lib/libm/src: s_scalbnl.c

Log Message:
Add missing ';' to fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/src/s_scalbnl.c

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

Modified files:

Index: src/lib/libm/src/s_scalbnl.c
diff -u src/lib/libm/src/s_scalbnl.c:1.2 src/lib/libm/src/s_scalbnl.c:1.3
--- src/lib/libm/src/s_scalbnl.c:1.2	Mon Jan 28 06:34:09 2013
+++ src/lib/libm/src/s_scalbnl.c	Mon Jan 28 14:09:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_scalbnl.c,v 1.2 2013/01/28 06:34:09 matt Exp $	*/
+/*	$NetBSD: s_scalbnl.c,v 1.3 2013/01/28 14:09:43 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: s_scalbnl.c,v 1.2 2013/01/28 06:34:09 matt Exp $);
+__RCSID($NetBSD: s_scalbnl.c,v 1.3 2013/01/28 14:09:43 pgoyette Exp $);
 
 #include namespace.h
 
@@ -61,7 +61,7 @@ __weak_alias(scalblnl, _scalblnl)
 long double
 scalbnl(long double x, int n)
 {
-	return scalblnl(x, n)
+	return scalblnl(x, n);
 }
 #endif
 



CVS commit: src/usr.bin/xlint

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 14:25:18 UTC 2013

Modified Files:
src/usr.bin/xlint: Makefile.inc

Log Message:
Make mips64e[bl] check more generic.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/Makefile.inc

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

Modified files:

Index: src/usr.bin/xlint/Makefile.inc
diff -u src/usr.bin/xlint/Makefile.inc:1.12 src/usr.bin/xlint/Makefile.inc:1.13
--- src/usr.bin/xlint/Makefile.inc:1.12	Mon Mar 22 05:12:24 2010
+++ src/usr.bin/xlint/Makefile.inc	Mon Jan 28 14:25:18 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.12 2010/03/22 05:12:24 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.13 2013/01/28 14:25:18 matt Exp $
 
 WARNS?=		3	# XXX: fails -Wsign-compare
 
@@ -8,10 +8,10 @@ WARNS?=		3	# XXX: fails -Wsign-compare
 
 # Special cases first, then check for a MACHINE_ARCH specific
 # subdir before looking for MACHINE_CPU.
-.if ${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el
-ARCHSUBDIR=	mips64
-.elif exists(${.CURDIR}/../arch/${MACHINE_ARCH})
+.if exists(${.CURDIR}/../arch/${MACHINE_ARCH})
 ARCHSUBDIR=	${MACHINE_ARCH}
+.elif exists(${.CURDIR}/../arch/${MACHINE_ARCH:C/e[lb]$//})
+ARCHSUBDIR=	${MACHINE_ARCH:C/e[lb]$//}
 .else
 ARCHSUBDIR=	${MACHINE_CPU}
 .endif



CVS commit: src/sys/arch/amiga/pci

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 14:44:37 UTC 2013

Modified Files:
src/sys/arch/amiga/pci: empb.c empbreg.h empbvar.h
Added Files:
src/sys/arch/amiga/pci: empm.c empmvar.h

Log Message:
Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/pci/empb.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amiga/pci/empbreg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/pci/empbvar.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/pci/empm.c \
src/sys/arch/amiga/pci/empmvar.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/amiga/pci/empb.c
diff -u src/sys/arch/amiga/pci/empb.c:1.8 src/sys/arch/amiga/pci/empb.c:1.9
--- src/sys/arch/amiga/pci/empb.c:1.8	Sat Oct 27 17:17:34 2012
+++ src/sys/arch/amiga/pci/empb.c	Mon Jan 28 14:44:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: empb.c,v 1.8 2012/10/27 17:17:34 chs Exp $ */
+/*	$NetBSD: empb.c,v 1.9 2013/01/28 14:44:37 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -50,6 +50,7 @@
 #include amiga/pci/empbreg.h
 #include amiga/pci/empbvar.h
 #include amiga/pci/emmemvar.h
+#include amiga/pci/empmvar.h
 
 #include dev/pci/pciconf.h
 
@@ -65,9 +66,11 @@
 
 static int	empb_match(device_t, cfdata_t, void *);
 static void	empb_attach(device_t, device_t, void *);
-
 static void	empb_callback(device_t);
 
+static void	empb_empm_attach(struct empb_softc *sc);
+static int	empb_empm_print(void *aux, const char *pnp);
+
 static void	empb_find_mem(struct empb_softc *);
 static void	empb_switch_bridge(struct empb_softc *, uint8_t);
 static void	empb_intr_enable(struct empb_softc *);
@@ -125,7 +128,9 @@ empb_attach(device_t parent, device_t se
 	sc-sc_dev = self;
 	ba = zap-va;
 
-	switch (zap-prodid) {
+	sc-model = zap-prodid;
+
+	switch (sc-model) {
 	case ZORRO_PRODID_MED1K2:
 		aprint_normal(: ELBOX Mediator PCI 1200\n); 
 		break;
@@ -255,11 +260,38 @@ empb_callback(device_t self) {
 	pba.pba_bus = 0;
 	pba.pba_bridgetag = NULL;
 
+	/* Attach power management on SX and TX models. */
+	switch (sc-model) {
+	case ZORRO_PRODID_MED1K2SX:
+	case ZORRO_PRODID_MED1K2TX:
+		empb_empm_attach(sc);
+	default:
+		break;
+	}	
+
 	empb_intr_enable(sc);
 
 	config_found_ia(self, pcibus, pba, pcibusprint);
 }
 
+static void
+empb_empm_attach(struct empb_softc *sc)
+{
+	struct empm_attach_args aa;
+	aa.setup_area_t = sc-setup_area_t;
+
+	config_found_ia(sc-sc_dev, empmdev, aa, empb_empm_print);
+}
+
+static int 
+empb_empm_print(void *aux, const char *pnp)
+{
+	if (pnp)
+		aprint_normal(empm at %s, pnp);
+
+	return UNCONF;
+}
+
 static void 
 empb_intr_enable(struct empb_softc *sc) 
 {

Index: src/sys/arch/amiga/pci/empbreg.h
diff -u src/sys/arch/amiga/pci/empbreg.h:1.4 src/sys/arch/amiga/pci/empbreg.h:1.5
--- src/sys/arch/amiga/pci/empbreg.h:1.4	Mon Jun  4 12:56:49 2012
+++ src/sys/arch/amiga/pci/empbreg.h	Mon Jan 28 14:44:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: empbreg.h,v 1.4 2012/06/04 12:56:49 rkujawa Exp $ */
+/*	$NetBSD: empbreg.h,v 1.5 2013/01/28 14:44:37 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  * RAM space (its size depends on a WINDOW jumper setting).
  */
 #define EMPB_SETUP_OFF		0x
-#define EMPB_SETUP_SIZE		0x
+#define EMPB_SETUP_SIZE		0x30
 
 #define EMPB_SETUP_WINDOW_OFF	0x2	/* set memory window position */
 #define EMPB_SETUP_BRIDGE_OFF	0x7	/* select between conf or I/O */
@@ -88,7 +88,17 @@
 #define EMPB_MEM_BASE		0x8000
 #define EMPB_MEM_END		0xA000
 
+#define EMPB_PM_OFF		0x40	/* power management register */
+#define EMPB_PM_PSU_SHUTDOWN	0x0
+
 /* All PCI interrupt lines are wired to INT2? */
-#define EMPB_INT		2	// XXX: wild guess
+#define EMPB_INT		2
+
+/*
+ * Elbox Mediator 4000.
+ */
+#define EM4K_CONF_OFF		0x00C0
+#define EM4K_IO_OFF		0x0080
+#define EM4K_SETUP_WINDOW_OFF	0x0
 
 #endif /* _AMIGA_EMPBREG_H_ */

Index: src/sys/arch/amiga/pci/empbvar.h
diff -u src/sys/arch/amiga/pci/empbvar.h:1.2 src/sys/arch/amiga/pci/empbvar.h:1.3
--- src/sys/arch/amiga/pci/empbvar.h:1.2	Mon Jun  4 12:56:49 2012
+++ src/sys/arch/amiga/pci/empbvar.h	Mon Jan 28 14:44:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: empbvar.h,v 1.2 2012/06/04 12:56:49 rkujawa Exp $ */
+/*	$NetBSD: empbvar.h,v 1.3 2013/01/28 14:44:37 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -57,6 +57,8 @@ struct empb_dmamemdev_entry {
 struct empb_softc {
 	device_t			sc_dev;
 
+	uint16_t			model;
+
 	struct bus_space_tag		setup_area;
 	bus_space_tag_t			setup_area_t;
 	bus_space_handle_t		setup_area_h;

Added files:

Index: src/sys/arch/amiga/pci/empm.c
diff -u /dev/null src/sys/arch/amiga/pci/empm.c:1.1
--- /dev/null	Mon Jan 28 14:44:37 2013
+++ src/sys/arch/amiga/pci/empm.c	Mon Jan 28 14:44:37 2013
@@ -0,0 +1,85 @@
+/*	$NetBSD: 

CVS commit: src/sys/arch/amiga/amiga

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 14:53:34 UTC 2013

Modified Files:
src/sys/arch/amiga/amiga: machdep.c

Log Message:
Plug empm(4) into system halt function.


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/arch/amiga/amiga/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/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.239 src/sys/arch/amiga/amiga/machdep.c:1.240
--- src/sys/arch/amiga/amiga/machdep.c:1.239	Fri Aug  3 13:14:20 2012
+++ src/sys/arch/amiga/amiga/machdep.c	Mon Jan 28 14:53:33 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.239 2012/08/03 13:14:20 rkujawa Exp $	*/
+/*	$NetBSD: machdep.c,v 1.240 2013/01/28 14:53:33 rkujawa Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -47,8 +47,10 @@
 #include opt_panicbutton.h
 #include opt_m68k_arch.h
 
+#include empm.h
+
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.239 2012/08/03 13:14:20 rkujawa Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.240 2013/01/28 14:53:33 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -108,6 +110,9 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include amiga/amiga/cc.h
 #include amiga/amiga/memlist.h
 #include amiga/amiga/device.h
+#if NEMPM  0
+#include amiga/pci/empmvar.h
+#endif /* NEMPM  0 */
 
 #include fd.h
 #include ser.h
@@ -406,6 +411,9 @@ void
 cpu_reboot(register int howto, char *bootstr)
 {
 	struct pcb *pcb = lwp_getpcb(curlwp);
+#if NEMPM  0
+	device_t empmdev;
+#endif /* NEMPM  0 */
 
 	/* take a snap shot before clobbering any registers */
 	if (pcb != NULL)
@@ -423,6 +431,13 @@ cpu_reboot(register int howto, char *boo
 		dumpsys();
 
 	if (howto  RB_HALT) {
+#if NEMPM  0
+		empmdev = device_find_by_xname(empm0);
+		if (empmdev != NULL) {
+			empm_power_off(device_private(empmdev));
+		}	
+#endif /* NEMPM  0 */
+
 		printf(\n);
 		printf(The operating system has halted.\n);
 		printf(Please press any key to reboot.\n\n);



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

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 14:54:51 UTC 2013

Modified Files:
src/sys/arch/amiga/conf: GENERIC.in files.amiga

Log Message:
Add empm(4) driver to config files.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/amiga/conf/files.amiga

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

Modified files:

Index: src/sys/arch/amiga/conf/GENERIC.in
diff -u src/sys/arch/amiga/conf/GENERIC.in:1.107 src/sys/arch/amiga/conf/GENERIC.in:1.108
--- src/sys/arch/amiga/conf/GENERIC.in:1.107	Sun Nov 25 23:37:10 2012
+++ src/sys/arch/amiga/conf/GENERIC.in	Mon Jan 28 14:54:51 2013
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $
+# $NetBSD: GENERIC.in,v 1.108 2013/01/28 14:54:51 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.107 $
+#ident 		GENERIC-$Revision: 1.108 $
 
 m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
 makeoptions	COPTS=-Os
@@ -585,6 +585,7 @@ pci*at mppb?
 
 empb0		at zbus0		# ELBOX Mediator PCI 1200
 emmem0		at zbus0		# ELBOX Mediator PCI memory space
+empm0		at empb0		# ELBOX Mediator PCI Power Management
 pci*		at empb0
 
 #cv3dpb*	at zbus0		# CyberVision 64/3D PCI bridge

Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.167 src/sys/arch/amiga/conf/files.amiga:1.168
--- src/sys/arch/amiga/conf/files.amiga:1.167	Fri Jan 11 11:00:33 2013
+++ src/sys/arch/amiga/conf/files.amiga	Mon Jan 28 14:54:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.167 2013/01/11 11:00:33 he Exp $
+#	$NetBSD: files.amiga,v 1.168 2013/01/28 14:54:51 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -543,9 +543,14 @@ device	cv3dpb: pcibus
 attach	cv3dpb at zbus
 file	arch/amiga/pci/cv3dpb.c		cv3dpb  pci
 
-device	empb: pcibus, amibus_empb
+define	empmdev { }
+device	empm
+attach	empm at empmdev
+file	arch/amiga/pci/empm.c		empm needs-flag
+
+device	empb: pcibus, amibus_empb, empmdev
 attach	empb at zbus
-file	arch/amiga/pci/empb.c		empb  pci
+file	arch/amiga/pci/empb.c		empb  pci  empm
 
 device	emmem {}
 attach	emmem at zbus



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

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 14:56:03 UTC 2013

Modified Files:
src/sys/arch/amiga/conf: DRACO GENERIC INSTALL

Log Message:
Regen config files.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.294 -r1.295 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/amiga/conf/INSTALL

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

Modified files:

Index: src/sys/arch/amiga/conf/DRACO
diff -u src/sys/arch/amiga/conf/DRACO:1.162 src/sys/arch/amiga/conf/DRACO:1.163
--- src/sys/arch/amiga/conf/DRACO:1.162	Sun Nov 25 23:37:28 2012
+++ src/sys/arch/amiga/conf/DRACO	Mon Jan 28 14:56:02 2013
@@ -1,9 +1,9 @@
-# $NetBSD: DRACO,v 1.162 2012/11/25 23:37:28 rkujawa Exp $
+# $NetBSD: DRACO,v 1.163 2013/01/28 14:56:02 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.108 2013/01/28 14:54:51 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.162 $
+#ident 		GENERIC-$Revision: 1.163 $
 
 
 maxusers	8

Index: src/sys/arch/amiga/conf/GENERIC
diff -u src/sys/arch/amiga/conf/GENERIC:1.294 src/sys/arch/amiga/conf/GENERIC:1.295
--- src/sys/arch/amiga/conf/GENERIC:1.294	Sun Nov 25 23:37:28 2012
+++ src/sys/arch/amiga/conf/GENERIC	Mon Jan 28 14:56:03 2013
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.294 2012/11/25 23:37:28 rkujawa Exp $
+# $NetBSD: GENERIC,v 1.295 2013/01/28 14:56:03 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.108 2013/01/28 14:54:51 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.294 $
+#ident 		GENERIC-$Revision: 1.295 $
 
 
 maxusers	8
@@ -498,6 +498,7 @@ pci*at mppb?
 
 empb0		at zbus0		# ELBOX Mediator PCI 1200
 emmem0		at zbus0		# ELBOX Mediator PCI memory space
+empm0		at empb0		# ELBOX Mediator PCI Power Management
 pci*		at empb0
 
 #cv3dpb*	at zbus0		# CyberVision 64/3D PCI bridge

Index: src/sys/arch/amiga/conf/INSTALL
diff -u src/sys/arch/amiga/conf/INSTALL:1.113 src/sys/arch/amiga/conf/INSTALL:1.114
--- src/sys/arch/amiga/conf/INSTALL:1.113	Sun Nov 25 23:37:28 2012
+++ src/sys/arch/amiga/conf/INSTALL	Mon Jan 28 14:56:03 2013
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.113 2012/11/25 23:37:28 rkujawa Exp $
+# $NetBSD: INSTALL,v 1.114 2013/01/28 14:56:03 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.107 2012/11/25 23:37:10 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.108 2013/01/28 14:54:51 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.113 $
+#ident 		GENERIC-$Revision: 1.114 $
 
 makeoptions	COPTS=-Os
 
@@ -437,6 +437,7 @@ pci*at mppb?
 
 empb0		at zbus0		# ELBOX Mediator PCI 1200
 emmem0		at zbus0		# ELBOX Mediator PCI memory space
+empm0		at empb0		# ELBOX Mediator PCI Power Management
 pci*		at empb0
 
 #cv3dpb*	at zbus0		# CyberVision 64/3D PCI bridge



CVS commit: src/sys/net

2013-01-28 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jan 28 15:01:14 UTC 2013

Modified Files:
src/sys/net: if_tap.c

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/net/if_tap.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/if_tap.c
diff -u src/sys/net/if_tap.c:1.68 src/sys/net/if_tap.c:1.69
--- src/sys/net/if_tap.c:1.68	Sat Oct 27 17:18:39 2012
+++ src/sys/net/if_tap.c	Mon Jan 28 15:01:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.68 2012/10/27 17:18:39 chs Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.69 2013/01/28 15:01:13 yamt Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.68 2012/10/27 17:18:39 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.69 2013/01/28 15:01:13 yamt Exp $);
 
 #if defined(_KERNEL_OPT)
 
@@ -1055,7 +1055,7 @@ tap_dev_write(int unit, struct uio *uio,
 	m-m_pkthdr.rcvif = ifp;
 
 	bpf_mtap(ifp, m);
-	s =splnet();
+	s = splnet();
 	(*ifp-if_input)(ifp, m);
 	splx(s);
 



CVS commit: src/sys/net

2013-01-28 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jan 28 15:05:03 UTC 2013

Modified Files:
src/sys/net: if_tap.c

Log Message:
use cprng_fast instead of getmicrouptime to generate random mac address
because the latter often produces the same addresses for subsequent tap
instances.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/net/if_tap.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/if_tap.c
diff -u src/sys/net/if_tap.c:1.69 src/sys/net/if_tap.c:1.70
--- src/sys/net/if_tap.c:1.69	Mon Jan 28 15:01:13 2013
+++ src/sys/net/if_tap.c	Mon Jan 28 15:05:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.69 2013/01/28 15:01:13 yamt Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.70 2013/01/28 15:05:03 yamt Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.69 2013/01/28 15:01:13 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.70 2013/01/28 15:05:03 yamt Exp $);
 
 #if defined(_KERNEL_OPT)
 
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1
 #include sys/kernel.h
 #include sys/malloc.h
 #include sys/conf.h
+#include sys/cprng.h
 #include sys/device.h
 #include sys/file.h
 #include sys/filedesc.h
@@ -265,8 +266,6 @@ tap_attach(device_t parent, device_t sel
 	uint8_t enaddr[ETHER_ADDR_LEN] =
 	{ 0xf2, 0x0b, 0xa4, 0xff, 0xff, 0xff };
 	char enaddrstr[3 * ETHER_ADDR_LEN];
-	struct timeval tv;
-	uint32_t ui;
 
 	sc-sc_dev = self;
 	sc-sc_sih = softint_establish(SOFTINT_CLOCK, tap_softintr, sc);
@@ -278,12 +277,10 @@ tap_attach(device_t parent, device_t sel
 
 	/*
 	 * In order to obtain unique initial Ethernet address on a host,
-	 * do some randomisation using the current uptime.  It's not meant
-	 * for anything but avoiding hard-coding an address.
+	 * do some randomisation.  It's not meant for anything but avoiding
+	 * hard-coding an address.
 	 */
-	getmicrouptime(tv);
-	ui = (tv.tv_sec ^ tv.tv_usec)  0xff;
-	memcpy(enaddr+3, (uint8_t *)ui, 3);
+	cprng_fast(enaddr[3], 3);
 
 	aprint_verbose_dev(self, Ethernet address %s\n,
 	ether_snprintf(enaddrstr, sizeof(enaddrstr), enaddr));



CVS commit: src/doc

2013-01-28 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jan 28 15:05:51 UTC 2013

Modified Files:
src/doc: BRANCHES

Log Message:
update


To generate a diff of this commit:
cvs rdiff -u -r1.326 -r1.327 src/doc/BRANCHES

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

Modified files:

Index: src/doc/BRANCHES
diff -u src/doc/BRANCHES:1.326 src/doc/BRANCHES:1.327
--- src/doc/BRANCHES:1.326	Tue Nov  6 15:27:31 2012
+++ src/doc/BRANCHES	Mon Jan 28 15:05:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: BRANCHES,v 1.326 2012/11/06 15:27:31 yamt Exp $
+#	$NetBSD: BRANCHES,v 1.327 2013/01/28 15:05:51 yamt Exp $
 #
 # This file contains a list of branches that exist in the NetBSD CVS
 # tree and their current state.
@@ -617,7 +617,7 @@ Description:	page cache related changes
 Status:		Active
 Start Date:	Wed Nov 2 2011
 End Date:	
-Base Tag:	yamt-pagecache-base6
+Base Tag:	yamt-pagecache-base8
 Maintainer:	YAMAMOTO Takashi y...@netbsd.org
 Scope:		src
 Notes:		- maintain object pages in radix tree rather than rb tree.



CVS commit: src/sys/dev

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 15:14:21 UTC 2013

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add empm(4).


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.282 src/sys/dev/DEVNAMES:1.283
--- src/sys/dev/DEVNAMES:1.282	Thu Jan  3 21:13:26 2013
+++ src/sys/dev/DEVNAMES	Mon Jan 28 15:14:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.282 2013/01/03 21:13:26 jakllsch Exp $
+#	$NetBSD: DEVNAMES,v 1.283 2013/01/28 15:14:21 rkujawa Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -406,6 +406,7 @@ el			MI
 elink			MI		Attribute
 elmc			MI (MCA)
 emac			evbppc
+empm			amiga
 empsc			amiga
 empsc			amigappc
 emuxki			MI



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

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 15:41:17 UTC 2013

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

Log Message:
Note empm in synopsis.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/man4.amiga/empb.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/empb.4
diff -u src/share/man/man4/man4.amiga/empb.4:1.7 src/share/man/man4/man4.amiga/empb.4:1.8
--- src/share/man/man4/man4.amiga/empb.4:1.7	Sat Jul 28 09:56:39 2012
+++ src/share/man/man4/man4.amiga/empb.4	Mon Jan 28 15:41:17 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: empb.4,v 1.7 2012/07/28 09:56:39 njoly Exp $
+.\ $NetBSD: empb.4,v 1.8 2013/01/28 15:41:17 rkujawa Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -36,6 +36,7 @@
 .Sh SYNOPSIS
 .Cd empb0 at zbus0
 .Cd emmem0 at zbus0
+.Cd empm0 at zbus0
 .Cd pci* at empb0
 .Cd options PCI_NETBSD_CONFIGURE
 .Sh DESCRIPTION



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

2013-01-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan 28 15:45:13 UTC 2013

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

Log Message:
Import dhcpcd-5.6.7 with the following changes:
* Preserve space in static routes on the command line.
* Check correct interface the RAP came from; fixes PR bin/47433 thanks to
  Taylor R Campbell
* Ensure the nooption works for IPv4 routes

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-6-7

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
C src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/ipv6.c
U src/external/bsd/dhcpcd/dist/ipv6rs.c
U src/external/bsd/dhcpcd/dist/ipv6ns.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/ipv6.h
U src/external/bsd/dhcpcd/dist/ipv6ns.h
U src/external/bsd/dhcpcd/dist/ipv6rs.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist



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

2013-01-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan 28 15:46:52 UTC 2013

Modified Files:
src/external/bsd/dhcpcd/dist: dhcp.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/dhcp.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/bsd/dhcpcd/dist/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/dhcp.c:1.3 src/external/bsd/dhcpcd/dist/dhcp.c:1.4
--- src/external/bsd/dhcpcd/dist/dhcp.c:1.3	Thu Dec  6 11:16:47 2012
+++ src/external/bsd/dhcpcd/dist/dhcp.c	Mon Jan 28 15:46:52 2013
@@ -789,9 +789,9 @@ route_netmask(uint32_t ip_in)
  * If we have a CSR then we only use that.
  * Otherwise we add static routes and then routers. */
 struct rt *
-get_option_routes(const struct dhcp_message *dhcp,
-const char *ifname, unsigned long long *opts)
+get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp)
 {
+	struct if_options *ifo = ifp-state-options;
 	const uint8_t *p;
 	const uint8_t *e;
 	struct rt *routes = NULL;
@@ -799,25 +799,31 @@ get_option_routes(const struct dhcp_mess
 	int len;
 
 	/* If we have CSR's then we MUST use these only */
-	p = get_option(dhcp, DHO_CSR, len, NULL);
+	if (!has_option_mask(ifo-nomask, DHO_CSR))
+		p = get_option(dhcp, DHO_CSR, len, NULL);
+	else
+		p = NULL;
 	/* Check for crappy MS option */
-	if (!p)
+	if (!p  !has_option_mask(ifo-nomask, DHO_MSCSR))
 		p = get_option(dhcp, DHO_MSCSR, len, NULL);
 	if (p) {
 		routes = decode_rfc3442_rt(len, p);
 		if (routes) {
-			if (!(*opts  DHCPCD_CSR_WARNED)) {
+			if (!(ifo-options  DHCPCD_CSR_WARNED)) {
 syslog(LOG_DEBUG,
 %s: using Classless Static Routes,
-ifname);
-*opts |= DHCPCD_CSR_WARNED;
+ifp-name);
+ifo-options |= DHCPCD_CSR_WARNED;
 			}
 			return routes;
 		}
 	}
 
 	/* OK, get our static routes first. */
-	p = get_option(dhcp, DHO_STATICROUTE, len, NULL);
+	if (!has_option_mask(ifo-nomask, DHO_STATICROUTE))
+		p = get_option(dhcp, DHO_STATICROUTE, len, NULL);
+	else
+		p = NULL;
 	if (p) {
 		e = p + len;
 		while (p  e) {
@@ -836,7 +842,10 @@ get_option_routes(const struct dhcp_mess
 	}
 
 	/* Now grab our routers */
-	p = get_option(dhcp, DHO_ROUTER, len, NULL);
+	if (!has_option_mask(ifo-nomask, DHO_ROUTER))
+		p = get_option(dhcp, DHO_ROUTER, len, NULL);
+	else
+		p = NULL;
 	if (p) {
 		e = p + len;
 		while (p  e) {



CVS commit: src/doc

2013-01-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan 28 15:48:09 UTC 2013

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Import dhcpcd-5.6.7


To generate a diff of this commit:
cvs rdiff -u -r1.998 -r1.999 src/doc/3RDPARTY
cvs rdiff -u -r1.1784 -r1.1785 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.998 src/doc/3RDPARTY:1.999
--- src/doc/3RDPARTY:1.998	Thu Jan 17 22:19:52 2013
+++ src/doc/3RDPARTY	Mon Jan 28 15:48:09 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.998 2013/01/17 22:19:52 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.999 2013/01/28 15:48:09 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -300,8 +300,8 @@ No changes for NetBSD integration - just
 top of the current tree.
 
 Package:	dhcpcd
-Version:	5.6.6
-Current Vers:	5.6.6
+Version:	5.6.7
+Current Vers:	5.6.7
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1784 src/doc/CHANGES:1.1785
--- src/doc/CHANGES:1.1784	Mon Jan 28 15:13:37 2013
+++ src/doc/CHANGES	Mon Jan 28 15:48:09 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1784 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1785 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -181,3 +181,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	empm(4): Add driver for power manager present on Mediator 1200 TX and
 		SX bridges. [rkujawa 20130128]
 	amiga: Support software power-off with empm(4). [rkujawa 20130128]
+	dhcpcd(8): Import dhcpcd-5.6.7 [roy 20130128]



CVS commit: src/usr.bin/uudecode

2013-01-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 28 16:06:42 UTC 2013

Modified Files:
src/usr.bin/uudecode: uudecode.c

Log Message:
* Add -o outfile option.  This is reauired by POSIX.1-2008.
* Recognise /dev/stdout as a magic filename, both when embedded in the
  data stream and when specified via -o.  This is also required by
  POSIX.1-2008.
* Reimplement -p as an alias for -o /dev/stdout.

Thanks to Steffen Daode Nurpmeso for drawing my attention to the problems.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/uudecode/uudecode.c

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

Modified files:

Index: src/usr.bin/uudecode/uudecode.c
diff -u src/usr.bin/uudecode/uudecode.c:1.26 src/usr.bin/uudecode/uudecode.c:1.27
--- src/usr.bin/uudecode/uudecode.c:1.26	Tue Sep  6 18:44:26 2011
+++ src/usr.bin/uudecode/uudecode.c	Mon Jan 28 16:06:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uudecode.c,v 1.26 2011/09/06 18:44:26 joerg Exp $	*/
+/*	$NetBSD: uudecode.c,v 1.27 2013/01/28 16:06:42 apb Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)uudecode.c	8.2 (Berkeley) 4/2/94;
 #endif
-__RCSID($NetBSD: uudecode.c,v 1.26 2011/09/06 18:44:26 joerg Exp $);
+__RCSID($NetBSD: uudecode.c,v 1.27 2013/01/28 16:06:42 apb Exp $);
 #endif /* not lint */
 
 /*
@@ -67,30 +67,33 @@ __RCSID($NetBSD: uudecode.c,v 1.26 2011
 #include resolv.h
 #endif
 
-static int decode(void);
+static int decode(char *);
 __dead static void usage(void);
 static int checkend(const char *, const char *, const char *);
 static int base64_decode(void);
 
-static int base64, pflag;
-static const char *filename;
+static int base64;
+static const char *inputname;
 
 int
 main(int argc, char *argv[])
 {
 	int ch, rval;
+	char *outputname = NULL;
 
 	setlocale(LC_ALL, );
 	setprogname(argv[0]);
 
-	pflag = 0;
-	while ((ch = getopt(argc, argv, mp)) != -1)
+	while ((ch = getopt(argc, argv, mo:p)) != -1)
 		switch (ch) {
 		case 'm':
 			base64 = 1;
 			break;
+		case 'o':
+			outputname = optarg;
+			break;
 		case 'p':
-			pflag = 1;
+			outputname = __UNCONST(/dev/stdout);
 			break;
 		default:
 			usage();
@@ -101,22 +104,26 @@ main(int argc, char *argv[])
 	if (*argv) {
 		rval = 0;
 		do {
-			if (!freopen(filename = *argv, r, stdin)) {
+			if (!freopen(inputname = *argv, r, stdin)) {
 warn(%s, *argv);
 rval = 1;
 continue;
 			}
-			rval |= decode();
+			rval |= decode(outputname);
 		} while (*++argv);
 	} else {
-		filename = stdin;
-		rval = decode();
+		inputname = stdin;
+		rval = decode(outputname);
 	}
 	exit(rval);
 }
 
+/*
+ * Decode one file from stdin.  If outputname is not NULL
+ * then it overrides the file name embedded in the input data.
+ */
 static int
-decode(void)
+decode(char *outputname)
 {
 	struct passwd *pw;
 	int n;
@@ -129,7 +136,7 @@ decode(void)
 	/* search for header line */
 	for (;;) {
 		if (!fgets(buf, sizeof(buf), stdin)) {
-			warnx(%s: no \%s\ line, filename, base64 ? 
+			warnx(%s: no \%s\ line, inputname, base64 ? 
 	begin-base64 : begin);
 			return(1);
 		}
@@ -149,14 +156,14 @@ decode(void)
 	mode = strtol(p, fn, 8);
 	if (fn == (p) || !isspace((unsigned char)*fn) || mode==LONG_MIN || mode==LONG_MAX)
 	{
-	warnx(%s: invalid mode on \%s\ line, filename,
+	warnx(%s: invalid mode on \%s\ line, inputname,
 			base64 ? begin-base64 : begin);
 		return(1);
 	}
 	/* skip whitespace for file name */
 	while (*fn  isspace((unsigned char)*fn)) fn++;
 	if (*fn == 0) {
-warnx(%s: no filename on \%s\ line, filename,
+warnx(%s: no filename on \%s\ line, inputname,
 			base64 ? begin-base64 : begin);
 		return(1);
 	}
@@ -164,22 +171,26 @@ decode(void)
 	for (p = fn; *p  *p != '\n'; p++) 
 	;
 	if (*p) *p = 0;
+
+	/* outputname overrides fn */
+	if (outputname)
+		fn = outputname;
 	
 	/* handle ~user/file format */
 	if (*fn == '~') {
 		if (!(p = strchr(fn, '/'))) {
-			warnx(%s: illegal ~user., filename);
+			warnx(%s: illegal ~user., inputname);
 			return(1);
 		}
 		*p++ = '\0';
 		if (!(pw = getpwnam(fn + 1))) {
-			warnx(%s: no user %s., filename, buf);
+			warnx(%s: no user %s., inputname, buf);
 			return(1);
 		}
 		n = strlen(pw-pw_dir);
 		n1 = strlen(p);
 		if (n + n1 + 2  MAXPATHLEN) {
-			warnx(%s: path too long., filename);
+			warnx(%s: path too long., inputname);
 			return(1);
 		}
 		/* make space at beginning of buf by moving end of pathname */
@@ -189,11 +200,15 @@ decode(void)
 		fn = buf;
 	}
 
-	/* create output file, set mode */
-	if (!pflag  (!freopen(fn, w, stdout) ||
-	fchmod(fileno(stdout), mode  0666))) { 
-		warn(%s: %s, fn, filename);
-		return(1);
+	if (strcmp(fn, /dev/stdout) == 0) {
+		/* use stdout */
+	} else {
+		/* create output file, set mode */
+		if (freopen(fn, w, stdout) == NULL ||
+		fchmod(fileno(stdout), 

CVS commit: src/usr.bin/uuencode

2013-01-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 28 16:08:02 UTC 2013

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

Log Message:
Document today's changes to uudecode:
* Add -o outfile option.  This is required by POSIX.1-2008.
* Recognise /dev/stdout as a magic filename, both when embedded in the
  data stream and when specified via -o.  This is also required by
  POSIX.1-2008.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/uuencode/uuencode.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/uuencode/uuencode.1
diff -u src/usr.bin/uuencode/uuencode.1:1.21 src/usr.bin/uuencode/uuencode.1:1.22
--- src/usr.bin/uuencode/uuencode.1:1.21	Tue Mar 10 19:54:43 2009
+++ src/usr.bin/uuencode/uuencode.1	Mon Jan 28 16:08:02 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: uuencode.1,v 1.21 2009/03/10 19:54:43 joerg Exp $
+.\	$NetBSD: uuencode.1,v 1.22 2013/01/28 16:08:02 apb Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)uuencode.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd November 30, 2008
+.Dd January 28, 2012
 .Dt UUENCODE 1
 .Os
 .Sh NAME
@@ -42,7 +42,8 @@
 .Op Ar inputfile
 .Ar outputname
 .Nm uudecode
-.Op Fl m | Fl p
+.Op Fl m
+.Op Fl p | Fl o Ar outputfile
 .Op Ar encoded-file ...
 .Sh DESCRIPTION
 .Nm
@@ -57,6 +58,25 @@ The following options are available:
 .Bl -tag -width .Fl m
 .It Fl m
 Use base64 encoding.
+The default is that
+.Nm
+uses the historical uuencode algorithm,
+and
+.Nm uudecode
+automatically detects the encoding.
+.It Fl o Ar outputname
+.Po Nm uudecode No only . Pc
+Use the specified
+.Ar outputname
+as the name of the output file.
+The default is that
+.Nm uudecode
+obtains the name of the output file from the data stream, where
+.Nm
+would have recorded it.
+.It Fl p
+.Po Nm uudecode No only . Pc
+Write the decoded file to stdout instead of to a named file.
 .El
 .Pp
 .Nm
@@ -79,11 +99,17 @@ files (or by default, the standard input
 The resulting file is named
 .Ar outputname
 as recorded in the encoded file,
+or as specified by the
+.Fl o
+option,
 and will have the mode of the original file except that setuid
-and execute bits are not retained; if the
+and execute bits are not retained.
+If the
 .Fl p
-option is specified, the data will be written to the standard output
-instead.
+option is specified, or if the output file name is given as
+.Pa /dev/stdout ,
+then the data will be written to the standard output
+instead of to a named file.
 .Nm uudecode
 ignores any leading and trailing lines.
 .Sh EXIT STATUS
@@ -122,7 +148,7 @@ The
 and
 .Nm
 utilities conform to
-.St -p1003.2-92 .
+.St -p1003.1-2008 .
 .Sh HISTORY
 The
 .Nm uudecode



CVS commit: src/sys/arch/amiga/amiga

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon Jan 28 16:36:10 UTC 2013

Modified Files:
src/sys/arch/amiga/amiga: machdep.c

Log Message:
Power down only if RB_POWERDOWN. Noticed by phx@ .


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/arch/amiga/amiga/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/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.240 src/sys/arch/amiga/amiga/machdep.c:1.241
--- src/sys/arch/amiga/amiga/machdep.c:1.240	Mon Jan 28 14:53:33 2013
+++ src/sys/arch/amiga/amiga/machdep.c	Mon Jan 28 16:36:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.240 2013/01/28 14:53:33 rkujawa Exp $	*/
+/*	$NetBSD: machdep.c,v 1.241 2013/01/28 16:36:10 rkujawa Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
 #include empm.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.240 2013/01/28 14:53:33 rkujawa Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.241 2013/01/28 16:36:10 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -430,14 +430,16 @@ cpu_reboot(register int howto, char *boo
 	if (howto  RB_DUMP)
 		dumpsys();
 
-	if (howto  RB_HALT) {
 #if NEMPM  0
+	if (howto  RB_POWERDOWN) {
 		empmdev = device_find_by_xname(empm0);
 		if (empmdev != NULL) {
 			empm_power_off(device_private(empmdev));
 		}	
+	}
 #endif /* NEMPM  0 */
 
+	if (howto  RB_HALT) {
 		printf(\n);
 		printf(The operating system has halted.\n);
 		printf(Please press any key to reboot.\n\n);



CVS commit: [matt-nb6-plus] src/lib/csu/common

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 16:56:14 UTC 2013

Modified Files:
src/lib/csu/common [matt-nb6-plus]: crt0-common.c

Log Message:
Use __weakref_visible


To generate a diff of this commit:
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 src/lib/csu/common/crt0-common.c

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

Modified files:

Index: src/lib/csu/common/crt0-common.c
diff -u src/lib/csu/common/crt0-common.c:1.7.6.1 src/lib/csu/common/crt0-common.c:1.7.6.2
--- src/lib/csu/common/crt0-common.c:1.7.6.1	Tue Jan 22 22:56:58 2013
+++ src/lib/csu/common/crt0-common.c	Mon Jan 28 16:56:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.7.6.1 2013/01/22 22:56:58 matt Exp $ */
+/* $NetBSD: crt0-common.c,v 1.7.6.2 2013/01/28 16:56:14 matt Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: crt0-common.c,v 1.7.6.1 2013/01/22 22:56:58 matt Exp $);
+__RCSID($NetBSD: crt0-common.c,v 1.7.6.2 2013/01/28 16:56:14 matt Exp $);
 
 #include sys/types.h
 #include sys/exec.h
@@ -95,10 +95,14 @@ do {		\
  * Since we don't need .init or .fini sections, just code them in C
  * to make life easier.
  */
-extern const fptr_t init_array_start[] __weak_reference(__init_array_start);
-extern const fptr_t init_array_end[] __weak_reference(__init_array_end);
-extern const fptr_t fini_array_start[] __weak_reference(__fini_array_start);
-extern const fptr_t fini_array_end[] __weak_reference(__fini_array_end);
+__weakref_visible const fptr_t init_array_start[1]
+__weak_reference(__init_array_start);
+__weakref_visible const fptr_t init_array_end[1]
+__weak_reference(__init_array_end);
+__weakref_visible const fptr_t fini_array_start[1]
+__weak_reference(__fini_array_start);
+__weakref_visible const fptr_t fini_array_end[1]
+__weak_reference(__fini_array_end);
 
 static inline void
 _init(void)



CVS commit: src/lib/csu/common

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 16:56:39 UTC 2013

Modified Files:
src/lib/csu/common: crt0-common.c

Log Message:
Use __weakref_visible (from joerg@)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/csu/common/crt0-common.c

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

Modified files:

Index: src/lib/csu/common/crt0-common.c
diff -u src/lib/csu/common/crt0-common.c:1.11 src/lib/csu/common/crt0-common.c:1.12
--- src/lib/csu/common/crt0-common.c:1.11	Mon Jan 28 06:17:57 2013
+++ src/lib/csu/common/crt0-common.c	Mon Jan 28 16:56:39 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.11 2013/01/28 06:17:57 matt Exp $ */
+/* $NetBSD: crt0-common.c,v 1.12 2013/01/28 16:56:39 matt Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: crt0-common.c,v 1.11 2013/01/28 06:17:57 matt Exp $);
+__RCSID($NetBSD: crt0-common.c,v 1.12 2013/01/28 16:56:39 matt Exp $);
 
 #include sys/types.h
 #include sys/exec.h
@@ -95,17 +95,14 @@ do {		\
  * Since we don't need .init or .fini sections, just code them in C
  * to make life easier.
  */
-#if __GNUC_PREREQ__(4,5) || defined(__clang__)
-static const fptr_t init_array_start[1] __weak_reference(__init_array_start);
-static const fptr_t init_array_end[1] __weak_reference(__init_array_end);
-static const fptr_t fini_array_start[1] __weak_reference(__fini_array_start);
-static const fptr_t fini_array_end[1] __weak_reference(__fini_array_end);
-#else
-extern const fptr_t init_array_start[] __weak_reference(__init_array_start);
-extern const fptr_t init_array_end[] __weak_reference(__init_array_end);
-extern const fptr_t fini_array_start[] __weak_reference(__fini_array_start);
-extern const fptr_t fini_array_end[] __weak_reference(__fini_array_end);
-#endif
+__weakref_visible const fptr_t init_array_start[1]
+__weak_reference(__init_array_start);
+__weakref_visible const fptr_t init_array_end[1]
+__weak_reference(__init_array_end);
+__weakref_visible const fptr_t fini_array_start[1]
+__weak_reference(__fini_array_start);
+__weakref_visible const fptr_t fini_array_end[1]
+__weak_reference(__fini_array_end);
 
 static inline void
 _init(void)



CVS commit: src/lib/libc_vfp

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 17:04:40 UTC 2013

Added Files:
src/lib/libc_vfp: Makefile shlib_version vfpdf.S vfpsf.S

Log Message:
Add a library for ARM systems with VFP which implements the soft-float ABI
but use VFP instructions to do the actual work.  This should give near
hard-float performance without requiring compiler changes.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libc_vfp/Makefile \
src/lib/libc_vfp/shlib_version src/lib/libc_vfp/vfpdf.S \
src/lib/libc_vfp/vfpsf.S

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

Added files:

Index: src/lib/libc_vfp/Makefile
diff -u /dev/null src/lib/libc_vfp/Makefile:1.1
--- /dev/null	Mon Jan 28 17:04:40 2013
+++ src/lib/libc_vfp/Makefile	Mon Jan 28 17:04:40 2013
@@ -0,0 +1,12 @@
+#	$NetBSD: Makefile,v 1.1 2013/01/28 17:04:40 matt Exp $
+#
+
+LIB=	c_vfp
+
+.include bsd.own.mk
+
+CPUFLAGS+=	-mfpu=vfp
+
+SRCS=	vfpsf.S vfpdf.S
+
+.include bsd.lib.mk
Index: src/lib/libc_vfp/shlib_version
diff -u /dev/null src/lib/libc_vfp/shlib_version:1.1
--- /dev/null	Mon Jan 28 17:04:40 2013
+++ src/lib/libc_vfp/shlib_version	Mon Jan 28 17:04:40 2013
@@ -0,0 +1,5 @@
+#	$NetBSD: shlib_version,v 1.1 2013/01/28 17:04:40 matt Exp $
+#	Remember to update distrib/sets/lists/base/shl.* when changing
+#
+major=0
+minor=0
Index: src/lib/libc_vfp/vfpdf.S
diff -u /dev/null src/lib/libc_vfp/vfpdf.S:1.1
--- /dev/null	Mon Jan 28 17:04:40 2013
+++ src/lib/libc_vfp/vfpdf.S	Mon Jan 28 17:04:40 2013
@@ -0,0 +1,165 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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.
+ *
+ * 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 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
+ * 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.
+ */
+
+#include arm/asm.h
+
+RCSID($NetBSD: vfpdf.S,v 1.1 2013/01/28 17:04:40 matt Exp $)
+
+/*
+ * This file provides softfloat compatible routines which use VFP instructions
+ * to do the actual work.  This should give near hard-float performance while
+ * being compatible with soft-float code.
+ *
+ * This file implements the double precision floating point routines.
+ */
+
+#ifdef	__ARMEL__
+#define	vmov_arg0	vmov	d0, r0, r1
+#define	vmov_arg1	vmov	d1, r2, r3
+#define	vmov_ret	vmov	r0, r1, d0
+#else
+#define	vmov_arg0	vmov	d0, r1, r0
+#define	vmov_arg1	vmov	d1, r3, r2
+#define	vmov_ret	vmov	r1, r0, d0
+#endif
+#define	vmov_args	vmov_arg0; vmov_arg1
+
+ENTRY(__adddf3)
+	vmov_args
+	vadd.f64	d0, d0, d1
+	vmov_ret
+	RET
+END(__adddf3)
+
+ENTRY(__subdf3)
+	vmov_args
+	vsub.f64	d0, d0, d1
+	vmov_ret
+	RET
+END(__subdf3)
+
+ENTRY(__muldf3)
+	vmov_args
+	vmul.f64	d0, d0, d1
+	vmov_ret
+	RET
+END(__muldf3)
+
+ENTRY(__divdf3)
+	vmov_args
+	vdiv.f64	d0, d0, d1
+	vmov_ret
+	RET
+END(__divdf3)
+
+ENTRY(__negdf2)
+	vmov_arg0
+	vneg.f64	d0, d0
+	vmov_ret
+	RET
+END(__negdf2)
+
+ENTRY(__extendsfdf2)
+	vmov		s0, r0
+	vcvt.f64.f32	d0, s0
+	vmov_ret
+	RET
+END(__extendsfdf2)
+
+ENTRY(__fixdfsi)
+	vmov_arg0
+	vcvt.s32.f64	s0, d0
+	vmov		r0, s0
+	RET
+END(__fixdfsi)
+
+ENTRY(__fixunsdfsi)
+	vmov_arg0
+	vcvt.u32.f64	s0, d0
+	vmov		r0, s0
+	RET
+END(__fixunsdfsi)
+
+ENTRY(__floatsidf)
+	vmov		s0, r0
+	vcvt.f64.s32	d0, s0
+	vmov_ret
+	RET
+END(__floatsidf)
+
+ENTRY(__floatunsidf)
+	vmov		s0, r0
+	vcvt.f64.u32	d0, s0
+	vmov_ret
+	RET
+END(__floatunsidf)
+
+/* N set if compare = result */
+/* Z set if compare = result */
+/* C set if compare (=,=,UNORD) result */
+/* V set if compare UNORD result */
+
+STRONG_ALIAS(__eqdf2, __nedf2)
+ENTRY(__nedf2)
+	vmov_args
+	vcmp.f64	d0, d1
+	vmrs		APSR_nzcv, fpscr
+	moveq		r0, #0		/* !(a == b) */
+	movne		r0, #1		/* 

CVS commit: src/sys/netinet6

2013-01-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 28 17:57:34 UTC 2013

Modified Files:
src/sys/netinet6: nd6_rtr.c

Log Message:
Set the socket family for the network mask.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.84 src/sys/netinet6/nd6_rtr.c:1.85
--- src/sys/netinet6/nd6_rtr.c:1.84	Mon Jun 25 17:25:29 2012
+++ src/sys/netinet6/nd6_rtr.c	Mon Jan 28 17:57:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.84 2012/06/25 17:25:29 abs Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.85 2013/01/28 17:57:34 joerg Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.84 2012/06/25 17:25:29 abs Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.85 2013/01/28 17:57:34 joerg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1674,6 +1674,7 @@ nd6_prefix_onlink(struct nd_prefix *pr)
 	 * ifa-ifa_rtrequest = nd6_rtrequest;
 	 */
 	memset(mask6, 0, sizeof(mask6));
+	mask6.sin6_family = AF_INET6;
 	mask6.sin6_len = sizeof(mask6);
 	mask6.sin6_addr = pr-ndpr_mask;
 	/* rtrequest() will probably set RTF_UP, but we're not sure. */



CVS commit: src

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 18:57:11 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: ad.arm ad.armeb
src/distrib/sets/lists/debug: ad.arm ad.armeb
src/lib: Makefile
src/lib/libc_vfp: Makefile
Added Files:
src/distrib/sets/lists/base: ad.arm.shl
src/distrib/sets/lists/comp: ad.arm.shl

Log Message:
Enable building/installing libc_vfp for MACHINE_ARCH arm/armeb


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/base/ad.arm.shl
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/comp/ad.arm.shl
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/comp/ad.armeb
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/ad.arm \
src/distrib/sets/lists/debug/ad.armeb
cvs rdiff -u -r1.196 -r1.197 src/lib/Makefile
cvs rdiff -u -r1.1 -r1.2 src/lib/libc_vfp/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.arm
diff -u src/distrib/sets/lists/comp/ad.arm:1.43 src/distrib/sets/lists/comp/ad.arm:1.44
--- src/distrib/sets/lists/comp/ad.arm:1.43	Wed Jan 16 16:01:05 2013
+++ src/distrib/sets/lists/comp/ad.arm	Mon Jan 28 18:57:10 2013
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.43 2013/01/16 16:01:05 christos Exp $
+# $NetBSD: ad.arm,v 1.44 2013/01/28 18:57:10 matt Exp $
 ./usr/include/gcc-4.5/arm_neon.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/mmintrin.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
@@ -88,12 +88,11 @@
 ./usr/lib/libarm.acomp-c-lib
 ./usr/lib/libarm32.acomp-obsolete		obsolete
 ./usr/lib/libarm32_p.acomp-obsolete		obsolete
-./usr/lib/libarm32_pic.a			comp-obsolete		obsolete
 ./usr/lib/libarm_p.acomp-c-lib		profile
-./usr/lib/libarm_pic.acomp-c-piclib
+./usr/lib/libc_vfp.acomp-c-lib
+./usr/lib/libc_vfp_p.acomp-c-lib		profile
 ./usr/lib/libpmc.acomp-c-lib
 ./usr/lib/libpmc_p.acomp-c-proflib		profile
-./usr/lib/libpmc_pic.acomp-c-piclib
 ./usr/libdata/lint/llib-larm.ln			comp-c-lintlib		lint
 ./usr/libdata/lint/llib-larm32.ln		comp-obsolete		obsolete
 ./usr/libdata/lint/llib-lpmc.ln			comp-c-lintlib		lint

Index: src/distrib/sets/lists/comp/ad.armeb
diff -u src/distrib/sets/lists/comp/ad.armeb:1.10 src/distrib/sets/lists/comp/ad.armeb:1.11
--- src/distrib/sets/lists/comp/ad.armeb:1.10	Wed Jan 16 16:01:05 2013
+++ src/distrib/sets/lists/comp/ad.armeb	Mon Jan 28 18:57:11 2013
@@ -1,4 +1,4 @@
-# $NetBSD: ad.armeb,v 1.10 2013/01/16 16:01:05 christos Exp $
+# $NetBSD: ad.armeb,v 1.11 2013/01/28 18:57:11 matt Exp $
 #
 # The armeb MACHINE_ARCH never existed in NetBSD as a.out, so we
 #	skip the old a.out compatibility tools.
@@ -92,12 +92,11 @@
 ./usr/lib/libarm.acomp-c-lib
 ./usr/lib/libarm32.acomp-obsolete		obsolete
 ./usr/lib/libarm32_p.acomp-obsolete		obsolete
-./usr/lib/libarm32_pic.a			comp-obsolete		obsolete
 ./usr/lib/libarm_p.acomp-c-lib		profile
-./usr/lib/libarm_pic.acomp-c-piclib
+./usr/lib/libc_vfp.acomp-c-lib
+./usr/lib/libc_vfp_p.acomp-c-lib		profile
 ./usr/lib/libpmc.acomp-c-lib
 ./usr/lib/libpmc_p.acomp-c-proflib		profile
-./usr/lib/libpmc_pic.acomp-c-piclib
 ./usr/libdata/lint/llib-larm.ln			comp-c-lintlib		lint
 ./usr/libdata/lint/llib-larm32.ln		comp-obsolete		obsolete
 ./usr/libdata/lint/llib-lpmc.ln			comp-c-lintlib		lint

Index: src/distrib/sets/lists/debug/ad.arm
diff -u src/distrib/sets/lists/debug/ad.arm:1.1 src/distrib/sets/lists/debug/ad.arm:1.2
--- src/distrib/sets/lists/debug/ad.arm:1.1	Wed Jan 16 16:01:07 2013
+++ src/distrib/sets/lists/debug/ad.arm	Mon Jan 28 18:57:11 2013
@@ -1,7 +1,8 @@
-# $NetBSD: ad.arm,v 1.1 2013/01/16 16:01:07 christos Exp $
+# $NetBSD: ad.arm,v 1.2 2013/01/28 18:57:11 matt Exp $
 ./usr/libdata/debug/sbin/ldconfig.debug		comp-sysutil-debug	debug,pic
 ./usr/libdata/debug/usr/bin/fdformat.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/lib/libarm.so.0.0.debug	comp-sys-debug		debug,pic
+./usr/libdata/debug/usr/lib/libc_vfp.so.0.0.debug	comp-sys-debug		debug,pic
 ./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug	comp-sys-debug		debug,pic
 ./usr/lib/libarm_g.a-unknown-		debuglib
 ./usr/lib/libpmc_g.a-unknown-		debuglib
Index: src/distrib/sets/lists/debug/ad.armeb
diff -u src/distrib/sets/lists/debug/ad.armeb:1.1 src/distrib/sets/lists/debug/ad.armeb:1.2
--- src/distrib/sets/lists/debug/ad.armeb:1.1	Wed Jan 16 16:01:07 2013
+++ src/distrib/sets/lists/debug/ad.armeb	Mon Jan 28 18:57:11 2013
@@ -1,6 +1,7 @@
-# $NetBSD: ad.armeb,v 1.1 2013/01/16 16:01:07 christos Exp $
+# $NetBSD: ad.armeb,v 1.2 2013/01/28 18:57:11 matt Exp $
 ./usr/libdata/debug/usr/bin/fdformat.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/lib/libarm.so.0.0.debug	comp-sys-debug		debug,pic
+./usr/libdata/debug/usr/lib/libc_vfp.so.0.0.debug	

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

2013-01-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 28 19:31:15 UTC 2013

Modified Files:
src/sys/arch/arm/conf: majors.arm32

Log Message:
reserve char 111 for vchiq


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/conf/majors.arm32

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/conf/majors.arm32
diff -u src/sys/arch/arm/conf/majors.arm32:1.33 src/sys/arch/arm/conf/majors.arm32:1.34
--- src/sys/arch/arm/conf/majors.arm32:1.33	Thu Jun 30 20:09:20 2011
+++ src/sys/arch/arm/conf/majors.arm32	Mon Jan 28 19:31:14 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.arm32,v 1.33 2011/06/30 20:09:20 wiz Exp $
+#	$NetBSD: majors.arm32,v 1.34 2013/01/28 19:31:14 jmcneill Exp $
 #
 # Device majors for arm32
 #
@@ -104,6 +104,7 @@ device-major	epcom		char 107		epcom
 device-major	tslcd		char 108		tslcd
 device-major	twe		char 109  		twe
 device-major	nsmb		char 110		nsmb
+device-major	vchiq		char 111		vchiq
 
 # Majors up to 143 are reserved for machine-dependent drivers.
 # New machine-independent driver majors are assigned in 



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

2013-01-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 28 19:47:03 UTC 2013

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

Log Message:
add machdep.serial sysctl for getting board serial number


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 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.31 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.32
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.31	Fri Jan 25 13:32:21 2013
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Mon Jan 28 19:47:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.32 2013/01/28 19:47:02 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.32 2013/01/28 19:47:02 jmcneill Exp $);
 
 #include opt_evbarm_boardtype.h
 
@@ -45,6 +45,7 @@ __KERNEL_RCSID(0, $NetBSD: rpi_machdep.
 #include sys/param.h
 #include sys/device.h
 #include sys/termios.h
+#include sys/sysctl.h
 #include sys/bus.h
 
 #include net/if_ether.h
@@ -787,3 +788,15 @@ rpi_device_register(device_t dev, void *
 	}
 #endif
 }
+
+SYSCTL_SETUP(sysctl_machdep_rpi, sysctl machdep subtree setup (rpi))
+{
+	sysctl_createv(clog, 0, NULL, NULL,
+	CTLFLAG_PERMANENT, CTLTYPE_NODE, machdep, NULL,
+	NULL, 0, NULL, 0, CTL_MACHDEP, CTL_EOL);
+
+	sysctl_createv(clog, 0, NULL, NULL,
+	CTLFLAG_PERMANENT|CTLFLAG_READONLY|CTLFLAG_HEX|CTLFLAG_PRIVATE,
+	CTLTYPE_QUAD, serial, NULL, NULL, 0,
+	vb.vbt_serial.sn, 0, CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+}



CVS commit: src/usr.bin/uudecode

2013-01-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 28 19:50:30 UTC 2013

Modified Files:
src/usr.bin/uudecode: uudecode.c

Log Message:
Support both - and /dev/stdout as references to standard
output.  Add comments about what POSIX says regarding stdout.
Also add comments about what POSIX says regarding file mode.
---


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/uudecode/uudecode.c

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

Modified files:

Index: src/usr.bin/uudecode/uudecode.c
diff -u src/usr.bin/uudecode/uudecode.c:1.27 src/usr.bin/uudecode/uudecode.c:1.28
--- src/usr.bin/uudecode/uudecode.c:1.27	Mon Jan 28 16:06:42 2013
+++ src/usr.bin/uudecode/uudecode.c	Mon Jan 28 19:50:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uudecode.c,v 1.27 2013/01/28 16:06:42 apb Exp $	*/
+/*	$NetBSD: uudecode.c,v 1.28 2013/01/28 19:50:30 apb Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)uudecode.c	8.2 (Berkeley) 4/2/94;
 #endif
-__RCSID($NetBSD: uudecode.c,v 1.27 2013/01/28 16:06:42 apb Exp $);
+__RCSID($NetBSD: uudecode.c,v 1.28 2013/01/28 19:50:30 apb Exp $);
 #endif /* not lint */
 
 /*
@@ -200,10 +200,24 @@ decode(char *outputname)
 		fn = buf;
 	}
 
-	if (strcmp(fn, /dev/stdout) == 0) {
-		/* use stdout */
+	if (strcmp(fn, /dev/stdout) == 0 || strcmp(fn, -) == 0) {
+		/*
+		 * POSIX.1-2008 says that both - and /dev/stdout
+		 * refer to standard output when they appear in the file
+		 * header, but only /dev/stdout refers to standard
+		 * output when it appears as the argument to the -o
+		 * command line option.
+		 *
+		 * We handle both special names, regardless of whether
+		 * they came from the -o option or from the header of
+		 * the input stream.
+		 */
 	} else {
-		/* create output file, set mode */
+		/*
+		 * Create output file, and set its mode.  POSIX.1-2008
+		 * requires the mode to be used exactly, ignoring the
+		 * umask and anything else, but we mask it with 0666.
+		 */
 		if (freopen(fn, w, stdout) == NULL ||
 		fchmod(fileno(stdout), mode  0666) != 0) { 
 			warn(%s: %s, fn, inputname);



CVS commit: src/usr.sbin/ldpd

2013-01-28 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Jan 28 20:06:52 UTC 2013

Modified Files:
src/usr.sbin/ldpd: fsm.c ldp_command.c socketops.c socketops.h

Log Message:
Fix the transport address TLV mess I created after INET6 convert
Use a single loop to decrement and check hello list keepalives
Display transport address in show hello output


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ldpd/fsm.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/ldpd/ldp_command.c
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/ldpd/socketops.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/socketops.h

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

Modified files:

Index: src/usr.sbin/ldpd/fsm.c
diff -u src/usr.sbin/ldpd/fsm.c:1.7 src/usr.sbin/ldpd/fsm.c:1.8
--- src/usr.sbin/ldpd/fsm.c:1.7	Sat Jan 26 17:29:55 2013
+++ src/usr.sbin/ldpd/fsm.c	Mon Jan 28 20:06:52 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fsm.c,v 1.7 2013/01/26 17:29:55 kefren Exp $ */
+/* $NetBSD: fsm.c,v 1.8 2013/01/28 20:06:52 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -55,7 +55,6 @@ run_ldp_hello(struct ldp_pdu * pduid, st
 struct sockaddr * padd, struct in_addr * ladd, int mysock)
 {
 	struct ldp_peer *peer = NULL;
-	union sockunion peer_addr;
 	struct transport_address_tlv *trtlv;
 	struct hello_info *hi;
 
@@ -77,6 +76,7 @@ run_ldp_hello(struct ldp_pdu * pduid, st
 			return;
 		}
 		hi-ldp_id.s_addr = pduid-ldp_id.s_addr;
+		hi-transport_address.sa.sa_family = 0;
 		SLIST_INSERT_HEAD(hello_info_head, hi, infos);
 	} else
 		/* Just update timer */
@@ -102,41 +102,46 @@ run_ldp_hello(struct ldp_pdu * pduid, st
 	if (!get_ldp_peer_by_id(pduid-ldp_id)) {
 		/* Check transport TLV */
 		if (pduid-length - PDU_PAYLOAD_LENGTH -
-		sizeof(struct hello_tlv)  3) {
-			trtlv = (struct transport_address_tlv *) ht[1];
-			if (trtlv-type == TLV_IPV4_TRANSPORT) {
-peer_addr.sin.sin_family = AF_INET;
-peer_addr.sin.sin_len =
+		sizeof(struct hello_tlv) = 8) {
+			trtlv = (struct transport_address_tlv *)(ht + 1);
+			if (trtlv-type == htons(TLV_IPV4_TRANSPORT)) {
+hi-transport_address.sin.sin_family = AF_INET;
+hi-transport_address.sin.sin_len =
 sizeof(struct sockaddr_in);
-memcpy(peer_addr.sin.sin_addr, trtlv-address,
-sizeof(struct in_addr));
-			} else if (trtlv-type == TLV_IPV6_TRANSPORT) {
-peer_addr.sin6.sin6_family = AF_INET6;
-peer_addr.sin6.sin6_len =
+memcpy(hi-transport_address.sin.sin_addr,
+trtlv-address, sizeof(struct in_addr));
+			} else if (trtlv-type == htons(TLV_IPV6_TRANSPORT)) {
+hi-transport_address.sin6.sin6_family =
+AF_INET6;
+hi-transport_address.sin6.sin6_len =
 sizeof(struct sockaddr_in6);
-memcpy(peer_addr.sin6.sin6_addr,
+memcpy(hi-transport_address.sin6.sin6_addr,
 trtlv-address, sizeof(struct in6_addr));
-			}
+			} else
+warnp(Unknown AF %x for transport address\n,
+ntohs(trtlv-type));
 		} else {
 			trtlv = NULL;
-			peer_addr.sin.sin_family = AF_INET;
-			peer_addr.sin.sin_len = sizeof(struct sockaddr_in);
-			memcpy(peer_addr.sin.sin_addr, pduid-ldp_id,
-			sizeof(struct in_addr));
+			hi-transport_address.sin.sin_family = AF_INET;
+			hi-transport_address.sin.sin_len =
+			sizeof(struct sockaddr_in);
+			memcpy(hi-transport_address.sin.sin_addr,
+			pduid-ldp_id, sizeof(struct in_addr));
 		}
 		/*
 		 * RFC 5036 2.5.2: If A1  A2, LSR1 plays the active role;
 		 * otherwise it is passive.
 		 */
-		/* XXX: check for IPv6 too */
-		if (peer_addr.sa.sa_family == AF_INET 
-		ntohl(peer_addr.sin.sin_addr.s_addr) ntohl(ladd-s_addr)) {
+		/* XXX TODO: check for IPv6 too */
+		if (hi-transport_address.sa.sa_family == AF_INET 
+		ntohl(hi-transport_address.sin.sin_addr.s_addr) 
+		ntohl(ladd-s_addr)) {
 			peer = ldp_peer_new(pduid-ldp_id, padd,
-trtlv != NULL ? peer_addr.sa : NULL,
+hi-transport_address.sa,
 ht-ch.holdtime, 0);
-			if (!peer)
+			if (peer == NULL)
 return;
-			if (peer  peer-state == LDP_PEER_CONNECTED)
+			if (peer-state == LDP_PEER_CONNECTED)
 send_initialize(peer);
 		}
 	}

Index: src/usr.sbin/ldpd/ldp_command.c
diff -u src/usr.sbin/ldpd/ldp_command.c:1.8 src/usr.sbin/ldpd/ldp_command.c:1.9
--- src/usr.sbin/ldpd/ldp_command.c:1.8	Sat Jan 26 17:29:55 2013
+++ src/usr.sbin/ldpd/ldp_command.c	Mon Jan 28 20:06:52 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_command.c,v 1.8 2013/01/26 17:29:55 kefren Exp $ */
+/* $NetBSD: ldp_command.c,v 1.9 2013/01/28 20:06:52 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -555,8 +555,12 @@ show_hellos(int s, char *recvspace)
 	struct hello_info *hi;
 
 	SLIST_FOREACH(hi, hello_info_head, infos) {
-		snprintf(sendspace, MAXSEND, %s: %ds\n, inet_ntoa(hi-ldp_id),
-		hi-keepalive);
+		snprintf(sendspace, MAXSEND,
+		ID: %s\nKeepalive: %ds\nTransport address: %s\n\n,
+		

CVS commit: src/usr.sbin/ldpd

2013-01-28 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Jan 28 20:32:05 UTC 2013

Modified Files:
src/usr.sbin/ldpd: socketops.c

Log Message:
permit notifications even if session not fully established


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/ldpd/socketops.c

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

Modified files:

Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.21 src/usr.sbin/ldpd/socketops.c:1.22
--- src/usr.sbin/ldpd/socketops.c:1.21	Mon Jan 28 20:06:52 2013
+++ src/usr.sbin/ldpd/socketops.c	Mon Jan 28 20:32:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.21 2013/01/28 20:06:52 kefren Exp $ */
+/* $NetBSD: socketops.c,v 1.22 2013/01/28 20:32:04 kefren Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -1072,7 +1072,8 @@ recv_session_pdu(struct ldp_peer * p)
 		/* Should we get the message ? */
 		if (p-state != LDP_PEER_ESTABLISHED 
 		ntohs(ttmp-type) != LDP_INITIALIZE 
-		ntohs(ttmp-type) != LDP_KEEPALIVE)
+		ntohs(ttmp-type) != LDP_KEEPALIVE 
+		ntohs(ttmp-type) != LDP_NOTIFICATION)
 			break;
 		/* The big switch */
 		switch (ntohs(ttmp-type)) {



CVS commit: src/usr.sbin/ldpd

2013-01-28 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Jan 28 21:08:14 UTC 2013

Modified Files:
src/usr.sbin/ldpd: ldp_command.c ldp_peer.c

Log Message:
Use satos instead of inet_ntop
Fix an alloc problem


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/ldpd/ldp_command.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/ldpd/ldp_peer.c

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

Modified files:

Index: src/usr.sbin/ldpd/ldp_command.c
diff -u src/usr.sbin/ldpd/ldp_command.c:1.9 src/usr.sbin/ldpd/ldp_command.c:1.10
--- src/usr.sbin/ldpd/ldp_command.c:1.9	Mon Jan 28 20:06:52 2013
+++ src/usr.sbin/ldpd/ldp_command.c	Mon Jan 28 21:08:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_command.c,v 1.9 2013/01/28 20:06:52 kefren Exp $ */
+/* $NetBSD: ldp_command.c,v 1.10 2013/01/28 21:08:14 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -411,21 +411,16 @@ show_neighbours(int s, char *recvspace)
 	socklen_t sin_len = sizeof(struct sockaddr_in);
 	int enc;
 	socklen_t enclen = sizeof(enc);
-	char traddress[39], nhaddress[39];
 
 	SLIST_FOREACH(p, ldp_peer_head, peers) {
 		snprintf(sendspace, MAXSEND, LDP peer: %s\n,
 		inet_ntoa(p-ldp_id));
 		writestr(s, sendspace);
-		inet_ntop(p-transport_address-sa_family,
-		p-transport_address-sa_data, traddress, 39);
 		snprintf(sendspace, MAXSEND, Transport address: %s\n,
-		traddress);
+		satos(p-transport_address));
 		writestr(s, sendspace);
-		inet_ntop(p-address-sa_family, p-address-sa_data,
-		nhaddress, 39);
 		snprintf(sendspace, MAXSEND, Next-hop address: %s\n,
-		nhaddress);
+		satos(p-address));
 		writestr(s, sendspace);
 		snprintf(sendspace, MAXSEND, State: %s\n,
 		ldp_state_to_name(p-state));
@@ -513,7 +508,6 @@ static int
 show_bindings(int s, char *recvspace)
 {
 	struct label *l;
-	char labelgw[39];
 
 	snprintf(sendspace, MAXSEND, Local label\tNetwork\t\t\t\tNexthop\n);
 	writestr(s, sendspace);
@@ -523,12 +517,10 @@ show_bindings(int s, char *recvspace)
 		writestr(s, sendspace);
 		snprintf(sendspace, MAXSEND, %s, union_ntoa(l-so_pref));
 		writestr(s, sendspace);
-		if (l-p) {
-			inet_ntop(l-p-address-sa_family,
-			l-p-address-sa_data, labelgw, 39);
+		if (l-p)
 			snprintf(sendspace, MAXSEND, \t%s:%d\n,
-			labelgw, l-label);
-		} else
+			satos(l-p-address), l-label);
+		else
 			snprintf(sendspace, MAXSEND, \n);
 		writestr(s, sendspace);
 	}

Index: src/usr.sbin/ldpd/ldp_peer.c
diff -u src/usr.sbin/ldpd/ldp_peer.c:1.6 src/usr.sbin/ldpd/ldp_peer.c:1.7
--- src/usr.sbin/ldpd/ldp_peer.c:1.6	Sun Jan 27 05:53:21 2013
+++ src/usr.sbin/ldpd/ldp_peer.c	Mon Jan 28 21:08:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.c,v 1.6 2013/01/27 05:53:21 kefren Exp $ */
+/* $NetBSD: ldp_peer.c,v 1.7 2013/01/28 21:08:14 kefren Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -131,13 +131,15 @@ ldp_peer_new(const struct in_addr * ldp_
 
 	SLIST_INSERT_HEAD(ldp_peer_head, p, peers);
 	p-address = (struct sockaddr *)malloc(padd-sa_len);
-	p-transport_address = (struct sockaddr *)malloc(padd-sa_len);
 	memcpy(p-address, padd, padd-sa_len);
 	memcpy(p-ldp_id, ldp_id, sizeof(struct in_addr));
-	if (tradd != NULL)
+	if (tradd != NULL) {
+		p-transport_address = (struct sockaddr *)malloc(tradd-sa_len);
 		memcpy(p-transport_address, tradd, tradd-sa_len);
-	else
+	} else {
+		p-transport_address = (struct sockaddr *)malloc(padd-sa_len);
 		memcpy(p-transport_address, padd, padd-sa_len);
+	}
 	p-holdtime=holdtime  ldp_holddown_time ? holdtime : ldp_holddown_time;
 	p-socket = s;
 	if (soc  1) {
@@ -401,11 +403,10 @@ void 
 print_bounded_addresses(struct ldp_peer * p)
 {
 	struct ldp_peer_address *wp;
-	char abuf[512], peername[39];
+	char abuf[512];
 
-	inet_ntop(p-address-sa_family, p-address-sa_data, peername, 39);
 	snprintf(abuf, sizeof(abuf), Addresses bounded to peer %s: ,
-	peername);
+	satos(p-address));
 	SLIST_FOREACH(wp, p-ldp_peer_address_head, addresses) {
 		strncat(abuf, satos(wp-address.sa),
 			sizeof(abuf) -1);



CVS commit: src/usr.sbin/ldpd

2013-01-28 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Jan 28 21:35:35 UTC 2013

Modified Files:
src/usr.sbin/ldpd: ldp_errors.h ldp_peer.c pdu.c socketops.c

Log Message:
Be a little more strict when sending notifications and checking PDU


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/ldp_errors.h
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ldpd/ldp_peer.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/ldpd/pdu.c
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/ldpd/socketops.c

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

Modified files:

Index: src/usr.sbin/ldpd/ldp_errors.h
diff -u src/usr.sbin/ldpd/ldp_errors.h:1.4 src/usr.sbin/ldpd/ldp_errors.h:1.5
--- src/usr.sbin/ldpd/ldp_errors.h:1.4	Sat Jan 26 17:29:55 2013
+++ src/usr.sbin/ldpd/ldp_errors.h	Mon Jan 28 21:35:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_errors.h,v 1.4 2013/01/26 17:29:55 kefren Exp $ */
+/* $NetBSD: ldp_errors.h,v 1.5 2013/01/28 21:35:34 kefren Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -48,6 +48,7 @@
 #define	LDP_E_TOO_MANY_LABELS	13
 #define	LDP_E_INVAL		14
 #define	LDP_E_TOO_MANY_FDS	15
+#define	LDP_E_BAD_ID		16
 #define	LDP_E_GENERIC		255
 
 void	printtime(void);

Index: src/usr.sbin/ldpd/ldp_peer.c
diff -u src/usr.sbin/ldpd/ldp_peer.c:1.7 src/usr.sbin/ldpd/ldp_peer.c:1.8
--- src/usr.sbin/ldpd/ldp_peer.c:1.7	Mon Jan 28 21:08:14 2013
+++ src/usr.sbin/ldpd/ldp_peer.c	Mon Jan 28 21:35:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.c,v 1.7 2013/01/28 21:08:14 kefren Exp $ */
+/* $NetBSD: ldp_peer.c,v 1.8 2013/01/28 21:35:34 kefren Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -193,7 +193,8 @@ ldp_peer_holddown_all()
 	SLIST_FOREACH(p, ldp_peer_head, peers) {
 		if ((p-state == LDP_PEER_ESTABLISHED) ||
 		(p-state == LDP_PEER_CONNECTED))
-			send_notification(p, get_message_id(), NOTIF_SHUTDOWN);
+			send_notification(p, get_message_id(),
+			NOTIF_FATAL | NOTIF_SHUTDOWN);
 		ldp_peer_holddown(p);
 	}
 }

Index: src/usr.sbin/ldpd/pdu.c
diff -u src/usr.sbin/ldpd/pdu.c:1.2 src/usr.sbin/ldpd/pdu.c:1.3
--- src/usr.sbin/ldpd/pdu.c:1.2	Sat Jan 26 17:29:55 2013
+++ src/usr.sbin/ldpd/pdu.c	Mon Jan 28 21:35:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pdu.c,v 1.2 2013/01/26 17:29:55 kefren Exp $ */
+/* $NetBSD: pdu.c,v 1.3 2013/01/28 21:35:35 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -66,12 +66,22 @@ check_recv_pdu(struct ldp_peer * p, stru
 	if (c  MIN_PDU_SIZE)
 		return LDP_E_BAD_LENGTH;
 
+	if (p-ldp_id.s_addr != rpdu-ldp_id.s_addr) {
+		fatalp(Invalid LDP ID received from %s\n,
+		inet_ntoa(p-ldp_id));
+		notiftlv = build_notification(0,
+		NOTIF_FATAL | NOTIF_BAD_LDP_ID);
+		send_tlv(p, (struct tlv *) notiftlv);
+		free(notiftlv);
+		return LDP_E_BAD_ID;
+	}
 
 	/* Check PDU for right LDP version */
 	if (ntohs(rpdu-version) != LDP_VERSION) {
 		fatalp(Invalid PDU version received from %s (%d)\n,
 		   satos(p-address), ntohs(rpdu-version));
-		notiftlv = build_notification(0, NOTIF_BAD_LDP_VER);
+		notiftlv = build_notification(0,
+		NOTIF_FATAL | NOTIF_BAD_LDP_VER);
 		send_tlv(p, (struct tlv *) notiftlv);
 		free(notiftlv);
 		return LDP_E_BAD_VERSION;
@@ -81,7 +91,8 @@ check_recv_pdu(struct ldp_peer * p, stru
 		fatalp(Invalid PDU length received from %s (announced %d, 
 		received %d)\n, satos(p-address),
 		ntohs(rpdu-length), (int) (c - PDU_VER_LENGTH));
-		notiftlv = build_notification(0, NOTIF_BAD_PDU_LEN);
+		notiftlv = build_notification(0,
+		NOTIF_FATAL | NOTIF_BAD_PDU_LEN);
 		send_tlv(p, (struct tlv *) notiftlv);
 		free(notiftlv);
 		return LDP_E_BAD_LENGTH;

Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.22 src/usr.sbin/ldpd/socketops.c:1.23
--- src/usr.sbin/ldpd/socketops.c:1.22	Mon Jan 28 20:32:04 2013
+++ src/usr.sbin/ldpd/socketops.c	Mon Jan 28 21:35:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.22 2013/01/28 20:32:04 kefren Exp $ */
+/* $NetBSD: socketops.c,v 1.23 2013/01/28 21:35:35 kefren Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -734,7 +734,7 @@ send_hello_alarm(int unused)
 			case LDP_PEER_ESTABLISHED:
 			case LDP_PEER_CONNECTED:
 send_notification(p, 0,
-NOTIF_KEEP_ALIVE_TIMER_EXPIRED);
+NOTIF_FATAL|NOTIF_KEEP_ALIVE_TIMER_EXPIRED);
 warnp(Keepalive expired for %s\n,
 inet_ntoa(p-ldp_id));
 ldp_peer_holddown(p);



CVS commit: src/include

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 23:19:29 UTC 2013

Modified Files:
src/include: math.h

Log Message:
Add missing long double functions


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/include/math.h

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

Modified files:

Index: src/include/math.h
diff -u src/include/math.h:1.58 src/include/math.h:1.59
--- src/include/math.h:1.58	Sat May  5 22:07:57 2012
+++ src/include/math.h	Mon Jan 28 23:19:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.58 2012/05/05 22:07:57 christos Exp $	*/
+/*	$NetBSD: math.h,v 1.59 2013/01/28 23:19:28 matt Exp $	*/
 
 /*
  * 
@@ -282,6 +282,14 @@ float	cosf(float);
 float	sinf(float);
 float	tanf(float);
 
+long double	acosl(long double);
+long double	asinl(long double);
+long double	atanl(long double);
+long double	atan2l(long double, long double);
+long double	cosl(long double);
+long double	sinl(long double);
+long double	tanl(long double);
+
 /* 7.12.5 hyperbolic */
 
 float	acoshf(float);
@@ -290,6 +298,12 @@ float	atanhf(float);
 float	coshf(float);
 float	sinhf(float);
 float	tanhf(float);
+long double	acoshl(long double);
+long double	asinhl(long double);
+long double	atanhl(long double);
+long double	coshl(long double);
+long double	sinhl(long double);
+long double	tanhl(long double);
 
 /* 7.12.6 exp / log */
 
@@ -306,65 +320,110 @@ float	log1pf(float);
 float	logbf(float);
 float	modff(float, float *);
 float	scalbnf(float, int);
+float	scalblnf(float, long);
+
+long double	expl(long double);
+long double	exp2l(long double);
+long double	expm1l(long double);
+long double	frexpl(long double, int *);
+int		ilogbl(long double);
+long double	ldexpl(long double, int);
+long double	logl(long double);
+long double	log2l(long double);
+long double	log10l(long double);
+long double	log1pl(long double);
+long double	logbl(long double);
+long double	modfl(long double, long double *);
+long double	scalbnl(long double, int);
+long double	scalblnl(long double, long);
+
 
 /* 7.12.7 power / absolute */
 
 float	cbrtf(float);
 float	fabsf(float);
-long double	fabsl(long double);
 float	hypotf(float, float);
 float	powf(float, float);
 float	sqrtf(float);
+long double	cbrtl(long double);
+long double	fabsl(long double);
+long double	hypotl(long double, long double);
+long double	powl(long double, long double);
+long double	sqrtl(long double);
 
 /* 7.12.8 error / gamma */
 
+double	tgamma(double);
 float	erff(float);
 float	erfcf(float);
 float	lgammaf(float);
 float	tgammaf(float);
-double	tgamma(double);
+long double	erfl(long double);
+long double	erfcl(long double);
+long double	lgammal(long double);
+long double	tgammal(long double);
 
 /* 7.12.9 nearest integer */
 
-float	ceilf(float);
-float	floorf(float);
-float	rintf(float);
-double	round(double);
-float	roundf(float);
-double	trunc(double);
-float	truncf(float);
-long int	lrint(double);
-long int	lrintf(float);
 /* LONGLONG */
 long long int	llrint(double);
-/* LONGLONG */
-long long int	llrintf(float);
 long int	lround(double);
-long int	lroundf(float);
 /* LONGLONG */
 long long int	llround(double);
+long int	lrint(double);
+double	round(double);
+double	trunc(double);
+
+float	ceilf(float);
+float	floorf(float);
+/* LONGLONG */
+long long int	llrintf(float);
+long int	lroundf(float);
 /* LONGLONG */
 long long int	llroundf(float);
+long int	lrintf(float);
+float	rintf(float);
+float	roundf(float);
+float	truncf(float);
+long double	ceill(long double);
+long double	floorl(long double);
+/* LONGLONG */
+long long int	llrintl(long double);
+long int	lroundl(long double);
+/* LONGLONG */
+long long int	llroundl(long double);
+long int	lrintl(long double);
+long double	rintl(long double);
+long double	roundl(long double);
+long double	truncl(long double);
 
 /* 7.12.10 remainder */
 
 float	fmodf(float, float);
 float	remainderf(float, float);
+long double	fmodl(long double, long double);
+long double	remainderl(long double, long double);
 
 /* 7.12.10.3 The remquo functions */
 double	remquo(double, double, int *);
 float	remquof(float, float, int *);
+long double	remquol(long double, long double, int *);
 
 /* 7.12.11 manipulation */
 
-float	copysignf(float, float);
-long double	copysignl(long double, long double);
 double	nan(const char *);
+double	nearbyint(double);
+double	nexttoward(double, long double);
+float	copysignf(float, float);
 float	nanf(const char *);
-long double	nanl(const char *);
+float	nearbyintf(float);
 float	nextafterf(float, float);
+float	nexttowardf(float, long double);
+long double	copysignl(long double, long double);
+long double	nanl(const char *);
+long double	nearbyintl(long double);
 long double nextafterl(long double, long double);
-double	nexttoward(double, long double);
+long double	nexttowardl(long double, long double);
 
 /* 7.12.14 comparison */
 
@@ -376,12 

CVS commit: src/include

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 23:19:50 UTC 2013

Modified Files:
src/include: complex.h

Log Message:
Add missing long double prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/include/complex.h

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

Modified files:

Index: src/include/complex.h
diff -u src/include/complex.h:1.3 src/include/complex.h:1.4
--- src/include/complex.h:1.3	Wed Sep 15 16:11:30 2010
+++ src/include/complex.h	Mon Jan 28 23:19:50 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: complex.h,v 1.3 2010/09/15 16:11:30 christos Exp $ */
+/* $NetBSD: complex.h,v 1.4 2013/01/28 23:19:50 matt Exp $ */
 
 /*
  * Written by Matthias Drochner.
@@ -20,60 +20,74 @@ __BEGIN_DECLS
 /* 7.3.5.1 The cacos functions */
 double complex cacos(double complex);
 float complex cacosf(float complex);
+long double complex cacosl(long double complex);
 
 /* 7.3.5.2 The casin functions */
 double complex casin(double complex);
 float complex casinf(float complex);
+long double complex casinl(long double complex);
 
 /* 7.3.5.1 The catan functions */
 double complex catan(double complex);
 float complex catanf(float complex);
+long double complex catanl(long double complex);
 
 /* 7.3.5.1 The ccos functions */
 double complex ccos(double complex);
 float complex ccosf(float complex);
+long double complex ccosl(long double complex);
 
 /* 7.3.5.1 The csin functions */
 double complex csin(double complex);
 float complex csinf(float complex);
+long double complex csinl(long double complex);
 
 /* 7.3.5.1 The ctan functions */
 double complex ctan(double complex);
 float complex ctanf(float complex);
+long double complex ctanl(long double complex);
 
 /* 7.3.6 Hyperbolic functions */
 /* 7.3.6.1 The cacosh functions */
 double complex cacosh(double complex);
 float complex cacoshf(float complex);
+long double complex cacoshl(long double complex);
 
 /* 7.3.6.2 The casinh functions */
 double complex casinh(double complex);
 float complex casinhf(float complex);
+long double complex casinhl(long double complex);
 
 /* 7.3.6.3 The catanh functions */
 double complex catanh(double complex);
 float complex catanhf(float complex);
+long double complex catanhl(long double complex);
 
 /* 7.3.6.4 The ccosh functions */
 double complex ccosh(double complex);
 float complex ccoshf(float complex);
+long double complex ccoshl(long double complex);
 
 /* 7.3.6.5 The csinh functions */
 double complex csinh(double complex);
 float complex csinhf(float complex);
+long double complex csinhl(long double complex);
 
 /* 7.3.6.6 The ctanh functions */
 double complex ctanh(double complex);
 float complex ctanhf(float complex);
+long double complex ctanhl(long double complex);
 
 /* 7.3.7 Exponential and logarithmic functions */
 /* 7.3.7.1 The cexp functions */
 double complex cexp(double complex);
 float complex cexpf(float complex);
+long double complex cexpl(long double complex);
 
 /* 7.3.7.2 The clog functions */
 double complex clog(double complex);
 float complex clogf(float complex);
+long double complex clogl(long double complex);
 
 /* 7.3.8 Power and absolute-value functions */
 /* 7.3.8.1 The cabs functions */
@@ -81,20 +95,24 @@ float complex clogf(float complex);
 /* avoid conflict with historical cabs(struct complex) */
 double cabs(double complex) __RENAME(__c99_cabs);
 float cabsf(float complex) __RENAME(__c99_cabsf);
+long double cabsl(long double complex) __RENAME(__c99_cabsl);
 #endif
 
 /* 7.3.8.2 The cpow functions */
 double complex cpow(double complex, double complex);
 float complex cpowf(float complex, float complex);
+long double complex cpowl(long double complex, long double complex);
 
 /* 7.3.8.3 The csqrt functions */
 double complex csqrt(double complex);
 float complex csqrtf(float complex);
+long double complex csqrtl(long double complex);
 
 /* 7.3.9 Manipulation functions */
 /* 7.3.9.1 The carg functions */ 
 double carg(double complex);
 float cargf(float complex);
+long double cargl(long double complex);
 
 /* 7.3.9.2 The cimag functions */
 double cimag(double complex);



CVS commit: src/sys/dev/usb

2013-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 28 23:46:33 UTC 2013

Modified Files:
src/sys/dev/usb: if_urtwn.c if_urtwnreg.h

Log Message:
make monitor mode work.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/if_urtwnreg.h

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.18 src/sys/dev/usb/if_urtwn.c:1.19
--- src/sys/dev/usb/if_urtwn.c:1.18	Tue Jan 22 07:40:43 2013
+++ src/sys/dev/usb/if_urtwn.c	Mon Jan 28 18:46:33 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.18 2013/01/22 12:40:43 jmcneill Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.19 2013/01/28 23:46:33 christos Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.18 2013/01/22 12:40:43 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.19 2013/01/28 23:46:33 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -1696,9 +1696,22 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 			urtwn_set_chan(sc, ic-ic_curchan,
 			IEEE80211_HTINFO_2NDCHAN_NONE);
 
+			/* Set media status to 'No Link'. */
+			urtwn_set_nettype0_msr(sc, R92C_CR_NETTYPE_NOLINK);
+
 			/* Enable Rx of data frames. */
 			urtwn_write_2(sc, R92C_RXFLTMAP2, 0x);
 
+			/* Allow Rx from any BSSID. */
+			urtwn_write_4(sc, R92C_RCR,
+			urtwn_read_4(sc, R92C_RCR) 
+			~(R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN));
+
+			/* Accept Rx data/control/management frames */
+			urtwn_write_4(sc, R92C_RCR,
+			urtwn_read_4(sc, R92C_RCR) |
+			R92C_RCR_ADF | R92C_RCR_ACF | R92C_RCR_AMF);
+
 			/* Turn link LED on. */
 			urtwn_set_led(sc, URTWN_LED_LINK, 1);
 			break;
@@ -1918,6 +1931,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
 		ifp-if_ierrors++;
 		return;
 	}
+	/*
+	 * XXX: This will drop most control packets.  Do we really
+	 * want this in IEEE80211_M_MONITOR mode?
+	 */
 	if (__predict_false(pktlen  (int)sizeof(*wh))) {
 		DPRINTFN(DBG_RX, (%s: %s: packet too short %d\n,
 		device_xname(sc-sc_dev), __func__, pktlen));
@@ -1974,7 +1991,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
 	if (__predict_false(sc-sc_drvbpf != NULL)) {
 		struct urtwn_rx_radiotap_header *tap = sc-sc_rxtap;
 
-		tap-wr_flags = IEEE80211_RADIOTAP_F_FCS;
+		tap-wr_flags = 0;
 		if (!(rxdw3  R92C_RXDW3_HT)) {
 			switch (rate) {
 			/* CCK. */
@@ -2064,6 +2081,7 @@ urtwn_rxeof(usbd_xfer_handle xfer, usbd_
 		if (__predict_false(pktlen == 0)) {
 			DPRINTFN(DBG_RX, (%s: %s: pktlen is 0 byte\n,
 			device_xname(sc-sc_dev), __func__));
+			break;
 		}
 
 		infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8;
@@ -2165,6 +2183,8 @@ urtwn_tx(struct urtwn_softc *sc, struct 
 		if (wh-i_fc[1]  IEEE80211_FC1_WEP)
 			tap-wt_flags |= IEEE80211_RADIOTAP_F_WEP;
 
+		/* XXX: set tap-wt_rate? */
+
 		bpf_mtap2(sc-sc_drvbpf, tap, sc-sc_txtap_len, m);
 	}
 
@@ -3655,8 +3675,6 @@ urtwn_init(struct ifnet *ifp)
 	}
 	urtwn_write_4(sc, R92C_CR, reg);
 
-	urtwn_rxfilter_init(sc);
-
 	/* Set response rate */
 	reg = urtwn_read_4(sc, R92C_RRSR);
 	reg = RW(reg, R92C_RRSR_RATE_BITMAP, R92C_RRSR_RATE_CCK_ONLY_1M);
@@ -3721,9 +3739,13 @@ urtwn_init(struct ifnet *ifp)
 	SET(sc-sc_flags, URTWN_FLAG_FWREADY);
 
 	/* Initialize MAC/BB/RF blocks. */
-	urtwn_mac_init(sc);
-	urtwn_write_4(sc, R92C_RCR,
-	urtwn_read_4(sc, R92C_RCR)  ~R92C_RCR_ADF);
+	/*
+	 * XXX: urtwn_mac_init() sets R92C_RCR[0:15] = R92C_RCR_APM |
+	 * R92C_RCR_AM | R92C_RCR_AB | R92C_RCR_AICV | R92C_RCR_AMF.
+	 * XXX: This setting should be removed from rtl8192cu_mac[].
+	 */
+	urtwn_mac_init(sc);		// sets R92C_RCR[0:15]
+	urtwn_rxfilter_init(sc);	// reset R92C_RCR
 	urtwn_bb_init(sc);
 	urtwn_rf_init(sc);
 

Index: src/sys/dev/usb/if_urtwnreg.h
diff -u src/sys/dev/usb/if_urtwnreg.h:1.2 src/sys/dev/usb/if_urtwnreg.h:1.3
--- src/sys/dev/usb/if_urtwnreg.h:1.2	Sun Jan 20 15:21:57 2013
+++ src/sys/dev/usb/if_urtwnreg.h	Mon Jan 28 18:46:33 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwnreg.h,v 1.2 2013/01/20 20:21:57 christos Exp $	*/
+/*	$NetBSD: if_urtwnreg.h,v 1.3 2013/01/28 23:46:33 christos Exp $	*/
 /*	$OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $	*/
 
 /*-
@@ -190,23 +190,48 @@
 /* WMAC Configuration. */
 #define R92C_APSD_CTRL			0x600
 #define R92C_BWOPMODE			0x603
+#define R92C_TCR			0x604
 #define R92C_RCR			0x608
+#define R92C_RX_PKT_LIMIT		0x60c
+#define R92C_RX_DLK_TIME		0x60d
 #define R92C_RX_DRVINFO_SZ		0x60f
 #define R92C_MACID			0x610
 #define R92C_BSSID			0x618
 #define R92C_MAR			0x620
+#define R92C_MBIDCAMCFG			0x628
+#define R92C_USTIME_EDCA		0x638
 #define R92C_MAC_SPEC_SIFS		0x63a
 #define R92C_R2T_SIFS			0x63c
 #define R92C_T2T_SIFS			0x63e
 #define R92C_ACKTO			0x640
+#define R92C_CTS2TO			0x641
+#define R92C_EIFS			0x642
+#define 

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

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 23:47:38 UTC 2013

Modified Files:
src/sys/arch/arm/include: asm.h

Log Message:
Add a RETr(r) macro (indirect return through register r).


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/asm.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/include/asm.h
diff -u src/sys/arch/arm/include/asm.h:1.16 src/sys/arch/arm/include/asm.h:1.17
--- src/sys/arch/arm/include/asm.h:1.16	Sat Sep  1 14:46:25 2012
+++ src/sys/arch/arm/include/asm.h	Mon Jan 28 23:47:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.16 2012/09/01 14:46:25 matt Exp $	*/
+/*	$NetBSD: asm.h,v 1.17 2013/01/28 23:47:38 matt Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -170,9 +170,11 @@
   
 #if defined (_ARM_ARCH_4T)
 # define RET		bx		lr
+# define RETr(r)	bx		r
 # define RETc(c)	__CONCAT(bx,c)	lr
 #else
 # define RET		mov		pc, lr
+# define RETr(r)	mov		pc, r
 # define RETc(c)	__CONCAT(mov,c)	pc, lr
 #endif
 



CVS commit: src/sys/arch/arm

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 28 23:49:13 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: arm32_machdep.c
src/sys/arch/arm/include: cpu.h
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Add a machdep.fpu_present sysctl for ld.elf_so to use in ld.so.conf to load
libc_vfp.so.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/include/cpu.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/vfp/vfp_init.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/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.89 src/sys/arch/arm/arm32/arm32_machdep.c:1.90
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.89	Sat Jan 19 10:16:56 2013
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Mon Jan 28 23:49:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.89 2013/01/19 10:16:56 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.90 2013/01/28 23:49:12 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arm32_machdep.c,v 1.89 2013/01/19 10:16:56 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm32_machdep.c,v 1.90 2013/01/28 23:49:12 matt Exp $);
 
 #include opt_modular.h
 #include opt_md.h
@@ -97,6 +97,7 @@ void *	msgbufaddr;
 extern paddr_t msgbufphys;
 
 int kernel_debug = 0;
+int cpu_fpu_present;
 
 /* exported variable to be filled in by the bootloaders */
 char *booted_kernel;
@@ -360,6 +361,11 @@ SYSCTL_SETUP(sysctl_machdep_setup, sysc
 		   CTLTYPE_INT, powersave, NULL,
 		   sysctl_machdep_powersave, 0, cpu_do_powersave, 0,
 		   CTL_MACHDEP, CPU_POWERSAVE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READONLY,
+		   CTLTYPE_INT, fpu_present, NULL,
+		   NULL, 0, cpu_fpu_present, 0,
+		   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
 }
 
 void

Index: src/sys/arch/arm/include/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.74 src/sys/arch/arm/include/cpu.h:1.75
--- src/sys/arch/arm/include/cpu.h:1.74	Wed Dec 26 18:32:41 2012
+++ src/sys/arch/arm/include/cpu.h	Mon Jan 28 23:49:12 2013
@@ -85,6 +85,7 @@
 #ifndef _LOCORE
 /* 1 == use cpu_sleep(), 0 == don't */
 extern int cpu_do_powersave;
+extern int cpu_fpu_present;
 #endif
 
 #ifdef _LOCORE

Index: src/sys/arch/arm/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.16 src/sys/arch/arm/vfp/vfp_init.c:1.17
--- src/sys/arch/arm/vfp/vfp_init.c:1.16	Mon Jan 28 06:14:45 2013
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Jan 28 23:49:13 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.16 2013/01/28 06:14:45 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.17 2013/01/28 23:49:13 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -382,6 +382,7 @@ vfp_attach(void)
 		return;
 	}
 
+	cpu_fpu_present = 1;
 	if (fpsid != 0) {
 		aprint_normal(vfp%d at %s: %s\n,
 		device_unit(curcpu()-ci_dev), device_xname(curcpu()-ci_dev),



CVS commit: src/sys/dev/usb

2013-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 29 00:00:16 UTC 2013

Modified Files:
src/sys/dev/usb: ehci.c ehcivar.h ohci.c ohcivar.h uhci.c uhcivar.h

Log Message:
use a pool instead of a linked list to avoid synchronization problems.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/ehcivar.h
cvs rdiff -u -r1.231 -r1.232 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/usb/ohcivar.h
cvs rdiff -u -r1.252 -r1.253 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/uhcivar.h

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

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.203 src/sys/dev/usb/ehci.c:1.204
--- src/sys/dev/usb/ehci.c:1.203	Tue Jan 22 07:40:42 2013
+++ src/sys/dev/usb/ehci.c	Mon Jan 28 19:00:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.203 2013/01/22 12:40:42 jmcneill Exp $ */
+/*	$NetBSD: ehci.c,v 1.204 2013/01/29 00:00:15 christos Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.203 2013/01/22 12:40:42 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.204 2013/01/29 00:00:15 christos Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -353,6 +353,9 @@ ehci_init(ehci_softc_t *sc)
 	cv_init(sc-sc_softwake_cv, ehciab);
 	cv_init(sc-sc_doorbell, ehcidi);
 
+	sc-sc_xferpool = pool_cache_init(sizeof(struct ehci_xfer), 0, 0, 0,
+	ehcixfer, NULL, IPL_USB, NULL, NULL, NULL);
+
 	sc-sc_doorbell_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
 	ehci_doorbell, sc);
 	sc-sc_pcd_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
@@ -1143,7 +1146,6 @@ ehci_childdet(device_t self, device_t ch
 int
 ehci_detach(struct ehci_softc *sc, int flags)
 {
-	usbd_xfer_handle xfer;
 	int rv = 0;
 
 	if (sc-sc_child != NULL)
@@ -1172,10 +1174,7 @@ ehci_detach(struct ehci_softc *sc, int f
 	mutex_destroy(sc-sc_intr_lock);
 #endif
 
-	while ((xfer = SIMPLEQ_FIRST(sc-sc_free_xfers)) != NULL) {
-		SIMPLEQ_REMOVE_HEAD(sc-sc_free_xfers, next);
-		kmem_free(xfer, sizeof(struct ehci_xfer));
-	}
+	pool_cache_destroy(sc-sc_xferpool);
 
 	EOWRITE4(sc, EHCI_CONFIGFLAG, 0);
 
@@ -1369,18 +1368,7 @@ ehci_allocx(struct usbd_bus *bus)
 	struct ehci_softc *sc = bus-hci_private;
 	usbd_xfer_handle xfer;
 
-	xfer = SIMPLEQ_FIRST(sc-sc_free_xfers);
-	if (xfer != NULL) {
-		SIMPLEQ_REMOVE_HEAD(sc-sc_free_xfers, next);
-#ifdef DIAGNOSTIC
-		if (xfer-busy_free != XFER_FREE) {
-			printf(ehci_allocx: xfer=%p not free, 0x%08x\n, xfer,
-			   xfer-busy_free);
-		}
-#endif
-	} else {
-		xfer = kmem_alloc(sizeof(struct ehci_xfer), KM_SLEEP);
-	}
+	xfer = pool_cache_get(sc-sc_xferpool, PR_NOWAIT);
 	if (xfer != NULL) {
 		memset(xfer, 0, sizeof(struct ehci_xfer));
 #ifdef DIAGNOSTIC
@@ -1406,7 +1394,7 @@ ehci_freex(struct usbd_bus *bus, usbd_xf
 		printf(ehci_freex: !isdone\n);
 	}
 #endif
-	SIMPLEQ_INSERT_HEAD(sc-sc_free_xfers, xfer, next);
+	pool_cache_put(sc-sc_xferpool, xfer);
 }
 
 Static void

Index: src/sys/dev/usb/ehcivar.h
diff -u src/sys/dev/usb/ehcivar.h:1.40 src/sys/dev/usb/ehcivar.h:1.41
--- src/sys/dev/usb/ehcivar.h:1.40	Sun Jun 10 02:15:53 2012
+++ src/sys/dev/usb/ehcivar.h	Mon Jan 28 19:00:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehcivar.h,v 1.40 2012/06/10 06:15:53 mrg Exp $ */
+/*	$NetBSD: ehcivar.h,v 1.41 2013/01/29 00:00:15 christos Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -29,6 +29,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _EHCIVAR_H_
+#define _EHCIVAR_H_
+
+#include sys/pool.h
+
 typedef struct ehci_soft_qtd {
 	ehci_qtd_t qtd;
 	struct ehci_soft_qtd *nextqtd; /* mirrors nextqtd in TD */
@@ -162,7 +167,7 @@ typedef struct ehci_softc {
 	u_int32_t sc_eintrs;
 	ehci_soft_qh_t *sc_async_head;
 
-	SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */
+	pool_cache_t sc_xferpool;	/* free xfer pool */
 
 	struct callout sc_tmo_intrlist;
 
@@ -195,3 +200,5 @@ void		ehci_childdet(device_t, device_t);
 bool		ehci_suspend(device_t, const pmf_qual_t *);
 bool		ehci_resume(device_t, const pmf_qual_t *);
 bool		ehci_shutdown(device_t, int);
+
+#endif /* _EHCIVAR_H_ */

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.231 src/sys/dev/usb/ohci.c:1.232
--- src/sys/dev/usb/ohci.c:1.231	Tue Jan 22 07:40:43 2013
+++ src/sys/dev/usb/ohci.c	Mon Jan 28 19:00:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.231 2013/01/22 12:40:43 jmcneill Exp $	*/
+/*	$NetBSD: ohci.c,v 1.232 2013/01/29 00:00:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.231 2013/01/22 12:40:43 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.232 2013/01/29 00:00:15 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ 

CVS commit: src/sys/arch/amiga/pci

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Jan 29 00:49:43 UTC 2013

Modified Files:
src/sys/arch/amiga/pci: emmem.c empb.c empbreg.h
Added Files:
src/sys/arch/amiga/pci: em4k.c em4kvar.h

Log Message:
Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/pci/em4k.c \
src/sys/arch/amiga/pci/em4kvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/pci/emmem.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amiga/pci/empb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amiga/pci/empbreg.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/amiga/pci/emmem.c
diff -u src/sys/arch/amiga/pci/emmem.c:1.3 src/sys/arch/amiga/pci/emmem.c:1.4
--- src/sys/arch/amiga/pci/emmem.c:1.3	Sat Oct 27 17:17:34 2012
+++ src/sys/arch/amiga/pci/emmem.c	Tue Jan 29 00:49:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: emmem.c,v 1.3 2012/10/27 17:17:34 chs Exp $ */
+/*	$NetBSD: emmem.c,v 1.4 2013/01/29 00:49:43 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -47,7 +47,6 @@
 #include machine/bus.h
 #include machine/cpu.h
 
-//#include m68k/bus_dma.h
 #include amiga/dev/zbusvar.h
 #include amiga/pci/empbreg.h
 #include amiga/pci/emmemvar.h
@@ -69,11 +68,14 @@ emmem_match(device_t parent, cfdata_t cf
 		return 0;
 
 	switch (zap-prodid) {
-	case ZORRO_PRODID_MED1K2_MEM:
+	case ZORRO_PRODID_MED1K2_MEM:	/* Mediator 1200 family */
 	case ZORRO_PRODID_MED1K2SX_MEM:
 	case ZORRO_PRODID_MED1K2LT2_MEM:
 	case ZORRO_PRODID_MED1K2LT4_MEM:
 	case ZORRO_PRODID_MED1K2TX_MEM:
+	case ZORRO_PRODID_MEDZIV_MEM:	/* Mediator ZIV, not really yet */
+	case ZORRO_PRODID_MED4K_MEM:	/* Mediator 4000 family */
+	case ZORRO_PRODID_MED4KMKII_MEM:
 		return 1;
 	}
 
@@ -97,7 +99,7 @@ emmem_attach(device_t parent, device_t s
 	zap-size / 1024);
 
 	/*
-	 * Do nothing here, empb should find the emmem devices
+	 * Do nothing here, empb or em4k should find the emmem devices
 	 * and do the right(tm) thing. 
 	 */
 

Index: src/sys/arch/amiga/pci/empb.c
diff -u src/sys/arch/amiga/pci/empb.c:1.9 src/sys/arch/amiga/pci/empb.c:1.10
--- src/sys/arch/amiga/pci/empb.c:1.9	Mon Jan 28 14:44:37 2013
+++ src/sys/arch/amiga/pci/empb.c	Tue Jan 29 00:49:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: empb.c,v 1.9 2013/01/28 14:44:37 rkujawa Exp $ */
+/*	$NetBSD: empb.c,v 1.10 2013/01/29 00:49:43 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -108,6 +108,7 @@ empb_match(device_t parent, cfdata_t cf,
 	case ZORRO_PRODID_MED1K2LT2:
 	case ZORRO_PRODID_MED1K2LT4:
 	case ZORRO_PRODID_MED1K2TX:
+	case ZORRO_PRODID_MEDZIV:	/* ZIV untested! */
 		return 1;
 	}
 

Index: src/sys/arch/amiga/pci/empbreg.h
diff -u src/sys/arch/amiga/pci/empbreg.h:1.5 src/sys/arch/amiga/pci/empbreg.h:1.6
--- src/sys/arch/amiga/pci/empbreg.h:1.5	Mon Jan 28 14:44:37 2013
+++ src/sys/arch/amiga/pci/empbreg.h	Tue Jan 29 00:49:43 2013
@@ -1,7 +1,7 @@
-/*	$NetBSD: empbreg.h,v 1.5 2013/01/28 14:44:37 rkujawa Exp $ */
+/*	$NetBSD: empbreg.h,v 1.6 2013/01/29 00:49:43 rkujawa Exp $ */
 
 /*-
- * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * Copyright (c) 2012, 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -91,14 +91,32 @@
 #define EMPB_PM_OFF		0x40	/* power management register */
 #define EMPB_PM_PSU_SHUTDOWN	0x0
 
-/* All PCI interrupt lines are wired to INT2? */
+/* All PCI interrupt lines are wired to INT2. */
 #define EMPB_INT		2
 
 /*
  * Elbox Mediator 4000.
+ *
+ * Similar design to Mediator 1200, consists of two Zorro III boards.
+ * First (with lower ID, 16MB) is used to access bridge setup, configuration 
+ * and I/O spaces. The second board (256MB or 512MB) is a window into PCI 
+ * memory space.
  */
-#define EM4K_CONF_OFF		0x00C0
-#define EM4K_IO_OFF		0x0080
-#define EM4K_SETUP_WINDOW_OFF	0x0
+#define EM4K_SETUP_OFF		0x0
+#define EM4K_SETUP_SIZE		0x1F
+
+#define EM4K_CONF_OFF		0x0080
+#define EM4K_CONF_SIZE		0x003F
+
+#define EM4K_IO_OFF		0x00C0
+#define EM4K_IO_SIZE		0x000F
+
+#define EM4K_SETUP_WINDOW_OFF	0x0	/* window position register */
+#define EM4K_SETUP_INTR_OFF	0x4	/* interrupt setup */
+
+#define EM4K_WINDOW_SHIFT	0x18
+#define EM4K_WINDOW_MASK_512M	0xE0
+#define EM4K_WINDOW_MASK_256M	0xF0
 
 #endif /* _AMIGA_EMPBREG_H_ */
+

Added files:

Index: src/sys/arch/amiga/pci/em4k.c
diff -u /dev/null src/sys/arch/amiga/pci/em4k.c:1.1
--- /dev/null	Tue Jan 29 00:49:44 2013
+++ src/sys/arch/amiga/pci/em4k.c	Tue Jan 29 00:49:42 2013
@@ -0,0 +1,371 @@
+/*	$NetBSD: em4k.c,v 1.1 2013/01/29 00:49:42 rkujawa Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to 

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

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Jan 29 00:52:50 UTC 2013

Modified Files:
src/sys/arch/amiga/conf: GENERIC.in files.amiga

Log Message:
Add em4k(4).


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.168 -r1.169 src/sys/arch/amiga/conf/files.amiga

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

Modified files:

Index: src/sys/arch/amiga/conf/GENERIC.in
diff -u src/sys/arch/amiga/conf/GENERIC.in:1.108 src/sys/arch/amiga/conf/GENERIC.in:1.109
--- src/sys/arch/amiga/conf/GENERIC.in:1.108	Mon Jan 28 14:54:51 2013
+++ src/sys/arch/amiga/conf/GENERIC.in	Tue Jan 29 00:52:50 2013
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.108 2013/01/28 14:54:51 rkujawa Exp $
+# $NetBSD: GENERIC.in,v 1.109 2013/01/29 00:52:50 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.108 $
+#ident 		GENERIC-$Revision: 1.109 $
 
 m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
 makeoptions	COPTS=-Os
@@ -584,9 +584,11 @@ mppb*   at zbus0		# Matay Promet
 pci*at mppb?
 
 empb0		at zbus0		# ELBOX Mediator PCI 1200
+em4k0		at zbus0		# ELBOX Mediator PCI 4000
 emmem0		at zbus0		# ELBOX Mediator PCI memory space
 empm0		at empb0		# ELBOX Mediator PCI Power Management
 pci*		at empb0
+pci*		at em4k0
 
 #cv3dpb*	at zbus0		# CyberVision 64/3D PCI bridge
 

Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.168 src/sys/arch/amiga/conf/files.amiga:1.169
--- src/sys/arch/amiga/conf/files.amiga:1.168	Mon Jan 28 14:54:51 2013
+++ src/sys/arch/amiga/conf/files.amiga	Tue Jan 29 00:52:50 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.168 2013/01/28 14:54:51 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.169 2013/01/29 00:52:50 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -552,6 +552,10 @@ device	empb: pcibus, amibus_empb, empmde
 attach	empb at zbus
 file	arch/amiga/pci/empb.c		empb  pci  empm
 
+device	em4k: pcibus
+attach	em4k at zbus
+file	arch/amiga/pci/em4k.c		em4k  pci
+
 device	emmem {}
 attach	emmem at zbus
 file	arch/amiga/pci/emmem.c		emmem



CVS commit: src/sys/dev

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Jan 29 00:54:13 UTC 2013

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add em4k, also forgotten empb.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.283 src/sys/dev/DEVNAMES:1.284
--- src/sys/dev/DEVNAMES:1.283	Mon Jan 28 15:14:21 2013
+++ src/sys/dev/DEVNAMES	Tue Jan 29 00:54:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.283 2013/01/28 15:14:21 rkujawa Exp $
+#	$NetBSD: DEVNAMES,v 1.284 2013/01/29 00:54:13 rkujawa Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -406,6 +406,8 @@ el			MI
 elink			MI		Attribute
 elmc			MI (MCA)
 emac			evbppc
+em4k			amiga
+empb			amiga
 empm			amiga
 empsc			amiga
 empsc			amigappc



CVS commit: src/doc

2013-01-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Jan 29 00:56:48 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Note new em4k(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1785 -r1.1786 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1785 src/doc/CHANGES:1.1786
--- src/doc/CHANGES:1.1785	Mon Jan 28 15:48:09 2013
+++ src/doc/CHANGES	Tue Jan 29 00:56:48 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1785 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1786 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -182,3 +182,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		SX bridges. [rkujawa 20130128]
 	amiga: Support software power-off with empm(4). [rkujawa 20130128]
 	dhcpcd(8): Import dhcpcd-5.6.7 [roy 20130128]
+	em4k(4): Add driver for Mediator 4000 PCI bridges. [rkujawa 20130129]



CVS commit: src/usr.sbin/makefs

2013-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 29 01:05:57 UTC 2013

Modified Files:
src/usr.sbin/makefs: cd9660.c

Log Message:
handle some of the options by the generic parser.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/makefs/cd9660.c

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

Modified files:

Index: src/usr.sbin/makefs/cd9660.c
diff -u src/usr.sbin/makefs/cd9660.c:1.39 src/usr.sbin/makefs/cd9660.c:1.40
--- src/usr.sbin/makefs/cd9660.c:1.39	Mon Jan 28 16:03:26 2013
+++ src/usr.sbin/makefs/cd9660.c	Mon Jan 28 20:05:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.c,v 1.39 2013/01/28 21:03:26 christos Exp $	*/
+/*	$NetBSD: cd9660.c,v 1.40 2013/01/29 01:05:57 christos Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: cd9660.c,v 1.39 2013/01/28 21:03:26 christos Exp $);
+__RCSID($NetBSD: cd9660.c,v 1.40 2013/01/29 01:05:57 christos Exp $);
 #endif  /* !__lint */
 
 #include string.h
@@ -272,6 +272,28 @@ cd9660_prep_opts(fsinfo_t *fsopts)
 		  OPT_STRARRAY, 1,
 		  sizeof(diskStructure-primaryDescriptor.volume_id),
 		  Disk Label },
+	{ 'R', rockridge, diskStructure-rock_ridge_enabled,
+		  OPT_INT32, 0, 1, Enable Rock-Ridge extensions },
+	{ 'A', archimedes, diskStructure-archimedes_enabled,
+		  OPT_INT32, 0, 1, Enable Archimedes structure },
+	{ '\0', chrp-boot, diskStructure-chrp_boot,
+		  OPT_INT32, 0, 1, Enable CHRP boot },
+	{ 'K', keep-bad-images, diskStructure-keep_bad_images,
+		  OPT_INT32, 0, 1, Keep bad images },
+	{ '\0', allow-deep-trees, diskStructure-allow_deep_trees,
+		  OPT_INT32, 0, 1, Allow trees more than 8 levels },
+	{ '\0', allow-max-name, diskStructure-allow_max_name,
+		  OPT_INT32, 0, 1, Allow 37 char filenames (unimplemented) },
+	{ '\0', allow-illegal-chars, 
+		  diskStructure-allow_illegal_chars,
+		  OPT_INT32, 0, 1, Allow illegal characters in filenames },
+	{ '\0', allow-lowercase, diskStructure-allow_lowercase,
+		  OPT_INT32, 0, 1, Allow lowercase characters in filenames },
+	{ '\0', allow-multidot, diskStructure-allow_multidot,
+		  OPT_INT32, 0, 1, Allow multiple periods in filenames },
+	{ '\0', omit-trailing-period,
+		  diskStructure-omit_trailing_period,
+		  OPT_INT32, 0, 1, Omit trailing periods in filenames },
 		{ .name = NULL }
 	};
 
@@ -392,26 +414,6 @@ cd9660_parse_opts(const char *option, fs
 	} else if (CD9660_IS_COMMAND_ARG(var, no-trailing-padding))
 		diskStructure-include_padding_areas = 0;
 	/* RRIP */
-	else if (CD9660_IS_COMMAND_ARG_DUAL(var, R, rockridge))
-		diskStructure-rock_ridge_enabled = 1;
-	else if (CD9660_IS_COMMAND_ARG_DUAL(var, A, archimedes))
-		diskStructure-archimedes_enabled = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, chrp-boot))
-		diskStructure-chrp_boot = 1;
-	else if (CD9660_IS_COMMAND_ARG_DUAL(var, K, keep-bad-images))
-		diskStructure-keep_bad_images = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, allow-deep-trees))
-		diskStructure-allow_deep_trees = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, allow-max-name))
-		diskStructure-allow_max_name = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, allow-illegal-chars))
-		diskStructure-allow_illegal_chars = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, allow-lowercase))
-		diskStructure-allow_lowercase = 1;
-	else if (CD9660_IS_COMMAND_ARG(var,allow-multidot))
-		diskStructure-allow_multidot = 1;
-	else if (CD9660_IS_COMMAND_ARG(var, omit-trailing-period))
-		diskStructure-omit_trailing_period = 1;
 	else if (CD9660_IS_COMMAND_ARG(var, no-emul-boot) ||
 		 CD9660_IS_COMMAND_ARG(var, no-boot) ||
 		 CD9660_IS_COMMAND_ARG(var, hard-disk-boot)) {



CVS commit: src/usr.sbin/makefs

2013-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 29 01:06:15 UTC 2013

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

Log Message:
deal with options that don't have a single letter argument.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/makefs/makefs.c

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

Modified files:

Index: src/usr.sbin/makefs/makefs.c
diff -u src/usr.sbin/makefs/makefs.c:1.41 src/usr.sbin/makefs/makefs.c:1.42
--- src/usr.sbin/makefs/makefs.c:1.41	Mon Jan 28 16:03:27 2013
+++ src/usr.sbin/makefs/makefs.c	Mon Jan 28 20:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makefs.c,v 1.41 2013/01/28 21:03:27 christos Exp $	*/
+/*	$NetBSD: makefs.c,v 1.42 2013/01/29 01:06:15 christos Exp $	*/
 
 /*
  * Copyright (c) 2001-2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: makefs.c,v 1.41 2013/01/28 21:03:27 christos Exp $);
+__RCSID($NetBSD: makefs.c,v 1.42 2013/01/29 01:06:15 christos Exp $);
 #endif	/* !__lint */
 
 #include assert.h
@@ -414,7 +414,9 @@ usage(fstype_t *fstype, fsinfo_t *fsopti
 
 		fprintf(stderr, \n%s specific options:\n, fstype-type);
 		for (i = 0; o[i].name != NULL; i++)
-			fprintf(stderr, \t%c,%20.20s\t%s\n, o[i].letter,
+			fprintf(stderr, \t%c%c%20.20s\t%s\n,
+			o[i].letter ? o[i].letter : ' ',
+			o[i].letter ? ',' : ' ',
 			o[i].name, o[i].desc);
 	}
 	exit(1);



CVS commit: src/sys/sys

2013-01-28 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Tue Jan 29 01:23:13 UTC 2013

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

Log Message:
Fix comment documenting __link_set_decl() macro.

The `__link_set_decl()` macro's replacement text includes a `*` after
`ptype`, so `ptype` is the pointed-at type (the type of a dereferenced
array entry), not the pointer type.

(This is a comment-only change.)

(From Richard Hansen of BBN.)


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/sys/cdefs.h

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

Modified files:

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.104 src/sys/sys/cdefs.h:1.105
--- src/sys/sys/cdefs.h:1.104	Wed Jan  2 17:02:13 2013
+++ src/sys/sys/cdefs.h	Tue Jan 29 01:23:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.104 2013/01/02 17:02:13 matt Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.105 2013/01/29 01:23:12 gdt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -468,7 +468,7 @@
  *
  *	__link_set_decl(set, ptype)
  *		Provide an extern declaration of the set `set', which
- *		contains an array of the pointer type `ptype'.  This
+ *		contains an array of pointers to type `ptype'.  This
  *		macro must be used by any code which wishes to reference
  *		the elements of a link set.
  *



CVS commit: src/usr.sbin/makefs

2013-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 29 01:52:05 UTC 2013

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

Log Message:
mention me


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/makefs/makefs.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/makefs/makefs.8
diff -u src/usr.sbin/makefs/makefs.8:1.42 src/usr.sbin/makefs/makefs.8:1.43
--- src/usr.sbin/makefs/makefs.8:1.42	Sun Jan 27 19:23:18 2013
+++ src/usr.sbin/makefs/makefs.8	Mon Jan 28 20:52:04 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: makefs.8,v 1.42 2013/01/28 00:23:18 christos Exp $
+.\	$NetBSD: makefs.8,v 1.43 2013/01/29 01:52:04 christos Exp $
 .\
 .\ Copyright (c) 2001-2003 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -402,3 +402,5 @@ utility appeared in
 (v7fs support),
 .An Tamas Toth
 (chfs support).
+.An Christos Zoulas
+(msdos support).



CVS commit: src/lib/libm/complex

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 29 02:05:09 UTC 2013

Modified Files:
src/lib/libm/complex: cabs.3 cacos.3 cacosh.3 carg.3 casin.3 casinh.3
catan.3 catanh.3 ccos.3 ccosh.3 cexp.3 clog.3 cpow.3 csin.3 csinh.3
csqrt.3 ctan.3 ctanh.3

Log Message:
Document long double versions of these routines.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/complex/cabs.3 \
src/lib/libm/complex/cacos.3 src/lib/libm/complex/cacosh.3 \
src/lib/libm/complex/carg.3 src/lib/libm/complex/casin.3 \
src/lib/libm/complex/casinh.3 src/lib/libm/complex/catan.3 \
src/lib/libm/complex/catanh.3 src/lib/libm/complex/ccos.3 \
src/lib/libm/complex/ccosh.3 src/lib/libm/complex/cexp.3 \
src/lib/libm/complex/clog.3 src/lib/libm/complex/cpow.3 \
src/lib/libm/complex/csin.3 src/lib/libm/complex/csinh.3 \
src/lib/libm/complex/csqrt.3 src/lib/libm/complex/ctan.3 \
src/lib/libm/complex/ctanh.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/libm/complex/cabs.3
diff -u src/lib/libm/complex/cabs.3:1.2 src/lib/libm/complex/cabs.3:1.3
--- src/lib/libm/complex/cabs.3:1.2	Thu Dec 27 21:34:09 2012
+++ src/lib/libm/complex/cabs.3	Tue Jan 29 02:05:08 2013
@@ -1,11 +1,12 @@
-.\ $NetBSD: cabs.3,v 1.2 2012/12/27 21:34:09 wiz Exp $
+.\ $NetBSD: cabs.3,v 1.3 2013/01/29 02:05:08 matt Exp $
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
-.Dd December 27, 2012
+.Dd January 29, 2013
 .Dt CABS 3
 .Os
 .Sh NAME
 .Nm cabs ,
-.Nm cabsf
+.Nm cabsf ,
+.Nm cabsl
 .Nd return a complex absolute value
 .Sh SYNOPSIS
 .In complex.h
@@ -13,6 +14,8 @@
 .Fn cabs double complex z
 .Ft float
 .Fn cabsf float complex z
+.Ft long double
+.Fn cabsl long double complex z
 .Sh DESCRIPTION
 These functions compute the complex absolute value (also called
 norm, modulus, or magnitude) of
Index: src/lib/libm/complex/cacos.3
diff -u src/lib/libm/complex/cacos.3:1.2 src/lib/libm/complex/cacos.3:1.3
--- src/lib/libm/complex/cacos.3:1.2	Thu Dec 27 21:34:10 2012
+++ src/lib/libm/complex/cacos.3	Tue Jan 29 02:05:08 2013
@@ -1,11 +1,12 @@
-.\ $NetBSD: cacos.3,v 1.2 2012/12/27 21:34:10 wiz Exp $
+.\ $NetBSD: cacos.3,v 1.3 2013/01/29 02:05:08 matt Exp $
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
-.Dd December 27, 2012
+.Dd January 29, 2013
 .Dt CACOS 3
 .Os
 .Sh NAME
 .Nm cacos ,
-.Nm cacosf
+.Nm cacosf ,
+.Nm cacosl
 .Nd complex arc cosine functions
 .Sh SYNOPSIS
 .In complex.h
@@ -13,6 +14,8 @@
 .Fn cacos double complex z
 .Ft float complex
 .Fn cacosf float complex z
+.Ft long double complex
+.Fn cacosl long double complex z
 .Sh DESCRIPTION
 These functions compute the complex arc cosine of
 .Ar z ,
Index: src/lib/libm/complex/cacosh.3
diff -u src/lib/libm/complex/cacosh.3:1.2 src/lib/libm/complex/cacosh.3:1.3
--- src/lib/libm/complex/cacosh.3:1.2	Thu Dec 27 21:34:10 2012
+++ src/lib/libm/complex/cacosh.3	Tue Jan 29 02:05:09 2013
@@ -1,11 +1,12 @@
-.\ $NetBSD: cacosh.3,v 1.2 2012/12/27 21:34:10 wiz Exp $
+.\ $NetBSD: cacosh.3,v 1.3 2013/01/29 02:05:09 matt Exp $
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
-.Dd December 27, 2012
+.Dd January 29, 2013
 .Dt CACOSH 3
 .Os
 .Sh NAME
 .Nm cacosh ,
-.Nm cacoshf
+.Nm cacoshf ,
+.Nm cacoshl
 .Nd complex arc hyperbolic cosine functions
 .Sh SYNOPSIS
 .In complex.h
@@ -13,6 +14,8 @@
 .Fn cacosh double complex z
 .Ft float complex
 .Fn cacoshf float complex z
+.Ft long double complex
+.Fn cacoshl long double complex z
 .Sh DESCRIPTION
 These functions compute the complex arc hyperbolic cosine of
 .Ar z ,
Index: src/lib/libm/complex/carg.3
diff -u src/lib/libm/complex/carg.3:1.2 src/lib/libm/complex/carg.3:1.3
--- src/lib/libm/complex/carg.3:1.2	Thu Dec 27 21:34:10 2012
+++ src/lib/libm/complex/carg.3	Tue Jan 29 02:05:09 2013
@@ -1,11 +1,12 @@
-.\ $NetBSD: carg.3,v 1.2 2012/12/27 21:34:10 wiz Exp $
+.\ $NetBSD: carg.3,v 1.3 2013/01/29 02:05:09 matt Exp $
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
-.Dd December 27, 2012
+.Dd January 29, 2013
 .Dt CARG 3
 .Os
 .Sh NAME
 .Nm carg ,
-.Nm cargf
+.Nm cargf ,
+.Nm cargl
 .Nd complex argument functions
 .Sh SYNOPSIS
 .In complex.h
@@ -13,6 +14,8 @@
 .Fn carg double complex z
 .Ft float
 .Fn cargf float complex z
+.Ft long double
+.Fn cargl long double complex z
 .Sh DESCRIPTION
 These functions compute the argument (also called phase angle)
 of
Index: src/lib/libm/complex/casin.3
diff -u src/lib/libm/complex/casin.3:1.2 src/lib/libm/complex/casin.3:1.3
--- src/lib/libm/complex/casin.3:1.2	Thu Dec 27 21:34:10 2012
+++ src/lib/libm/complex/casin.3	Tue Jan 29 02:05:09 2013
@@ -1,11 +1,12 @@
-.\ $NetBSD: casin.3,v 1.2 2012/12/27 21:34:10 wiz Exp $
+.\ $NetBSD: casin.3,v 1.3 2013/01/29 02:05:09 matt Exp $
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
-.Dd December 27, 2012
+.Dd January 29, 2013
 .Dt CASIN 

CVS commit: src/lib/libm/man

2013-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 29 02:54:30 UTC 2013

Modified Files:
src/lib/libm/man: acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3

Log Message:
Document the long double versions.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libm/man/acos.3 src/lib/libm/man/asin.3 \
src/lib/libm/man/atan.3 src/lib/libm/man/atan2.3
cvs rdiff -u -r1.15 -r1.16 src/lib/libm/man/acosh.3 src/lib/libm/man/asinh.3 \
src/lib/libm/man/atanh.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/libm/man/acos.3
diff -u src/lib/libm/man/acos.3:1.16 src/lib/libm/man/acos.3:1.17
--- src/lib/libm/man/acos.3:1.16	Thu Aug  7 16:44:46 2003
+++ src/lib/libm/man/acos.3	Tue Jan 29 02:54:30 2013
@@ -26,14 +26,15 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)acos.3	5.1 (Berkeley) 5/2/91
-.\	$NetBSD: acos.3,v 1.16 2003/08/07 16:44:46 agc Exp $
+.\	$NetBSD: acos.3,v 1.17 2013/01/29 02:54:30 matt Exp $
 .\
-.Dd May 2, 1991
+.Dd January 29, 2013
 .Dt ACOS 3
 .Os
 .Sh NAME
 .Nm acos ,
-.Nm acosf
+.Nm acosf ,
+.Nm acosl
 .Nd arc cosine function
 .Sh LIBRARY
 .Lb libm
@@ -43,20 +44,24 @@
 .Fn acos double x
 .Ft float
 .Fn acosf float x
+.Ft long double
+.Fn acosl long double x
 .Sh DESCRIPTION
 The
-.Fn acos
+.Fn acos ,
+.Fn acosf ,
 and
-.Fn acosf
+.Fn acosl
 functions compute the principal value of the arc cosine of
 .Fa x
 in the range
 .Bq 0 , \*(Pi .
 .Sh RETURN VALUES
 If |x|\*[Gt]1,
-.Fn acos x
+.Fn acos x ,
+.Fn acosf x ,
 and
-.Fn acosf x
+.Fn acosl x
 .\ POSIX_MODE
 set the global variable
 .Va errno
@@ -80,4 +85,4 @@ to EDOM.
 The
 .Fn acos
 function conforms to
-.St -ansiC .
+.St -isoC-99 .
Index: src/lib/libm/man/asin.3
diff -u src/lib/libm/man/asin.3:1.16 src/lib/libm/man/asin.3:1.17
--- src/lib/libm/man/asin.3:1.16	Thu Aug  7 16:44:46 2003
+++ src/lib/libm/man/asin.3	Tue Jan 29 02:54:30 2013
@@ -26,14 +26,15 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)asin.3	5.1 (Berkeley) 5/2/91
-.\	$NetBSD: asin.3,v 1.16 2003/08/07 16:44:46 agc Exp $
+.\	$NetBSD: asin.3,v 1.17 2013/01/29 02:54:30 matt Exp $
 .\
-.Dd May 2, 1991
+.Dd January 29, 2013
 .Dt ASIN 3
 .Os
 .Sh NAME
 .Nm asin ,
-.Nm asinf
+.Nm asinf ,
+.Nm asinl
 .Nd arc sine function
 .Sh LIBRARY
 .Lb libm
@@ -43,11 +44,14 @@
 .Fn asin double x
 .Ft float
 .Fn asinf float x
+.Ft long double
+.Fn asinl long double x
 .Sh DESCRIPTION
 The
-.Fn asin
+.Fn asin ,
+.Fn asinf ,
 and
-.Fn asinf
+.Fn asinl
 functions compute the principal value of the arc sine of
 .Fa x
 in the range
@@ -57,9 +61,10 @@ in the range
 .Sh RETURN VALUES
 .\ POSIX_MODE
 If |x|\*[Gt]1,
-.Fn asin x
+.Fn asin x ,
+.Fn asinf x ,
 and
-.Fn asinf x
+.Fn asinl x
 return NaN and set the global variable
 .Va errno
 to EDOM.
@@ -82,4 +87,4 @@ to EDOM.
 The
 .Fn asin
 function conforms to
-.St -ansiC .
+.St -isoC-99 .
Index: src/lib/libm/man/atan.3
diff -u src/lib/libm/man/atan.3:1.16 src/lib/libm/man/atan.3:1.17
--- src/lib/libm/man/atan.3:1.16	Thu Aug  7 16:44:46 2003
+++ src/lib/libm/man/atan.3	Tue Jan 29 02:54:30 2013
@@ -26,14 +26,15 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)atan.3	5.1 (Berkeley) 5/2/91
-.\	$NetBSD: atan.3,v 1.16 2003/08/07 16:44:46 agc Exp $
+.\	$NetBSD: atan.3,v 1.17 2013/01/29 02:54:30 matt Exp $
 .\
-.Dd May 2, 1991
+.Dd January 29, 2013
 .Dt ATAN 3
 .Os
 .Sh NAME
 .Nm atan ,
-.Nm atanf
+.Nm atanf ,
+.Nm atanl
 .Nd arc tangent function of one variable
 .Sh LIBRARY
 .Lb libm
@@ -43,11 +44,14 @@
 .Fn atan double x
 .Ft float
 .Fn atanf float x
+.Ft long double
+.Fn atanl long double x
 .Sh DESCRIPTION
 The
-.Fn atan
+.Fn atan ,
+.Fn atanf ,
 and
-.Fn atanf
+.Fn atanl
 functions compute the principal value of the arc tangent of
 .Fa x
 in the range
@@ -74,4 +78,4 @@ in the range
 The
 .Fn atan
 functions conforms to
-.St -ansiC .
+.St -isoC-99 .
Index: src/lib/libm/man/atan2.3
diff -u src/lib/libm/man/atan2.3:1.16 src/lib/libm/man/atan2.3:1.17
--- src/lib/libm/man/atan2.3:1.16	Thu Aug  7 16:44:46 2003
+++ src/lib/libm/man/atan2.3	Tue Jan 29 02:54:30 2013
@@ -26,14 +26,15 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)atan2.3	5.1 (Berkeley) 5/2/91
-.\	$NetBSD: atan2.3,v 1.16 2003/08/07 16:44:46 agc Exp $
+.\	$NetBSD: atan2.3,v 1.17 2013/01/29 02:54:30 matt Exp $
 .\
-.Dd May 2, 1991
+.Dd January 29, 2013
 .Dt ATAN2 3
 .Os
 .Sh NAME
 .Nm atan2 ,
-.Nm atan2f
+.Nm atan2f ,
+.Nm atan2l
 .Nd arc tangent function of two variables
 .Sh LIBRARY
 .Lb libm
@@ -43,11 +44,14 @@
 .Fn atan2 double y double x
 .Ft float
 .Fn atan2f float y float x
+.Ft long double
+.Fn atan2l long double y long double x
 .Sh DESCRIPTION
 The
-.Fn atan2
+.Fn atan2 ,
+.Fn atan2f ,
 and
-.Fn atan2f
+.Fn atan2l
 functions compute the principal value of the arc tangent of
 .Ar y/ Ns Ar x ,
 using the signs of both arguments to determine the quadrant of
@@ -189,4 +193,4 @@ r := \(sr(x\(**x+y\(**y);\0\0if r = 0 th
 The
 .Fn atan2
 function conforms to
-.St -ansiC .
+.St -isoC-99 .