Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/fdisk Only examine mbr_bootsel* #ifdef BOOTSEL.



details:   https://anonhg.NetBSD.org/src/rev/d4abb38a7793
branches:  trunk
changeset: 559795:d4abb38a7793
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Mar 24 02:49:37 2004 +0000

description:
Only examine mbr_bootsel* #ifdef BOOTSEL.
Noted on current-users@ by Markus Hennecke.

diffstat:

 sbin/fdisk/fdisk.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 01cbfd44f942 -r d4abb38a7793 sbin/fdisk/fdisk.c
--- a/sbin/fdisk/fdisk.c        Wed Mar 24 02:25:15 2004 +0000
+++ b/sbin/fdisk/fdisk.c        Wed Mar 24 02:49:37 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdisk.c,v 1.76 2004/03/22 07:11:00 lukem Exp $ */
+/*     $NetBSD: fdisk.c,v 1.77 2004/03/24 02:49:37 lukem Exp $ */
 
 /*
  * Mach Operating System
@@ -35,7 +35,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: fdisk.c,v 1.76 2004/03/22 07:11:00 lukem Exp $");
+__RCSID("$NetBSD: fdisk.c,v 1.77 2004/03/24 02:49:37 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1319,7 +1319,7 @@
        free(off);
        return default_ptn;
 }
-#endif
+#endif /* BOOTSEL */
 
 
 /* Prerequisite: the disklabel parameters and master boot record must
@@ -2298,6 +2298,7 @@
                    tabletype, offset);
                return -1;
        }
+#ifdef BOOTSEL
        if (le16toh(boot->mbr_bootsel_magic) == MBR_MAGIC) {
                                /* mbr_bootsel in old location */
                warnx("%s partition table: using old-style bootsel information",
@@ -2323,6 +2324,7 @@
                        /* highlight that new bootsel code is necessar */
                boot->mbr_bootsel.mbrbs_flags &= ~ MBR_BS_NEWMBR;
        }
+#endif /* BOOTSEL */
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index