-/* $OpenBSD: fdreg.h,v 1.8 1996/11/10 21:21:30 downsj Exp $ */
+/* $OpenBSD: fdreg.h,v 1.9 1996/12/05 13:13:21 deraadt Exp $ */
/* $NetBSD: fdreg.h,v 1.8 1995/06/28 04:30:57 cgd Exp $ */
/*-
#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 & 0x80) >> 7) /* XXX two drives max, sorry */
+#define FDTYPE(dev) ((minor(dev) & 0x70) >> 4)
+#define FDPART(dev) (minor(dev) & 0x0f)