summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-12-15 16:41:40 +0000
committerphk <phk@FreeBSD.org>2000-12-15 16:41:40 +0000
commitfe59327d800ee948fac888013cc16a680a9dfa6d (patch)
tree1a46cb9eacf28f84dc10b64c5cdd17006e1a0729
parent139e3e3e413d31c576b790001e28b1fcffe4551f (diff)
downloadFreeBSD-src-fe59327d800ee948fac888013cc16a680a9dfa6d.zip
FreeBSD-src-fe59327d800ee948fac888013cc16a680a9dfa6d.tar.gz
Make a #define for the highest legal disk unit (0x1ff)
-rw-r--r--sys/sys/disklabel.h3
-rw-r--r--sys/sys/diskmbr.h3
-rw-r--r--sys/sys/diskpc98.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index e66b75e..df183ae 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -427,6 +427,9 @@ struct dos_partition {
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
+
+#define DKMAXUNIT 0x1ff /* Highest disk unit number */
+
#define dkmakeminor(unit, slice, part) \
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
(((unit) & 0x1f) << 3) | (part))
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index e66b75e..df183ae 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -427,6 +427,9 @@ struct dos_partition {
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
+
+#define DKMAXUNIT 0x1ff /* Highest disk unit number */
+
#define dkmakeminor(unit, slice, part) \
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
(((unit) & 0x1f) << 3) | (part))
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index e66b75e..df183ae 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -427,6 +427,9 @@ struct dos_partition {
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
+
+#define DKMAXUNIT 0x1ff /* Highest disk unit number */
+
#define dkmakeminor(unit, slice, part) \
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
(((unit) & 0x1f) << 3) | (part))
OpenPOWER on IntegriCloud