CVS commit: src/usr.bin/make

2009-06-01 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Mon Jun  1 23:28:39 UTC 2009

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

Log Message:
Missing ':' in .ORDER example


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.157 src/usr.bin/make/make.1:1.158
--- src/usr.bin/make/make.1:1.157	Wed May 13 22:56:42 2009
+++ src/usr.bin/make/make.1	Mon Jun  1 23:28:39 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.157 2009/05/13 22:56:42 wiz Exp $
+.\"	$NetBSD: make.1,v 1.158 2009/06/01 23:28:39 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd April 11, 2009
+.Dd June 1, 2009
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -1664,7 +1664,7 @@
 is built by another part of the dependency graph,
 the following is a dependency loop:
 .Bd -literal
-\&.ORDER a b
+\&.ORDER: a b
 b: a
 .Ed
 .Pp



CVS commit: src/lib/libc/sys

2009-06-01 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jun  1 22:04:54 UTC 2009

Modified Files:
src/lib/libc/sys: madvise.2

Log Message:
don't describe internal details.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/madvise.2

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/sys/madvise.2
diff -u src/lib/libc/sys/madvise.2:1.24 src/lib/libc/sys/madvise.2:1.25
--- src/lib/libc/sys/madvise.2:1.24	Tue Apr 22 10:42:16 2008
+++ src/lib/libc/sys/madvise.2	Mon Jun  1 22:04:54 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: madvise.2,v 1.24 2008/04/22 10:42:16 rmind Exp $
+.\"	$NetBSD: madvise.2,v 1.25 2009/06/01 22:04:54 yamt Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)madvise.2	8.1 (Berkeley) 6/9/93
 .\"
-.Dd April 19, 2008
+.Dd June 2, 2009
 .Dt MADVISE 2
 .Os
 .Sh NAME
@@ -62,24 +62,23 @@
 Is a hint that pages will be accessed randomly, and prefetching
 is likely not advantageous.
 .It Dv MADV_SEQUENTIAL
-Causes the VM system to depress the priority of
+Is a hint that pages will be accessed sequentially, from the lower address to
+higher address.
+It might cause the VM system to depress the priority of
 pages immediately preceding a given page when it is faulted in.
 .It Dv MADV_WILLNEED
-Causes pages that are in a given virtual address range
-to temporarily have higher priority, and if they are in
+Is a hint that pages will be accessed in the near future.
+It might cause the VM system to make pages that are in a given virtual
+address range to temporarily have higher priority, and if they are in
 memory, decrease the likelihood of them being freed.
-Additionally,
-the pages that are already in memory will be immediately mapped into
-the process, thereby eliminating unnecessary overhead of going through
+It might immediately map the pages that are already in memory into the
+process, thereby eliminating unnecessary overhead of going through
 the entire process of faulting the pages in.
-This WILL NOT fault
-pages in from backing store, but quickly map the pages already in memory
-into the calling process.
+It might or might not fault pages in from backing store.
 .It Dv MADV_DONTNEED
-Allows the VM system to decrease the in-memory priority
+Is a hint that pages will not be accessed in the near future.
+It might allow the VM system to decrease the in-memory priority
 of pages in the specified range.
-Additionally future references to
-this address range will incur a page fault.
 .It Dv MADV_FREE
 Gives the VM system the freedom to free pages,
 and tells the system that information in the specified page range



CVS commit: src/sys/arch/alpha

2009-06-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jun  1 20:58:16 UTC 2009

Modified Files:
src/sys/arch/alpha/alpha: locore.s vm_machdep.c
src/sys/arch/alpha/include: alpha.h

Log Message:
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup() instead.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/alpha/alpha/vm_machdep.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/include/alpha.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/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.113 src/sys/arch/alpha/alpha/locore.s:1.114
--- src/sys/arch/alpha/alpha/locore.s:1.113	Mon Apr 28 20:23:10 2008
+++ src/sys/arch/alpha/alpha/locore.s	Mon Jun  1 20:58:16 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.113 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: locore.s,v 1.114 2009/06/01 20:58:16 martin Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.113 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.114 2009/06/01 20:58:16 martin Exp $");
 
 #include "assym.h"
 
@@ -748,6 +748,16 @@
 	jmp	zero, (pv)
 	END(lwp_trampoline)
 
