diff options
author | Hannes Reinecke <hare@suse.de> | 2005-07-08 03:29:19 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-07-08 03:29:19 +0200 |
commit | b4a2906bf1921cd6cbc25621a6db0bae906616c8 (patch) | |
tree | 484215222901f0970210d817c00884763ce837d8 /extras/scsi_id/scsi_serial.c | |
parent | face198a5f21027fefe796dc01e19e349a2d36ce (diff) |
fix usb_id and let scsi_id ignore "illegal request"
Diffstat (limited to 'extras/scsi_id/scsi_serial.c')
-rw-r--r-- | extras/scsi_id/scsi_serial.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c index 20a7928553..7bfa9d1812 100644 --- a/extras/scsi_id/scsi_serial.c +++ b/extras/scsi_id/scsi_serial.c @@ -89,6 +89,7 @@ static const char hex_str[]="0123456789abcdef"; #define SG_ERR_CAT_RESET 2 /* interpreted from sense buffer */ #define SG_ERR_CAT_TIMEOUT 3 #define SG_ERR_CAT_RECOVERED 4 /* Successful command after recovered err */ +#define SG_ERR_CAT_NOTSUPPORTED 5 /* Illegal / unsupported command */ #define SG_ERR_CAT_SENSE 98 /* Something else in the sense buffer */ #define SG_ERR_CAT_OTHER 99 /* Some other error/warning */ @@ -130,6 +131,8 @@ static int sg_err_category_new(int scsi_status, int msg_status, int return SG_ERR_CAT_MEDIA_CHANGED; if (0x29 == asc) return SG_ERR_CAT_RESET; + } else if (sense_key == ILLEGAL_REQUEST) { + return SG_ERR_CAT_NOTSUPPORTED; } } return SG_ERR_CAT_SENSE; @@ -331,6 +334,9 @@ resend: retval = sg_err_category3(&io_hdr); switch (retval) { + case SG_ERR_CAT_NOTSUPPORTED: + buf[1] = 0; + /* Fallthrough */ case SG_ERR_CAT_CLEAN: case SG_ERR_CAT_RECOVERED: retval = 0; |