CVS commit: src/lib/libc/gen

2009-04-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 20 08:37:22 UTC 2009

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

Log Message:
Remove duplicate 'the' found by Jukka Salmi.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gen/makecontext.3

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

Modified files:

Index: src/lib/libc/gen/makecontext.3
diff -u src/lib/libc/gen/makecontext.3:1.6 src/lib/libc/gen/makecontext.3:1.7
--- src/lib/libc/gen/makecontext.3:1.6	Thu Apr 16 18:37:30 2009
+++ src/lib/libc/gen/makecontext.3	Mon Apr 20 08:37:22 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: makecontext.3,v 1.6 2009/04/16 18:37:30 wiz Exp $
+.\	$NetBSD: makecontext.3,v 1.7 2009/04/20 08:37:22 wiz Exp $
 .\
 .\ Copyright (c) 2001, 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -115,7 +115,6 @@
 The
 .Fa oucp
 argument or the
-the
 .Fa ucp
 argument points to an invalid address.
 .It Bq Er EINVAL



CVS commit: src

2009-04-20 Thread Martin Schuette
Module Name:src
Committed By:   mschuett
Date:   Mon Apr 20 09:56:08 UTC 2009

Modified Files:
src/share/man/man3: queue.3
src/sys/dev/ieee1394: fw_port.h
src/sys/sys: queue.h
src/usr.sbin/syslogd: syslogd.h

Log Message:
Add queue macros SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE, STAILQ_LAST,
SIMPLEQ_CONCAT, and SIMPLEQ_LAST.

Remove seperate definitions outside of queue.h.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/share/man/man3/queue.3
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ieee1394/fw_port.h
cvs rdiff -u -r1.51 -r1.52 src/sys/sys/queue.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/syslogd/syslogd.h

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/man3/queue.3
diff -u src/share/man/man3/queue.3:1.41 src/share/man/man3/queue.3:1.42
--- src/share/man/man3/queue.3:1.41	Wed Mar 11 08:29:56 2009
+++ src/share/man/man3/queue.3	Mon Apr 20 09:56:07 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: queue.3,v 1.41 2009/03/11 08:29:56 wiz Exp $
+.\	$NetBSD: queue.3,v 1.42 2009/04/20 09:56:07 mschuett Exp $
 .\
 .\ Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -66,6 +66,7 @@
 .Nm SLIST_REMOVE_HEAD ,
 .Nm SLIST_REMOVE ,
 .Nm SLIST_FOREACH ,
+.Nm SLIST_FOREACH_SAFE ,
 .Nm SLIST_EMPTY ,
 .Nm SLIST_FIRST ,
 .Nm SLIST_NEXT ,
@@ -83,6 +84,8 @@
 .Nm SIMPLEQ_EMPTY ,
 .Nm SIMPLEQ_FIRST ,
 .Nm SIMPLEQ_NEXT ,
+.Nm SIMPLEQ_LAST ,
+.Nm SIMPLEQ_CONCAT ,
 .Nm STAILQ_HEAD ,
 .Nm STAILQ_HEAD_INITIALIZER ,
 .Nm STAILQ_ENTRY ,
@@ -93,9 +96,11 @@
 .Nm STAILQ_REMOVE_HEAD ,
 .Nm STAILQ_REMOVE ,
 .Nm STAILQ_FOREACH ,
+.Nm STAILQ_FOREACH_SAFE ,
 .Nm STAILQ_EMPTY ,
 .Nm STAILQ_FIRST ,
 .Nm STAILQ_NEXT ,
+.Nm STAILQ_LAST ,
 .Nm STAILQ_CONCAT ,
 .Nm LIST_HEAD ,
 .Nm LIST_HEAD_INITIALIZER ,
@@ -159,6 +164,7 @@
 .Fn SLIST_REMOVE_HEAD SLIST_HEAD *head SLIST_ENTRY NAME
 .Fn SLIST_REMOVE SLIST_HEAD *head TYPE *elm TYPE SLIST_ENTRY NAME
 .Fn SLIST_FOREACH TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME
+.Fn SLIST_FOREACH_SAFE TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME TYPE *tmp
 .Ft int
 .Fn SLIST_EMPTY SLIST_HEAD *head
 .Ft TYPE *
@@ -183,6 +189,9 @@
 .Fn SIMPLEQ_FIRST SIMPLEQ_HEAD *head
 .Ft TYPE *
 .Fn SIMPLEQ_NEXT TYPE *elm SIMPLEQ_ENTRY NAME
+.Ft TYPE *
+.Fn SIMPLEQ_LAST SIMPLEQ_HEAD *head TYPE *elm SIMPLEQ_ENTRY NAME
+.Fn SIMPLEQ_CONCAT SIMPLEQ_HEAD *head1 SIMPLEQ_HEAD *head2
 .sp
 .Fn STAILQ_HEAD HEADNAME TYPE
 .Fn STAILQ_HEAD_INITIALIZER head
@@ -194,12 +203,15 @@
 .Fn STAILQ_REMOVE_HEAD STAILQ_HEAD *head STAILQ_ENTRY NAME
 .Fn STAILQ_REMOVE STAILQ_HEAD *head TYPE *elm TYPE STAILQ_ENTRY NAME
 .Fn STAILQ_FOREACH TYPE *var STAILQ_HEAD *head STAILQ_ENTRY NAME
+.Fn STAILQ_FOREACH_SAFE TYPE *var STAILQ_HEAD *head STAILQ_ENTRY NAME TYPE *tmp
 .Ft int
 .Fn STAILQ_EMPTY STAILQ_HEAD *head
 .Ft TYPE *
 .Fn STAILQ_FIRST STAILQ_HEAD *head
 .Ft TYPE *
 .Fn STAILQ_NEXT TYPE *elm STAILQ_ENTRY NAME
+.Ft TYPE *
+.Fn STAILQ_LAST STAILQ_HEAD *head TYPE *elm STAILQ_ENTRY NAME
 .Fn STAILQ_CONCAT STAILQ_HEAD *head1 STAILQ_HEAD *head2
 .sp
 .Fn LIST_HEAD HEADNAME TYPE
@@ -414,14 +426,14 @@
 _INSERT_BEFORE:-:+:-:-:+:+
 _INSERT_HEAD:+:+:+:+:+:+
 _INSERT_TAIL:-:-:+:+:+:+
-_LAST:-:-:-:-:+:+
+_LAST:-:-:-:+:+:+
 _LOOP_NEXT:-:-:-:-:-:+
 _LOOP_PREV:-:-:-:-:-:+
 _NEXT:+:+:+:+:+:+
 _PREV:-:-:-:-:+:+
 _REMOVE:+:+:+:+:+:+
 _REMOVE_HEAD:+:-:+:+:-:-
-_CONCAT:-:-:-:+:+:-
+_CONCAT:-:-:+:+:+:-
 .TE
 .Sh SINGLY-LINKED LISTS
 A singly-linked list is headed by a structure defined by the
@@ -482,6 +494,12 @@
 turn to
 .Fa var .
 .Pp
+The SAFE versions uses
+.Fa tmp
+to hold the next element, so
+.Fa var
+may be freed or removed from the list.
+.Pp
 The macro
 .Nm SLIST_INIT
 initializes the list referenced by
@@ -672,6 +690,20 @@
 returns the element after the element
 .Fa elm .
 .Pp
+The macro
+.Nm SIMPLEQ_LAST
+returns the last item on the tail queue.
+If the tail queue is empty the return value is
+.Dv NULL .
+.Pp
+The macro
+.Nm SIMPLEQ_CONCAT
+concatenates the tail queue headed by
+.Fa head2
+onto the end of the one headed by
+.Fa head1
+removing all entries from the former.
+.Pp
 The macros prefixed with
 .Dq Nm STAILQ_
 .Nm ( STAILQ_HEAD ,
@@ -684,10 +716,13 @@
 .Nm STAILQ_REMOVE_HEAD ,
 .Nm STAILQ_REMOVE ,
 .Nm STAILQ_FOREACH ,
+.Nm STAILQ_FOREACH_SAFE ,
 .Nm STAILQ_EMPTY ,
 .Nm STAILQ_FIRST ,
+.Nm STAILQ_NEXT ,
+.Nm STAILQ_LAST ,
 and
-.Nm STAILQ_NEXT )
+.Nm STAILQ_CONCAT )
 are functionally identical to these simple queue functions,
 and are provided for compatibility with
 .Fx .

Index: src/sys/dev/ieee1394/fw_port.h
diff -u src/sys/dev/ieee1394/fw_port.h:1.31 src/sys/dev/ieee1394/fw_port.h:1.32
--- src/sys/dev/ieee1394/fw_port.h:1.31	Wed Mar 18 16:00:18 2009
+++ src/sys/dev/ieee1394/fw_port.h	Mon Apr 20 09:56:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fw_port.h,v 1.31 2009/03/18 16:00:18 cegger Exp $	*/
+/*	$NetBSD: fw_port.h,v 1.32 2009/04/20 09:56:07 mschuett Exp $	*/
 /*
  * Copyright (c) 2004 

CVS commit: src/sys/arch/mips/alchemy/dev

2009-04-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Apr 20 12:11:50 UTC 2009

Modified Files:
src/sys/arch/mips/alchemy/dev: ausmbus_psc.c

Log Message:
One more implementation of the quick_{read,write} I2C protocol.  Note
that this is currently used only by the I2C_SCAN code (disabled by
default).

XXX Not tested due to lack of hardware.  Reviewed by simon@ and sh...@.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/alchemy/dev/ausmbus_psc.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/mips/alchemy/dev/ausmbus_psc.c
diff -u src/sys/arch/mips/alchemy/dev/ausmbus_psc.c:1.8 src/sys/arch/mips/alchemy/dev/ausmbus_psc.c:1.9
--- src/sys/arch/mips/alchemy/dev/ausmbus_psc.c:1.8	Wed Oct 17 19:55:35 2007
+++ src/sys/arch/mips/alchemy/dev/ausmbus_psc.c	Mon Apr 20 12:11:50 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ausmbus_psc.c,v 1.8 2007/10/17 19:55:35 garbled Exp $ */
+/* $NetBSD: ausmbus_psc.c,v 1.9 2009/04/20 12:11:50 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2006 Shigeyuki Fukushima.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ausmbus_psc.c,v 1.8 2007/10/17 19:55:35 garbled Exp $);
+__KERNEL_RCSID(0, $NetBSD: ausmbus_psc.c,v 1.9 2009/04/20 12:11:50 pgoyette Exp $);
 
 #include locators.h
 
@@ -85,6 +85,8 @@
 size_t buflen, int flags);
 
 /* subroutine functions for i2c_controller */
+static int	ausmbus_quick_write(struct ausmbus_softc *);
+static int	ausmbus_quick_read(struct ausmbus_softc *);
 static int	ausmbus_receive_1(struct ausmbus_softc *, uint8_t *);
 static int	ausmbus_read_1(struct ausmbus_softc *, uint8_t, uint8_t *);
 static int	ausmbus_read_2(struct ausmbus_softc *, uint8_t, uint16_t *);