+/*
+ * Simplified version of above: don't call lwp_startup()
+ */
+LEAF_NOPROFILE(setfunc_trampoline, 0)
+	mov	s0, pv
+	mov	s1, ra
+	mov	s2, a0
+	jmp	zero, (pv)
+	END(setfunc_trampoline)
+
 /**/
 
 /*

Index: src/sys/arch/alpha/alpha/vm_machdep.c
diff -u src/sys/arch/alpha/alpha/vm_machdep.c:1.99 src/sys/arch/alpha/alpha/vm_machdep.c:1.100
--- src/sys/arch/alpha/alpha/vm_machdep.c:1.99	Mon Mar 16 23:11:09 2009
+++ src/sys/arch/alpha/alpha/vm_machdep.c	Mon Jun  1 20:58:16 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.99 2009/03/16 23:11:09 dsl Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.100 2009/06/01 20:58:16 martin Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.99 2009/03/16 23:11:09 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.100 2009/06/01 20:58:16 martin Exp $");
 
 #include 
 #include 
@@ -85,6 +85,7 @@
 void (*func)(void *), void *arg)
 {
 	struct user *up = l2->l_addr;
+	extern void lwp_trampoline(void);
 
 	l2->l_md.md_tf = l1->l_md.md_tf;
 	l2->l_md.md_flags = l1->l_md.md_flags & (MDP_FPUSED | MDP_FP_C);
@@ -150,7 +151,19 @@
 		l2tf->tf_regs[FRAME_A3] = 0;		/* no error */
 		l2tf->tf_regs[FRAME_A4] = 1;		/* is child */
 
-		cpu_setfunc(l2, func, arg);
+		up = l2->l_addr;
+		up->u_pcb.pcb_hw.apcb_ksp =
+		(u_int64_t)l2->l_md.md_tf;
+		up->u_pcb.pcb_context[0] =
+		(u_int64_t)func;			/* s0: pc */
+		up->u_pcb.pcb_context[1] =
+		(u_int64_t)exception_return;	/* s1: ra */
+		up->u_pcb.pcb_context[2] =
+		(u_int64_t)arg;			/* s2: arg */
+		up->u_pcb.pcb_context[3] =
+		(u_int64_t)l2;			/* s3: lwp */
+		up->u_pcb.pcb_context[7] =
+		(u_int64_t)lwp_trampoline;		/* ra: assembly magic */
 	}
 }
 
@@ -158,6 +171,7 @@
 cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
 {
 	struct user *up = l->l_addr;
+	extern void setfunc_trampoline(void);
 
 	up->u_pcb.pcb_hw.apcb_ksp =
 	(u_int64_t)l->l_md.md_tf;
@@ -167,10 +181,8 @@
 	(u_int64_t)exception_return;	/* s1: ra */
 	up->u_pcb.pcb_context[2] =
 	(u_int64_t)arg;			/* s2: arg */
-	up->u_pcb.pcb_context[3] =
-	(u_int64_t)l;			/* s3: lwp */
 	up->u_pcb.pcb_context[7] =
-	(u_int64_t)lwp_trampoline;		/* ra: assembly magic */
+	(u_int64_t)setfunc_trampoline;	/* ra: assembly magic */
 }	
 
 /*

Index: src/sys/arch/alpha/include/alpha.h
diff -u src/sys/arch/alpha/include/alpha.h:1.23 src/sys/arch/alpha/include/alpha.h:1.24
--- src/sys/arch/alpha/include/alpha.h:1.23	Wed Nov 28 17:40:03 2007
+++ src/sys/arch/alpha/include/alpha.h	Mon Jun  1 20:58:16 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha.h,v 1.23 2007/11/28 17:40:03 ad Exp $ */
+/* $NetBSD: alpha.h,v 1.24 2009/06/01 20:58:16 martin Exp $ */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -139,7 +139,6 @@
 void	regdump(struct trapframe *);
 void	regtoframe(const struct reg *, struct trapframe *);
 void	savectx(struct pcb *);
-void	lwp_trampoline(void);	/* MAGIC */
 void	trap(unsigned long, unsigned long, unsigned long, unsigned long,
 	struct trapframe *);
 void	trap_init(void);



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

2009-06-01 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun  1 20:36:43 UTC 2009

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

Log Message:
Replace a flag that was accidentally removed.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/ipmi.c

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

