CVS commit: src/external/lgpl3/gmp

2013-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  4 11:43:53 UTC 2013

Modified Files:
src/external/lgpl3/gmp: README

Log Message:
add a couple of more things to worry about.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/gmp/README

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

Modified files:

Index: src/external/lgpl3/gmp/README
diff -u src/external/lgpl3/gmp/README:1.5 src/external/lgpl3/gmp/README:1.6
--- src/external/lgpl3/gmp/README:1.5	Wed Dec  4 01:03:15 2013
+++ src/external/lgpl3/gmp/README	Wed Dec  4 11:43:52 2013
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.5 2013/12/04 01:03:15 mrg Exp $
+$NetBSD: README,v 1.6 2013/12/04 11:43:52 mrg Exp $
 
 GMP in NetBSD.  We need GMP for GCC = 4.2.
 
@@ -26,7 +26,10 @@ There are a few steps to this:
 
 	  some of these files might have src/obj references.  in particular
 	  fix GMP_MPARAM_H_SUGGEST to start from ./mpn/... and make sure
-	  we #define __GMP_CC to gcc -std=gnu99.  XXX  make this automatic
+	  we #define __GMP_CC to gcc -std=gnu99, and make sure that
+	  CONFIG_TOP_SRCDIR is not defined in config.m4
+
+	  XXX  make this automatic
 
 
 	- parse the ./configure output and note all created symlinks



CVS commit: src/sbin/mount_tmpfs

2013-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec  4 13:30:35 UTC 2013

Modified Files:
src/sbin/mount_tmpfs: mount_tmpfs.8 mount_tmpfs.c

Log Message:
Provide variants of the -s option to allow limiting the tmpfs dynamically
at mount time to 1/Nth or to N percent of the available ram.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/mount_tmpfs/mount_tmpfs.8
cvs rdiff -u -r1.25 -r1.26 src/sbin/mount_tmpfs/mount_tmpfs.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/mount_tmpfs/mount_tmpfs.8
diff -u src/sbin/mount_tmpfs/mount_tmpfs.8:1.15 src/sbin/mount_tmpfs/mount_tmpfs.8:1.16
--- src/sbin/mount_tmpfs/mount_tmpfs.8:1.15	Sun Jun  2 13:27:12 2013
+++ src/sbin/mount_tmpfs/mount_tmpfs.8	Wed Dec  4 13:30:35 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_tmpfs.8,v 1.15 2013/06/02 13:27:12 wiz Exp $
+.\	$NetBSD: mount_tmpfs.8,v 1.16 2013/12/04 13:30:35 martin Exp $
 .\
 .\ Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -85,6 +85,24 @@ If zero is given (the default), the avai
 main memory and swap space) will be used.
 Note that four megabytes are always reserved for the system and cannot
 be assigned to the file system.
+.Ar Size
+can alternatively be specified as a percentage of the available
+system ram by using the notation
+.Ar ram%n
+where
+.Ar n
+is a number between 1 and 100.
+Similarily it can be specified as a fraction of the available system
+ram by using
+.Ar ram/n
+where
+.Ar n
+is the divisor.
+(Using
+.Ar ram%25
+and
+.Ar ram/4
+will result in the same limit.)
 .It Fl u Ar user
 Specifies the user name or UID of the root inode of the file system.
 Defaults to the mount point's UID.

Index: src/sbin/mount_tmpfs/mount_tmpfs.c
diff -u src/sbin/mount_tmpfs/mount_tmpfs.c:1.25 src/sbin/mount_tmpfs/mount_tmpfs.c:1.26
--- src/sbin/mount_tmpfs/mount_tmpfs.c:1.25	Sun Jun  2 13:27:20 2013
+++ src/sbin/mount_tmpfs/mount_tmpfs.c	Wed Dec  4 13:30:35 2013
@@ -1,4 +1,5 @@
-/*	$NetBSD: mount_tmpfs.c,v 1.25 2013/06/02 13:27:20 wiz Exp $	*/
+
+/*	$NetBSD: mount_tmpfs.c,v 1.26 2013/12/04 13:30:35 martin Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -32,12 +33,13 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: mount_tmpfs.c,v 1.25 2013/06/02 13:27:20 wiz Exp $);
+__RCSID($NetBSD: mount_tmpfs.c,v 1.26 2013/12/04 13:30:35 martin Exp $);
 #endif /* not lint */
 
 #include sys/param.h
 #include sys/mount.h
 #include sys/stat.h
+#include sys/sysctl.h
 
 #include fs/tmpfs/tmpfs_args.h
 
