From e6c866720849f684adcdfb776007421ab7c1aeca Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 15 Dec 2000 16:41:40 +0000 Subject: [PATCH] Make a #define for the highest legal disk unit (0x1ff) --- sys/sys/disklabel.h | 3 +++ sys/sys/diskmbr.h | 3 +++ sys/sys/diskpc98.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index e66b75ecbaf9..df183ae74a28 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 e66b75ecbaf9..df183ae74a28 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 e66b75ecbaf9..df183ae74a28 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))