diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-05-14 15:02:17 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-05-14 15:02:17 +0200 |
commit | 025570aa3e054d92d65f8d2de9f91d202f60c798 (patch) | |
tree | b92a65e19ec3c12f229a5850ff1ea23d471c2166 /extras/scsi_id/scsi_serial.c | |
parent | 2d05764a77078953849a1f84ac269c927904ca23 (diff) |
scsi_id: add --sg-version= option
Diffstat (limited to 'extras/scsi_id/scsi_serial.c')
-rw-r--r-- | extras/scsi_id/scsi_serial.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c index 202ffc0a84..c5cacfa114 100644 --- a/extras/scsi_id/scsi_serial.c +++ b/extras/scsi_id/scsi_serial.c @@ -803,12 +803,14 @@ int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) return retval; memcpy(dev_scsi->vendor, buf + 8, 8); + dev_scsi->vendor[8] = '\0'; memcpy(dev_scsi->model, buf + 16, 16); + dev_scsi->model[16] = '\0'; memcpy(dev_scsi->revision, buf + 32, 4); + dev_scsi->revision[4] = '\0'; sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); - if (close(fd) < 0) - info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); + close(fd); return 0; } |