diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2002-01-04 08:35:07 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2002-01-04 08:35:07 +0000 |
commit | 4000cc8ea3810f6c3298aa89bd4399132331629f (patch) | |
tree | fd8b18872aa3a8f2fb23eb2fa4e1dd90024d23fa /sbin/fdisk/mbr.c | |
parent | 80c51b3f573153f5c32b1bba1e002af3c13d9e43 (diff) |
Remove references to the NT serial number. Now the first 0x1be
bytes of the MBR are treated as code for the purposes of the
(u)pdate command. This is consistent with the new -u flag.
This means boot managers like BootEasy can now be written
out correctly. Note that rewriting the MBR now whacks the
NT serial number - a behavior that is consistent with
the DOS FDISK /MBR.
Diffstat (limited to 'sbin/fdisk/mbr.c')
-rw-r--r-- | sbin/fdisk/mbr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c index c3243ee1255..f116c9051a4 100644 --- a/sbin/fdisk/mbr.c +++ b/sbin/fdisk/mbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.c,v 1.13 2001/12/15 02:12:26 kjell Exp $ */ +/* $OpenBSD: mbr.c,v 1.14 2002/01/04 08:35:06 kjell Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -107,8 +107,6 @@ MBR_parse(disk, mbr_buf, offset, reloff, mbr) memcpy(mbr->code, mbr_buf, MBR_CODE_SIZE); mbr->offset = offset; mbr->reloffset = reloff; - mbr->nt_serial = getlong(&mbr_buf[MBR_NTSER_OFF]); - mbr->spare = getshort(&mbr_buf[MBR_SPARE_OFF]); mbr->signature = getshort(&mbr_buf[MBR_SIG_OFF]); for (i = 0; i < NDOSPART; i++) @@ -124,8 +122,6 @@ MBR_make(mbr, mbr_buf) int i; memcpy(mbr_buf, mbr->code, MBR_CODE_SIZE); - putlong(&mbr_buf[MBR_NTSER_OFF], mbr->nt_serial); - putshort(&mbr_buf[MBR_SPARE_OFF], mbr->spare); putshort(&mbr_buf[MBR_SIG_OFF], mbr->signature); for (i = 0; i < NDOSPART; i++) @@ -140,8 +136,8 @@ MBR_print(mbr) int i; /* Header */ - printf("Signatures: 0x%X,0x%X\n", - (int)mbr->signature, (int)mbr->nt_serial); + printf("Signature: 0x%X\n", + (int)mbr->signature); PRT_print(0, NULL); /* Entries */ |