@@ -66,6 +68,63 @@ static const struct mntopt mopts[] = {
 /* - */
 
 static void	usage(void) __dead;
+static int64_t	ram_fract(const char *arg);
+static int64_t	ram_percent(const char *arg);
+static int64_t	ram_factor(float f);
+
+/* - */
+
+/* return f * available system ram */
+static int64_t
+ram_factor(float f)
+{
+	uint64_t ram;
+	size_t len;
+
+	len = sizeof(ram);
+	if (sysctlbyname(hw.physmem64, ram, len, NULL, 0))
+		err(EXIT_FAILURE, can't get \hw.physmem64\: %s, strerror(errno));
+
+	return (int64_t)((float)ram * f);
+}
+
+/* return fraction of available ram given by arg */
+static int64_t
+ram_fract(const char *arg)
+{
+	char *endp;
+	float f;
+
+	f = strtof(arg, endp);
+	if (endp  *endp != 0)
+		err(EXIT_FAILURE, syntax error in ram fraction: ram/%s
+		 at %s, arg, endp);
+	if (f = 0.0f)
+		err(EXIT_FAILURE, ram fraction must be a positive number:
+		  ram/%s, arg);
+
+	return ram_factor(1.0f/f);
+}
+
+/* - */
+
+/* return percentage of available ram given by arg */
+static int64_t
+ram_percent(const char *arg)
+{
+	char *endp;
+	float f;
+
+	f = strtof(arg, endp);
+	if (endp  *endp != 0)
+		err(EXIT_FAILURE, syntax error in ram percentage: ram%%%s
+		 at %s, arg, endp);
+	if (f = 0.0f || f = 100.0f)
+		err(EXIT_FAILURE, ram percentage must be a between 0 and 100
+		  ram%%%s, arg);
+
+	return ram_factor(f/100.0f);
+}
 
 /* - */
 
@@ -122,7 +181,11 @@ mount_tmpfs_parseargs(int argc, char *ar
 			break;
 
 		case 's':
-			if (dehumanize_number(optarg, tmpnumber) == -1)
+			if (strncmp(optarg, ram/, 4) == 0)
+tmpnumber = ram_fract(optarg+4);
+			else if (strncmp(optarg, ram%, 4) == 0)
+tmpnumber = ram_percent(optarg+4);
+			else if (dehumanize_number(optarg, tmpnumber) == -1)
 err(EXIT_FAILURE, failed to parse size `%s',
 optarg);
 			args-ta_size_max = tmpnumber;



CVS commit: src

2013-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  4 14:47:41 UTC 2013

Modified Files:
src: UPDATING

Log Message:
add a note about GMP i wrote but forgot to commit a few days ago.


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

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.248 src/UPDATING:1.249
--- src/UPDATING:1.248	Fri Nov 29 02:05:59 2013
+++ src/UPDATING	Wed Dec  4 14:47:41 2013
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.248 2013/11/29 02:05:59 mrg Exp $
+$NetBSD: UPDATING,v 1.249 2013/12/04 14:47:41 mrg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -16,6 +16,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20131129:
+	The GMP sources were updated, and builds will likely fail without
+	cleaning their build trees for both tools and in-tree, like below.
+
 20131128:
 	The MPC and MPFR sources were updated, and builds may require their
 	tools and in-tree directories cleaned for successful updates.



CVS commit: src/sbin/mount_tmpfs

2013-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec  4 15:10:11 UTC 2013

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

Log Message:
Fix err/errx confusion, pointed out by rmind.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/mount_tmpfs/mount_tmpfs.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/mount_tmpfs/mount_tmpfs.c
diff -u src/sbin/mount_tmpfs/mount_tmpfs.c:1.26 src/sbin/mount_tmpfs/mount_tmpfs.c:1.27
--- src/sbin/mount_tmpfs/mount_tmpfs.c:1.26	Wed Dec  4 13:30:35 2013
+++ src/sbin/mount_tmpfs/mount_tmpfs.c	Wed Dec  4 15:10:11 2013
@@ -1,5 +1,5 @@
 
-/*	$NetBSD: mount_tmpfs.c,v 1.26 2013/12/04 13:30:35 martin Exp $	*/
+/*	$NetBSD: mount_tmpfs.c,v 1.27 2013/12/04 15:10:11 martin Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: mount_tmpfs.c,v 1.26 2013/12/04 13:30:35 martin Exp $);
+__RCSID($NetBSD: mount_tmpfs.c,v 1.27 2013/12/04 15:10:11 martin Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -83,7 +83,7 @@ ram_factor(float f)
 
 	len = sizeof(ram);
 	if (sysctlbyname(hw.physmem64, ram, len, NULL, 0))
-		err(EXIT_FAILURE, can't get \hw.physmem64\: %s, strerror(errno));
+		err(EXIT_FAILURE, can't get \hw.physmem64\);
 
 	return (int64_t)((float)ram * f);
 }
@@ -97,10 +97,10 @@ ram_fract(const char *arg)
 
 	f = strtof(arg, endp);
 	if (endp  *endp != 0)
-		err(EXIT_FAILURE, syntax error in ram fraction: ram/%s
+		errx(EXIT_FAILURE, syntax error in ram fraction: ram/%s
 		 at %s, arg, endp);
 	if (f = 0.0f)
-		err(EXIT_FAILURE, ram fraction must be a positive number:
+		errx(EXIT_FAILURE, ram fraction must be a positive number:
 		  ram/%s, arg);
 
 	return ram_factor(1.0f/f);
@@ -117,10 +117,10 @@ ram_percent(const char *arg)
 
 	f = strtof(arg, endp);
 	if (endp  *endp != 0)
-		err(EXIT_FAILURE, syntax error in ram percentage: ram%%%s
+		errx(EXIT_FAILURE, syntax error in ram percentage: ram%%%s
 		 at %s, arg, endp);
 	if (f = 0.0f || f = 100.0f)
-		err(EXIT_FAILURE, ram percentage must be a between 0 and 100
+		errx(EXIT_FAILURE, ram percentage must be a between 0 and 100
 		  ram%%%s, arg);
 
 	return ram_factor(f/100.0f);



CVS commit: src/external/bsd/ppp/dist/pppd

2013-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec  4 15:05:49 UTC 2013

Modified Files:
src/external/bsd/ppp/dist/pppd: main.c

Log Message:
CID 271284: Missing error check on open


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ppp/dist/pppd/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/bsd/ppp/dist/pppd/main.c
diff -u src/external/bsd/ppp/dist/pppd/main.c:1.2 src/external/bsd/ppp/dist/pppd/main.c:1.3
--- src/external/bsd/ppp/dist/pppd/main.c:1.2	Thu Nov 28 17:33:42 2013
+++ src/external/bsd/ppp/dist/pppd/main.c	Wed Dec  4 10:05:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.2 2013/11/28 22:33:42 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.3 2013/12/04 15:05:49 christos Exp $	*/
 
 /*
  * main.c - Point-to-Point Protocol main module
@@ -73,7 +73,7 @@
 #define RCSID	Id: main.c,v 1.156 2008/06/23 11:47:18 paulus Exp 
 static const char rcsid[] = RCSID;
 #else
-__RCSID($NetBSD: main.c,v 1.2 2013/11/28 22:33:42 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.3 2013/12/04 15:05:49 christos Exp $);
 #endif
 
 #include stdio.h
@@ -1682,8 +1682,13 @@ device_script(program, in, out, dont_wai
 
 if (log_to_fd = 0)
 	errfd = log_to_fd;
-else
+else {
 	errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);
+	if (errfd == -1) {
+	error(Cannot open `%s': %m, _PATH_CONNERRS);
+	return -1;
+	}
+}
 
 ++conn_running;
 pid = safe_fork(in, out, errfd);



CVS commit: src/sbin/mount_tmpfs

2013-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  4 18:05:21 UTC 2013

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

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/mount_tmpfs/mount_tmpfs.8

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

Modified files:

Index: src/sbin/mount_tmpfs/mount_tmpfs.8
diff -u src/sbin/mount_tmpfs/mount_tmpfs.8:1.16 src/sbin/mount_tmpfs/mount_tmpfs.8:1.17
--- src/sbin/mount_tmpfs/mount_tmpfs.8:1.16	Wed Dec  4 13:30:35 2013
+++ src/sbin/mount_tmpfs/mount_tmpfs.8	Wed Dec  4 18:05:21 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_tmpfs.8,v 1.16 2013/12/04 13:30:35 martin Exp $
+.\	$NetBSD: mount_tmpfs.8,v 1.17 2013/12/04 18:05:21 wiz Exp $
 .\
 .\ Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -28,7 +28,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 13, 2008
+.Dd December 4, 2013
 .Dt MOUNT_TMPFS 8
 .Os
 .Sh NAME



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

2013-12-04 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Dec  4 18:44:14 UTC 2013

Modified Files:
src/sys/arch/sparc/include: ctlreg.h

Log Message:
Clarify comment about SER_SZERR.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/include/ctlreg.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/sparc/include/ctlreg.h
diff -u src/sys/arch/sparc/include/ctlreg.h:1.28 src/sys/arch/sparc/include/ctlreg.h:1.29
--- src/sys/arch/sparc/include/ctlreg.h:1.28	Sun Dec 11 12:19:05 2005
+++ src/sys/arch/sparc/include/ctlreg.h	Wed Dec  4 18:44:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.28 2005/12/11 12:19:05 christos Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.29 2013/12/04 18:44:14 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -145,7 +145,7 @@
 #define	SER_TIMEOUT	0x20		/* bus timeout (non-existent mem) */
 #define	SER_SBUSERR	0x10		/* S-Bus bus error */
 #define	SER_MEMERR	0x08		/* memory ecc/parity error */
-#define	SER_SZERR	0x02		/* [4/vme?] size error, whatever that is */
+#define	SER_SZERR	0x02		/* [4/vme] size error (r/w too large) */
 #define	SER_WATCHDOG	0x01		/* watchdog reset (never see this) */
 
 #define	SER_BITS \



CVS commit: src/sbin/gpt

2013-12-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Dec  4 19:59:47 UTC 2013

Modified Files:
src/sbin/gpt: migrate.c

Log Message:
Mirror my changes of src/sbin/gpt/create.c 1.4 in migrate.c;

Use less bogus CHS addresses in PMBR.
With the ending head set at 0xff one machine I have will never leave
the initial startup screen if such a disk is present. Additionally,
Wikipedia suggests without citiation that 254 is the maximium allowable
value for the head, and this seems to be the case.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/gpt/migrate.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/gpt/migrate.c
diff -u src/sbin/gpt/migrate.c:1.12 src/sbin/gpt/migrate.c:1.13
--- src/sbin/gpt/migrate.c:1.12	Wed Nov 13 21:25:40 2013
+++ src/sbin/gpt/migrate.c	Wed Dec  4 19:59:47 2013
@@ -29,7 +29,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: migrate.c,v 1.12 2013/11/13 21:25:40 christos Exp $);
+__RCSID($NetBSD: migrate.c,v 1.13 2013/12/04 19:59:47 jakllsch Exp $);
 #endif
 
 #include sys/types.h
@@ -430,11 +430,11 @@ migrate(int fd)
 	 * Turn the MBR into a Protective MBR.
 	 */
 	bzero(mbr-mbr_part, sizeof(mbr-mbr_part));
-	mbr-mbr_part[0].part_shd = 0xff;
-	mbr-mbr_part[0].part_ssect = 0xff;
-	mbr-mbr_part[0].part_scyl = 0xff;
+	mbr-mbr_part[0].part_shd = 0x00;
+	mbr-mbr_part[0].part_ssect = 0x02;
+	mbr-mbr_part[0].part_scyl = 0x00;
 	mbr-mbr_part[0].part_typ = 0xee;
-	mbr-mbr_part[0].part_ehd = 0xff;
+	mbr-mbr_part[0].part_ehd = 0xfe;
 	mbr-mbr_part[0].part_esect = 0xff;
 	mbr-mbr_part[0].part_ecyl = 0xff;
 	mbr-mbr_part[0].part_start_lo = htole16(1);



CVS commit: src/sbin/gpt

2013-12-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Dec  4 20:15:51 UTC 2013

Modified Files:
src/sbin/gpt: create.c gpt.c migrate.c

Log Message:
Use MBR_PTYPE_ defines from sys/bootblock.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/gpt/create.c
cvs rdiff -u -r1.24 -r1.25 src/sbin/gpt/gpt.c
cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/migrate.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/gpt/create.c
diff -u src/sbin/gpt/create.c:1.6 src/sbin/gpt/create.c:1.7
--- src/sbin/gpt/create.c:1.6	Sat Apr 13 18:04:33 2013
+++ src/sbin/gpt/create.c	Wed Dec  4 20:15:51 2013
@@ -29,10 +29,11 @@
 __FBSDID($FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: create.c,v 1.6 2013/04/13 18:04:33 jakllsch Exp $);
+__RCSID($NetBSD: create.c,v 1.7 2013/12/04 20:15:51 jakllsch Exp $);
 #endif
 
 #include sys/types.h
+#include sys/bootblock.h
 
 #include err.h
 #include stddef.h
@@ -103,7 +104,7 @@ create(int fd)
 		mbr-mbr_part[0].part_shd = 0x00;
 		mbr-mbr_part[0].part_ssect = 0x02;
 		mbr-mbr_part[0].part_scyl = 0x00;
-		mbr-mbr_part[0].part_typ = 0xee;
+		mbr-mbr_part[0].part_typ = MBR_PTYPE_PMBR;
 		mbr-mbr_part[0].part_ehd = 0xfe;
 		mbr-mbr_part[0].part_esect = 0xff;
 		mbr-mbr_part[0].part_ecyl = 0xff;

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.24 src/sbin/gpt/gpt.c:1.25
--- src/sbin/gpt/gpt.c:1.24	Wed Nov 27 01:47:53 2013
+++ src/sbin/gpt/gpt.c	Wed Dec  4 20:15:51 2013
@@ -31,7 +31,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: gpt.c,v 1.24 2013/11/27 01:47:53 jnemeth Exp $);
+__RCSID($NetBSD: gpt.c,v 1.25 2013/12/04 20:15:51 jakllsch Exp $);
 #endif
 
 #include sys/param.h
