summaryrefslogtreecommitdiff
path: root/sys/arch/pmax
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/pmax')
-rw-r--r--sys/arch/pmax/pmax/disksubr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/pmax/pmax/disksubr.c b/sys/arch/pmax/pmax/disksubr.c
index b340fa04a52..be0c0a0edff 100644
--- a/sys/arch/pmax/pmax/disksubr.c
+++ b/sys/arch/pmax/pmax/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.14 1998/10/03 21:18:56 millert Exp $ */
+/* $OpenBSD: disksubr.c,v 1.15 1998/10/04 20:02:58 millert Exp $ */
/* $NetBSD: disksubr.c,v 1.14 1997/01/15 00:55:43 jonathan Exp $ */
/*
@@ -75,12 +75,17 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
struct disklabel *dlp;
char *msg = NULL;
+ /* minimal requirements for archetypal disk label */
+ if (lp->d_secsize == 0)
+ lp->d_secsize = DEV_BSIZE;
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
- 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;
+ if (lp->d_secpercyl == 0)
+ lp->d_secpercyl = 1;
+ lp->d_npartitions = RAW_PART + 1;
+ if (lp->d_partitions[RAW_PART].p_size == 0)
+ lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
+ lp->d_partitions[RAW_PART].p_offset = 0;
/* don't read the on-disk label if we are in spoofed-only mode */
if (spoofonly)