diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arc/dev/fd.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 7 | ||||
-rw-r--r-- | sys/dev/isa/fdreg.h | 7 |
3 files changed, 12 insertions, 9 deletions
diff --git a/sys/arch/arc/dev/fd.c b/sys/arch/arc/dev/fd.c index fc5d4443775..e0f69b60166 100644 --- a/sys/arch/arc/dev/fd.c +++ b/sys/arch/arc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.2 1996/08/26 11:12:00 pefo Exp $ */ +/* $OpenBSD: fd.c,v 1.3 1996/11/06 01:34:00 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp $ */ /*- @@ -63,8 +63,9 @@ #include <arc/dev/dma.h> -#define FDUNIT(dev) (minor(dev) / 8) -#define FDTYPE(dev) (minor(dev) % 8) +#define FDUNIT(dev) ((dev & 0x080) >> 7) +#define FDTYPE(dev) ((minor(dev) & 0x70) >> 4) +#define FDPART(dev) (minor(dev) & 0x0f) #define b_cylin b_resid diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 75ffee33adc..2af99ae3fbc 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.9 1996/08/11 23:11:35 downsj Exp $ */ +/* $OpenBSD: fd.c,v 1.10 1996/11/06 01:33:58 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.33.4.1 1996/06/12 20:52:25 pk Exp $ */ /*- @@ -68,8 +68,9 @@ #include <sparc/dev/fdreg.h> #include <sparc/dev/fdvar.h> -#define FDUNIT(dev) (minor(dev) / 8) -#define FDTYPE(dev) (minor(dev) % 8) +#define FDUNIT(dev) ((dev & 0x180) >> 7) +#define FDTYPE(dev) ((minor(dev) & 0x70) >> 4) +#define FDPART(dev) (minor(dev) & 0x0f) #define b_cylin b_resid diff --git a/sys/dev/isa/fdreg.h b/sys/dev/isa/fdreg.h index d67d33fd9c3..8a8eca8be1b 100644 --- a/sys/dev/isa/fdreg.h +++ b/sys/dev/isa/fdreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fdreg.h,v 1.6 1996/10/26 06:22:38 downsj Exp $ */ +/* $OpenBSD: fdreg.h,v 1.7 1996/11/06 01:33:53 deraadt Exp $ */ /* $NetBSD: fdreg.h,v 1.8 1995/06/28 04:30:57 cgd Exp $ */ /*- @@ -66,5 +66,6 @@ #define FDC_NPORT 8 #define FDC_MAXIOSIZE NBPG /* XXX should be MAXBSIZE */ -#define FDUNIT(dev) (minor(dev) / 16) -#define FDTYPE(dev) (minor(dev) % 16) +#define FDUNIT(dev) ((dev & 0x180) >> 7) +#define FDTYPE(dev) ((minor(dev) & 0x70) >> 4) +#define FDPART(dev) (minor(dev) & 0x0f) |