summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2003-01-04 08:50:48 +0000
committernyan <nyan@FreeBSD.org>2003-01-04 08:50:48 +0000
commit864080610ecb4bdf1e559a7f65f6e149c26ede85 (patch)
tree564ff0c6cce1ed927a6fa1c29c37132bcc9a33b1 /sbin/bsdlabel
parentd409ed88f5d1f0e447be9bda781b1812ae8b69b9 (diff)
downloadFreeBSD-src-864080610ecb4bdf1e559a7f65f6e149c26ede85.zip
FreeBSD-src-864080610ecb4bdf1e559a7f65f6e149c26ede85.tar.gz
Rename the dos_partition structure for pc98 to pc98_partition.
Diffstat (limited to 'sbin/bsdlabel')
-rw-r--r--sbin/bsdlabel/bsdlabel.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 3d3139f..786ca62 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -658,7 +658,17 @@ makebootarea(char *boot, struct disklabel *dp, int f)
if (read(b, boot, (int)dp->d_secsize) < 0)
err(4, "%s", xxboot);
(void)close(b);
-#ifdef __i386__
+#ifdef PC98
+ for (i = DOSPARTOFF, found = 0;
+ !found && i < (int)(DOSPARTOFF + NDOSPART * sizeof(struct pc98_partition));
+ i++)
+ found = tmpbuf[i] != 0;
+ if (found)
+ memcpy((void *)&boot[DOSPARTOFF],
+ (void *)&tmpbuf[DOSPARTOFF],
+ NDOSPART * sizeof(struct pc98_partition));
+ free(tmpbuf);
+#elif defined(__i386__)
for (i = DOSPARTOFF, found = 0;
!found && i < (int)(DOSPARTOFF + NDOSPART*sizeof(struct dos_partition));
i++)
OpenPOWER on IntegriCloud