From 9af3551d46b6cd0beddc3d04e7b6c30587aa2341 Mon Sep 17 00:00:00 2001 From: Andreas Schulz Date: Fri, 15 Sep 1995 10:45:42 +0000 Subject: [PATCH] Correct the calculation of the unit number. it is not minor(x) & 3. It need to be shifted >> 3. The last bits are the partition info. --- sys/i386/isa/wcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c index 901382e180d..76cb6407dfa 100644 --- a/sys/i386/isa/wcd.c +++ b/sys/i386/isa/wcd.c @@ -36,7 +36,7 @@ #include #define NUNIT (NWDC*2) /* Max. number of devices */ -#define UNIT(d) (minor(d) & 3) /* Unit part of minor device number */ +#define UNIT(d) ((minor(d) >> 3) & 3) /* Unit part of minor device number */ #define SECSIZE 2048 /* CD-ROM sector size in bytes */ #define F_OPEN 0x0001 /* The drive os opened */