summaryrefslogtreecommitdiff
path: root/extras/scsi_id/scsi_serial.c
diff options
context:
space:
mode:
authorpatmans@us.ibm.com <patmans@us.ibm.com>2004-06-26 01:18:17 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:36:21 -0700
commit062db23d5eb303ef49d2ff805381229932f44246 (patch)
treefa4bec0bad640e27afce8f676c0647476fd31348 /extras/scsi_id/scsi_serial.c
parentc59a72105d0ff8a47b31f1829dd3c166ebd859d0 (diff)
[PATCH] update udev scsi_id to scsi_id 0.5
This patch syncs the scsi_id in the udev tree to version 0.5.
Diffstat (limited to 'extras/scsi_id/scsi_serial.c')
-rw-r--r--extras/scsi_id/scsi_serial.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index ae83330c30..e0074b662d 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
+#include <linux/compiler.h> /* need __user when built via klibc */
#include <scsi/sg.h>
#include <sysfs/libsysfs.h>
#include "scsi_id.h"
@@ -312,6 +313,8 @@ static int scsi_inquiry(struct sysfs_device *scsi_dev, int fd, unsigned
buffer = inq + OFFSET;
resend:
+ dprintf("%s evpd %d, page 0x%x\n", scsi_dev->name, evpd, page);
+
memset(&io_hdr, 0, sizeof(struct sg_io_hdr));
io_hdr.interface_id = 'S';
io_hdr.cmd_len = sizeof(inq_cmd);
@@ -352,6 +355,11 @@ resend:
retval = -1;
}
+ if (retval < 0)
+ log_message(LOG_WARNING,
+ "%s: Unable to get INQUIRY vpd %d page 0x%x.\n",
+ scsi_dev->name, evpd, page);
+
free(inq);
return retval;
}