summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-02 18:28:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-02 18:28:10 +0000
commite13c85fa6f83a03bfdd249509731dd8d5194baea (patch)
tree88ab35917b5b8c54d89112adb4de19ef6c17e034 /sys/arch/sparc
parent3ab14ca55e9e29b9c3cd3fdecec447a389d96d6b (diff)
warn about MAXPARTITIONS != 16, grr@shandakor.tharsis.com
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/disksubr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 7475b2bf7e8..725fcadb30a 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 1997/01/02 06:28:43 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 1997/04/02 18:28:09 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -53,6 +53,10 @@
#include <sparc/dev/sbusvar.h>
+#if MAXPARTITIONS != 16
+#warn beware: Sun disklabel compatibility assumes MAXPARTITIONS == 16
+#endif
+
static char *disklabel_sun_to_bsd __P((char *, struct disklabel *));
static int disklabel_bsd_to_sun __P((struct disklabel *, char *));
@@ -293,7 +297,7 @@ bounds_check_with_label(bp, lp, wlabel)
struct disklabel *lp;
int wlabel;
{
-#define dkpart(dev) (minor(dev) & (MAXPARTITIONS-1))
+#define dkpart(dev) DISKPART(dev)
struct partition *p = lp->d_partitions + dkpart(bp->b_dev);
int maxsz = p->p_size;