diff options
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r-- | sys/arch/hp300/dev/hdvar.h | 9 | ||||
-rw-r--r-- | sys/arch/hp300/dev/sd.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/dev/sdvar.h | 9 |
3 files changed, 12 insertions, 14 deletions
diff --git a/sys/arch/hp300/dev/hdvar.h b/sys/arch/hp300/dev/hdvar.h index 051bdb246a5..85a71d05cfa 100644 --- a/sys/arch/hp300/dev/hdvar.h +++ b/sys/arch/hp300/dev/hdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hdvar.h,v 1.1 1997/02/03 08:11:55 downsj Exp $ */ +/* $OpenBSD: hdvar.h,v 1.2 1997/02/10 01:33:56 downsj Exp $ */ /* $NetBSD: rdvar.h,v 1.6 1997/01/30 09:14:19 thorpej Exp $ */ /* @@ -91,10 +91,9 @@ struct hd_softc { #define HDF_WANTED 0x20 #define HDF_WLABEL 0x40 -#define hdunit(x) (minor(x) >> 3) -#define hdpart(x) (minor(x) & 0x7) -#define hdpunit(x) ((x) & 7) -#define hdlabdev(d) (dev_t)(((int)(d)&~7)|2) /* hd?c */ +#define hdunit(x) DISKUNIT(x) +#define hdpart(x) DISKPART(x) +#define hdlabdev(d) MAKEDISKDEV(major(d), hdunit(d), RAW_PART) #define b_cylin b_resid diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index ecc87b4d639..d848472cfd2 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.7 1997/02/03 04:47:47 downsj Exp $ */ +/* $OpenBSD: sd.c,v 1.8 1997/02/10 01:33:57 downsj Exp $ */ /* $NetBSD: sd.c,v 1.29 1997/01/30 09:14:20 thorpej Exp $ */ /* @@ -1022,9 +1022,6 @@ sdioctl(dev, cmd, data, flag, p) int error, flags; switch (cmd) { - default: - return (EINVAL); - case DIOCGDINFO: *(struct disklabel *)data = *lp; return (0); @@ -1106,6 +1103,9 @@ sdioctl(dev, cmd, data, flag, p) */ bcopy(&sc->sc_sensestore, data, sizeof(sc->sc_sensestore)); return (0); + + default: + return (EINVAL); } /*NOTREACHED*/ diff --git a/sys/arch/hp300/dev/sdvar.h b/sys/arch/hp300/dev/sdvar.h index c3d9921798c..a23d9dccc6b 100644 --- a/sys/arch/hp300/dev/sdvar.h +++ b/sys/arch/hp300/dev/sdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdvar.h,v 1.6 1997/02/03 04:47:48 downsj Exp $ */ +/* $OpenBSD: sdvar.h,v 1.7 1997/02/10 01:33:58 downsj Exp $ */ /* $NetBSD: sdvar.h,v 1.6 1997/01/30 09:14:22 thorpej Exp $ */ /* @@ -74,10 +74,9 @@ struct sd_softc { #define SDF_RMEDIA 0x20 #define SDF_ERROR 0x40 -#define sdunit(x) (minor(x) >> 3) -#define sdpart(x) (minor(x) & 0x7) -#define sdpunit(x) ((x) & 7) -#define sdlabdev(d) (dev_t)(((int)(d)&~7)|2) /* sd?c */ +#define sdunit(x) DISKUNIT(x) +#define sdpart(x) DISKPART(x) +#define sdlabdev(d) MAKEDISKDEV(major(d), sdunit(d), RAW_PART) #define b_cylin b_resid |