Rename the top 7 bits if disk minors to spare bits, rather than type bits.

This commit is contained in:
Poul-Henning Kamp 2001-11-04 09:01:07 +00:00
parent 8fb6b29956
commit 20a3b67cb2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86012
5 changed files with 8 additions and 8 deletions

View file

@ -41,7 +41,7 @@ disk_dev_synth(dev_t dev)
int u, s, p;
dev_t pdev;
if (dktype(dev))
if (dksparebits(dev))
return;
LIST_FOREACH(dp, &disklist, d_list) {
if (major(dev) != dp->d_devsw->d_maj)

View file

@ -1232,7 +1232,7 @@ wdopen(dev_t dev, int flags, int fmt, struct thread *td)
struct disklabel *dl;
lunit = dkunit(dev);
if (lunit >= NWD || dktype(dev) != 0)
if (lunit >= NWD || dksparebits(dev) != 0)
return (ENXIO);
du = wddrives[lunit];
if (du == NULL)

View file

@ -428,7 +428,7 @@ struct dos_partition {
_________________________________________________________________
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-----------------------------------------------------------------
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
| SPARE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
@ -451,7 +451,7 @@ dkmodslice(dev_t dev, int slice)
#define dkpart(dev) (minor(dev) & 7)
#define dkslice(dev) ((minor(dev) >> 16) & 0x1f)
#define dktype(dev) ((minor(dev) >> 25) & 0x7f)
#define dksparebits(dev) ((minor(dev) >> 25) & 0x7f)
static __inline u_int
dkunit(dev_t dev)

View file

@ -428,7 +428,7 @@ struct dos_partition {
_________________________________________________________________
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-----------------------------------------------------------------
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
| SPARE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
@ -451,7 +451,7 @@ dkmodslice(dev_t dev, int slice)
#define dkpart(dev) (minor(dev) & 7)
#define dkslice(dev) ((minor(dev) >> 16) & 0x1f)
#define dktype(dev) ((minor(dev) >> 25) & 0x7f)
#define dksparebits(dev) ((minor(dev) >> 25) & 0x7f)
static __inline u_int
dkunit(dev_t dev)

View file

@ -428,7 +428,7 @@ struct dos_partition {
_________________________________________________________________
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-----------------------------------------------------------------
| TYPE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
| SPARE |UNIT_2 | SLICE | MAJOR? | UNIT |PART |
-----------------------------------------------------------------
*/
@ -451,7 +451,7 @@ dkmodslice(dev_t dev, int slice)
#define dkpart(dev) (minor(dev) & 7)
#define dkslice(dev) ((minor(dev) >> 16) & 0x1f)
#define dktype(dev) ((minor(dev) >> 25) & 0x7f)
#define dksparebits(dev) ((minor(dev) >> 25) & 0x7f)
static __inline u_int
dkunit(dev_t dev)