@@ -39,6 +39,7 @@ __RCSID($NetBSD: gpt.c,v 1.24 2013/11/2
 #include sys/disk.h
 #include sys/stat.h
 #include sys/ioctl.h
+#include sys/bootblock.h
 
 #include err.h
 #include errno.h
@@ -392,9 +393,9 @@ gpt_mbr(int fd, off_t lba)
 	 */
 	pmbr = 0;
 	for (i = 0; i  4; i++) {
-		if (mbr-mbr_part[i].part_typ == 0)
+		if (mbr-mbr_part[i].part_typ == MBR_PTYPE_UNUSED)
 			continue;
-		if (mbr-mbr_part[i].part_typ == 0xee)
+		if (mbr-mbr_part[i].part_typ == MBR_PTYPE_PMBR)
 			pmbr++;
 		else
 			break;
@@ -419,8 +420,8 @@ gpt_mbr(int fd, off_t lba)
 	if (p == NULL)
 		return (-1);
 	for (i = 0; i  4; i++) {
-		if (mbr-mbr_part[i].part_typ == 0 ||
-		mbr-mbr_part[i].part_typ == 0xee)
+		if (mbr-mbr_part[i].part_typ == MBR_PTYPE_UNUSED ||
+		mbr-mbr_part[i].part_typ == MBR_PTYPE_PMBR)
 			continue;
 		start = le16toh(mbr-mbr_part[i].part_start_hi);
 		start = (start  16) + le16toh(mbr-mbr_part[i].part_start_lo);
@@ -437,7 +438,7 @@ gpt_mbr(int fd, off_t lba)
 			warnx(%s: MBR part: type=%d, start=%llu, size=%llu,
 			device_name, mbr-mbr_part[i].part_typ,
 			(long long)start, (long long)size);
-		if (mbr-mbr_part[i].part_typ != 15) {
+		if (mbr-mbr_part[i].part_typ != MBR_PTYPE_EXT_LBA) {
 			m = map_add(start, size, MAP_TYPE_MBR_PART, p);
 			if (m == NULL)
 return (-1);

Index: src/sbin/gpt/migrate.c
diff -u src/sbin/gpt/migrate.c:1.13 src/sbin/gpt/migrate.c:1.14
--- src/sbin/gpt/migrate.c:1.13	Wed Dec  4 19:59:47 2013
+++ src/sbin/gpt/migrate.c	Wed Dec  4 20:15:51 2013
@@ -29,7 +29,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: migrate.c,v 1.13 2013/12/04 19:59:47 jakllsch Exp $);
+__RCSID($NetBSD: migrate.c,v 1.14 2013/12/04 20:15:51 jakllsch Exp $);
 #endif
 
 #include sys/types.h
@@ -433,7 +433,7 @@ migrate(int fd)
 	mbr-mbr_part[0].part_shd = 0x00;
 	mbr-mbr_part[0].part_ssect = 0x02;
 	mbr-mbr_part[0].part_scyl = 0x00;
-	mbr-mbr_part[0].part_typ = 0xee;
+	mbr-mbr_part[0].part_typ = MBR_PTYPE_PMBR;
 	mbr-mbr_part[0].part_ehd = 0xfe;
 	mbr-mbr_part[0].part_esect = 0xff;
 	mbr-mbr_part[0].part_ecyl = 0xff;



CVS commit: src/doc

2013-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  4 22:53:55 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.24 out.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1074 src/doc/3RDPARTY:1.1075
--- src/doc/3RDPARTY:1.1074	Sun Dec  1 20:02:43 2013
+++ src/doc/3RDPARTY	Wed Dec  4 22:53:55 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1074 2013/12/01 20:02:43 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1075 2013/12/04 22:53:55 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -154,7 +154,7 @@ Todo[5]: Reconcile the doc directory.
 
 Package:	binutils
 Version:	2.23.2
-Current Vers:	2.23.2
+Current Vers:	2.24
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/