mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Rename the top 7 bits if disk minors to spare bits, rather than type bits.
This commit is contained in:
parent
8fb6b29956
commit
20a3b67cb2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86012
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue