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

2010-10-16 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Oct 16 18:22:37 UTC 2010

Modified Files:
src/sys/arch/macppc/dev: snapper.c

Log Message:
Find all GPIOs in OF also on newer PowerBooks.
Do not use a GPIO or establish an interrupt when it was not found.
To be done: We should use bus_space(9) for reading/writing GPIOs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c
diff -u src/sys/arch/macppc/dev/snapper.c:1.34 src/sys/arch/macppc/dev/snapper.c:1.35
--- src/sys/arch/macppc/dev/snapper.c:1.34	Thu Sep  9 00:24:59 2010
+++ src/sys/arch/macppc/dev/snapper.c	Sat Oct 16 18:22:37 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapper.c,v 1.34 2010/09/09 00:24:59 macallan Exp $	*/
+/*	$NetBSD: snapper.c,v 1.35 2010/10/16 18:22:37 phx Exp $	*/
 /*	Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp	*/
 /*	Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp		*/
 
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.34 2010/09/09 00:24:59 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.35 2010/10/16 18:22:37 phx Exp $");
 
 #include 
 #include 
@@ -1903,16 +1903,18 @@
 {
 	u_int x;
 
-	DPRINTF("ampmute %d --> ", gpio_read(amp_mute));
+	if (amp_mute) {
+		DPRINTF("ampmute %d --> ", gpio_read(amp_mute));
 
-	if (mute)
-		x = amp_active;		/* mute */
-	else
-		x = !amp_active;	/* unmute */
-	if (x != gpio_read(amp_mute))
-		gpio_write(amp_mute, x);
+		if (mute)
+			x = amp_active;		/* mute */
+		else
+			x = !amp_active;	/* unmute */
+		if (x != gpio_read(amp_mute))
+			gpio_write(amp_mute, x);
 
-	DPRINTF("%d\n", gpio_read(amp_mute));
+		DPRINTF("%d\n", gpio_read(amp_mute));
+	}
 }
 
 static void
@@ -1920,16 +1922,18 @@
 {
 	u_int x;
 
-	DPRINTF("headphonemute %d --> ", gpio_read(headphone_mute));
+	if (headphone_mute != NULL) {
+		DPRINTF("headphonemute %d --> ", gpio_read(headphone_mute));
 
-	if (mute)
-		x = headphone_active;	/* mute */
-	else
-		x = !headphone_active;	/* unmute */
-	if (x != gpio_read(headphone_mute))
-		gpio_write(headphone_mute, x);
+		if (mute)
+			x = headphone_active;	/* mute */
+		else
+			x = !headphone_active;	/* unmute */
+		if (x != gpio_read(headphone_mute))
+			gpio_write(headphone_mute, x);
 
-	DPRINTF("%d\n", gpio_read(headphone_mute));
+		DPRINTF("%d\n", gpio_read(headphone_mute));
+	}
 }
 
 static int
@@ -1938,20 +1942,22 @@
 	struct snapper_softc *sc;
 	u_int sense;
 
-	sc = v;
-	sense = *headphone_detect;
-	DPRINTF("headphone detect = 0x%x\n", sense);
-
-	if (((sense & 0x02) >> 1) == headphone_detect_active) {
-		DPRINTF("headphone is inserted\n");
-		snapper_mute_speaker(sc, 1);
-		snapper_mute_headphone(sc, 0);
-		sc->sc_output_mask = 1 << 1;
-	} else {
-		DPRINTF("headphone is NOT inserted\n");
-		snapper_mute_speaker(sc, 0);
-		snapper_mute_headphone(sc, 1);
-		sc->sc_output_mask = 1 << 0;
+	if (headphone_detect != NULL) {
+		sc = v;
+		sense = *headphone_detect;
+		DPRINTF("headphone detect = 0x%x\n", sense);
+
+		if (((sense & 0x02) >> 1) == headphone_detect_active) {
+			DPRINTF("headphone is inserted\n");
+			snapper_mute_speaker(sc, 1);
+			snapper_mute_headphone(sc, 0);
+			sc->sc_output_mask = 1 << 1;
+		} else {
+			DPRINTF("headphone is NOT inserted\n");
+			snapper_mute_speaker(sc, 0);
+			snapper_mute_headphone(sc, 1);
+			sc->sc_output_mask = 1 << 0;
+		}
 	}
 
 	return 1;
@@ -2020,6 +2026,7 @@
 {
 	int gpio;
 	int headphone_detect_intr, headphone_detect_intrtype;
+	uint32_t gpio_base, reg[1];
 #ifdef SNAPPER_DEBUG
 	char fcr[32];
 
@@ -2029,7 +2036,12 @@
 	headphone_detect_intr = -1;
 
 	gpio = of_getnode_byname(OF_parent(node), "gpio");
-	DPRINTF(" /gpio 0x%x\n", gpio);
+	if (OF_getprop(gpio, "reg", reg, sizeof(reg)) == sizeof(reg))
+		gpio_base = reg[0];
+	else
+		gpio_base = 0;
+	DPRINTF(" /gpio 0...@0x%x\n", (unsigned)gpio, gpio_base);
+
 	gpio = OF_child(gpio);
 	while (gpio) {
 		char name[64], audio_gpio[64];
@@ -2041,29 +2053,40 @@
 		addr = 0;
 		OF_getprop(gpio, "name", name, sizeof name);
 		OF_getprop(gpio, "audio-gpio", audio_gpio, sizeof audio_gpio);
-		OF_getprop(gpio, "AAPL,address", &addr, sizeof addr);
+		if (OF_getprop(gpio, "AAPL,address", &addr, sizeof addr) == -1)
+			if (OF_getprop(gpio, "reg", reg, sizeof reg)
+			== sizeof reg)
+addr = (char *)sc->sc_baseaddr +
+gpio_base + reg[0];
 		DPRINTF(" 0x%x %s %s\n", gpio, name, audio_gpio);
 
 		/* gpio5 */
-		if (strcmp(audio_gpio, "headphone-mute") == 0)
+		if (strcmp(audio_gpio, "headphone-mute") == 0 ||
+		strcmp(name, "headphone-mute") == 0)
 			headphone_mute = addr;
 		/* gpio6 */
-		if (strcmp(audio_gpio, "amp-mute") == 0)
+		if (strcmp(audio_gpio, "amp-mute") == 0 ||
+		strcmp(name, "amp-mute") == 0)
 			amp_mute = addr;
 		/* extint-gpio15 */
-		if (strcmp(audio_gpio, "headphone-detect") == 0) {
+		if (str

CVS commit: src/sys/kern

2010-10-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Oct 16 18:09:02 UTC 2010

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

Log Message:
Remove double-inclusion of 


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/kern_module.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/kern_module.c
diff -u src/sys/kern/kern_module.c:1.72 src/sys/kern/kern_module.c:1.73
--- src/sys/kern/kern_module.c:1.72	Sat Aug 21 13:17:31 2010
+++ src/sys/kern/kern_module.c	Sat Oct 16 18:09:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.72 2010/08/21 13:17:31 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.72 2010/08/21 13:17:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -51,7 +51,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



CVS commit: src/libexec/ld.elf_so

2010-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 17:48:13 UTC 2010

Modified Files:
src/libexec/ld.elf_so: headers.c

Log Message:
Add cast so that usr.bin/ldd/elf32 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/libexec/ld.elf_so/headers.c

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

Modified files:

Index: src/libexec/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.36 src/libexec/ld.elf_so/headers.c:1.37
--- src/libexec/ld.elf_so/headers.c:1.36	Sat Oct 16 10:27:07 2010
+++ src/libexec/ld.elf_so/headers.c	Sat Oct 16 17:48:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.36 2010/10/16 10:27:07 skrll Exp $	 */
+/*	$NetBSD: headers.c,v 1.37 2010/10/16 17:48:12 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.36 2010/10/16 10:27:07 skrll Exp $");
+__RCSID("$NetBSD: headers.c,v 1.37 2010/10/16 17:48:12 skrll Exp $");
 #endif /* not lint */
 
 #include 
@@ -325,7 +325,7 @@
 	assert(obj->phdr == phdr);
 	
 	for (ph = phdr; ph < phlimit; ++ph) {
-		vaddr = (Elf_Addr)obj->relocbase + ph->p_vaddr;
+		vaddr = (Elf_Addr)(uintptr_t)(obj->relocbase + ph->p_vaddr);
 		switch (ph->p_type) {
 
 		case PT_INTERP:



CVS commit: src/sys/arch

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 17:10:44 UTC 2010

Modified Files:
src/sys/arch/amiga/amiga: machdep.c
src/sys/arch/atari/atari: machdep.c
src/sys/arch/cesfic/cesfic: machdep.c
src/sys/arch/luna68k/luna68k: machdep.c
src/sys/arch/mac68k/mac68k: machdep.c
src/sys/arch/mvme68k/mvme68k: machdep.c
src/sys/arch/next68k/next68k: machdep.c
src/sys/arch/x68k/x68k: machdep.c

Log Message:
Prepare empty module_init_md() for options MODULAR for all other m68k ports.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/arch/amiga/amiga/machdep.c
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/cesfic/cesfic/machdep.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/luna68k/luna68k/machdep.c
cvs rdiff -u -r1.335 -r1.336 src/sys/arch/mac68k/mac68k/machdep.c
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/mvme68k/mvme68k/machdep.c
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/x68k/x68k/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.226 src/sys/arch/amiga/amiga/machdep.c:1.227
--- src/sys/arch/amiga/amiga/machdep.c:1.226	Sun Jun  6 04:50:05 2010
+++ src/sys/arch/amiga/amiga/machdep.c	Sat Oct 16 17:10:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.226 2010/06/06 04:50:05 mrg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.227 2010/10/16 17:10:42 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -87,7 +87,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.226 2010/06/06 04:50:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.227 2010/10/16 17:10:42 tsutsui Exp $");
 
 #include 
 #include 
@@ -109,6 +109,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1263,6 +1264,13 @@
 }
 
 #ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
 
 int _spllkm6(void);
 int _spllkm7(void);

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.167 src/sys/arch/atari/atari/machdep.c:1.168
--- src/sys/arch/atari/atari/machdep.c:1.167	Tue Apr 13 11:22:22 2010
+++ src/sys/arch/atari/atari/machdep.c	Sat Oct 16 17:10:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.167 2010/04/13 11:22:22 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.168 2010/10/16 17:10:42 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.167 2010/04/13 11:22:22 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.168 2010/10/16 17:10:42 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -103,6 +103,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -877,6 +878,16 @@
 	return error;
 }
 
+#ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
+#endif
+
 #ifdef _MILANHW_
 
 /*

Index: src/sys/arch/cesfic/cesfic/machdep.c
diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.54 src/sys/arch/cesfic/cesfic/machdep.c:1.55
--- src/sys/arch/cesfic/cesfic/machdep.c:1.54	Mon Feb  8 19:02:27 2010
+++ src/sys/arch/cesfic/cesfic/machdep.c	Sat Oct 16 17:10:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.54 2010/02/08 19:02:27 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.55 2010/10/16 17:10:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2010/02/08 19:02:27 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2010/10/16 17:10:43 tsutsui Exp $");
 
 #include "opt_bufcache.h"
 #include "opt_ddb.h"
@@ -85,6 +85,7 @@
 #include "opt_compat_netbsd.h"
 #include "opt_sysv.h"
 #include "opt_panicbutton.h"
+#include "opt_modular.h"
 
 #include 
 #include 
@@ -107,6 +108,7 @@
 #include 
 #include 
 #include 
+#include 
 #ifdef SYSVMSG
 #include 
 #endif
@@ -701,3 +703,13 @@
 
 	return ENOEXEC;
 }
+
+#ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
+#endif

Index: src/sys/arch/luna68k/luna68k/machdep.c
diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.75 src/sys/arch/luna68k/luna68k/machdep.c:1.76
--- src/sys/arch/luna68k/luna68k/machdep.c:1.75	Sun Jun  6 04:50:06 2010
+++ src/sys/arch/luna68k/luna68k/machdep.c	Sat Oct 16 17:10:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.75 2010/06/06 04:50:06 mrg Exp $ */
+/* $NetBSD: machdep.c,v 1.76 2010/10/16 17:10:43 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro

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

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 16:57:29 UTC 2010

Modified Files:
src/sys/arch/hp300/conf: GENERIC

Log Message:
- add commented out options MODULAR
- comment out historical options COMPAT_44


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/hp300/conf/GENERIC

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/hp300/conf/GENERIC
diff -u src/sys/arch/hp300/conf/GENERIC:1.156 src/sys/arch/hp300/conf/GENERIC:1.157
--- src/sys/arch/hp300/conf/GENERIC:1.156	Wed Jul  7 01:24:52 2010
+++ src/sys/arch/hp300/conf/GENERIC	Sat Oct 16 16:57:29 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.156 2010/07/07 01:24:52 chs Exp $
+# $NetBSD: GENERIC,v 1.157 2010/10/16 16:57:29 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.156 $"
+#ident 		"GENERIC-$Revision: 1.157 $"
 
 maxusers	32		# estimated number of users
 
@@ -57,6 +57,8 @@
 options 	SYSVSEM		# System V-style semaphores
 options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
 
+#options 	MODULAR		# new style module framework
+
 # Enable experimental buffer queue strategy for better responsiveness under 
 # high disk I/O load. Use it with caution - it's not proven to be stable yet.
 #options 	BUFQ_READPRIO
@@ -73,7 +75,7 @@
 
 # Compatibility options
 options 	COMPAT_43	# compatibility with 4.3BSD interfaces
-options 	COMPAT_44	# compatibility with 4.4BSD binaries
+#options 	COMPAT_44	# compatibility with 4.4BSD binaries
 options 	COMPAT_09	# compatibility with NetBSD 0.9
 options 	COMPAT_10	# compatibility with NetBSD 1.0
 options 	COMPAT_11	# compatibility with NetBSD 1.1



CVS commit: src/sys/arch/hp300/hp300

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 16:41:45 UTC 2010

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

Log Message:
Prepare empty module_init_md() for options MODULAR.

XXX: Should we get rid of cpu_exec_aout_makecmds() for COMPAT_NOMID and
XXX: COMPAT_44? Who still keeps such rare ancient commands?


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/hp300/hp300/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/hp300/hp300/machdep.c
diff -u src/sys/arch/hp300/hp300/machdep.c:1.211 src/sys/arch/hp300/hp300/machdep.c:1.212
--- src/sys/arch/hp300/hp300/machdep.c:1.211	Mon Feb  8 19:02:28 2010
+++ src/sys/arch/hp300/hp300/machdep.c	Sat Oct 16 16:41:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211 2010/02/08 19:02:28 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.212 2010/10/16 16:41:45 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2010/02/08 19:02:28 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.212 2010/10/16 16:41:45 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -109,6 +109,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DDB
 #include 
@@ -1277,3 +1278,13 @@
 
 	return ENOEXEC;
 }
+
+#ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
+#endif



CVS commit: src/doc

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 15:33:06 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Note misc user visible changes I put recently.


To generate a diff of this commit:
cvs rdiff -u -r1.1441 -r1.1442 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.1441 src/doc/CHANGES:1.1442
--- src/doc/CHANGES:1.1441	Tue Oct 12 23:30:47 2010
+++ src/doc/CHANGES	Sat Oct 16 15:33:06 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1441 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1442 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -643,6 +643,9 @@
 	hpcsh: Add sysinst(8) support. [tsutsui 20100503]
 	sandpoint: Added support for Marvell-SKnet in netboot.
 		[phx 20100503]
+	news68k: Switch NetBSD/news68k to using 8KB/page in kernel.
+		It slightly improves performance on NWS-1750D.
+		[tsutsui 20100504]
 	xen: Enable no-execute bit feature for i386pae and amd64 kernels.
 		[jym 20100505]
 	cron(8): Import 4.1 from isc. [christos 20100506]
@@ -681,8 +684,14 @@
 	httpd(8): Import bozohttpd-20100621. [mrg 20100621]
 	kernel: Add high-priority xcall(9) support. [rmind 20100622]
 	hp700: Add support for uturn(4) based machines. [skrll 20100624]
+	autoconf(9): Add config_mountroot(9), which defers device configuration
+		after mountroot(), like config_interrupt(9) that defers
+		configuration after interrupts are enabled. [tsutsui 20100625]
+	hpcarm: Use rtc_offset passed from hpcboot. [tsutsui 20100626]
 	network: Add mpls(4) - MultiProtocol Label Switching support
 		[kefren 20100626]
+	kue(4): Fix unaligned memory access to make kue(4) work on
+		ARM and MIPS machines. [tsutsui 20100627]
 	atf(7): Import 0.10.  [jmmv 20100703]
 	upgt(4): Add a driver for Conexant/Intersil PrismGT SoftMAC USB
 		IEEE 802.11b/g WLAN device, ported from OpenBSD by
@@ -692,6 +701,7 @@
 	kernel: Add direct select()/poll() support. [rmind 20100708]
 	prep: Support Xserver.  It's tested only on-board s3(864).
 		[kiyohara 20100712]
+	hpcarm: Bump MAXPARTITIONS from 8 to 16. [tsutsui 20100717]
 	tests(7): Convert the libposix, libprop, libpthread, librt, libskey and
 		libutil tests to ATF.  [jmmv 20100716]
 	tests(7): Convert the include and csu tests to ATF.  [jmmv 20100717]
@@ -705,6 +715,9 @@
 		[kiyohara 20100801]
 	tests(7): Convert the sort tests to ATF.  [jmmv 20100801]
 	wpa: New wpa_supplicant and hostapd 0.7.2 [christos 20100804]
+	hpcarm: Improve console speed on W-ZERO3 machines using
+		write through mapping for framebuffer memory.
+		[tsutsui 20100808]
 	bind: Update to 9.7.2b1. [christos 20100806]
 	acpicpu(4): add a driver for ACPI-based processor functionality.
 		[jruoho 20100815]
@@ -713,14 +726,39 @@
 	awk(1): upgrade to 20100523 [christos 20100826]
 	ntp: switch build to ntp 4.2.6 (imported 20091213 in external/bsd/ntp)
 		[kardel 20100827]
+	dreamcast: Fix a long standing GD-ROM driver bug so that file system
+		on GD-ROM works properly.  The problem is reported and tracked
+		by Yasushi Oshima. [tsutsui 20100831]
 	omapfb: a simple driver for OMAP 3xxx on-chip video, especially the
 		Beagleboard [macallan 20100831]
+	hpcarm: Add an install kernel for JORNADA720 and make sysinst(8)
+		choose a proper default kernel per running installation kernel.
+		[tsutsui 20100904]
 	acpi(4): The ACPI driver will no longer attach if the BIOS release
 		year is 2000 or older. To override this behaviour, set
 		acpi_force_load=1 or add options ACPI_BLACKLIST_YEAR=0 to your
 		kernel config. [jmcneill 20100906]
+	amd64, i386: Enable Ext2fs support in bootloader. [tsutsui 20100911]
+	m68k: Re-enable m68k optimized in_cksum routine.  Makes
+		~5% improvements of ttcp(1) xfer rates. [tsutsui 20100919]
+	sparc: Re-enable sparc optimized in_cksum routine. [tsutsui 20100920]
 	httpd(8): Import bozohttpd-20100920. [mrg 20100921]
+	aue(4): Add support for I-O DATA ETX-US2. [tsutsui 20100925]
 	evbarm: Support Marvell Sheevaplug and some Marvell SoC NAS box.
 		[kiyohara 20101002]
+	build: Use consistent kernel names in distribution, i.e. rename kernels
+		from "netbsd.aout-GENERIC.gz" to "netbsd-GENERIC.aout.gz" etc.
+		[tsutsui 20101004]
+	dreamcast: Build and put a raw binary format kernel into distribution.
+		[tsutsui 20101004]
 	dhcpcd(8): Import dhcpcd-5.2.8. [roy 20101007]
+	xinit(1): Disable PAM on ports which have legacy non-XFree86 servers
+		so that xinit(1) can properly quit Xserver after xinitrc script
+		exits. [tsutsui 20101010]
 	acpivga(4): Add a driver for ACPI video extensions.  [gsutre 20101012]
+	dreamcast: Add a stub for kernels with options MODULAR.
+		[tsutsui 20101013]
+	m68k: Fix kobj relocation functions so that MODULAR kernel work
+		on m68k ports.  [tsutsui 20101014]
+	sun3: Make common kernel module binaries work on both sun3 and sun3x

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

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 13:55:54 UTC 2010

Modified Files:
src/sys/arch/sun3/conf: GENERIC GENERIC3X

Log Message:
Add commented out options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/arch/sun3/conf/GENERIC
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/sun3/conf/GENERIC3X

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/sun3/conf/GENERIC
diff -u src/sys/arch/sun3/conf/GENERIC:1.151 src/sys/arch/sun3/conf/GENERIC:1.152
--- src/sys/arch/sun3/conf/GENERIC:1.151	Wed Jul  7 01:24:52 2010
+++ src/sys/arch/sun3/conf/GENERIC	Sat Oct 16 13:55:54 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.151 2010/07/07 01:24:52 chs Exp $
+# $NetBSD: GENERIC,v 1.152 2010/10/16 13:55:54 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -25,7 +25,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.151 $"
+#ident		"GENERIC-$Revision: 1.152 $"
 
 makeoptions	COPTS="-Os"		# bootloader has size limit (~2MB)
 
@@ -42,6 +42,9 @@
 options 	SYSVSEM		# System V semaphores
 options 	SYSVSHM		# System V shared memory
 options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
+
+#options 	MODULAR		# new style module framework
+
 #options 	INSECURE	# disable kernel security level
 #options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)

Index: src/sys/arch/sun3/conf/GENERIC3X
diff -u src/sys/arch/sun3/conf/GENERIC3X:1.107 src/sys/arch/sun3/conf/GENERIC3X:1.108
--- src/sys/arch/sun3/conf/GENERIC3X:1.107	Thu Apr 29 22:40:54 2010
+++ src/sys/arch/sun3/conf/GENERIC3X	Sat Oct 16 13:55:54 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC3X,v 1.107 2010/04/29 22:40:54 chs Exp $
+# $NetBSD: GENERIC3X,v 1.108 2010/10/16 13:55:54 tsutsui Exp $
 
 # GENERIC Sun3X (3/80, 3/470)
 # Supports root on: ie0, le0, sd*, ...
@@ -7,7 +7,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC3X-$Revision: 1.107 $"
+#ident		"GENERIC3X-$Revision: 1.108 $"
 
 makeoptions	COPTS="-Os"	# bootloader has size limit (~2MB)
 
@@ -24,6 +24,9 @@
 options 	SYSVSEM		# System V semaphores
 options 	SYSVSHM		# System V shared memory
 options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
+
+#options 	MODULAR		# new style module framework
+
 #options 	INSECURE	# disable kernel security level
 #options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)



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

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 13:55:11 UTC 2010

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Add commented out options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/news68k/conf/GENERIC

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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.101 src/sys/arch/news68k/conf/GENERIC:1.102
--- src/sys/arch/news68k/conf/GENERIC:1.101	Sat May  8 22:16:28 2010
+++ src/sys/arch/news68k/conf/GENERIC	Sat Oct 16 13:55:11 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.101 2010/05/08 22:16:28 mrg Exp $
+# $NetBSD: GENERIC,v 1.102 2010/10/16 13:55:11 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.101 $"
+#ident 		"GENERIC-$Revision: 1.102 $"
 
 maxusers	8
 
@@ -38,6 +38,9 @@
 options 	SYSVSEM			# System V semaphores
 options 	SYSVSHM			# System V shared memory
 options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
+
+#options 	MODULAR			# new style module framework
+
 options 	USERCONF		# userconf(4) support
 #options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel



CVS commit: src/share/man/man3

2010-10-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 16 12:05:48 UTC 2010

Modified Files:
src/share/man/man3: dl_iterate_phdr.3

Log Message:
Use .In.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man3/dl_iterate_phdr.3

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/dl_iterate_phdr.3
diff -u src/share/man/man3/dl_iterate_phdr.3:1.1 src/share/man/man3/dl_iterate_phdr.3:1.2
--- src/share/man/man3/dl_iterate_phdr.3:1.1	Sat Oct 16 10:27:08 2010
+++ src/share/man/man3/dl_iterate_phdr.3	Sat Oct 16 12:05:48 2010
@@ -1,4 +1,4 @@
-.\"   $NetBSD: dl_iterate_phdr.3,v 1.1 2010/10/16 10:27:08 skrll Exp $
+.\"   $NetBSD: dl_iterate_phdr.3,v 1.2 2010/10/16 12:05:48 wiz Exp $
 .\"   $OpenBSD: dl_iterate_phdr.3,v 1.3 2007/05/31 19:19:48 jmc Exp $
 .\"
 .\" Copyright (c) 2005 Mark Kettenis
@@ -22,7 +22,7 @@
 .Nm dl_iterate_phdr
 .Nd iterate over program headers
 .Sh SYNOPSIS
-.Fd #include 
+.In link.h
 .Ft int
 .Fn dl_iterate_phdr "int (*callback)(struct dl_phdr_info *, size_t, void*)" "void *data"
 .Sh DESCRIPTION



CVS commit: src

2010-10-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 16 11:23:42 UTC 2010

Modified Files:
src/lib/libc/stdlib: getenv.3 setenv.c
src/tests/lib/libc/stdlib: t_environment.c

Log Message:
Make setenv(3) follow the standard, by rejecting invalid strings. It
now fails with EINVAL errno when variable is NULL, empty or contains
an `=' character; or value is NULL.

Adjust the man page accordingly, and exercize them in the existing
environment testcase.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdlib/getenv.3
cvs rdiff -u -r1.40 -r1.41 src/lib/libc/stdlib/setenv.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_environment.c

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

Modified files:

Index: src/lib/libc/stdlib/getenv.3
diff -u src/lib/libc/stdlib/getenv.3:1.22 src/lib/libc/stdlib/getenv.3:1.23
--- src/lib/libc/stdlib/getenv.3:1.22	Fri Oct  1 20:57:50 2010
+++ src/lib/libc/stdlib/getenv.3	Sat Oct 16 11:23:41 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getenv.3,v 1.22 2010/10/01 20:57:50 wiz Exp $
+.\"	$NetBSD: getenv.3,v 1.23 2010/10/16 11:23:41 njoly Exp $
 .\"
 .\" Copyright (c) 1988, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\" from: @(#)getenv.3	8.2 (Berkeley) 12/11/93
 .\"
-.Dd October 1, 2010
+.Dd October 16, 2010
 .Dt GETENV 3
 .Os
 .Sh NAME
@@ -62,16 +62,14 @@
 host
 .Em environment list .
 For compatibility with differing environment conventions,
-the given arguments
+the
+.Fn getenv
+or
+.Fn getenv_r
+given argument
 .Ar name
-and
-.Ar value
-may be appended and prepended,
-respectively,
-with an equal sign
-.Dq Li \&= ,
-except for
-.Fn unsetenv .
+may be appended with an equal sign
+.Dq Li \&= .
 .Pp
 The
 .Fn getenv
@@ -160,11 +158,18 @@
 The
 .Fa name
 argument to
+.Fn setenv
+or
 .Fn unsetenv
 is a null pointer, points to an empty string, or points to a string
 containing an
 .Dq Li \&=
 character.
+The
+.Fa value
+argument to
+.Fn setenv
+is a null pointer.
 .It Bq Er ENOMEM
 The function
 .Fn setenv

Index: src/lib/libc/stdlib/setenv.c
diff -u src/lib/libc/stdlib/setenv.c:1.40 src/lib/libc/stdlib/setenv.c:1.41
--- src/lib/libc/stdlib/setenv.c:1.40	Sat Oct  2 16:56:03 2010
+++ src/lib/libc/stdlib/setenv.c	Sat Oct 16 11:23:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: setenv.c,v 1.40 2010/10/02 16:56:03 tron Exp $	*/
+/*	$NetBSD: setenv.c,v 1.41 2010/10/16 11:23:41 njoly Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)setenv.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: setenv.c,v 1.40 2010/10/02 16:56:03 tron Exp $");
+__RCSID("$NetBSD: setenv.c,v 1.41 2010/10/16 11:23:41 njoly Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -60,13 +60,23 @@
 setenv(const char *name, const char *value, int rewrite)
 {
 	char *c;
-	const char *cc;
 	size_t l_value, size;
 	int offset;
 
 	_DIAGASSERT(name != NULL);
 	_DIAGASSERT(value != NULL);
 
+	if (name == NULL || value == NULL) {
+		errno = EINVAL;
+		return -1;
+	}
+
+	size = strcspn(name, "=");
+	if (size == 0 || name[size] != '\0') {
+		errno = EINVAL;
+		return -1;
+	}
+
 	if (rwlock_wrlock(&__environ_lock) != 0)
 		return -1;
 
@@ -76,8 +86,6 @@
 	if (__allocenv(offset) == -1)
 		goto bad;
 
-	if (*value == '=')			/* no `=' in value */
-		++value;
 	l_value = strlen(value);
 
 	if (c != NULL) {
@@ -93,9 +101,6 @@
 			goto copy;
 		}
 	}
-	for (cc = name; *cc && *cc != '='; ++cc)	/* no `=' in name */
-		continue;
-	size = cc - name;
 	/* name + `=' + value */
 	if ((c = malloc(size + l_value + 2)) == NULL)
 		goto bad;

Index: src/tests/lib/libc/stdlib/t_environment.c
diff -u src/tests/lib/libc/stdlib/t_environment.c:1.2 src/tests/lib/libc/stdlib/t_environment.c:1.3
--- src/tests/lib/libc/stdlib/t_environment.c:1.2	Fri Oct  1 20:12:20 2010
+++ src/tests/lib/libc/stdlib/t_environment.c	Sat Oct 16 11:23:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_environment.c,v 1.2 2010/10/01 20:12:20 christos Exp $	*/
+/*	$NetBSD: t_environment.c,v 1.3 2010/10/16 11:23:41 njoly Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,9 +32,10 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_environment.c,v 1.2 2010/10/01 20:12:20 christos Exp $");
+__RCSID("$NetBSD: t_environment.c,v 1.3 2010/10/16 11:23:41 njoly Exp $");
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -71,6 +72,14 @@
 		unsetenv(name);
 		ATF_CHECK(getenv(name) == NULL);
 	}
+
+	ATF_CHECK_ERRNO(EINVAL, setenv(NULL, "val", 1) == -1);
+	ATF_CHECK_ERRNO(EINVAL, setenv("", "val", 1) == -1);
+	ATF_CHECK_ERRNO(EINVAL, setenv("v=r", "val", 1) == -1);
+	ATF_CHECK_ERRNO(EINVAL, setenv("var", NULL, 1) == -1);
+
+	ATF_CHECK(setenv("var", "=val", 1) == 0);
+	ATF_CHECK_STREQ(getenv("var"), "=val");
 }
 
 ATF_TC_BODY(t_putenv, tc)



CVS commit: src/usr.bin/env

2010-10-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 16 11:13:52 UTC 2010

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

Log Message:
Do use putenv(3) to handle the provided strings directly, instead of
setenv(3) which need string splitting and later reassembly.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/env/env.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/env/env.c
diff -u src/usr.bin/env/env.c:1.18 src/usr.bin/env/env.c:1.19
--- src/usr.bin/env/env.c:1.18	Fri Oct 15 19:35:08 2010
+++ src/usr.bin/env/env.c	Sat Oct 16 11:13:52 2010
@@ -35,7 +35,7 @@
 
 #ifndef lint
 /*static char sccsid[] = "@(#)env.c	8.3 (Berkeley) 4/2/94";*/
-__RCSID("$NetBSD: env.c,v 1.18 2010/10/15 19:35:08 jschauma Exp $");
+__RCSID("$NetBSD: env.c,v 1.19 2010/10/16 11:13:52 njoly Exp $");
 #endif /* not lint */
 
 #include 
@@ -54,7 +54,7 @@
 int
 main(int argc, char **argv)
 {
-	char **ep, *p;
+	char **ep;
 	char *cleanenv[1];
 	int ch;
 
@@ -72,8 +72,8 @@
 			usage();
 		}
 
-	for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv)
-		(void)setenv(*argv, ++p, 1);
+	for (argv += optind; *argv && strchr(*argv, '=') != NULL; ++argv)
+		(void)putenv(*argv);
 
 	if (*argv) {
 		/* return 127 if the command to be run could not be found; 126



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

2010-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 10:41:51 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
oops, sort after previous.


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

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1512 src/distrib/sets/lists/comp/mi:1.1513
--- src/distrib/sets/lists/comp/mi:1.1512	Sat Oct 16 10:27:06 2010
+++ src/distrib/sets/lists/comp/mi	Sat Oct 16 10:41:50 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1512 2010/10/16 10:27:06 skrll Exp $
+#	$NetBSD: mi,v 1.1513 2010/10/16 10:41:50 skrll Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -11538,11 +11538,11 @@
 ./usr/share/man/html3/disklabel_dkcksum.html	comp-c-htmlman		html
 ./usr/share/man/html3/disklabel_scan.html	comp-c-htmlman		html
 ./usr/share/man/html3/div.html			comp-c-htmlman		html
+./usr/share/man/html3/dl_iterate_phdr.html	comp-c-htmlman		html
 ./usr/share/man/html3/dladdr.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlclose.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlctl.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlerror.html		comp-c-htmlman		html
-./usr/share/man/html3/dl_iterate_phdr.html	comp-c-htmlman		html
 ./usr/share/man/html3/dlfcn.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlopen.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlsym.html		comp-c-htmlman		html



CVS commit: src

2010-10-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 16 10:27:08 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/include: link_elf.h
src/lib/libc/dlfcn: dlfcn_elf.c
src/libexec/ld.elf_so: headers.c load.c map_object.c rtld.c rtld.h
symbol.c
src/rescue: list.ldd
src/share/man/man3: Makefile
src/sys/sys: exec_elf.h
src/usr.bin/ldd: ldd.c
Added Files:
src/share/man/man3: dl_iterate_phdr.3

Log Message:
Implement dl_iterate_phdr.

Somewhat taken from FreeBSD. Manual page from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1511 -r1.1512 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.9 -r1.10 src/include/link_elf.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/dlfcn/dlfcn_elf.c
cvs rdiff -u -r1.35 -r1.36 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.37 -r1.38 src/libexec/ld.elf_so/load.c
cvs rdiff -u -r1.40 -r1.41 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.130 -r1.131 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.94 -r1.95 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.53 -r1.54 src/libexec/ld.elf_so/symbol.c
cvs rdiff -u -r1.3 -r1.4 src/rescue/list.ldd
cvs rdiff -u -r1.55 -r1.56 src/share/man/man3/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man3/dl_iterate_phdr.3
cvs rdiff -u -r1.105 -r1.106 src/sys/sys/exec_elf.h
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/ldd/ldd.c

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/mi
diff -u src/distrib/sets/lists/comp/mi:1.1511 src/distrib/sets/lists/comp/mi:1.1512
--- src/distrib/sets/lists/comp/mi:1.1511	Fri Oct 15 12:29:17 2010
+++ src/distrib/sets/lists/comp/mi	Sat Oct 16 10:27:06 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1511 2010/10/15 12:29:17 skrll Exp $
+#	$NetBSD: mi,v 1.1512 2010/10/16 10:27:06 skrll Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5588,6 +5588,7 @@
 ./usr/share/man/cat3/disklabel_dkcksum.0	comp-c-catman		.cat
 ./usr/share/man/cat3/disklabel_scan.0		comp-c-catman		.cat
 ./usr/share/man/cat3/div.0			comp-c-catman		.cat
+./usr/share/man/cat3/dl_iterate_phdr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/dladdr.0			comp-c-catman		.cat
 ./usr/share/man/cat3/dlclose.0			comp-c-catman		.cat
 ./usr/share/man/cat3/dlctl.0			comp-c-catman		.cat
@@ -11541,6 +11542,7 @@
 ./usr/share/man/html3/dlclose.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlctl.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlerror.html		comp-c-htmlman		html
+./usr/share/man/html3/dl_iterate_phdr.html	comp-c-htmlman		html
 ./usr/share/man/html3/dlfcn.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlopen.html		comp-c-htmlman		html
 ./usr/share/man/html3/dlsym.html		comp-c-htmlman		html
@@ -17394,6 +17396,7 @@
 ./usr/share/man/man3/disklabel_dkcksum.3	comp-c-man		.man
 ./usr/share/man/man3/disklabel_scan.3		comp-c-man		.man
 ./usr/share/man/man3/div.3			comp-c-man		.man
+./usr/share/man/man3/dl_iterate_phdr.3		comp-c-man		.man
 ./usr/share/man/man3/dladdr.3			comp-c-man		.man
 ./usr/share/man/man3/dlclose.3			comp-c-man		.man
 ./usr/share/man/man3/dlctl.3			comp-c-man		.man

Index: src/include/link_elf.h
diff -u src/include/link_elf.h:1.9 src/include/link_elf.h:1.10
--- src/include/link_elf.h:1.9	Thu Oct 14 07:51:21 2010
+++ src/include/link_elf.h	Sat Oct 16 10:27:06 2010
@@ -1,11 +1,10 @@
-/*	$NetBSD: link_elf.h,v 1.9 2010/10/14 07:51:21 skrll Exp $	*/
+/*	$NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $	*/
 
 #ifndef _LINK_ELF_H_
 #define	_LINK_ELF_H_
 
 #include 
-
-#include 
+#include 
 
 typedef struct link_map {
 	caddr_t		 l_addr;	/* Base Address of library */
@@ -32,4 +31,23 @@
 	} r_state;
 };
 
+struct dl_phdr_info
+{
+	Elf_Addr dlpi_addr;			/* module relocation base */
+	const char *dlpi_name;			/* module name */
+	const Elf_Phdr *dlpi_phdr;		/* pointer to module's phdr */
+	Elf_Half dlpi_phnum;			/* number of entries in phdr */
+	unsigned long long int dlpi_adds;	/* total # of loads */
+	unsigned long long int dlpi_subs;	/* total # of unloads */
+	size_t dlpi_tls_modid;
+	void *dlpi_tls_data;
+};
+
+__BEGIN_DECLS
+
+int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *),
+void *);
+
+__END_DECLS
+
 #endif	/* _LINK_ELF_H_ */

Index: src/lib/libc/dlfcn/dlfcn_elf.c
diff -u src/lib/libc/dlfcn/dlfcn_elf.c:1.6 src/lib/libc/dlfcn/dlfcn_elf.c:1.7
--- src/lib/libc/dlfcn/dlfcn_elf.c:1.6	Thu Sep 24 21:21:33 2009
+++ src/lib/libc/dlfcn/dlfcn_elf.c	Sat Oct 16 10:27:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dlfcn_elf.c,v 1.6 2009/09/24 21:21:33 pooka Exp $	*/
+/*	$NetBSD: dlfcn_elf.c,v 1.7 2010/10/16 10:27:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 2000 Takuya SHIOZAKI
@@ -27,7 +27,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: dlfcn_elf.c,v 1.6 2009/09/24 21:21:33 pooka Exp $");
+__RCSID("$NetBSD: dlfcn_elf.c,v 1.7 2010/10/16 10:27:07 skrll Exp $");