Subject: port-mac68k/6911: mac68k-part of mbr header file shuffling missing
To: None <gnats-bugs@gnats.netbsd.org>
From: None <erik@mediator.uni-c.dk>
List: netbsd-bugs
Date: 01/29/1999 23:02:22
>Number: 6911
>Category: port-mac68k
>Synopsis: mac68k-part of mbr header file shuffling missing
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-mac68k-maintainer (NetBSD/mac68k Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 29 14:05:01 1999
>Last-Modified:
>Originator: Erik Bertelsen
>Organization:
>Release: NetBSD-current 29 Jan 1999
>Environment:
System: NetBSD q610.ebe.uni-c.dk 1.3I NetBSD 1.3I (Q610) #104: Fri Jan 29 22:38:21 MET 1999 erik@q610.ebe.uni-c.dk:/home/src/sys/arch/mac68k/compile/Q610 mac68k
>Description:
After the last few days re-shuffling and clean-up of the declarations
of MBR structures, the mac68k parts are missing and causes kernel
compilation errors.
>How-To-Repeat:
>Fix:
Index: disksubr.c
===================================================================
RCS file: /home/cvs-base/src/sys/arch/mac68k/mac68k/disksubr.c,v
retrieving revision 1.1.1.11
diff -c -r1.1.1.11 disksubr.c
*** disksubr.c 1999/01/28 15:38:14 1.1.1.11
--- disksubr.c 1999/01/29 21:58:42
***************
*** 83,88 ****
--- 83,89 ----
#include <sys/buf.h>
#include <sys/disk.h>
#include <sys/disklabel.h>
+ #include <sys/disklabel_mbr.h>
#include <sys/syslog.h>
#include <machine/bswap.h>
***************
*** 507,524 ****
/* XXX */
dp = (struct mbr_partition *)(bp->b_data + MBR_PARTOFF);
for (i = 0; i < NMBRPART; i++, dp++) {
! if (dp->dp_typ != 0) {
slot = getFreeLabelEntry(lp);
if (slot > maxslot)
maxslot = slot;
pp = &lp->d_partitions[slot];
pp->p_fstype = FS_OTHER;
! pp->p_offset = bswap32(dp->dp_start);
! pp->p_size = bswap32(dp->dp_size);
for (ip = fat_types; *ip != -1; ip++) {
! if (dp->dp_typ == *ip) {
pp->p_fstype = FS_MSDOS;
break;
}
--- 508,525 ----
/* XXX */
dp = (struct mbr_partition *)(bp->b_data + MBR_PARTOFF);
for (i = 0; i < NMBRPART; i++, dp++) {
! if (dp->mbrp_typ != 0) {
slot = getFreeLabelEntry(lp);
if (slot > maxslot)
maxslot = slot;
pp = &lp->d_partitions[slot];
pp->p_fstype = FS_OTHER;
! pp->p_offset = bswap32(dp->mbrp_start);
! pp->p_size = bswap32(dp->mbrp_size);
for (ip = fat_types; *ip != -1; ip++) {
! if (dp->mbrp_typ == *ip) {
pp->p_fstype = FS_MSDOS;
break;
}
***************
*** 582,588 ****
if (*sbSigp == 0x4552) {
msg = read_mac_label(dev, strat, lp, osdep);
} else if (bswap16(*(u_int16_t *)(bp->b_data + MBR_MAGICOFF))
! == MBRSIG) {
msg = read_dos_label(dev, strat, lp, osdep);
} else {
dlp = (struct disklabel *)(bp->b_un.b_addr + 0);
--- 583,589 ----
if (*sbSigp == 0x4552) {
msg = read_mac_label(dev, strat, lp, osdep);
} else if (bswap16(*(u_int16_t *)(bp->b_data + MBR_MAGICOFF))
! == MBR_MAGIC) {
msg = read_dos_label(dev, strat, lp, osdep);
} else {
dlp = (struct disklabel *)(bp->b_un.b_addr + 0);
regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: