]> err.no Git - systemd/commitdiff
[PATCH[ udev: ata_id: Fix length of INQUIRY command
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 22 Dec 2011 21:12:30 +0000 (16:12 -0500)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 22 Dec 2011 23:33:09 +0000 (00:33 +0100)
SCSI INQUIRY commands are 6 bytes long, not 12 bytes.

extras/ata_id/ata_id.c

index e38a7d1aa522b94492916009945d589ffa148675..64df86c23ad429a53c951209ff4205aed7dc5ca7 100644 (file)
@@ -52,7 +52,7 @@ static int disk_scsi_inquiry_command(int      fd,
                                     size_t   buf_len)
 {
        struct sg_io_v4 io_v4;
-       uint8_t cdb[12];
+       uint8_t cdb[6];
        uint8_t sense[32];
        int ret;