Modified files:

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.34 src/sys/arch/x86/x86/ipmi.c:1.35
--- src/sys/arch/x86/x86/ipmi.c:1.34	Mon Jun  1 20:08:44 2009
+++ src/sys/arch/x86/x86/ipmi.c	Mon Jun  1 20:36:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.34 2009/06/01 20:08:44 pgoyette Exp $ */
+/*	$NetBSD: ipmi.c,v 1.35 2009/06/01 20:36:43 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.34 2009/06/01 20:08:44 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.35 2009/06/01 20:36:43 pgoyette Exp $");
 
 #include 
 #include 
@@ -1781,6 +1781,7 @@
 		/*
 		 * Monitor threshold limits in the sensors.
 		 */
+		sc->sc_sensor[i].flags |= ENVSYS_FMONCRITICAL;
 		sc->sc_sensor[i].flags |= ENVSYS_FMONLIMITS;
 		(void)strlcpy(sc->sc_sensor[i].desc, ipmi_s->i_envdesc,
 		sizeof(sc->sc_sensor[i].desc));



CVS commit: src

2009-06-01 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun  1 20:08:45 UTC 2009

Modified Files:
src/share/man/man9: sysmon_envsys.9
src/sys/arch/x86/x86: ipmi.c
src/sys/dev/acpi: acpi_tz.c
src/sys/dev/i2c: dbcool.c sdtemp.c
src/sys/dev/sysmon: sysmon_envsys_events.c
src/sys/sys: envsys.h param.h

Log Message:
Since we no longer have individual events for each sensor value limit,
we don't need individual flag bits.  Clean up extra bit definitions.
Bump kernel version - welcome to 5.99.13


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/sysmon_envsys.9
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/ipmi.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/acpi/acpi_tz.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/dbcool.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/sdtemp.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/envsys.h
cvs rdiff -u -r1.346 -r1.347 src/sys/sys/param.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/man9/sysmon_envsys.9
diff -u src/share/man/man9/sysmon_envsys.9:1.23 src/share/man/man9/sysmon_envsys.9:1.24
--- src/share/man/man9/sysmon_envsys.9:1.23	Mon May 18 12:14:48 2009
+++ src/share/man/man9/sysmon_envsys.9	Mon Jun  1 20:08:44 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysmon_envsys.9,v 1.23 2009/05/18 12:14:48 wiz Exp $
+.\"	$NetBSD: sysmon_envsys.9,v 1.24 2009/06/01 20:08:44 pgoyette Exp $
 .\"
 .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 28, 2008
+.Dd June 1, 2009
 .Dt SYSMON_ENVSYS 9
 .Os
 .Sh NAME
@@ -432,14 +432,9 @@
 value as valid.
 .It ENVSYS_FMONCRITICAL
 Enables and registers a new event to monitor a critical state.
-.It ENVSYS_FMONCRITUNDER
-Enables and registers a new event to monitor a critical under state.
-.It ENVSYS_FMONCRITOVER
-Enables and registers a new event to monitor a critical over state.
-.It ENVSYS_FMONWARNUNDER
-Enables and registers a new event to monitor a warning under state.
-.It ENVSYS_FMONWARNOVER
-Enables and registers a new event to monitor a warning over state.
+.It ENVSYS_FMONLIMITS
+Enables and registers a new event to monitor a sensor's value crossing
+limits or thresholds.
 .It ENVSYS_FMONSTCHANGED
 Enables and registers a new event to monitor Battery capacity or drive state
 sensors.

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.33 src/sys/arch/x86/x86/ipmi.c:1.34
--- src/sys/arch/x86/x86/ipmi.c:1.33	Fri Apr 24 17:42:03 2009
+++ src/sys/arch/x86/x86/ipmi.c	Mon Jun  1 20:08:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.33 2009/04/24 17:42:03 ad Exp $ */
+/*	$NetBSD: ipmi.c,v 1.34 2009/06/01 20:08:44 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.33 2009/04/24 17:42:03 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.34 2009/06/01 20:08:44 pgoyette Exp $");
 
 #include 
 #include 
@@ -1779,12 +1779,9 @@
 		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		sc->sc_sensor[i].monitor = true;
 		/*
-		 * Monitor critical/critical-over/warning-over states
-		 * in the sensors.
+		 * Monitor threshold limits in the sensors.
 		 */
-		sc->sc_sensor[i].flags |= ENVSYS_FMONCRITICAL;
-		sc->sc_sensor[i].flags |= ENVSYS_FMONCRITOVER;
-		sc->sc_sensor[i].flags |= ENVSYS_FMONWARNOVER;
+		sc->sc_sensor[i].flags |= ENVSYS_FMONLIMITS;
 		(void)strlcpy(sc->sc_sensor[i].desc, ipmi_s->i_envdesc,
 		sizeof(sc->sc_sensor[i].desc));
 		if (sysmon_envsys_sensor_attach(sc->sc_envsys,

Index: src/sys/dev/acpi/acpi_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.39 src/sys/dev/acpi/acpi_tz.c:1.40
--- src/sys/dev/acpi/acpi_tz.c:1.39	Sun Nov  9 13:54:06 2008
+++ src/sys/dev/acpi/acpi_tz.c	Mon Jun  1 20:08:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.39 2008/11/09 13:54:06 pgoyette Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.40 2009/06/01 20:08:44 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill 
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.39 2008/11/09 13:54:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.40 2009/06/01 20:08:44 pgoyette Exp $");
 
 #include 
 #include 
@@ -585,7 +585,7 @@
 
 	sc->sc_sme = sysmon_envsys_create();
 	sc->sc_sensor.monitor = true;
-	sc->sc_sensor.flags = (ENVSYS_FMONCRITOVER|ENVSYS_FMONWARNOVER);
+	sc->sc_sensor.flags = ENVSYS_FMONLIMITS;
 	strlcpy(sc->sc_sensor.desc, "temperature", sizeof(sc->sc_sensor.desc));
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor)) {
 		sysmon_envsys_destroy(sc->sc_sme);

Index: src/sys/dev/i2c/dbcool.c
diff -u src/sys/dev/i2c/dbcool.c:1.11 src/sys/dev/i2c/dbcool.c:1.12
--- src/sys/dev/i2c/dbcool.c:1.11	M

CVS commit: src/sbin/fdisk

2009-06-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun  1 19:57:33 UTC 2009

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

Log Message:
Delete GPT partitions if we overwrite with MBR to avoid confusion with disks
that have both MBR and a secondary left over GPT partition signature. From
Mike M. Volokhov


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sbin/fdisk/Makefile
cvs rdiff -u -r1.59 -r1.60 src/sbin/fdisk/fdisk.8
cvs rdiff -u -r1.120 -r1.121 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/Makefile
diff -u src/sbin/fdisk/Makefile:1.39 src/sbin/fdisk/Makefile:1.40
--- src/sbin/fdisk/Makefile:1.39	Mon Apr  6 08:19:16 2009
+++ src/sbin/fdisk/Makefile	Mon Jun  1 15:57:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2009/04/06 12:19:16 lukem Exp $
+#	$NetBSD: Makefile,v 1.40 2009/06/01 19:57:33 christos Exp $
 
 PROG=	fdisk 
 SRCS=	fdisk.c
@@ -17,7 +17,7 @@
 
 .if (${HOSTPROG:U} == "")
 SUBDIR=	mbr
-DPADD+=	${LIBUTIL}
-LDADD+=	-lutil
+DPADD+=	${LIBUTIL} ${LIBZ}
+LDADD+=	-lutil -lz
 .include 
 .endif

Index: src/sbin/fdisk/fdisk.8
diff -u src/sbin/fdisk/fdisk.8:1.59 src/sbin/fdisk/fdisk.8:1.60
--- src/sbin/fdisk/fdisk.8:1.59	Sun Jan 20 10:04:09 2008
+++ src/sbin/fdisk/fdisk.8	Mon Jun  1 15:57:33 2009
@@ -1,6 +1,6 @@
-.\"	$NetBSD: fdisk.8,v 1.59 2008/01/20 15:04:09 dsl Exp $
+.\"	$NetBSD: fdisk.8,v 1.60 2009/06/01 19:57:33 christos Exp $
 .\"
-.Dd January 20, 2008
+.Dd June 1, 2009
 .Dt FDISK 8
 .Os
 .Sh NAME
@@ -125,6 +125,14 @@
 .Nm
 selects defaults for its questions to guarantee that behaviour.
 .Pp
+If partition data is going to be updated, and disk carries GUID Partition
+Tables the
+.Nm
+will remove both primary and backup GPT headers from the disk.
+See
+.Xr gpt 8
+for information on how to manipulate GUID Partition Tables.
+.Pp
 .Nm
 will calculate the correct
 .Em cylinder ,
@@ -559,6 +567,7 @@
 .Xr disktab 5 ,
 .Xr boot 8 ,
 .Xr disklabel 8 ,
+.Xr gpt 8 ,
 .Xr installboot 8 ,
 .Xr mbr 8 ,
 .Xr mbrlabel 8

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.120 src/sbin/fdisk/fdisk.c:1.121
--- src/sbin/fdisk/fdisk.c:1.120	Mon Apr 20 13:06:55 2009
+++ src/sbin/fdisk/fdisk.c	Mon Jun  1 15:57:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.120 2009/04/20 17:06:55 drochner Exp $ */
+/*	$NetBSD: fdisk.c,v 1.121 2009/06/01 19:57:33 christos Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: fdisk.c,v 1.120 2009/04/20 17:06:55 drochner Exp $");
+__RCSID("$NetBSD: fdisk.c,v 1.121 2009/06/01 19:57:33 christos Exp $");
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -61,13 +61,16 @@
 
 #if !HAVE_NBTOOL_CONFIG_H
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #else
 #include 
+#include 
 #include 
 #include "../../include/disktab.h"
 /* We enforce -F, so none of these possibly undefined items can be needed */
@@ -106,6 +109,8 @@
 #define	SCAN_F1		0x3b
 #define	SCAN_1		0x2
 
+#define GPT_TYPE(offs) ((offs) == GPT_HDR_BLKNO ?  "primary" : "secondary")
+
 #define	MAX_BIOS_DISKS	16	/* Going beyond F12 is hard though! */
 
 /* We same the dflt 'boot partition' as a disk block, with some magic values. */
@@ -197,6 +202,8 @@
 int F_flag = 1;
 #endif
 
+struct gpt_hdr gpt1, gpt2;	/* GUID partition tables */
+
 struct mbr_sector bootcode[8192 / sizeof (struct mbr_sector)];
 int bootsize;		/* actual size of bootcode */
 int boot_installed;	/* 1 if we've copied code into the mbr */
@@ -235,6 +242,8 @@
 int	get_params(void);
 int	read_s0(daddr_t, struct mbr_sector *);
 int	write_mbr(void);
+int	read_gpt(daddr_t, struct gpt_hdr *);
+int	delete_gpt(struct gpt_hdr *);
 int	yesno(const char *, ...);
 int	decimal(const char *, int, int, int, int);
 #define DEC_SEC		1		/* asking for a sector number */
@@ -288,7 +297,8 @@
 
 	int csysid;	/* For the s_flag. */
 	unsigned int cstart, csize;
-	a_flag = i_flag = u_flag = sh_flag = f_flag = s_flag = b_flag = 0;
+	a_flag = u_flag = sh_flag = f_flag = s_flag = b_flag = 0;
+	i_flag = B_flag = 0;
 	v_flag = 0;
 	E_flag = 0;
 	csysid = cstart = csize = 0;
@@ -434,6 +444,9 @@
 		/* must have been a blank disk */
 		init_sector0(1);
 
+	read_gpt(GPT_HDR_BLKNO, &gpt1);
+	read_gpt(disksectors - 1, &gpt2);
+
 #if (defined(__i386__) || defined(__x86_64__)) && !HAVE_NBTOOL_CONFIG_H
 	get_geometry();
 #else
@@ -499,10 +512,23 @@
 			   "yet.  This is your last chance.\n");
 			if (u_flag)
 print_s0(-1);
-			if (yesno("Should we write new partition table?"))
+			if (gpt1.hdr_size != 0 || gpt2.hdr_size != 0)
+printf("\nWARNING: The disk is carrying "
+   "GUID Partition Tables.\n"
+   " If you continue, "
+   "GPT headers will be deleted.\n\n");
+			if (yesno("Should we write new partition table?")) {
+delete_gpt(&gpt1);
+delete_gpt(&gpt2);
 write_mbr()

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

2009-06-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun  1 19:07:56 UTC 2009

Modified Files:
src/external/bsd/dhcpcd/dist: dhcpcd.conf

Log Message:
Add an NetBSD id for ease of maintenance.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/dhcpcd/dist/dhcpcd.conf

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcpcd.conf
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.conf:1.1.1.4 src/external/bsd/dhcpcd/dist/dhcpcd.conf:1.2
--- src/external/bsd/dhcpcd/dist/dhcpcd.conf:1.1.1.4	Thu May 14 12:25:57 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd.conf	Mon Jun  1 15:07:55 2009
@@ -1,3 +1,5 @@
+#	$NetBSD: dhcpcd.conf,v 1.2 2009/06/01 19:07:55 christos Exp $
+#
 # A sample configuration for dhcpcd.
 # See dhcpcd.conf(5) for details.
 



CVS commit: [netbsd-5] src/doc

2009-06-01 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Jun  1 17:29:29 UTC 2009

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

Log Message:
Fix formatting on last.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-5.1

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.1
diff -u src/doc/CHANGES-5.1:1.1.2.24 src/doc/CHANGES-5.1:1.1.2.25
--- src/doc/CHANGES-5.1:1.1.2.24	Mon Jun  1 17:26:39 2009
+++ src/doc/CHANGES-5.1	Mon Jun  1 17:29:29 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.24 2009/06/01 17:26:39 liamjfoy Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.25 2009/06/01 17:29:29 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -803,10 +803,11 @@
 sys/fs/udf/udf_subr.c1.90
 sys/fs/udf/udf_subr.c1.91
 
-	Descriptor version is 16 bit and not 8 so use udf_rw16() to access them.
-	UniqueID was written in the logical volume integrity without byteswapping for
-	bigendian machines.
+	Descriptor version is 16 bit and not 8 so use udf_rw16() to access
+	them.  UniqueID was written in the logical volume integrity without
+	byteswapping for big endian machines.
 
-	Retire IN_CALLBACK_ULK flagging since its not used anymore and the old
-	assertions on it would trigger without cause.
+	Retire IN_CALLBACK_ULK flagging since its not used anymore and the
+	old assertions on it would trigger without cause.
 	[reinoud, ticket #772]
+



CVS commit: [netbsd-5] src/doc

2009-06-01 Thread Liam J. Foy
Module Name:src
Committed By:   liamjfoy
Date:   Mon Jun  1 17:26:39 UTC 2009

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

Log Message:
Ticket #772


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-5.1

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.1
diff -u src/doc/CHANGES-5.1:1.1.2.23 src/doc/CHANGES-5.1:1.1.2.24
--- src/doc/CHANGES-5.1:1.1.2.23	Sat May 30 17:01:33 2009
+++ src/doc/CHANGES-5.1	Mon Jun  1 17:26:39 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.23 2009/05/30 17:01:33 snj Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.24 2009/06/01 17:26:39 liamjfoy Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -797,3 +797,16 @@
 	post-vmlocking2 kernels have a chance to work.
 	[mrg, ticket #776]
 
+sys/fs/udf/udf_strat_direct.c			1.10
+sys/fs/udf/udf_strat_rmw.c			1.19
+sys/fs/udf/udf_strat_sequential.c		1.10
+sys/fs/udf/udf_subr.c1.90
+sys/fs/udf/udf_subr.c1.91
+
+	Descriptor version is 16 bit and not 8 so use udf_rw16() to access them.
+	UniqueID was written in the logical volume integrity without byteswapping for
+	bigendian machines.
+
+	Retire IN_CALLBACK_ULK flagging since its not used anymore and the old
+	assertions on it would trigger without cause.
+	[reinoud, ticket #772]



CVS commit: [netbsd-5] src/sys/fs/udf

2009-06-01 Thread Liam J. Foy
Module Name:src
Committed By:   liamjfoy
Date:   Mon Jun  1 17:11:36 UTC 2009

Modified Files:
src/sys/fs/udf [netbsd-5]: udf_strat_direct.c udf_strat_rmw.c
udf_strat_sequential.c udf_subr.c

Log Message:
Pull up following revision(s) (requested by reinoud in ticket #772):
sys/fs/udf/udf_strat_rmw.c: revision 1.19
sys/fs/udf/udf_strat_sequential.c: revision 1.10
sys/fs/udf/udf_strat_direct.c: revision 1.10
sys/fs/udf/udf_subr.c: revision 1.90
sys/fs/udf/udf_subr.c: revision 1.91
Descriptor version is 16 bit and not 8 so use udf_rw16() to access them.
UniqueID was written in the logical volume integrity without byteswapping for
bigendian machines.

Retire IN_CALLBACK_ULK flagging since its not used anymore and the old
assertions on it would trigger without cause.


To generate a diff of this commit:
cvs rdiff -u -r1.5.4.3 -r1.5.4.4 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.9.4.7 -r1.9.4.8 src/sys/fs/udf/udf_strat_rmw.c
cvs rdiff -u -r1.5.4.2 -r1.5.4.3 src/sys/fs/udf/udf_strat_sequential.c
cvs rdiff -u -r1.73.4.9 -r1.73.4.10 src/sys/fs/udf/udf_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/fs/udf/udf_strat_direct.c
diff -u src/sys/fs/udf/udf_strat_direct.c:1.5.4.3 src/sys/fs/udf/udf_strat_direct.c:1.5.4.4
--- src/sys/fs/udf/udf_strat_direct.c:1.5.4.3	Wed Mar 18 05:08:38 2009
+++ src/sys/fs/udf/udf_strat_direct.c	Mon Jun  1 17:11:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_direct.c,v 1.5.4.3 2009/03/18 05:08:38 snj Exp $ */
+/* $NetBSD: udf_strat_direct.c,v 1.5.4.4 2009/06/01 17:11:35 liamjfoy Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.5.4.3 2009/03/18 05:08:38 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.5.4.4 2009/06/01 17:11:35 liamjfoy Exp $");
 #endif /* not lint */
 
 
@@ -116,9 +116,7 @@
 	udf_node->outstanding_nodedscr--;
 	if (udf_node->outstanding_nodedscr == 0) {
 		/* unlock the node */
-		KASSERT(udf_node->i_flags & IN_CALLBACK_ULK);
-		UDF_UNLOCK_NODE(udf_node, IN_CALLBACK_ULK);
-
+		UDF_UNLOCK_NODE(udf_node, 0);
 		wakeup(&udf_node->outstanding_nodedscr);
 	}
 	/* unreference the vnode so it can be recycled */

Index: src/sys/fs/udf/udf_strat_rmw.c
diff -u src/sys/fs/udf/udf_strat_rmw.c:1.9.4.7 src/sys/fs/udf/udf_strat_rmw.c:1.9.4.8
--- src/sys/fs/udf/udf_strat_rmw.c:1.9.4.7	Wed Feb 18 00:51:27 2009
+++ src/sys/fs/udf/udf_strat_rmw.c	Mon Jun  1 17:11:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.9.4.7 2009/02/18 00:51:27 snj Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.9.4.8 2009/06/01 17:11:35 liamjfoy Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.9.4.7 2009/02/18 00:51:27 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.9.4.8 2009/06/01 17:11:35 liamjfoy Exp $");
 #endif /* not lint */
 
 
@@ -699,7 +699,7 @@
 	holdrele(udf_node->vnode);
 	udf_node->outstanding_nodedscr--;
 	if (udf_node->outstanding_nodedscr == 0) {
-		UDF_UNLOCK_NODE(udf_node, udf_node->i_flags & IN_CALLBACK_ULK);
+		UDF_UNLOCK_NODE(udf_node, 0);
 		wakeup(&udf_node->outstanding_nodedscr);
 	}
 

Index: src/sys/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.5.4.2 src/sys/fs/udf/udf_strat_sequential.c:1.5.4.3
--- src/sys/fs/udf/udf_strat_sequential.c:1.5.4.2	Wed Mar 18 05:08:38 2009
+++ src/sys/fs/udf/udf_strat_sequential.c	Mon Jun  1 17:11:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.5.4.2 2009/03/18 05:08:38 snj Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.5.4.3 2009/06/01 17:11:35 liamjfoy Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.5.4.2 2009/03/18 05:08:38 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.5.4.3 2009/06/01 17:11:35 liamjfoy Exp $");
 #endif /* not lint */
 
 
@@ -126,9 +126,7 @@
 	udf_node->outstanding_nodedscr--;
 	if (udf_node->outstanding_nodedscr == 0) {
 		/* first unlock the node */
-		KASSERT(udf_node->i_flags & IN_CALLBACK_ULK);
-		UDF_UNLOCK_NODE(udf_node, IN_CALLBACK_ULK);
-
+		UDF_UNLOCK_NODE(udf_node, 0);
 		wakeup(&udf_node->outstanding_nodedscr);
 	}
 

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.73.4.9 src/sys/fs/udf/udf_subr.c:1.73.4.10
--- src/sys/fs/udf/udf_subr.c:1.73.4.9	Thu Feb 19 03:39:56 2009
+++ src/sys/fs/udf/udf_subr.c	Mon Jun  1 17:11:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.73.4.9 2009/02/19 03:39:56 snj Exp $ */
+/* $NetBSD: udf_subr.c,v 1.73.4.10 2009/06/01 17:11:35 liamjfoy Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf

CVS commit: src/distrib/sparc/miniroot

2009-06-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jun  1 13:06:03 UTC 2009

Modified Files:
src/distrib/sparc/miniroot: Makefile.inc

Log Message:
The sparc miniroot actually doesn't use "file" anymore to distinguish
between a.out and ELF objects, so omit the now no-longer-present "magic"
file (deprecated after latest "file" update).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sparc/miniroot/Makefile.inc

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

Modified files:

Index: src/distrib/sparc/miniroot/Makefile.inc
diff -u src/distrib/sparc/miniroot/Makefile.inc:1.12 src/distrib/sparc/miniroot/Makefile.inc:1.13
--- src/distrib/sparc/miniroot/Makefile.inc:1.12	Sun Jun 13 05:27:18 2004
+++ src/distrib/sparc/miniroot/Makefile.inc	Mon Jun  1 13:06:03 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.12 2004/06/13 05:27:18 sjg Exp $
+#	$NetBSD: Makefile.inc,v 1.13 2009/06/01 13:06:03 he Exp $
 
 IMAGESIZE=	8192k
 MAKEFS_FLAGS=   -o density=4k
@@ -8,7 +8,7 @@
 IMAGEDEPENDS+=	${ARCHDIR}/../install.md ${ARCHDIR}/dot.profile \
 		${ARCHDIR}/termcap.src \
 		${DESTDIR}/etc/disktab \
-		${DESTDIR}/usr/mdec/boot ${DESTDIR}/usr/share/misc/magic \
+		${DESTDIR}/usr/mdec/boot \
 		${KERNOBJDIR}/GENERIC/netbsd
 
 IMAGEPOSTBUILD=	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} \



CVS commit: src/lib/libc/sys

2009-06-01 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jun  1 09:56:06 UTC 2009

Modified Files:
src/lib/libc/sys: fcntl.2

Log Message:
Note that fcntl(2) returns EINVAL for invalid command.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/sys/fcntl.2

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/sys/fcntl.2
diff -u src/lib/libc/sys/fcntl.2:1.34 src/lib/libc/sys/fcntl.2:1.35
--- src/lib/libc/sys/fcntl.2:1.34	Thu Jan  4 00:02:43 2007
+++ src/lib/libc/sys/fcntl.2	Mon Jun  1 09:56:06 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fcntl.2,v 1.34 2007/01/04 00:02:43 wiz Exp $
+.\"	$NetBSD: fcntl.2,v 1.35 2009/06/01 09:56:06 njoly Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -448,6 +448,11 @@
 .Dv F_SETLKW ,
 and the function was interrupted by a signal.
 .It Bq Er EINVAL
+The argument
+.Fa cmd
+is invalid.
+.Pp
+The argument
 .Fa cmd
 is
 .Dv F_DUPFD



CVS commit: src/sys/arch/hppa/hppa

2009-06-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jun  1 07:10:14 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa: hppa_machdep.c

Log Message:
Enforce strong ordering (for now) on PA2.0.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/hppa/hppa_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/hppa/hppa/hppa_machdep.c
diff -u src/sys/arch/hppa/hppa/hppa_machdep.c:1.16 src/sys/arch/hppa/hppa/hppa_machdep.c:1.17
--- src/sys/arch/hppa/hppa/hppa_machdep.c:1.16	Thu Apr 30 07:01:27 2009
+++ src/sys/arch/hppa/hppa/hppa_machdep.c	Mon Jun  1 07:10:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hppa_machdep.c,v 1.16 2009/04/30 07:01:27 skrll Exp $	*/
+/*	$NetBSD: hppa_machdep.c,v 1.17 2009/06/01 07:10:14 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.16 2009/04/30 07:01:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.17 2009/06/01 07:10:14 skrll Exp $");
 
 #include 
 #include 
@@ -254,7 +254,8 @@
 		}
 #endif
 
-		tf->tf_ipsw	= gr[0];
+		tf->tf_ipsw	= gr[0] |
+		(hppa_cpu_info->hci_features & HPPA_FTRS_W32B ? PSW_O : 0);
 		tf->tf_r1	= gr[1];
 		tf->tf_rp	= gr[2];
 		tf->tf_r3	= gr[3];