diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kscd/libwm/scsi.c | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscd/libwm/scsi.c')
-rw-r--r-- | kscd/libwm/scsi.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kscd/libwm/scsi.c b/kscd/libwm/scsi.c index 11570146..c3c1d342 100644 --- a/kscd/libwm/scsi.c +++ b/kscd/libwm/scsi.c @@ -38,7 +38,7 @@ #include "include/wm_cdrom.h" #include "include/wm_cdtext.h" -#define SCMD_INQUIRY 0x12 +#define SCMD_INTQUIRY 0x12 #define SCMD_MODE_SELECT 0x15 #define SCMD_MODE_SENSE 0x1a #define SCMD_START_STOP 0x1b @@ -48,14 +48,14 @@ #define SCMD_PLAY_AUDIO_MSF 0x47 #define SCMD_PAUSE_RESUME 0x4b -#define SUBQ_STATUS_INVALID 0x00 -#define SUBQ_STATUS_PLAY 0x11 -#define SUBQ_STATUS_PAUSE 0x12 -#define SUBQ_STATUS_DONE 0x13 -#define SUBQ_STATUS_ERROR 0x14 -#define SUBQ_STATUS_NONE 0x15 -#define SUBQ_STATUS_NO_DISC 0x17 /* Illegal, but Toshiba returns it. */ -#define SUBQ_ILLEGAL 0xff +#define SUBTQ_STATUS_INVALID 0x00 +#define SUBTQ_STATUS_PLAY 0x11 +#define SUBTQ_STATUS_PAUSE 0x12 +#define SUBTQ_STATUS_DONE 0x13 +#define SUBTQ_STATUS_ERROR 0x14 +#define SUBTQ_STATUS_NONE 0x15 +#define SUBTQ_STATUS_NO_DISC 0x17 /* Illegal, but Toshiba returns it. */ +#define SUBTQ_ILLEGAL 0xff #define PAGE_AUDIO 0x0e #define LEADOUT 0xaa @@ -194,14 +194,14 @@ wm_scsi_mode_select( struct wm_drive *d, unsigned char *buf, unsigned char len ) } /* - * Send an INQUIRY command to get the drive type. + * Send an INTQUIRY command to get the drive type. * * d Drive structure * vendor Buffer for vendor name (8 bytes + null) * model Buffer for model name (16 bytes + null) * rev Buffer for revision level (4 bytes + null) * - * The above string lengths apply to the SCSI INQUIRY command. The + * The above string lengths apply to the SCSI INTQUIRY command. The * actual WorkMan drive structure reserves 31 bytes + NULL per entry. * * If the model name begins with "CD-ROM" and zero or more spaces, that will @@ -216,7 +216,7 @@ wm_scsi_get_drive_type( struct wm_drive *d, char *vendor, memset(buf, 0, 36); wm_lib_message(WM_MSG_CLASS_SCSI | WM_MSG_LEVEL_INFO, "Sending SCSI inquiry command...\n"); - if (sendscsi(d, buf, 36, 1, SCMD_INQUIRY, 0, 0, 0, 36, 0,0,0,0,0,0,0)) + if (sendscsi(d, buf, 36, 1, SCMD_INTQUIRY, 0, 0, 0, 36, 0,0,0,0,0,0,0)) { sprintf( vendor, WM_STR_GENVENDOR); sprintf( model, WM_STR_GENMODEL); @@ -346,20 +346,20 @@ wm_scsi2_get_drive_status(struct wm_drive *d, int oldmode, } /* If we can't read status, the CD has been ejected. */ - buf[1] = SUBQ_ILLEGAL; + buf[1] = SUBTQ_ILLEGAL; if (sendscsi(d, buf, sizeof(buf), 1, SCMD_READ_SUBCHANNEL, 2, 64, 1, 0, 0, 0, sizeof(buf) / 256, sizeof(buf) % 256, 0,0,0)) return (0); switch (buf[1]) { - case SUBQ_STATUS_PLAY: + case SUBTQ_STATUS_PLAY: *mode = WM_CDM_PLAYING; *track = buf[6]; *ind = buf[7]; *pos = buf[9] * 60 * 75 + buf[10] * 75 + buf[11]; break; - case SUBQ_STATUS_PAUSE: + case SUBTQ_STATUS_PAUSE: if (oldmode == WM_CDM_PLAYING || oldmode == WM_CDM_PAUSED) { *mode = WM_CDM_PAUSED; @@ -374,13 +374,13 @@ wm_scsi2_get_drive_status(struct wm_drive *d, int oldmode, break; /* - * SUBQ_STATUS_DONE is sometimes returned when the CD is idle, + * SUBTQ_STATUS_DONE is sometimes returned when the CD is idle, * even though the spec says it should only be returned when an * audio play operation finishes. */ - case SUBQ_STATUS_DONE: - case SUBQ_STATUS_NONE: - case SUBQ_STATUS_INVALID: + case SUBTQ_STATUS_DONE: + case SUBTQ_STATUS_NONE: + case SUBTQ_STATUS_INVALID: if (oldmode == WM_CDM_PLAYING) *mode = WM_CDM_TRACK_DONE; else @@ -390,16 +390,16 @@ wm_scsi2_get_drive_status(struct wm_drive *d, int oldmode, /* * This usually means there's no disc in the drive. */ - case SUBQ_STATUS_NO_DISC: + case SUBTQ_STATUS_NO_DISC: break; /* * This usually means the user ejected the CD manually. */ - case SUBQ_STATUS_ERROR: + case SUBTQ_STATUS_ERROR: break; - case SUBQ_ILLEGAL: /* call didn't really succeed */ + case SUBTQ_ILLEGAL: /* call didn't really succeed */ break; default: |