Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/disklabel - use MBR partition table also on arc.
details: https://anonhg.NetBSD.org/src/rev/b7fe4bc823ff
branches: trunk
changeset: 481464:b7fe4bc823ff
user: soda <soda%NetBSD.org@localhost>
date: Mon Jan 31 16:01:06 2000 +0000
description:
- use MBR partition table also on arc.
- use defined(USE_MBR) instead of defined(__i386__), like hpcmips and arc.
diffstat:
sbin/disklabel/Makefile | 8 +++++---
sbin/disklabel/disklabel.c | 20 ++++++++++----------
2 files changed, 15 insertions(+), 13 deletions(-)
diffs (121 lines):
diff -r d749154298d7 -r b7fe4bc823ff sbin/disklabel/Makefile
--- a/sbin/disklabel/Makefile Mon Jan 31 15:59:58 2000 +0000
+++ b/sbin/disklabel/Makefile Mon Jan 31 16:01:06 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2000/01/09 02:45:43 shin Exp $
+# $NetBSD: Makefile,v 1.36 2000/01/31 16:01:06 soda Exp $
# @(#)Makefile 8.2 (Berkeley) 3/17/94
PROG= disklabel
@@ -7,9 +7,11 @@
LDADD+= -lutil
DPADD+= ${LIBUTIL}
+.if (${MACHINE} == "i386")
# recognize old partition ID for a while
-.if (${MACHINE} == "i386")
CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
+# use MBR partition info
+CPPFLAGS+= -DUSE_MBR
.endif
.if (${MACHINE} == "hp300") || (${MACHINE} == "vax") \
@@ -29,7 +31,7 @@
CPPFLAGS+= -DSAVEBOOTAREA
.endif
-.if (${MACHINE} == "hpcmips")
+.if (${MACHINE} == "hpcmips" || ${MACHINE} == "arc")
# recognize old partition ID for a while
CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
# use MBR partition info
diff -r d749154298d7 -r b7fe4bc823ff sbin/disklabel/disklabel.c
--- a/sbin/disklabel/disklabel.c Mon Jan 31 15:59:58 2000 +0000
+++ b/sbin/disklabel/disklabel.c Mon Jan 31 16:01:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.80 2000/01/18 00:02:28 perseant Exp $ */
+/* $NetBSD: disklabel.c,v 1.81 2000/01/31 16:01:06 soda Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -47,7 +47,7 @@
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#else
-__RCSID("$NetBSD: disklabel.c,v 1.80 2000/01/18 00:02:28 perseant Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.81 2000/01/31 16:01:06 soda Exp $");
#endif
#endif /* not lint */
@@ -137,7 +137,7 @@
#define OPTIONS "BCNRWb:ef:irs:tw"
#endif
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
static struct mbr_partition *dosdp; /* i386 DOS partition, if found */
static int mbrpt_nobsd; /* MBR partition table exists, but no BSD partition */
static struct mbr_partition *readmbr __P((int));
@@ -147,7 +147,7 @@
static u_int get_filecore_partition __P((int));
static int filecore_checksum __P((u_char *));
#endif /* __arm32__ */
-#if defined(__i386__) || (defined(__arm32__) && defined(notyet)) || defined(USE_MBR)
+#if defined(USE_MBR) || (defined(__arm32__) && defined(notyet))
static void confirm __P((const char *));
#endif
@@ -273,7 +273,7 @@
if (f < 0)
err(4, "%s", specname);
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
/*
* Check for presence of DOS partition table in
* master boot record. Return pointer to NetBSD/i386
@@ -432,7 +432,7 @@
(void)strncpy(lp->d_packname, name, sizeof(lp->d_packname));
}
-#if defined(__i386__) || (defined(__arm32__) && defined(notyet)) || defined(USE_MBR)
+#if defined(USE_MBR) || (defined(__arm32__) && defined(notyet))
static void
confirm(txt)
const char *txt;
@@ -473,7 +473,7 @@
if (rflag)
#endif
{
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
struct partition *pp = &lp->d_partitions[2];
/*
@@ -605,7 +605,7 @@
}
}
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
/*
* Fetch DOS partition table from disk.
*/
@@ -825,7 +825,7 @@
char *msg;
off_t sectoffset = 0;
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
if (dosdp)
sectoffset = (off_t)dosdp->mbrp_start * DEV_BSIZE;
#endif
@@ -910,7 +910,7 @@
if (rflag) {
off_t sectoffset = 0;
-#if defined(__i386__) || defined(USE_MBR)
+#ifdef USE_MBR
if (dosdp)
sectoffset = (off_t)dosdp->mbrp_start * DEV_BSIZE;
#endif
Home |
Main Index |
Thread Index |
Old Index