The changes I had made long ago to support >32 disk-type units was
incomplete; dkmakeminor was broken for >32. I noticed this when trying to use more than 32 ccd units on wcarchive. Reviewed by: bde
This commit is contained in:
parent
df743c09c1
commit
7f62231983
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
|
||||
* $Id: disklabel.h,v 1.29 1998/02/01 20:08:36 bde Exp $
|
||||
* $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_DISKLABEL_H_
|
||||
@ -414,7 +414,8 @@ struct dos_partition {
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
#define dkmakeminor(unit, slice, part) \
|
||||
(((slice) << 16) | ((unit) << 3) | (part))
|
||||
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
|
||||
(((unit) & 0x1f) << 3) | (part))
|
||||
#define dkmodpart(dev, part) (((dev) & ~(dev_t)7) | (part))
|
||||
#define dkmodslice(dev, slice) (((dev) & ~(dev_t)0x1f0000) | ((slice) << 16))
|
||||
#define dkpart(dev) (minor(dev) & 7)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
|
||||
* $Id: disklabel.h,v 1.29 1998/02/01 20:08:36 bde Exp $
|
||||
* $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_DISKLABEL_H_
|
||||
@ -414,7 +414,8 @@ struct dos_partition {
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
#define dkmakeminor(unit, slice, part) \
|
||||
(((slice) << 16) | ((unit) << 3) | (part))
|
||||
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
|
||||
(((unit) & 0x1f) << 3) | (part))
|
||||
#define dkmodpart(dev, part) (((dev) & ~(dev_t)7) | (part))
|
||||
#define dkmodslice(dev, slice) (((dev) & ~(dev_t)0x1f0000) | ((slice) << 16))
|
||||
#define dkpart(dev) (minor(dev) & 7)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
|
||||
* $Id: disklabel.h,v 1.29 1998/02/01 20:08:36 bde Exp $
|
||||
* $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_DISKLABEL_H_
|
||||
@ -414,7 +414,8 @@ struct dos_partition {
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
#define dkmakeminor(unit, slice, part) \
|
||||
(((slice) << 16) | ((unit) << 3) | (part))
|
||||
(((slice) << 16) | (((unit) & 0x1e0) << 16) | \
|
||||
(((unit) & 0x1f) << 3) | (part))
|
||||
#define dkmodpart(dev, part) (((dev) & ~(dev_t)7) | (part))
|
||||
#define dkmodslice(dev, slice) (((dev) & ~(dev_t)0x1f0000) | ((slice) << 16))
|
||||
#define dkpart(dev) (minor(dev) & 7)
|
||||
|
Loading…
Reference in New Issue
Block a user