@@ -233,6 +235,11 @@
 		return ausmbus_read_2(sc, *cmd, (uint16_t *)vbuf);
 	}
 
+	/* Read quick */
+	if ((I2C_OP_READ_P(op))  (cmdlen == 0)  (buflen == 0)) {
+		return ausmbus_quick_read(sc);
+	}
+
 	/* Send byte */
 	if ((I2C_OP_WRITE_P(op))  (cmdlen == 0)  (buflen == 1)) {
 		return ausmbus_send_1(sc, *((uint8_t *)vbuf));
@@ -248,13 +255,19 @@
 		return ausmbus_write_2(sc, *cmd, *((uint16_t *)vbuf));
 	}
 
+	/* Write quick */
+	if ((I2C_OP_WRITE_P(op))  (cmdlen == 0)  (buflen == 0)) {
+		return ausmbus_quick_write(sc);
+	}
+
 	/*
 	 * XXX: TODO Please Support other protocols defined in SMBus 2.0
-	 * - Quick Command
 	 * - Process call
 	 * - Block write/read
 	 * - Clock write-block read process cal
 	 * - SMBus host notify protocol
+	 *
+	 * - Read quick and write quick have not been tested!
 	 */
 
 	return -1;
@@ -414,6 +427,23 @@
 	return 0;
 }
 
+/*
+ * XXX The quick_write() and quick_read() routines have not been tested!
+ */
+static int
+ausmbus_quick_write(struct ausmbus_softc *sc)
+{
+	return ausmbus_initiate_xfer(sc, sc-sc_smbus_slave_addr,
+			I2C_F_STOP | I2C_F_WRITE);
+}
+
+static int
+ausmbus_quick_read(struct ausmbus_softc *sc)
+{
+	return ausmbus_initiate_xfer(sc, sc-sc_smbus_slave_addr,
+			I2C_F_STOP | I2C_F_READ);
+}
+
 static int
 ausmbus_wait_mastertx(struct ausmbus_softc *sc)
 {
@@ -494,6 +524,8 @@
 	v = (addr  1)  SMBUS_TXRX_ADDRDATA;
 	if ((flags  I2C_F_READ) != 0)
 		v |= 1;
+	if ((flags  I2C_F_STOP) != 0)
+		v |= SMBUS_TXRX_STP;
 	ausmbus_reg_write(sc, AUPSC_SMBTXRX, v);
 
 	/* Master Start */



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

2009-04-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Apr 20 12:55:02 UTC 2009

Modified Files:
src/sys/arch/arm/xscale: pxa2x0_i2c.c pxa2x0_i2c.h

Log Message:
One more i2c quick_{read,write} update.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xscale/pxa2x0_i2c.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/xscale/pxa2x0_i2c.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/xscale/pxa2x0_i2c.c
diff -u src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.3 src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.4
--- src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.3	Wed Oct 17 19:53:44 2007
+++ src/sys/arch/arm/xscale/pxa2x0_i2c.c	Mon Apr 20 12:55:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxa2x0_i2c.c,v 1.3 2007/10/17 19:53:44 garbled Exp $	*/
+/*	$NetBSD: pxa2x0_i2c.c,v 1.4 2009/04/20 12:55:02 pgoyette Exp $	*/
 /*	$OpenBSD: pxa2x0_i2c.c,v 1.2 2005/05/26 03:52:07 pascoe Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pxa2x0_i2c.c,v 1.3 2007/10/17 19:53:44 garbled Exp $);
+__KERNEL_RCSID(0, $NetBSD: pxa2x0_i2c.c,v 1.4 2009/04/20 12:55:02 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -235,6 +235,61 @@
 	return EIO;
 }
 
+/*
+ * XXX The quick_{read,write} opertions are untested!
+ */
+int
+pxa2x0_i2c_quick(struct pxa2x0_i2c_softc *sc, u_char slave, u_char rw)
+{
+	bus_space_tag_t iot = sc-sc_iot;
+	bus_space_handle_t ioh = sc-sc_ioh;
+	int timeout;
+	int tries = I2C_RETRY_COUNT;
+	uint32_t rv;
+
+retry:
+	bus_space_write_4(iot, ioh, I2C_ICR, ICR_UR);
+	bus_space_write_4(iot, ioh, I2C_ISAR, 0x00);
+	bus_space_write_4(iot, ioh, I2C_ISR, ISR_ITE);
+	delay(1);
+	bus_space_write_4(iot, ioh, I2C_ICR, ICR_IUE | ICR_SCLE);
+
+	/* Write slave device address. */
+	bus_space_write_4(iot, ioh, I2C_IDBR, (slave1) | (rw  1));
+	rv = bus_space_read_4(iot, ioh, I2C_ICR);
+	bus_space_write_4(iot, ioh, I2C_ICR, rv | ICR_START);
+	rv = bus_space_read_4(iot, ioh, I2C_ICR);
+	bus_space_write_4(iot, ioh, I2C_ICR, rv | ICR_STOP);
+	rv = bus_space_read_4(iot, ioh, I2C_ICR);
+
+	timeout = 1;
+	while ((bus_space_read_4(iot, ioh, I2C_ISR)  ISR_ITE) == 0) {
+		if (timeout-- == 0)
+			goto err;
+		delay(1);
+	}
+	if ((bus_space_read_4(iot, ioh, I2C_ISR)  ISR_ACKNAK) != 0)
+		goto err;
+
+	bus_space_write_4(iot, ioh, I2C_ISR, ISR_ITE);
+
+	rv = bus_space_read_4(iot, ioh, I2C_ICR);
+	bus_space_write_4(iot, ioh, I2C_ICR, rv  ~ICR_STOP);
+
+	return 0;
+
+err:
+	if (tries-- = 0)
+		goto retry;
+
+	bus_space_write_4(iot, ioh, I2C_ICR, ICR_UR);
+	bus_space_write_4(iot, ioh, I2C_ISAR, 0x00);
+	bus_space_write_4(iot, ioh, I2C_ISR, ISR_ITE);
+	bus_space_write_4(iot, ioh, I2C_ICR, ICR_IUE | ICR_SCLE);
+
+	return EIO;
+}
+
 int
 pxa2x0_i2c_write_2(struct pxa2x0_i2c_softc *sc, u_char slave, u_short value)
 {

Index: src/sys/arch/arm/xscale/pxa2x0_i2c.h
diff -u src/sys/arch/arm/xscale/pxa2x0_i2c.h:1.1 src/sys/arch/arm/xscale/pxa2x0_i2c.h:1.2
--- src/sys/arch/arm/xscale/pxa2x0_i2c.h:1.1	Sun Dec 17 16:03:33 2006
+++ src/sys/arch/arm/xscale/pxa2x0_i2c.h	Mon Apr 20 12:55:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxa2x0_i2c.h,v 1.1 2006/12/17 16:03:33 peter Exp $	*/
+/*	$NetBSD: pxa2x0_i2c.h,v 1.2 2009/04/20 12:55:02 pgoyette Exp $	*/
 /*	$OpenBSD: pxa2x0_i2c.h,v 1.2 2005/05/26 03:52:07 pascoe Exp $	*/
 
 /*
@@ -37,5 +37,6 @@
 int	pxa2x0_i2c_read(struct pxa2x0_i2c_softc *sc, u_char, u_char *);
 int	pxa2x0_i2c_write(struct pxa2x0_i2c_softc *, u_char, u_char);
 int	pxa2x0_i2c_write_2(struct pxa2x0_i2c_softc *, u_char, u_short);
+int	pxa2x0_i2c_quick(struct pxa2x0_i2c_softc *sc, u_char slave, u_char rw);
 
 #endif



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

2009-04-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Apr 20 12:58:33 UTC 2009

Modified Files:
src/sys/arch/evbarm/gumstix: gxiic.c

Log Message:
Missed this file in previous commit.  This finished updates required
to enable support of i2c quick_{read,write} operations.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/gumstix/gxiic.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/gumstix/gxiic.c
diff -u src/sys/arch/evbarm/gumstix/gxiic.c:1.3 src/sys/arch/evbarm/gumstix/gxiic.c:1.4
--- src/sys/arch/evbarm/gumstix/gxiic.c:1.3	Sun May 11 08:23:17 2008
+++ src/sys/arch/evbarm/gumstix/gxiic.c	Mon Apr 20 12:58:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gxiic.c,v 1.3 2008/05/11 08:23:17 kiyohara Exp $ */
+/*	$NetBSD: gxiic.c,v 1.4 2009/04/20 12:58:33 pgoyette Exp $ */
 /*
  * Copyright (c) 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gxiic.c,v 1.3 2008/05/11 08:23:17 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gxiic.c,v 1.4 2009/04/20 12:58:33 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -173,5 +173,10 @@
 			addr, *(u_short *)vbuf);
 	}
 
+	/* Handle quick_read/quick_write ops - XXX Untested XXX */
+	if ((cmdlen == 0)  (buflen == 0))
+		rv = pxa2x0_i2c_quick(sc-sc_pxa_i2c, addr,
+			I2C_OP_READ_P(op)?1:0);
+
 	return rv;
 }



CVS commit: src/sys/arch/alpha/stand

2009-04-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Apr 20 13:15:12 UTC 2009

Modified Files:
src/sys/arch/alpha/stand: Makefile.bootprogs

Log Message:
Set STRIPFLAG= after ${MAKECONF} is included by bsd.own.mk via bsd.prog.mk.
Fixes PR install/40492.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/stand/Makefile.bootprogs

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/alpha/stand/Makefile.bootprogs
diff -u src/sys/arch/alpha/stand/Makefile.bootprogs:1.29 src/sys/arch/alpha/stand/Makefile.bootprogs:1.30
--- src/sys/arch/alpha/stand/Makefile.bootprogs:1.29	Mon Apr 13 12:18:56 2009
+++ src/sys/arch/alpha/stand/Makefile.bootprogs	Mon Apr 20 13:15:12 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootprogs,v 1.29 2009/04/13 12:18:56 tsutsui Exp $
+# $NetBSD: Makefile.bootprogs,v 1.30 2009/04/20 13:15:12 tsutsui Exp $
 
 .include bsd.sys.mk		# for HOST_SH
 
@@ -6,7 +6,6 @@
 
 .PATH:	${.CURDIR}/../common
 
-STRIPFLAG=
 BINMODE= 444
 
 STRIP?=	strip
@@ -112,6 +111,7 @@
 .include bsd.prog.mk
 .include bsd.klinks.mk
 
+STRIPFLAG=	# override values in ${MAKECONF}
 COPTS+=-Os	# override -O supplied by user
 
 ### find out what to use for libkern



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:17:35 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: nattraversal.c

Log Message:
Fix a memory leak in nat-t keepalive code.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.9 src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.10
--- src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.9	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c	Mon Apr 20 13:17:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: nattraversal.c,v 1.9 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: nattraversal.c,v 1.10 2009/04/20 13:17:35 tteras Exp $	*/
 
 /*
  * Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany.
@@ -325,6 +325,15 @@
   iph1-natt_flags |= NAT_ANNOUNCED;
 }
 
+static void
+natt_keepalive_delete (struct natt_ka_addrs *ka)
+{
+  TAILQ_REMOVE (ka_tree, ka, chain);
+  racoon_free (ka-src);
+  racoon_free (ka-dst);
+  racoon_free (ka);
+}
+
 /* NAT keepalive functions */
 static void
 natt_keepalive_send (struct sched *param)
@@ -339,8 +348,7 @@
 
 s = myaddr_getfd(ka-src);
 if (s == -1) {
-  TAILQ_REMOVE (ka_tree, ka, chain);
-  racoon_free (ka);
+  natt_keepalive_delete(ka);
   continue;
 }
 plog (LLV_DEBUG, LOCATION, NULL, KA: %s\n, 
@@ -441,8 +449,7 @@
 
   plog (LLV_DEBUG, LOCATION, NULL, KA removing this one...\n);
 
-  TAILQ_REMOVE (ka_tree, ka, chain);
-  racoon_free (ka);
+  natt_keepalive_delete (ka);
   /* Should we break here? Every pair of addresses should 
  be inserted only once, but who knows :-) Lets traverse 
 	 the whole list... */



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:22:43 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: crypto_openssl.c

Log Message:
From Stephen Bevan: Fix a x509 signature verification memory leak.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.17 src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.18
--- src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.17	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c	Mon Apr 20 13:22:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto_openssl.c,v 1.17 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: crypto_openssl.c,v 1.18 2009/04/20 13:22:41 tteras Exp $	*/
 
 /* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
 
@@ -959,12 +959,14 @@
 	evp = X509_get_pubkey(x509);
 	if (! evp) {
 		plog(LLV_ERROR, LOCATION, NULL, X509_get_pubkey(): %s\n, eay_strerror());
+		X509_free(x509);
 		return -1;
 	}
 
 	res = eay_rsa_verify(source, sig, evp-pkey.rsa);
 
 	EVP_PKEY_free(evp);
+	X509_free(x509);
 
 	return res;
 }



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:24:36 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: isakmp.c isakmp.h isakmp_var.h

Log Message:
Fix a memory leak in certificate request generation.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c
cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/ipsec-tools/src/racoon/isakmp.h
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.53 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.54
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.53	Thu Mar 12 23:05:27 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c	Mon Apr 20 13:24:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp.c,v 1.53 2009/03/12 23:05:27 he Exp $	*/
+/*	$NetBSD: isakmp.c,v 1.54 2009/04/20 13:24:36 tteras Exp $	*/
 
 /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */
 
@@ -3029,7 +3029,8 @@
 }
 
 struct payload_list *
-isakmp_plist_append (struct payload_list *plist, vchar_t *payload, int payload_type)
+isakmp_plist_append_full (struct payload_list *plist, vchar_t *payload,
+			  u_int8_t payload_type, u_int8_t free_payload)
 {
 	if (! plist) {
 		plist = racoon_malloc (sizeof (struct payload_list));
@@ -3044,6 +3045,7 @@
 	plist-next = NULL;
 	plist-payload = payload;
 	plist-payload_type = payload_type;
+	plist-free_payload = free_payload;
 
 	return plist;
 }
@@ -3084,6 +3086,8 @@
 		p = set_isakmp_payload (p, ptr-payload, ptr-next ? ptr-next-payload_type : ISAKMP_NPTYPE_NONE);
 		first = ptr;
 		ptr = ptr-next;
+		if (first-free_payload)
+			vfree(first-payload);
 		racoon_free (first);
 		/* ptr-prev = NULL; first = NULL; ... omitted.  */
 		n++;

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.h:1.5 src/crypto/dist/ipsec-tools/src/racoon/isakmp.h:1.6
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp.h:1.5	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.h	Mon Apr 20 13:24:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp.h,v 1.5 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: isakmp.h,v 1.6 2009/04/20 13:24:36 tteras Exp $	*/
 
 /* Id: isakmp.h,v 1.11 2005/04/25 22:19:39 manubsd Exp */
 
@@ -379,7 +379,8 @@
 struct payload_list {
 	struct payload_list	*next, *prev;
 	vchar_t			*payload;
-	int			payload_type;
+	u_int8_t		payload_type;
+	u_int8_t		free_payload;
 };
 
 

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h:1.14 src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h:1.15
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h:1.14	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_var.h	Mon Apr 20 13:24:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_var.h,v 1.14 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: isakmp_var.h,v 1.15 2009/04/20 13:24:36 tteras Exp $	*/
 
 /* Id: isakmp_var.h,v 1.12 2005/05/07 14:45:31 manubsd Exp */
 
@@ -106,8 +106,19 @@
 extern caddr_t set_isakmp_header2 __P((vchar_t *, struct ph2handle *, int));
 extern caddr_t set_isakmp_payload __P((caddr_t, vchar_t *, int));
 
-extern struct payload_list *isakmp_plist_append __P((struct payload_list *plist, 
-	vchar_t *payload, int payload_type));
+extern struct payload_list *isakmp_plist_append_full __P((
+	struct payload_list *plist, vchar_t *payload,
+	u_int8_t payload_type, u_int8_t free));
+
+static inline struct payload_list *isakmp_plist_append(plist, payload, payload_type)
+	struct payload_list *plist;
+	vchar_t *payload;
+	u_int8_t payload_type;
+{
+	return isakmp_plist_append_full(plist, payload, payload_type, 0);
+}
+
+
 extern vchar_t *isakmp_plist_set_all __P((struct payload_list **plist,
 	struct ph1handle *iph1));
 



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:25:28 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
handler.c

Log Message:
From Paul Moore: Phase2 message id's should be unique wrt phase1, not
globally.


To generate a diff of this commit:
cvs rdiff -u -r1.9.6.7 -r1.9.6.8 \
src/crypto/dist/ipsec-tools/src/racoon/handler.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/handler.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.9.6.7 src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.9.6.8
--- src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.9.6.7	Fri Jan 11 14:12:00 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/handler.c	Mon Apr 20 13:25:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: handler.c,v 1.9.6.7 2008/01/11 14:12:00 vanhu Exp $	*/
+/*	$NetBSD: handler.c,v 1.9.6.8 2009/04/20 13:25:27 tteras Exp $	*/
 
 /* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */
 
@@ -479,7 +479,7 @@
 	struct ph2handle *p;
 
 	LIST_FOREACH(p, ph2tree, chain) {
-		if (p-msgid == msgid)
+		if (p-msgid == msgid  p-ph1 == iph1)
 			return p;
 	}
 



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:27:12 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
nattraversal.c

Log Message:
Fix a memory leak in nat-t keepalive code.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.6.1 \
src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.6 src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.6.6.1
--- src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c:1.6	Sat Sep  9 16:22:09 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/nattraversal.c	Mon Apr 20 13:27:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: nattraversal.c,v 1.6 2006/09/09 16:22:09 manu Exp $	*/
+/*	$NetBSD: nattraversal.c,v 1.6.6.1 2009/04/20 13:27:12 tteras Exp $	*/
 
 /*
  * Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany.
@@ -319,6 +319,15 @@
   iph1-natt_flags |= NAT_ANNOUNCED;
 }
 
+static void
+natt_keepalive_delete (struct natt_ka_addrs *ka)
+{
+  TAILQ_REMOVE (ka_tree, ka, chain);
+  racoon_free (ka-src);
+  racoon_free (ka-dst);
+  racoon_free (ka);
+}
+
 /* NAT keepalive functions */
 static void
 natt_keepalive_send (void *param)
@@ -333,8 +342,7 @@
 
 s = getsockmyaddr(ka-src);
 if (s == -1) {
-  TAILQ_REMOVE (ka_tree, ka, chain);
-  racoon_free (ka);
+  natt_keepalive_delete(ka);
   continue;
 }
 plog (LLV_DEBUG, LOCATION, NULL, KA: %s\n, 
@@ -435,8 +443,7 @@
 
   plog (LLV_DEBUG, LOCATION, NULL, KA removing this one...\n);
 
-  TAILQ_REMOVE (ka_tree, ka, chain);
-  racoon_free (ka);
+  natt_keepalive_delete (ka);
   /* Should we break here? Every pair of addresses should 
  be inserted only once, but who knows :-) Lets traverse 
 	 the whole list... */



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:32:57 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
admin.c racoonctl.c

Log Message:
Originally from Bin Li: Fix a crash with racoonctl logout user.


To generate a diff of this commit:
cvs rdiff -u -r1.17.6.2 -r1.17.6.3 \
src/crypto/dist/ipsec-tools/src/racoon/admin.c
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 \
src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/admin.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.17.6.2 src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.17.6.3
--- src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.17.6.2	Wed Jun 18 07:30:19 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/admin.c	Mon Apr 20 13:32:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: admin.c,v 1.17.6.2 2008/06/18 07:30:19 mgrooms Exp $	*/
+/*	$NetBSD: admin.c,v 1.17.6.3 2009/04/20 13:32:57 tteras Exp $	*/
 
 /* Id: admin.c,v 1.25 2006/04/06 14:31:04 manubsd Exp */
 
@@ -307,16 +307,18 @@
 #ifdef ENABLE_HYBRID
 	case ADMIN_LOGOUT_USER: {
 		struct ph1handle *iph1;
-		char *user;
-		int found = 0;
+		char user[LOGINLEN+1];
+		int found = 0, len = com-ac_len - sizeof(com);
 
-		if (com-ac_len  sizeof(com) + LOGINLEN + 1) {
+		if (len  LOGINLEN) {
 			plog(LLV_ERROR, LOCATION, NULL,
 			malformed message (login too long)\n);
 			break;
 		}
 
-		user = (char *)(com + 1);
+		memcpy(user, (char *)(com + 1), len);
+		user[len] = 0;
+
 		found = purgeph1bylogin(user);
 		plog(LLV_INFO, LOCATION, NULL, 
 		deleted %d SA for user \%s\\n, found, user);

Index: src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c:1.7.6.1 src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c:1.7.6.2
--- src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c:1.7.6.1	Tue Jul 15 00:55:48 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/racoonctl.c	Mon Apr 20 13:32:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: racoonctl.c,v 1.7.6.1 2008/07/15 00:55:48 mgrooms Exp $	*/
+/*	$NetBSD: racoonctl.c,v 1.7.6.2 2009/04/20 13:32:57 tteras Exp $	*/
 
 /*	Id: racoonctl.c,v 1.11 2006/04/06 17:06:25 manubsd Exp */
 
@@ -834,15 +834,17 @@
 	vchar_t *buf;
 	struct admin_com *head;
 	char *user;
+	size_t userlen;
 
 	/* need username */
 	if (ac  1)
 		errx(1, insufficient arguments);
 	user = av[0];
-	if ((user == NULL) || (strlen(user)  LOGINLEN))
+	userlen = strlen(user);
+	if ((user == NULL) || (userlen  LOGINLEN))
 		errx(1, bad login (too long?));
 
-	buf = vmalloc(sizeof(*head) + strlen(user) + 1);
+	buf = vmalloc(sizeof(*head) + userlen);
 	if (buf == NULL)
 		return NULL;
 
@@ -852,7 +854,7 @@
 	head-ac_errno = 0;
 	head-ac_proto = 0;
 
-	strncpy((char *)(head + 1), user, LOGINLEN);
+	strncpy((char *)(head + 1), user, userlen);
 
 	return buf;
 }



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:33:30 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
crypto_openssl.c

Log Message:
From Stephen Bevan: Fix a x509 signature verification memory leak.


To generate a diff of this commit:
cvs rdiff -u -r1.11.6.4 -r1.11.6.5 \
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.11.6.4 src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.11.6.5
--- src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.11.6.4	Tue Jul 15 00:55:48 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c	Mon Apr 20 13:33:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto_openssl.c,v 1.11.6.4 2008/07/15 00:55:48 mgrooms Exp $	*/
+/*	$NetBSD: crypto_openssl.c,v 1.11.6.5 2009/04/20 13:33:30 tteras Exp $	*/
 
 /* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
 
@@ -901,12 +901,14 @@
 	evp = X509_get_pubkey(x509);
 	if (! evp) {
 		plog(LLV_ERROR, LOCATION, NULL, X509_get_pubkey(): %s\n, eay_strerror());
+		X509_free(x509);
 		return -1;
 	}
 
 	res = eay_rsa_verify(source, sig, evp-pkey.rsa);
 
 	EVP_PKEY_free(evp);
+	X509_free(x509);
 
 	return res;
 }



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2009-04-20 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Mon Apr 20 13:35:36 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
isakmp_inf.c isakmp_xauth.c plog.c

Log Message:
Orignally from Bin Li: Fix possible memory corruption in binsanitize().


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.15 -r1.14.4.16 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
cvs rdiff -u -r1.11.6.1 -r1.11.6.2 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
cvs rdiff -u -r1.4.6.1 -r1.4.6.2 \
src/crypto/dist/ipsec-tools/src/racoon/plog.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.15 src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.16
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.15	Wed Sep 17 12:49:50 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c	Mon Apr 20 13:35:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_inf.c,v 1.14.4.15 2008/09/17 12:49:50 vanhu Exp $	*/
+/*	$NetBSD: isakmp_inf.c,v 1.14.4.16 2009/04/20 13:35:36 tteras Exp $	*/
 
 /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
 
@@ -339,8 +339,7 @@
 {
 	u_int type;
 	vchar_t *pbuf;
-	vchar_t *ndata;
-	char *nraw;
+	char *nraw, *ndata;
 	size_t l;
 	char *spi;
 
@@ -430,12 +429,12 @@
 		if (l  0) {
 			nraw = (char*)notify;	
 			nraw += sizeof(*notify) + notify-spi_size;
-			if ((ndata = vmalloc(l)) != NULL) {
-memcpy(ndata-v, nraw, ndata-l);
+			ndata = binsanitize(nraw, l);
+			if (ndata != NULL) {
 plog(LLV_ERROR, LOCATION, iph1-remote,
 Message: '%s'.\n, 
-binsanitize(ndata-v, ndata-l));
-vfree(ndata);
+ndata);
+racoon_free(ndata);
 			} else {
 plog(LLV_ERROR, LOCATION, iph1-remote,
 Cannot allocate memory\n);

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.11.6.1 src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.11.6.2
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.11.6.1	Tue Aug  7 04:49:24 2007
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c	Mon Apr 20 13:35:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_xauth.c,v 1.11.6.1 2007/08/07 04:49:24 manu Exp $	*/
+/*	$NetBSD: isakmp_xauth.c,v 1.11.6.2 2009/04/20 13:35:36 tteras Exp $	*/
 
 /* Id: isakmp_xauth.c,v 1.38 2006/08/22 18:17:17 manubsd Exp */
 
@@ -1372,8 +1372,7 @@
 	int ashort = 0;
 	int value = 0;
 	vchar_t *buffer = NULL;
-	char* mraw = NULL;
-	vchar_t *mdata = NULL;
+	char *mraw = NULL, *mdata;
 	char *data;
 	vchar_t *usr = NULL;
 	vchar_t *pwd = NULL;
@@ -1460,16 +1459,16 @@
 			dlen = ntohs(attr-lorv);
 			if (dlen  0) {
 mraw = (char*)(attr + 1);
-if ((mdata = vmalloc(dlen)) == NULL) {
+mdata = binsanitize(mraw, dlen);
+if (mdata == NULL) {
 	plog(LLV_ERROR, LOCATION, iph1-remote,
 	Cannot allocate memory\n);
 	return NULL;
 }
-memcpy(mdata-v, mraw, mdata-l);
 plog(LLV_NOTIFY,LOCATION, iph1-remote,
 	XAUTH Message: '%s'.\n,
-	binsanitize(mdata-v, mdata-l));
-vfree(mdata);
+	mdata);
+racoon_free(mdata);
 			}
 		}
 		return NULL;
@@ -1529,8 +1528,7 @@
 	char *data;
 	struct xauth_state *xst;
 	size_t dlen = 0;
-	char* mraw = NULL;
-	vchar_t *mdata = NULL;
+	char* mraw = NULL, *mdata;
 
 	if ((iph1-mode_cfg-flags  ISAKMP_CFG_VENDORID_XAUTH) == 0) {
 		plog(LLV_ERROR, LOCATION, NULL, 
@@ -1587,16 +1585,16 @@
 			dlen = ntohs(attr-lorv);
 			if (dlen  0) {
 mraw = (char*)(attr + 1);
-if ((mdata = vmalloc(dlen)) == NULL) {
+mdata = binsanitize(mraw, dlen);
+if (mdata == NULL) {
 	plog(LLV_ERROR, LOCATION, iph1-remote,
 	Cannot allocate memory\n);
 	return NULL;
 }
-memcpy(mdata-v, mraw, mdata-l);
 plog(LLV_NOTIFY,LOCATION, iph1-remote,
 	XAUTH Message: '%s'.\n,
-	binsanitize(mdata-v, mdata-l));
-vfree(mdata);
+	mdata);
+racoon_free(mdata);
 			}
 		}
 

Index: src/crypto/dist/ipsec-tools/src/racoon/plog.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.4.6.1 src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.4.6.2
--- src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.4.6.1	Tue Nov  6 16:41:27 2007
+++ src/crypto/dist/ipsec-tools/src/racoon/plog.c	Mon Apr 20 13:35:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: plog.c,v 1.4.6.1 2007/11/06 16:41:27 vanhu Exp $	*/
+/*	$NetBSD: plog.c,v 1.4.6.2 2009/04/20 13:35:36 tteras Exp $	*/
 
 /* Id: plog.c,v 1.11 2006/06/20 09:57:31 vanhu Exp */
 
@@ -251,15 +251,18 @@
 {
 	int p,q;
 	char* d;
+
+	d = racoon_malloc(n + 1);
 	for (p = 0, q = 0; p  n; p++) {
- if (isgraph((int)binstr[p])) {
-			binstr[q++] = binstr[p];
+		if (isgraph((int)binstr[p])) {
+			d[q++] = binstr[p];
 		} else {
-			if (q  binstr[q - 1] != ' ')
- 

CVS commit: src

2009-04-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 20 14:42:12 UTC 2009

Modified Files:
src/include: resolv.h
src/lib/libc/resolv: res_init.c

Log Message:
Bring back binary compatibility with the previous version of the resolver.
There was no room to allocate 16 bytes for _rnd in the struct in the _LP64
case, so we dynamically allocate now. Also put the _rnd field last, so that
we are bitwise compatible too. Now of course we've run out of space, so
next time will need to perform more evil tricks to fit.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/include/resolv.h
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/resolv/res_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/include/resolv.h
diff -u src/include/resolv.h:1.36 src/include/resolv.h:1.37
--- src/include/resolv.h:1.36	Sun Apr 12 13:07:33 2009
+++ src/include/resolv.h	Mon Apr 20 10:42:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: resolv.h,v 1.36 2009/04/12 17:07:33 christos Exp $	*/
+/*	$NetBSD: resolv.h,v 1.37 2009/04/20 14:42:12 christos Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. (ISC)
@@ -179,11 +179,10 @@
 	int	res_h_errno;		/*% last one set for this context */
 	int	_vcsock;		/*% PRIVATE: for res_send VC i/o */
 	u_int	_flags;			/*% PRIVATE: see below */
-	u_char	_rnd[16];		/*% PRIVATE: random state */
 	u_int	_pad;			/*% make _u 64 bit aligned */
 	union {
 		/* On an 32-bit arch this means 512b total. */
-		char	pad[56 - 4*sizeof (int) - 2*sizeof (void *)];
+		char	pad[56 - 4*sizeof (int) - 3*sizeof (void *)];
 		struct {
 			uint16_t		nscount;
 			uint16_t		nstimes[MAXNS];	/*% ms. */
@@ -191,6 +190,7 @@
 			struct __res_state_ext *ext;	/*% extention for IPv6 */
 		} _ext;
 	} _u;
+	u_char	*_rnd;			/*% PRIVATE: random state */
 #endif
 };
 

Index: src/lib/libc/resolv/res_init.c
diff -u src/lib/libc/resolv/res_init.c:1.19 src/lib/libc/resolv/res_init.c:1.20
--- src/lib/libc/resolv/res_init.c:1.19	Thu Apr 16 10:56:51 2009
+++ src/lib/libc/resolv/res_init.c	Mon Apr 20 10:42:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_init.c,v 1.19 2009/04/16 14:56:51 christos Exp $	*/
+/*	$NetBSD: res_init.c,v 1.20 2009/04/20 14:42:12 christos Exp $	*/
 
 /*
  * Copyright (c) 1985, 1989, 1993
@@ -76,7 +76,7 @@
 static const char sccsid[] = @(#)res_init.c	8.1 (Berkeley) 6/7/93;
 static const char rcsid[] = Id: res_init.c,v 1.26 2008/12/11 09:59:00 marka Exp;
 #else
-__RCSID($NetBSD: res_init.c,v 1.19 2009/04/16 14:56:51 christos Exp $);
+__RCSID($NetBSD: res_init.c,v 1.20 2009/04/20 14:42:12 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -212,6 +212,7 @@
 		statp-retrans = RES_TIMEOUT;
 		statp-retry = RES_DFLRETRY;
 		statp-options = RES_DEFAULT;
+		statp-_rnd = malloc(16);
 		res_rndinit(statp);
 		statp-id = res_nrandomid(statp);
 	}
@@ -685,22 +686,25 @@
 }
 #endif
 
+static u_char srnd[16];
+
 void
 res_rndinit(res_state statp)
 {
 	struct timeval now;
 	u_int32_t u32;
 	u_int16_t u16;
+	u_char *rnd = statp-_rnd == NULL ? srnd : statp-_rnd;
 
 	gettimeofday(now, NULL);
 	u32 = (u_int32_t)now.tv_sec;
-	memcpy(statp-_rnd, u32, 4);
+	memcpy(rnd, u32, 4);
 	u32 = now.tv_usec;
-	memcpy(statp-_rnd + 4, u32, 4);
+	memcpy(rnd + 4, u32, 4);
 	u32 += (u_int32_t)now.tv_sec;
-	memcpy(statp-_rnd + 8, u32, 4);
+	memcpy(rnd + 8, u32, 4);
 	u16 = getpid();
-	memcpy(statp-_rnd + 12, u16, 2);
+	memcpy(rnd + 12, u16, 2);
 }
 
 u_int
@@ -708,20 +712,21 @@
 	struct timeval now;
 	u_int16_t u16;
 	MD5_CTX ctx;
+	u_char *rnd = statp-_rnd == NULL ? srnd : statp-_rnd;
 
 	gettimeofday(now, NULL);
 	u16 = (u_int16_t) (now.tv_sec ^ now.tv_usec);
-	memcpy(statp-_rnd + 14, u16, 2);
+	memcpy(rnd + 14, u16, 2);
 #ifndef HAVE_MD5
 	MD5_Init(ctx);
-	MD5_Update(ctx, statp-_rnd, 16);
-	MD5_Final(statp-_rnd, ctx);
+	MD5_Update(ctx, rnd, 16);
+	MD5_Final(rnd, ctx);
 #else
 	MD5Init(ctx);
-	MD5Update(ctx, statp-_rnd, 16);
-	MD5Final(statp-_rnd, ctx);
+	MD5Update(ctx, rnd, 16);
+	MD5Final(rnd, ctx);
 #endif
-	memcpy(u16, statp-_rnd + 14, 2);
+	memcpy(u16, rnd + 14, 2);
 	return ((u_int) u16);
 }
 
@@ -752,10 +757,15 @@
 void
 res_ndestroy(res_state statp) {
 	res_nclose(statp);
-	if (statp-_u._ext.ext != NULL)
+	if (statp-_u._ext.ext != NULL) {
 		free(statp-_u._ext.ext);
+		statp-_u._ext.ext = NULL;
+	}
+	if (statp-_rnd != NULL) {
+		free(statp-_rnd);
+		statp-_rnd = NULL;
+	}
 	statp-options = ~RES_INIT;
-	statp-_u._ext.ext = NULL;
 }
 
 const char *



CVS commit: src/sbin/fdisk

2009-04-20 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Apr 20 15:03:56 UTC 2009

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

Log Message:
When using -s flag, read start and size as unsigned to allow for larger
disks. (Thanks to drochner@ for catching it).


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.118 src/sbin/fdisk/fdisk.c:1.119
--- src/sbin/fdisk/fdisk.c:1.118	Mon Apr  6 12:18:19 2009
+++ src/sbin/fdisk/fdisk.c	Mon Apr 20 15:03:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.118 2009/04/06 12:18:19 lukem Exp $ */
+/*	$NetBSD: fdisk.c,v 1.119 2009/04/20 15:03:56 sborrill Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.118 2009/04/06 12:18:19 lukem Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.119 2009/04/20 15:03:56 sborrill Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -286,8 +286,8 @@
 	char *cbootmenu = 0;
 #endif
 
-	int csysid, cstart, csize;	/* For the b_flag. */
-
+	int csysid;	/* For the b_flag. */
+	unsigned int cstart, csize;
 	a_flag = i_flag = u_flag = sh_flag = f_flag = s_flag = b_flag = 0;
 	v_flag = 0;
 	E_flag = 0;
@@ -345,7 +345,7 @@
 			break;
 		case 's':	/* Partition details */
 			s_flag = 1;
-			if (sscanf(optarg, %d/%d/%d%n, csysid, cstart,
+			if (sscanf(optarg, %d/%u/%u%n, csysid, cstart,
 			csize, n) == 3) {
 if (optarg[n] == 0)
 	break;



CVS commit: src/external/mit/xorg

2009-04-20 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon Apr 20 15:39:46 UTC 2009

Modified Files:
src/external/mit/xorg: Makefile

Log Message:
lbxproxy is no more


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/Makefile

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

Modified files:

Index: src/external/mit/xorg/Makefile
diff -u src/external/mit/xorg/Makefile:1.5 src/external/mit/xorg/Makefile:1.6
--- src/external/mit/xorg/Makefile:1.5	Thu Dec 11 20:40:19 2008
+++ src/external/mit/xorg/Makefile	Mon Apr 20 15:39:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2008/12/11 20:40:19 veego Exp $
+#	$NetBSD: Makefile,v 1.6 2009/04/20 15:39:46 jnemeth Exp $
 
 # Top level Makefile to cross build xorg inside the NetBSD tree.
 
@@ -51,7 +51,6 @@
 
 
 DISTRIBTARGETS=	\
-	bin/lbxproxy \
 	bin/proxymngr \
 	bin/twm \
 	bin/xdm/config \



CVS commit: src

2009-04-20 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Apr 20 16:05:31 UTC 2009

Modified Files:
src/bin/sh: Makefile
src/external/bsd/am-utils/bin/amd: Makefile
src/external/bsd/am-utils/bin/fsinfo: Makefile
src/games/atc: Makefile
src/gnu/usr.bin/binutils/gprof: Makefile
src/sbin/cgdconfig: Makefile
src/sbin/setkey: Makefile
src/usr.bin/fgen: Makefile
src/usr.bin/menuc: Makefile
src/usr.bin/mkcsmapper: Makefile
src/usr.bin/mkesdb: Makefile
src/usr.bin/msgc: Makefile
src/usr.sbin/envstat: Makefile
src/usr.sbin/isdn/isdnd: Makefile
src/usr.sbin/wsmoused: Makefile

Log Message:
define YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/bin/sh/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/am-utils/bin/amd/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/am-utils/bin/fsinfo/Makefile
cvs rdiff -u -r1.26 -r1.27 src/games/atc/Makefile
cvs rdiff -u -r1.5 -r1.6 src/gnu/usr.bin/binutils/gprof/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sbin/cgdconfig/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sbin/setkey/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/fgen/Makefile
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/menuc/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/mkcsmapper/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/mkesdb/Makefile
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/msgc/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/envstat/Makefile
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/isdn/isdnd/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/wsmoused/Makefile

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

Modified files:

Index: src/bin/sh/Makefile
diff -u src/bin/sh/Makefile:1.84 src/bin/sh/Makefile:1.85
--- src/bin/sh/Makefile:1.84	Sat Feb 14 08:31:14 2009
+++ src/bin/sh/Makefile	Mon Apr 20 16:05:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.84 2009/02/14 08:31:14 lukem Exp $
+#	$NetBSD: Makefile,v 1.85 2009/04/20 16:05:29 drochner Exp $
 #	@(#)Makefile	8.4 (Berkeley) 5/5/95
 
 .include bsd.own.mk
@@ -34,7 +34,7 @@
 YFLAGS+=-l
 .endif
 
-CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
+CPPFLAGS+=-DSHELL -I. -I${.CURDIR} -DYY_NO_INPUT
 #XXX: For testing only.
 #CPPFLAGS+=-DDEBUG=1
 #CFLAGS+=-funsigned-char

Index: src/external/bsd/am-utils/bin/amd/Makefile
diff -u src/external/bsd/am-utils/bin/amd/Makefile:1.2 src/external/bsd/am-utils/bin/amd/Makefile:1.3
--- src/external/bsd/am-utils/bin/amd/Makefile:1.2	Fri Mar 20 21:15:29 2009
+++ src/external/bsd/am-utils/bin/amd/Makefile	Mon Apr 20 16:05:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2009/03/20 21:15:29 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2009/04/20 16:05:29 drochner Exp $
 
 .include ${.CURDIR}/../Makefile.inc
 
@@ -54,7 +54,7 @@
 
 AMDOBJDIR!=cd ${.CURDIR}  ${PRINTOBJDIR}
 
-CPPFLAGS+=	-I${DIST} -I${AMDOBJDIR}
+CPPFLAGS+=	-I${DIST} -I${AMDOBJDIR} -DYY_NO_INPUT
 LDADD+=		${LIBAMU} -lrpcsvc
 DPADD+=		${LIBRPCSVC}
 YHEADER=	1

Index: src/external/bsd/am-utils/bin/fsinfo/Makefile
diff -u src/external/bsd/am-utils/bin/fsinfo/Makefile:1.1 src/external/bsd/am-utils/bin/fsinfo/Makefile:1.2
--- src/external/bsd/am-utils/bin/fsinfo/Makefile:1.1	Fri Sep 19 21:38:40 2008
+++ src/external/bsd/am-utils/bin/fsinfo/Makefile	Mon Apr 20 16:05:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2008/09/19 21:38:40 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2009/04/20 16:05:29 drochner Exp $
 
 .include ${.CURDIR}/../Makefile.inc
 
@@ -20,7 +20,7 @@
 
 FSINFOOBJDIR!=cd ${.CURDIR}  ${PRINTOBJDIR}
 
-CPPFLAGS+=	-I${DIST} -I${FSINFOOBJDIR}
+CPPFLAGS+=	-I${DIST} -I${FSINFOOBJDIR} -DYY_NO_INPUT
 YHEADER=	1
 
 .include bsd.prog.mk

Index: src/games/atc/Makefile
diff -u src/games/atc/Makefile:1.26 src/games/atc/Makefile:1.27
--- src/games/atc/Makefile:1.26	Mon Jan 28 07:03:58 2008
+++ src/games/atc/Makefile	Mon Apr 20 16:05:29 2009
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.26 2008/01/28 07:03:58 dholland Exp $
+#	$NetBSD: Makefile,v 1.27 2009/04/20 16:05:29 drochner Exp $
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 
 .include bsd.own.mk
 
 PROG=	atc
-CPPFLAGS+=-DBSD -I${.CURDIR} -I. -DYY_NO_UNPUT
+CPPFLAGS+=-DBSD -I${.CURDIR} -I. -DYY_NO_UNPUT -DYY_NO_INPUT
 SRCS=	extern.c grammar.y graphics.c input.c lex.l list.c log.c \
 	main.c tunable.c update.c
 YHEADER=1

Index: src/gnu/usr.bin/binutils/gprof/Makefile
diff -u src/gnu/usr.bin/binutils/gprof/Makefile:1.5 src/gnu/usr.bin/binutils/gprof/Makefile:1.6
--- src/gnu/usr.bin/binutils/gprof/Makefile:1.5	Fri Nov 28 05:14:18 2003
+++ src/gnu/usr.bin/binutils/gprof/Makefile	Mon Apr 20 16:05:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2003/11/28 05:14:18 simonb Exp $
+#	$NetBSD: Makefile,v 1.6 2009/04/20 16:05:29 drochner Exp $
 
 .include bsd.own.mk
 
@@ -9,7 +9,7 @@
 
 PROG=		gprof
 SRCS=		${G_gprof_OBJECTS:.o=.c}
-CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_ARCH}
+CPPFLAGS+=	

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

2009-04-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 20 17:13:42 UTC 2009

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

Log Message:
put back -u


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

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/main.c
diff -u src/external/gpl2/xcvs/dist/src/main.c:1.3 src/external/gpl2/xcvs/dist/src/main.c:1.4
--- src/external/gpl2/xcvs/dist/src/main.c:1.3	Fri Apr 10 07:20:30 2009
+++ src/external/gpl2/xcvs/dist/src/main.c	Mon Apr 20 13:13:42 2009
@@ -519,7 +519,7 @@
 int help = 0;		/* Has the user asked for help?  This
    lets us support the `cvs -H cmd'
    convention to give help for cmd. */
-static const char short_options[] = +QqrwtlnRvb:T:e:d:D:Hfz:s:xa;
+static const char short_options[] = +QqrwtlnRuvb:T:e:d:D:Hfz:s:xa;
 static struct option long_options[] =
 {
 {help, 0, NULL, 'H'},



CVS commit: src

2009-04-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Apr 20 20:14:22 UTC 2009

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: ale.4

Log Message:
add manpage for ale(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.1131 -r1.1132 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.488 -r1.489 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/ale.4

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1131 src/distrib/sets/lists/man/mi:1.1132
--- src/distrib/sets/lists/man/mi:1.1131	Sun Apr 12 17:24:51 2009
+++ src/distrib/sets/lists/man/mi	Mon Apr 20 20:14:21 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1131 2009/04/12 17:24:51 christos Exp $
+# $NetBSD: mi,v 1.1132 2009/04/20 20:14:21 cegger Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -639,6 +639,7 @@
 ./usr/share/man/cat4/aiboost.0			man-sys-catman		.cat
 ./usr/share/man/cat4/aic.0			man-sys-catman		.cat
 ./usr/share/man/cat4/akbd.0			man-sys-catman		.cat
+./usr/share/man/cat4/ale.0			man-sys-catman		.cat
 ./usr/share/man/cat4/alipm.0			man-sys-catman		.cat
 ./usr/share/man/cat4/alpha/apecs.0		man-sys-catman		.cat
 ./usr/share/man/cat4/alpha/asc.0		man-sys-catman		.cat
@@ -3268,6 +3269,7 @@
 ./usr/share/man/html4/aiboost.html		man-sys-htmlman		html
 ./usr/share/man/html4/aic.html			man-sys-htmlman		html
 ./usr/share/man/html4/akbd.html			man-sys-htmlman		html
+./usr/share/man/html4/ale.html			man-sys-htmlman		html
 ./usr/share/man/html4/alipm.html			man-sys-htmlman		html
 ./usr/share/man/html4/alpha/apecs.html		man-sys-htmlman		html
 ./usr/share/man/html4/alpha/asc.html		man-sys-htmlman		html
@@ -5597,6 +5599,7 @@
 ./usr/share/man/man4/aiboost.4			man-sys-man		.man
 ./usr/share/man/man4/aic.4			man-sys-man		.man
 ./usr/share/man/man4/akbd.4			man-sys-man		.man
+./usr/share/man/man4/ale.4			man-sys-man		.man
 ./usr/share/man/man4/alipm.4			man-sys-man		.man
 ./usr/share/man/man4/alpha/apecs.4		man-sys-man		.man
 ./usr/share/man/man4/alpha/asc.4		man-sys-man		.man

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.488 src/share/man/man4/Makefile:1.489
--- src/share/man/man4/Makefile:1.488	Thu Mar 12 00:16:16 2009
+++ src/share/man/man4/Makefile	Mon Apr 20 20:14:21 2009
@@ -1,11 +1,12 @@
-#	$NetBSD: Makefile,v 1.488 2009/03/12 00:16:16 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.489 2009/04/20 20:14:21 cegger Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \
 	adbbt.4 adbkbd.4 adbms.4 \
 	adc.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \
 	ahcisata.4 ahd.4 \
-	aiboost.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 amr.4 aps.4 \
+	aiboost.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \
+	amr.4 aps.4 \
 	an.4 arcmsr.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \
 	ath.4 atphy.4 atppc.4 attimer.4 atw.4 \
 	auacer.4 audio.4 audiocs.4 auich.4 \

Added files:

Index: src/share/man/man4/ale.4
diff -u /dev/null src/share/man/man4/ale.4:1.1
--- /dev/null	Mon Apr 20 20:14:22 2009
+++ src/share/man/man4/ale.4	Mon Apr 20 20:14:21 2009
@@ -0,0 +1,93 @@
+.\	$NetBSD: ale.4,v 1.1 2009/04/20 20:14:21 cegger Exp $
+.\	$OpenBSD: ale.4,v 1.2 2009/02/25 03:15:50 deraadt Exp $
+.\
+.\ Copyright (c) 2009 Kevin Lo ke...@openbsd.org
+.\
+.\ Permission to use, copy, modify, and distribute this software for any
+.\ purpose with or without fee is hereby granted, provided that the above
+.\ copyright notice and this permission notice appear in all copies.
+.\
+.\ THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\
+.Dd April 20 2009 $
+.Dt ALE 4
+.Os
+.Sh NAME
+.Nm ale
+.Nd Atheros AR8121/AR8113/AR8114 10/100/Gigabit Ethernet device
+.Sh SYNOPSIS
+.Cd ale* at pci?
+.Cd atphy* at mii?
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Ethernet interfaces based on the
+Atheros AR8121/AR8113/AR8114 Ethernet chipset, also known as
+the Attansic L1E.
+.Pp
+The
+.Nm
+driver supports IPv4 receive IP/TCP/UDP checksum offload and VLAN
+tag insertion and stripping.
+.Pp
+The following
+.Ar media
+types are supported:
+.Pp
+.Bl -tag -width autoselect -compact
+.It Cm autoselect
+Enable autoselection of the media type and options.
+.It Cm 10baseT
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 

CVS commit: src/doc

2009-04-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Apr 20 20:19:17 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
ale(4): new driver for Attensic/Atheros L1E Gigabit Ethernet.


To generate a diff of this commit:
cvs rdiff -u -r1.1209 -r1.1210 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.1209 src/doc/CHANGES:1.1210
--- src/doc/CHANGES:1.1209	Fri Apr 17 20:09:34 2009
+++ src/doc/CHANGES	Mon Apr 20 20:19:17 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1209 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1210 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -178,3 +178,5 @@
 	DHCID, NSEC3, NSEC3PARAM, HIP and DLV, various new api functions.
 	[christos 20090412]
 	dhcpcd: Import dhcpcd-4.0.13 [roy 20090417]
+	ale(4):	Add a driver for Attensic/Atheros L1E Gigabit Ethernet.
+		From OpenBSD and improvements from Kevin Lahey. [cegger 20090420]



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

2009-04-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Apr 20 20:50:38 UTC 2009

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

Log Message:
add age(4)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amd64/conf/XEN3_DOM0

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

Modified files:

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.41 src/sys/arch/amd64/conf/XEN3_DOM0:1.42
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.41	Mon Apr 20 20:49:22 2009
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Mon Apr 20 20:50:37 2009
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.41 2009/04/20 20:49:22 cegger Exp $
+# $NetBSD: XEN3_DOM0,v 1.42 2009/04/20 20:50:37 cegger Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -298,6 +298,7 @@
 
 
 # PCI network interfaces
+age*	at pci? dev ? function ?	# Attansic/Atheros L1 Gigabit Ethernet
 an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
 ale*	at pci? dev ? function ?	# Attansic/Atheros L1E Ethernet
 ath*	at pci? dev ? function ?	# Atheros 5210/5211/5212 802.11



CVS commit: src/distrib/sets/lists

2009-04-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 20 21:33:49 UTC 2009

Modified Files:
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xetc: mi

Log Message:
mark xorg-only obsolete files with obsolete,xorg so that they are
not obsoleted for xfree86 builds, leading to checklist complaining
about those files being missing.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xetc/mi

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

Modified files:

Index: src/distrib/sets/lists/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.89 src/distrib/sets/lists/xcomp/mi:1.90
--- src/distrib/sets/lists/xcomp/mi:1.89	Mon Apr 20 05:12:21 2009
+++ src/distrib/sets/lists/xcomp/mi	Mon Apr 20 21:33:49 2009
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.89 2009/04/20 05:12:21 mrg Exp $
+#	 $NetBSD: mi,v 1.90 2009/04/20 21:33:49 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -9242,7 +9242,7 @@
 ./usr/libdata/lint/llib-lXmuu.ln			-unknown-	lint,x11
 ./usr/libdata/lint/llib-lXmuu.ln			-unknown-	lint,xorg
 ./usr/libdata/lint/llib-lXp.ln-unknown-	lint,x11
-./usr/libdata/lint/llib-lXp.ln-obsolete-	obsolete
+./usr/libdata/lint/llib-lXp.ln-obsolete-	obsolete,xorg
 ./usr/libdata/lint/llib-lXpm.ln-unknown-	lint,x11
 ./usr/libdata/lint/llib-lXpm.ln-unknown-	lint,xorg
 ./usr/libdata/lint/llib-lXprintAppUtil.ln		-obsolete-	obsolete
@@ -9283,7 +9283,7 @@
 ./usr/libdata/lint/llib-lfreetype.ln			-unknown-	lint,xorg
 ./usr/libdata/lint/llib-lglut.ln			-unknown-	lint,xorg
 ./usr/libdata/lint/llib-llbxutil.ln			-unknown-	lint,x11
-./usr/libdata/lint/llib-llbxutil.ln			-obsolete-	obsolete
+./usr/libdata/lint/llib-llbxutil.ln			-obsolete-	obsolete,xorg
 ./usr/libdata/lint/llib-llisp.ln			-unknown-	lint,xorg
 ./usr/libdata/lint/llib-lmp.ln-unknown-	lint,xorg
 ./usr/libdata/lint/llib-loldX.ln			-unknown-	lint,x11

Index: src/distrib/sets/lists/xetc/mi
diff -u src/distrib/sets/lists/xetc/mi:1.14 src/distrib/sets/lists/xetc/mi:1.15
--- src/distrib/sets/lists/xetc/mi:1.14	Mon Apr 20 04:03:49 2009
+++ src/distrib/sets/lists/xetc/mi	Mon Apr 20 21:33:49 2009
@@ -1,11 +1,11 @@
-# $NetBSD: mi,v 1.14 2009/04/20 04:03:49 mrg Exp $
+# $NetBSD: mi,v 1.15 2009/04/20 21:33:49 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
 ./etc/X11/fs/config	-unknown-	x11
 ./etc/X11/fs/config	-unknown-	xorg
 ./etc/X11/lbxproxy/AtomControl-unknown-	x11
-./etc/X11/lbxproxy/AtomControl-obsolete-	obsolete
+./etc/X11/lbxproxy/AtomControl-obsolete-	xorg,obsolete
 ./etc/X11/proxymngr/pmconfig-unknown-	x11
 ./etc/X11/proxymngr/pmconfig-unknown-	xorg
 ./etc/X11/rstart/commands/@List-unknown-	x11



CVS commit: src/sbin/drvctl

2009-04-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Mon Apr 20 21:41:51 UTC 2009

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

Log Message:
Mention -n in usage.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/drvctl/drvctl.c

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

Modified files:

Index: src/sbin/drvctl/drvctl.c
diff -u src/sbin/drvctl/drvctl.c:1.9 src/sbin/drvctl/drvctl.c:1.10
--- src/sbin/drvctl/drvctl.c:1.9	Mon Apr 20 21:40:42 2009
+++ src/sbin/drvctl/drvctl.c	Mon Apr 20 21:41:50 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drvctl.c,v 1.9 2009/04/20 21:40:42 dyoung Exp $ */
+/* $NetBSD: drvctl.c,v 1.10 2009/04/20 21:41:50 dyoung Exp $ */
 
 /*
  * Copyright (c) 2004
@@ -50,7 +50,7 @@
 
 	fprintf(stderr, Usage: %s -r [-a attribute] busdevice [locator ...]\n
 	   %s -d device\n
-	   %s -l [device]\n
+	   %s [-n] -l [device]\n
 	   %s -p device\n
 	   %s -Q device\n
 	   %s -R device\n



CVS commit: src/sbin/drvctl

2009-04-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 20 22:04:57 UTC 2009

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

Log Message:
Bump date for previous. Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/drvctl/drvctl.8

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

Modified files:

Index: src/sbin/drvctl/drvctl.8
diff -u src/sbin/drvctl/drvctl.8:1.7 src/sbin/drvctl/drvctl.8:1.8
--- src/sbin/drvctl/drvctl.8:1.7	Mon Apr 20 21:40:42 2009
+++ src/sbin/drvctl/drvctl.8	Mon Apr 20 22:04:57 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: drvctl.8,v 1.7 2009/04/20 21:40:42 dyoung Exp $
+.\ $NetBSD: drvctl.8,v 1.8 2009/04/20 22:04:57 wiz Exp $
 .\
 .\ Copyright (c) 2004
 .\ 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd April 4, 2009
+.Dd April 20, 2009
 .Dt DRVCTL 8
 .Os
 .Sh NAME
@@ -88,7 +88,7 @@
 .Dq root
 if
 .Ar device
-is not specified. 
+is not specified.
 The second column is the child.
 .It Fl p
 Get the properties for the device specified by the



CVS commit: src/sbin/drvctl

2009-04-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 20 22:05:47 UTC 2009

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

Log Message:
Add -n to usage. Now it just needs to be documented.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/drvctl/drvctl.8

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

Modified files:

Index: src/sbin/drvctl/drvctl.8
diff -u src/sbin/drvctl/drvctl.8:1.8 src/sbin/drvctl/drvctl.8:1.9
--- src/sbin/drvctl/drvctl.8:1.8	Mon Apr 20 22:04:57 2009
+++ src/sbin/drvctl/drvctl.8	Mon Apr 20 22:05:47 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: drvctl.8,v 1.8 2009/04/20 22:04:57 wiz Exp $
+.\ $NetBSD: drvctl.8,v 1.9 2009/04/20 22:05:47 wiz Exp $
 .\
 .\ Copyright (c) 2004
 .\ 	Matthias Drochner.  All rights reserved.
@@ -40,6 +40,7 @@
 .Fl d
 .Ar device
 .Nm
+.Op Fl n
 .Fl l
 .Op Ar device
 .Nm



CVS commit: [netbsd-5] src/sbin/modload

2009-04-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 20 22:24:37 UTC 2009

Modified Files:
src/sbin/modload [netbsd-5]: modload.c

Log Message:
Apply patch (requested by ad in ticket #708):
Disable ksyms support, falling back to using sysctl to obtain the name
of the booted kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.51.28.1 src/sbin/modload/modload.c

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

Modified files:

Index: src/sbin/modload/modload.c
diff -u src/sbin/modload/modload.c:1.51 src/sbin/modload/modload.c:1.51.28.1
--- src/sbin/modload/modload.c:1.51	Mon Jun 27 01:00:05 2005
+++ src/sbin/modload/modload.c	Mon Apr 20 22:24:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: modload.c,v 1.51 2005/06/27 01:00:05 christos Exp $	*/
+/*	$NetBSD: modload.c,v 1.51.28.1 2009/04/20 22:24:37 snj Exp $	*/
 
 /*
  * Copyright (c) 1993 Terrence R. Lambert.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: modload.c,v 1.51 2005/06/27 01:00:05 christos Exp $);
+__RCSID($NetBSD: modload.c,v 1.51.28.1 2009/04/20 22:24:37 snj Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -356,6 +356,7 @@
 			modobj);
 	}
 
+#if 0
 	/*
 	 * Check if /dev/ksyms can be used.
 	 */
@@ -368,6 +369,7 @@
 			kname = _PATH_KSYMS;
 		}
 	}
+#endif
 
 	/*
 	 * Determine name of kernel to use



CVS commit: [netbsd-5] src/sbin/fdisk

2009-04-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 20 23:16:45 UTC 2009

Modified Files:
src/sbin/fdisk [netbsd-5]: fdisk.c

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #712):
sbin/fdisk/fdisk.c: revision 1.119
When using -s flag, read start and size as unsigned to allow for larger
disks. (Thanks to drochner@ for catching it).


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.116.6.1 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.116 src/sbin/fdisk/fdisk.c:1.116.6.1
--- src/sbin/fdisk/fdisk.c:1.116	Sun Mar  9 14:57:10 2008
+++ src/sbin/fdisk/fdisk.c	Mon Apr 20 23:16:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.116 2008/03/09 14:57:10 tnn Exp $ */
+/*	$NetBSD: fdisk.c,v 1.116.6.1 2009/04/20 23:16:45 snj Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.116 2008/03/09 14:57:10 tnn Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.116.6.1 2009/04/20 23:16:45 snj Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -296,8 +296,8 @@
 	char *cbootmenu = 0;
 #endif
 
-	int csysid, cstart, csize;	/* For the b_flag. */
-
+	int csysid;	/* For the b_flag. */
+	unsigned int cstart, csize;
 	a_flag = i_flag = u_flag = sh_flag = f_flag = s_flag = b_flag = 0;
 	v_flag = 0;
 	E_flag = 0;
@@ -355,7 +355,7 @@
 			break;
 		case 's':	/* Partition details */
 			s_flag = 1;
-			if (sscanf(optarg, %d/%d/%d%n, csysid, cstart,
+			if (sscanf(optarg, %d/%u/%u%n, csysid, cstart,
 			csize, n) == 3) {
 if (optarg[n] == 0)
 	break;



CVS commit: [netbsd-5] src/external/mit/xorg/bin/xterm

2009-04-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 20 23:20:57 UTC 2009

Modified Files:
src/external/mit/xorg/bin/xterm [netbsd-5]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #711):
external/mit/xorg/bin/xterm/Makefile: revision 1.3
turn on PASTE64 to handle large cut-n-paste buffers like the old xterm did.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/mit/xorg/bin/xterm/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/xterm/Makefile
diff -u src/external/mit/xorg/bin/xterm/Makefile:1.2 src/external/mit/xorg/bin/xterm/Makefile:1.2.4.1
--- src/external/mit/xorg/bin/xterm/Makefile:1.2	Tue Oct 14 23:37:19 2008
+++ src/external/mit/xorg/bin/xterm/Makefile	Mon Apr 20 23:20:57 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/10/14 23:37:19 cube Exp $
+#	$NetBSD: Makefile,v 1.2.4.1 2009/04/20 23:20:57 snj Exp $
 
 .include bsd.own.mk
 
@@ -12,7 +12,7 @@
 CPPFLAGS+=	-I${X11SRCDIR.${PROG}} \
 		-I${DESTDIR}${X11INCDIR}/freetype2 \
 		-DSCROLLBAR_RIGHT -DOPT_WIDE_CHARS \
-		-DXRENDERFONT -DXFREE86_FT2 \
+		-DXRENDERFONT -DXFREE86_FT2 -DOPT_PASTE64 \
 		-DPROJECTROOT=${X11ROOTDIR}
 
 CPPFLAGS.main.c=-DUTMP -DUSE_TTY_GROUP ${X11FLAGS.VERSION}



CVS commit: src/sys/kern

2009-04-20 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Apr 21 00:02:38 UTC 2009

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

Log Message:
fix an indentation error.  no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/kern/vfs_subr.c

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

Modified files:

Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.372 src/sys/kern/vfs_subr.c:1.373
--- src/sys/kern/vfs_subr.c:1.372	Mon Apr 20 18:06:26 2009
+++ src/sys/kern/vfs_subr.c	Tue Apr 21 00:02:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.372 2009/04/20 18:06:26 elad Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.373 2009/04/21 00:02:37 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.372 2009/04/20 18:06:26 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.373 2009/04/21 00:02:37 yamt Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -3312,7 +3312,7 @@
 		/*
 		 * You don't try to change ownership, and...
 		 */
-		 if (new_uid != cur_uid) {
+		if (new_uid != cur_uid) {
 			goto out;
 		}
 



CVS commit: src/sys/dev/drm

2009-04-20 Thread Rafal Boni
Module Name:src
Committed By:   rafal
Date:   Tue Apr 21 01:15:37 UTC 2009

Modified Files:
src/sys/dev/drm: drmP.h drm_drv.c drm_scatter.c

Log Message:
Rework scatter / gather page allocation inspired by r186295 of FreeBSD SVN:

rework drm_scatter.c which allocates scatter / gather pages for use by
ati pci gart to use bus_dma to handle the allocations.  This fixes
a garbled screen issue on at least some radeons (X1400 tested).  It is
also likely that this is the correct fix for PR# 119324, though that
is not confirmed yet.

Fixes similar issues on a Radeon Mobility X300, non-Mobility X800 (including
a hard-lock of the machine).

With feedback from ad@, ok mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/drm/drmP.h
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/drm/drm_drv.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/drm/drm_scatter.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/drm/drmP.h
diff -u src/sys/dev/drm/drmP.h:1.33 src/sys/dev/drm/drmP.h:1.34
--- src/sys/dev/drm/drmP.h:1.33	Sun Mar 29 17:00:50 2009
+++ src/sys/dev/drm/drmP.h	Tue Apr 21 01:15:37 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drmP.h,v 1.33 2009/03/29 17:00:50 mrg Exp $ */
+/* $NetBSD: drmP.h,v 1.34 2009/04/21 01:15:37 rafal Exp $ */
 
 /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
  * Created: Mon Jan  4 10:05:05 1999 by fa...@precisioninsight.com
@@ -706,11 +706,13 @@
 } drm_agp_head_t;
 
 typedef struct drm_sg_mem {
-	unsigned long   handle;
-	void*virtual;
-	int pages;
-	dma_addr_t	*busaddr;
-	drm_dma_handle_t *dmah;	/* Handle to PCI memory for ATI PCIGART table */
+	unsigned long		  handle;
+	void			 *virtual;
+	int			  pages;
+	dma_addr_t		 *busaddr;
+	struct drm_dma_handle	 *sg_dmah;	/* Handle for sg_pages   */
+	struct drm_dma_handle	 *dmah;		/* Handle to PCI memory  */
+		/* for ATI PCIGART table */
 } drm_sg_mem_t;
 
 typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t;
@@ -1065,6 +1067,7 @@
 
 /* Scatter Gather Support (drm_scatter.c) */
 void	drm_sg_cleanup(drm_sg_mem_t *entry);
+int	drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather * request);
 
 #if defined(__FreeBSD__) || defined (__NetBSD__)
 /* sysctl support (drm_sysctl.h) */
@@ -1139,8 +1142,8 @@
 int	drm_agp_bind_ioctl(DRM_IOCTL_ARGS);
 
 /* Scatter Gather Support (drm_scatter.c) */
-int	drm_sg_alloc(DRM_IOCTL_ARGS);
-int	drm_sg_free(DRM_IOCTL_ARGS);
+int	drm_sg_alloc_ioctl(DRM_IOCTL_ARGS);
+int	drm_sg_free_ioctl(DRM_IOCTL_ARGS);
 
 /* consistent PCI memory functions (drm_pci.c) */
 drm_dma_handle_t *drm_pci_alloc(drm_device_t *dev, size_t size, size_t align,

Index: src/sys/dev/drm/drm_drv.c
diff -u src/sys/dev/drm/drm_drv.c:1.23 src/sys/dev/drm/drm_drv.c:1.24
--- src/sys/dev/drm/drm_drv.c:1.23	Fri Apr 17 19:02:33 2009
+++ src/sys/dev/drm/drm_drv.c	Tue Apr 21 01:15:37 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $ */
+/* $NetBSD: drm_drv.c,v 1.24 2009/04/21 01:15:37 rafal Exp $ */
 
 /* drm_drv.h -- Generic driver template -*- linux-c -*-
  * Created: Thu Nov 23 03:10:50 2000 by gar...@valinux.com
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.24 2009/04/21 01:15:37 rafal Exp $);
 /*
 __FBSDID($FreeBSD: src/sys/dev/drm/drm_drv.c,v 1.6 2006/09/07 23:04:47 anholt Exp $);
 */
@@ -114,8 +114,8 @@
 	[DRM_IOCTL_NR(DRM_IOCTL_AGP_BIND)]  = { drm_agp_bind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
 	[DRM_IOCTL_NR(DRM_IOCTL_AGP_UNBIND)]= { drm_agp_unbind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
 
-	[DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)]  = { drm_sg_alloc,DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
-	[DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)]   = { drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
+	[DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)]  = { drm_sg_alloc_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
+	[DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)]   = { drm_sg_free_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY },
 
 	[DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)]   = { drm_wait_vblank, 0 },
 };

Index: src/sys/dev/drm/drm_scatter.c
diff -u src/sys/dev/drm/drm_scatter.c:1.7 src/sys/dev/drm/drm_scatter.c:1.8
--- src/sys/dev/drm/drm_scatter.c:1.7	Mon Jul  7 00:33:23 2008
+++ src/sys/dev/drm/drm_scatter.c	Tue Apr 21 01:15:37 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_scatter.c,v 1.7 2008/07/07 00:33:23 mrg Exp $ */
+/* $NetBSD: drm_scatter.c,v 1.8 2009/04/21 01:15:37 rafal Exp $ */
 
 /* drm_scatter.h -- IOCTLs to manage scatter/gather memory -*- linux-c -*-
  * Created: Mon Dec 18 23:20:54 2000 by gar...@valinux.com */
@@ -32,73 +32,107 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drm_scatter.c,v 1.7 2008/07/07 00:33:23 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: drm_scatter.c,v 1.8 2009/04/21 01:15:37 

CVS commit: [netbsd-5] src/doc

2009-04-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Apr 21 01:58:59 UTC 2009

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

Log Message:
Tickets 708 and 710-713.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.138 -r1.1.2.139 src/doc/CHANGES-5.0

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

Modified files:

Index: src/doc/CHANGES-5.0
diff -u src/doc/CHANGES-5.0:1.1.2.138 src/doc/CHANGES-5.0:1.1.2.139
--- src/doc/CHANGES-5.0:1.1.2.138	Sun Apr 19 15:54:04 2009
+++ src/doc/CHANGES-5.0	Tue Apr 21 01:58:59 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0,v 1.1.2.138 2009/04/19 15:54:04 snj Exp $
+# $NetBSD: CHANGES-5.0,v 1.1.2.139 2009/04/21 01:58:59 snj Exp $
 
 A complete list of changes from the initial NetBSD 5.0 branch on October 2008
 until the 5.0 release:
@@ -6119,6 +6119,7 @@
 	syntax. Fixes PR 41238.
 	[wiz, ticket #707]
 
+sbin/modload/modload.cpatch
 sys/uvm/uvm_km.c1.102
 sys/uvm/uvm_km.h1.18
 sys/uvm/uvm_map.c1.264
@@ -6127,7 +6128,10 @@
 	VM_MAP_IS_KERNEL(map) where map is outside the range of
 	kernel_map.  Fixes PR port-amd64/32816, making LKMs
 	loadable on amd64.
-	[mrg, ticket #708]
+	--
+	Disable ksyms support in modload(8), falling back to using
+	sysctl to obtain the name of the booted kernel.
+	[mrg/ad, ticket #708]
 
 dist/nvi/common/conv.h1.4 via patch
 dist/nvi/vi/vs_line.c1.5 via patch
@@ -6142,3 +6146,22 @@
 	kern/38773 and kern/41074.
 	[tsutsui, ticket #710]
 
+sys/netinet6/ip6_output.c			1.137
+
+	Fix traversing of a control mbuf in the case that a message
+	len is not aligned wrt CMSG_ALIGN - the length counter drops
+	below 0 in this case which was not checked for.
+	[drochner, ticket #713]
+
+sbin/fdisk/fdisk.c1.119
+
+	When using -s flag, read start and size as unsigned to allow
+	for larger disks.
+	[sborrill, ticket #712]
+
+external/mit/xorg/bin/xterm/Makefile		1.3
+
+	Turn on PASTE64 to handle large cut-n-paste buffers like the
+	old xterm did.
+	[agc, ticket #711]
+



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-r128

2009-04-20 Thread Rafal Boni
Module Name:src
Committed By:   rafal
Date:   Tue Apr 21 02:45:25 UTC 2009

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-r128: Makefile

Log Message:
Fix part of xsrc/40322: r128 driver does not restore VGA state on exit from X.

radeon driver still needs looking at, it restores the console mode OK, but
the font is a very dark gray making it appear as if the screen is blank as
well.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile:1.1 src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile:1.2
--- src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile:1.1	Mon Oct 13 11:12:33 2008
+++ src/external/mit/xorg/server/drivers/xf86-video-r128/Makefile	Tue Apr 21 02:45:25 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2008/10/13 11:12:33 rtr Exp $
+#	$NetBSD: Makefile,v 1.2 2009/04/21 02:45:25 rafal Exp $
 
 DRIVER=		xf86-video-r128
 DRIVER_NAME=	r128_drv
@@ -8,4 +8,9 @@
 
 MAN=	r128.4
 
+# Enable VGA support (esp. hw state save/restore) on i386 / amd64 platforms
+.if ${MACHINE} == amd64 || ${MACHINE} == i386
+CPPFLAGS+=	-DWITH_VGAHW
+.endif
+
 .include ../Makefile.xf86-driver



CVS commit: src/etc/etc.zaurus

2009-04-20 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Apr 21 03:00:58 UTC 2009

Modified Files:
src/etc/etc.zaurus: MAKEDEV.conf

Log Message:
Add ld0 for SD/MMC.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.zaurus/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.zaurus/MAKEDEV.conf
diff -u src/etc/etc.zaurus/MAKEDEV.conf:1.5 src/etc/etc.zaurus/MAKEDEV.conf:1.6
--- src/etc/etc.zaurus/MAKEDEV.conf:1.5	Sat Sep 13 11:46:18 2008
+++ src/etc/etc.zaurus/MAKEDEV.conf	Tue Apr 21 03:00:58 2009
@@ -1,7 +1,7 @@
-# $NetBSD: MAKEDEV.conf,v 1.5 2008/09/13 11:46:18 tsutsui Exp $
+# $NetBSD: MAKEDEV.conf,v 1.6 2009/04/21 03:00:58 nonaka Exp $
 
 all_md)
-	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
+	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 ld0
 	makedev tty0 tty1 st0 st1 ch0 cd0 cd1
 	makedev uk0 uk1 ss0
 	makedev lpa0 lpt0
@@ -19,7 +19,7 @@
 	;;
 
 ramdisk|floppy)
-	makedev std fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
+	makedev std fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3 ld0
 	makedev tty0 tty1 opty
 	makedev st0 st1 cd0 cd1
 	makedev wscons



CVS commit: src/doc

2009-04-20 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Apr 21 03:01:38 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
note Added SD/MMC driver


To generate a diff of this commit:
cvs rdiff -u -r1.1210 -r1.1211 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.1210 src/doc/CHANGES:1.1211
--- src/doc/CHANGES:1.1210	Mon Apr 20 20:19:17 2009
+++ src/doc/CHANGES	Tue Apr 21 03:01:38 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1210 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1211 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -179,4 +179,6 @@
 	[christos 20090412]
 	dhcpcd: Import dhcpcd-4.0.13 [roy 20090417]
 	ale(4):	Add a driver for Attensic/Atheros L1E Gigabit Ethernet.
-		From OpenBSD and improvements from Kevin Lahey. [cegger 20090420]
+		From OpenBSD and improvements from Kevin Lahey.
+		[cegger 20090420]
+	sdmmc(4): Add a driver for SD/MMC from OpenBSD. [nonaka 20090421]



CVS commit: src/doc

2009-04-20 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Apr 21 03:15:01 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
note recent zaudio(4) changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1211 -r1.1212 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.1211 src/doc/CHANGES:1.1212
--- src/doc/CHANGES:1.1211	Tue Apr 21 03:01:38 2009
+++ src/doc/CHANGES	Tue Apr 21 03:15:01 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1211 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1212 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -160,6 +160,7 @@
 		later chips. [tsutsui 20090307]
 	crash(8): Add a new utility to diagnose kernel crashes. Based upon
 		the in-kernel debugger (ddb). [ad 20090307]
+	zaudio(4): Add only playback support.
 	sgimips: Add TCPv4/UDPv4 RX hardware checksum support for mec(4)
 		Ethernet on O2. [tsutsui 20090316]
 	am-utils: Import latest from head; adds udf support amd -uu
@@ -178,6 +179,7 @@
 	DHCID, NSEC3, NSEC3PARAM, HIP and DLV, various new api functions.
 	[christos 20090412]
 	dhcpcd: Import dhcpcd-4.0.13 [roy 20090417]
+	zaudio(4): Add recoding support.
 	ale(4):	Add a driver for Attensic/Atheros L1E Gigabit Ethernet.
 		From OpenBSD and improvements from Kevin Lahey.
 		[cegger 20090420]