summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arc/arc/autoconf.c7
-rw-r--r--sys/arch/arc/arc/disksubr.c13
-rw-r--r--sys/arch/arc/include/disklabel.h6
3 files changed, 8 insertions, 18 deletions
diff --git a/sys/arch/arc/arc/autoconf.c b/sys/arch/arc/arc/autoconf.c
index 2a90388362a..8f8e452c0d1 100644
--- a/sys/arch/arc/arc/autoconf.c
+++ b/sys/arch/arc/arc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.1 1996/06/24 09:07:20 pefo Exp $ */
+/* $OpenBSD: autoconf.c,v 1.2 1996/08/26 11:01:33 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.1 1996/06/24 09:07:20 pefo Exp $
+ * $Id: autoconf.c,v 1.2 1996/08/26 11:01:33 pefo Exp $
*/
/*
@@ -125,9 +125,6 @@ static char devname[][2] = {
'f','d', /* 7 = floppy */
};
-#define PARTITIONMASK 0x7
-#define PARTITIONSHIFT 3
-
/*
* Attempt to find the device from which we were booted.
* If we can do so, and not instructed not to do so,
diff --git a/sys/arch/arc/arc/disksubr.c b/sys/arch/arc/arc/disksubr.c
index 4f84136f3a8..8352185c72d 100644
--- a/sys/arch/arc/arc/disksubr.c
+++ b/sys/arch/arc/arc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.1 1996/06/24 09:07:20 pefo Exp $ */
+/* $OpenBSD: disksubr.c,v 1.2 1996/08/26 11:01:34 pefo Exp $ */
/* $NetBSD: disksubr.c,v 1.3 1995/04/22 12:43:22 cgd Exp $ */
/*
@@ -168,15 +168,6 @@ setdisklabel(olp, nlp, openmask, clp)
(nlp->d_secsize % DEV_BSIZE) != 0)
return(EINVAL);
-#ifdef notdef
- /* XXX WHY WAS THIS HERE?! */
- /* special case to allow disklabel to be invalidated */
- if (nlp->d_magic == 0xffffffff) {
- *olp = *nlp;
- return (0);
- }
-#endif
-
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
@@ -283,7 +274,7 @@ bounds_check_with_label(bp, lp, wlabel)
struct disklabel *lp;
int wlabel;
{
-#define dkpart(dev) (minor(dev) & 7)
+#define dkpart(dev) (minor(dev) % MAXPARTITIONS )
struct partition *p = lp->d_partitions + dkpart(bp->b_dev);
int labelsect = lp->d_partitions[RAW_PART].p_offset;
diff --git a/sys/arch/arc/include/disklabel.h b/sys/arch/arc/include/disklabel.h
index eefe2733114..d02f56f5120 100644
--- a/sys/arch/arc/include/disklabel.h
+++ b/sys/arch/arc/include/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: disklabel.h,v 1.2 1996/08/26 11:01:35 pefo Exp $ */
/* $NetBSD: disklabel.h,v 1.2 1995/01/18 06:37:55 mellon Exp $ */
/*
@@ -36,7 +36,9 @@
#define LABELSECTOR 0 /* sector containing label */
#define LABELOFFSET 64 /* offset of label in sector */
-#define MAXPARTITIONS 8 /* number of partitions */
+#define MAXPARTITIONS 16 /* number of partitions */
+#define PARTITIONSHIFT 4 /* log2 */
+#define PARTITIONMASK 0xf
#define RAW_PART 2 /* raw partition: xx?c */
/* DOS partition table -- used when the system is booted from a dos