summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-10-04 00:54:53 +0000
committermillert <millert@openbsd.org>1998-10-04 00:54:53 +0000
commit54dab9d9892a19f14abc46f41a920a14a82c2dcf (patch)
treef4ff145e7589df1ca778cdae52ea1b774d8f6281
parentAdd DIOCGPDINFO ioctl and use it in disklabel's new -p mode (diff)
downloadwireguard-openbsd-54dab9d9892a19f14abc46f41a920a14a82c2dcf.tar.xz
wireguard-openbsd-54dab9d9892a19f14abc46f41a920a14a82c2dcf.zip
Use a sensible 'c' partition for spoofed labels.
-rw-r--r--sys/arch/hp300/hp300/disksubr.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c
index afd5bf4cf2b..ff5600426bb 100644
--- a/sys/arch/hp300/hp300/disksubr.c
+++ b/sys/arch/hp300/hp300/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.9 1998/10/03 21:18:54 millert Exp $ */
+/* $OpenBSD: disksubr.c,v 1.10 1998/10/04 00:54:53 millert Exp $ */
/* $NetBSD: disksubr.c,v 1.9 1997/04/01 03:12:13 scottr Exp $ */
/*
@@ -81,14 +81,12 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
lp->d_secsize = DEV_BSIZE;
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
- if (lp->d_secpercyl == 0) {
+ if (lp->d_secpercyl == 0)
lp->d_secpercyl = 1;
- }
-
- lp->d_npartitions = 1;
- if (lp->d_partitions[0].p_size == 0)
- lp->d_partitions[0].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ lp->d_npartitions = RAW_PART + 1;
+ if (lp->d_partitions[RAW_PART].p_size == 0)
+ lp->d_partitions[RAW_PART].p_size = 0x1fffffff;
+ lp->d_partitions[RAW_PART].p_offset = 0;
/* don't read the on-disk label if we are in spoofed-only mode */
if (spoofonly)