aboutsummaryrefslogtreecommitdiff
path: root/src/sg_get_config.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2014-05-16 22:51:01 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2014-05-16 22:51:01 +0000
commit80bb62dbb1aec4465404d859556fe3f130755e3e (patch)
tree79c73a3a870b32c6c69a922bcdc6a237d5ad9a83 /src/sg_get_config.c
parent8f71009943ab70edea7efddcae4df79d82c21acf (diff)
downloadsg3_utils-80bb62dbb1aec4465404d859556fe3f130755e3e.tar.gz
other half of the sg_get_category_sense_str() changes
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@578 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_get_config.c')
-rw-r--r--src/sg_get_config.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/sg_get_config.c b/src/sg_get_config.c
index 0d0ebbd4..4125b79b 100644
--- a/src/sg_get_config.c
+++ b/src/sg_get_config.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004-2013 Douglas Gilbert.
+ * Copyright (c) 2004-2014 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -27,7 +27,7 @@
*/
-static const char * version_str = "0.38 20130507"; /* mmc6r02 */
+static const char * version_str = "0.39 20140516"; /* mmc6r02 */
#define MX_ALLOC_LEN 8192
#define NAME_BUFF_SZ 64
@@ -1098,16 +1098,11 @@ main(int argc, char * argv[])
else
decode_config(resp_buffer, sizeof(resp_buffer), len, brief,
inner_hex);
- } else if (SG_LIB_CAT_INVALID_OP == res)
- fprintf(stderr, "Get Configuration command not supported\n");
- else if (SG_LIB_CAT_ILLEGAL_REQ == res)
- fprintf(stderr, "field in Get Configuration command illegal\n");
- else if (SG_LIB_CAT_UNIT_ATTENTION == res)
- fprintf(stderr, "Get Configuration received unit attention\n");
- else if (SG_LIB_CAT_ABORTED_COMMAND == res)
- fprintf(stderr, "Get Configuration: aborted command\n");
- else {
- fprintf(stderr, "Get Configuration command failed\n");
+ } else {
+ char b[80];
+
+ sg_get_category_sense_str(res, sizeof(b), b, verbose);
+ fprintf(stderr, "Get Configuration command: %s\n", b);
if (0 == verbose)
fprintf(stderr, " try '-v' option for more information\n");
}