diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-17 17:47:25 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-17 17:47:25 +0000 |
commit | 7a58392680d465306b00c059336c7425bf2b0cc0 (patch) | |
tree | 512185a4d0a29ea88512ea7cca5d8b4430a4c984 | |
parent | 584faa50b6b03ada08c80824e96fd3e3245a85d6 (diff) |
renumber the CHIO* since they clash w/ the CDIO, keep the old ones as OCHIO, EOL set to post 3.3
-rw-r--r-- | sys/scsi/ch.c | 12 | ||||
-rw-r--r-- | sys/sys/chio.h | 27 |
2 files changed, 30 insertions, 9 deletions
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index 743cd84d38a..c780fcf239a 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.12 2002/03/14 01:27:13 millert Exp $ */ +/* $OpenBSD: ch.c,v 1.13 2002/10/17 17:47:24 mickey Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -286,8 +286,11 @@ chioctl(dev, cmd, data, flags, p) * have the device open for writing. */ switch (cmd) { + case OCHIOGPICKER: case CHIOGPICKER: + case OCHIOGPARAMS: case CHIOGPARAMS: + case OCHIOGSTATUS: case CHIOGSTATUS: break; @@ -297,22 +300,27 @@ chioctl(dev, cmd, data, flags, p) } switch (cmd) { + case OCHIOMOVE: case CHIOMOVE: error = ch_move(sc, (struct changer_move *)data); break; + case OCHIOEXCHANGE: case CHIOEXCHANGE: error = ch_exchange(sc, (struct changer_exchange *)data); break; + case OCHIOPOSITION: case CHIOPOSITION: error = ch_position(sc, (struct changer_position *)data); break; + case OCHIOGPICKER: case CHIOGPICKER: *(int *)data = sc->sc_picker - sc->sc_firsts[CHET_MT]; break; + case OCHIOSPICKER: case CHIOSPICKER: { int new_picker = *(int *)data; @@ -321,6 +329,7 @@ chioctl(dev, cmd, data, flags, p) sc->sc_picker = sc->sc_firsts[CHET_MT] + new_picker; break; } + case OCHIOGPARAMS: case CHIOGPARAMS: { struct changer_params *cp = (struct changer_params *)data; @@ -331,6 +340,7 @@ chioctl(dev, cmd, data, flags, p) cp->cp_ndrives = sc->sc_counts[CHET_DT]; break; } + case OCHIOGSTATUS: case CHIOGSTATUS: { struct changer_element_status *ces = (struct changer_element_status *)data; diff --git a/sys/sys/chio.h b/sys/sys/chio.h index 84c3a32f741..67e71e6328b 100644 --- a/sys/sys/chio.h +++ b/sys/sys/chio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chio.h,v 1.4 1996/04/21 22:31:32 deraadt Exp $ */ +/* $OpenBSD: chio.h,v 1.5 2002/10/17 17:47:24 mickey Exp $ */ /* $NetBSD: chio.h,v 1.8 1996/04/03 00:25:21 thorpej Exp $ */ /* @@ -141,12 +141,23 @@ struct changer_element_status { #define CESTATUS_BITS \ "\20\6INEAB\5EXENAB\4ACCESS\3EXCEPT\2IMPEXP\1FULL" -#define CHIOMOVE _IOW('c', 0x01, struct changer_move) -#define CHIOEXCHANGE _IOW('c', 0x02, struct changer_exchange) -#define CHIOPOSITION _IOW('c', 0x03, struct changer_position) -#define CHIOGPICKER _IOR('c', 0x04, int) -#define CHIOSPICKER _IOW('c', 0x05, int) -#define CHIOGPARAMS _IOR('c', 0x06, struct changer_params) -#define CHIOGSTATUS _IOW('c', 0x08, struct changer_element_status) +/* + * XXX we have to renumber this since it chashes w/ the + * cdio ioctls, O* interface goes away right after 3.3 + */ +#define OCHIOMOVE _IOW('c', 0x01, struct changer_move) +#define CHIOMOVE _IOW('c', 0x41, struct changer_move) +#define OCHIOEXCHANGE _IOW('c', 0x02, struct changer_exchange) +#define CHIOEXCHANGE _IOW('c', 0x42, struct changer_exchange) +#define OCHIOPOSITION _IOW('c', 0x03, struct changer_position) +#define CHIOPOSITION _IOW('c', 0x43, struct changer_position) +#define OCHIOGPICKER _IOR('c', 0x04, int) +#define CHIOGPICKER _IOR('c', 0x44, int) +#define OCHIOSPICKER _IOW('c', 0x05, int) +#define CHIOSPICKER _IOW('c', 0x45, int) +#define OCHIOGPARAMS _IOR('c', 0x06, struct changer_params) +#define CHIOGPARAMS _IOR('c', 0x46, struct changer_params) +#define OCHIOGSTATUS _IOW('c', 0x08, struct changer_element_status) +#define CHIOGSTATUS _IOW('c', 0x48, struct changer_element_status) #endif /* _SYS_CHIO_H_ */ |