summaryrefslogtreecommitdiff
path: root/extras/multipath/unused.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/multipath/unused.c')
-rw-r--r--extras/multipath/unused.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/extras/multipath/unused.c b/extras/multipath/unused.c
index 33b3e859d1..08144cf717 100644
--- a/extras/multipath/unused.c
+++ b/extras/multipath/unused.c
@@ -1,4 +1,21 @@
static int
+get_serial (int fd, char * str)
+{
+ char buff[MX_ALLOC_LEN + 1];
+ int len;
+
+ if (0 == do_inq(fd, 0, 1, 0x80, buff, MX_ALLOC_LEN, 0)) {
+ len = buff[3];
+ if (len > 0) {
+ memcpy(str, buff + 4, len);
+ buff[len] = '\0';
+ }
+ return 1;
+ }
+ return 0;
+}
+
+static int
do_tur(int fd)
{
unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };