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:
dg 1998-02-22 10:11:23 +00:00
parent b3147e8cdb
commit 59689f1f05
3 changed files with 9 additions and 6 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)