diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-29 19:29:40 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-29 19:29:40 +0000 |
commit | f279cd63653509502ebfbc7abba76ae4b685008d (patch) | |
tree | 9bc3605dd0a6e8aa25defd964e5c9e21985a2454 /sys/arch/i386 | |
parent | 3f37d148b8f3c2434fd28dde0bd884721349ede0 (diff) |
we have MBR struct and signature defined elsewhere now
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/stand/libsa/biosdev.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index abf52a4ccd6..40335fc2913 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.26 1997/08/22 20:13:42 mickey Exp $ */ +/* $OpenBSD: biosdev.c,v 1.27 1997/08/29 19:29:39 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -273,11 +273,8 @@ biosopen(struct open_file *f, ...) #endif if (maj == 17) { /* hd, wd, sd */ - struct { - u_int8_t mboot[DOSPARTOFF]; - struct dos_partition dparts[NDOSPART]; - u_int16_t signature; - } mbr; + struct dos_mbr mbr; + if ((errno = biosstrategy(bd, F_READ, DOSBBSECTOR, DEV_BSIZE, &mbr, NULL)) != 0) { #ifdef DEBUG @@ -289,7 +286,7 @@ biosopen(struct open_file *f, ...) } /* check mbr signature */ - if (mbr.signature != 0xaa55) { + if (mbr.dmbr_sign != DOSMBR_SIGNATURE) { #ifdef DEBUG if (debug) printf("bad MBR signature\n"); @@ -299,14 +296,14 @@ biosopen(struct open_file *f, ...) } for (off = 0, i = 0; off == 0 && i < NDOSPART; i++) - if (mbr.dparts[i].dp_typ == DOSPTYP_OPENBSD) - off = mbr.dparts[i].dp_start + LABELSECTOR; + if (mbr.dmbr_parts[i].dp_typ == DOSPTYP_OPENBSD) + off = mbr.dmbr_parts[i].dp_start + LABELSECTOR; /* just in case */ if (off == 0) for (off = 0, i = 0; off == 0 && i < NDOSPART; i++) - if (mbr.dparts[i].dp_typ == DOSPTYP_NETBSD) - off = mbr.dparts[i].dp_start + + if (mbr.dmbr_parts[i].dp_typ == DOSPTYP_NETBSD) + off = mbr.dmbr_parts[i].dp_start + LABELSECTOR; if (off == 0) { |