aboutsummaryrefslogtreecommitdiff
path: root/src/sg_get_config.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2007-12-13 04:35:47 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2007-12-13 04:35:47 +0000
commite243d1d0d2e44d728da584d8a64e27ae040de71e (patch)
treed486bb43b7c85744b41b50562baa824342be0e38 /src/sg_get_config.c
parent79ebd609d6023bd6ae4cc4ffd16d813ac0e9a0c5 (diff)
downloadsg3_utils-e243d1d0d2e44d728da584d8a64e27ae040de71e.tar.gz
tweak Microcode Upgrade feature in sg_get_config
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@124 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_get_config.c')
-rw-r--r--src/sg_get_config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sg_get_config.c b/src/sg_get_config.c
index 3c3cbc2c..672a8a55 100644
--- a/src/sg_get_config.c
+++ b/src/sg_get_config.c
@@ -49,7 +49,7 @@
*/
-static char * version_str = "0.31 20071026"; /* mmc6r01 */
+static char * version_str = "0.31 20071212"; /* mmc6r01 */
#define MX_ALLOC_LEN 8192
#define NAME_BUFF_SZ 64
@@ -741,11 +741,12 @@ static void decode_feature(int feature, unsigned char * ucp, int len)
printf(" version=%d, persist=%d, current=%d [0x%x]\n",
((ucp[2] >> 2) & 0xf), !!(ucp[2] & 0x2), !!(ucp[2] & 0x1),
feature);
- if (len < 8) {
+ if (len < 4) {
printf(" additional length [%d] too short\n", len - 4);
break;
}
- printf(" M5=%d\n", !!(ucp[4] & 0x1));
+ if (len < 8)
+ printf(" M5=%d\n", !!(ucp[4] & 0x1));
break;
case 0x105: /* Timeout */
printf(" version=%d, persist=%d, current=%d [0x%x]\n",