aboutsummaryrefslogtreecommitdiff
path: root/src/sg_luns.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2009-07-22 02:22:05 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2009-07-22 02:22:05 +0000
commit017aa7827624e209683c4376074d598ed518e915 (patch)
tree9ad686b4865d2384dc72058ef8284996f4d0da79 /src/sg_luns.c
parent137715a6cb23b4d53521fdeffbfb6164bce4781b (diff)
downloadsg3_utils-017aa7827624e209683c4376074d598ed518e915.tar.gz
change many printf(0x%x) format strings to %#x
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@281 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_luns.c')
-rw-r--r--src/sg_luns.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sg_luns.c b/src/sg_luns.c
index 0df18a27..a8a07d93 100644
--- a/src/sg_luns.c
+++ b/src/sg_luns.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004-2008 Douglas Gilbert.
+ * Copyright (c) 2004-2009 Douglas Gilbert.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@
* This program issues the SCSI REPORT LUNS command to the given SCSI device.
*/
-static char * version_str = "1.15 20090617";
+static char * version_str = "1.15 20090717";
#define MAX_RLUNS_BUFF_LEN (1024 * 64)
#define DEF_RLUNS_BUFF_LEN (1024 * 8)
@@ -178,7 +178,7 @@ decode_lun(const char * leadin, unsigned char * lunp)
} else if ((1 == len) && (2 == e_a_method)) {
x = (lunp[1] << 16) + (lunp[2] << 8) + lunp[3];
printf("%sExtended flat space logical unit addressing: "
- "value=0x%x\n", l_leadin, x);
+ "value=%#x\n", l_leadin, x);
} else if ((3 == len) && (0xf == e_a_method))
printf("%sLogical unit _not_ specified addressing\n",
l_leadin);
@@ -187,7 +187,7 @@ decode_lun(const char * leadin, unsigned char * lunp)
if (1 == len)
x = (lunp[1] << 16) + (lunp[2] << 8) + lunp[3];
printf("%sExtended logical unit addressing: length=%d, "
- "e.a. method=%d, value=0x%x\n", l_leadin, len,
+ "e.a. method=%d, value=%#x\n", l_leadin, len,
e_a_method, x);
} else {
ull = 0;
@@ -198,7 +198,7 @@ decode_lun(const char * leadin, unsigned char * lunp)
ull |= lunp[1 + j];
}
printf("%sExtended logical unit addressing: length=%d, "
- "e. a. method=%d, value=0x%" PRIx64 "\n",
+ "e. a. method=%d, value=%#" PRIx64 "\n",
l_leadin, len, e_a_method, ull);
}
}
@@ -286,7 +286,7 @@ main(int argc, char * argv[])
fprintf(stderr, "version: %s\n", version_str);
return 0;
default:
- fprintf(stderr, "unrecognised option code 0x%x ??\n", c);
+ fprintf(stderr, "unrecognised option code %#x ??\n", c);
usage();
return SG_LIB_SYNTAX_ERROR;
}