diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2014-05-15 15:54:06 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2014-05-15 15:54:06 +0000 |
commit | 8f71009943ab70edea7efddcae4df79d82c21acf (patch) | |
tree | fe8085ccc1cdfea6e83c43b9f4a74f8ff4c360af /src/sg_get_lba_status.c | |
parent | b3db8c0bc921230b4287be7962a4e3603039b4d2 (diff) | |
download | sg3_utils-8f71009943ab70edea7efddcae4df79d82c21acf.tar.gz |
add 'sense' categories for reservation conflict, data protect and protection information violations; add sg_get_category_sense_str() to API
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@577 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_get_lba_status.c')
-rw-r--r-- | src/sg_get_lba_status.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sg_get_lba_status.c b/src/sg_get_lba_status.c index 61e47d17..d667580c 100644 --- a/src/sg_get_lba_status.c +++ b/src/sg_get_lba_status.c @@ -28,7 +28,7 @@ * device. */ -static const char * version_str = "1.06 20140512"; /* sbc2r29 */ +static const char * version_str = "1.06 20140515"; /* sbc2r29 */ #define MAX_GLBAS_BUFF_LEN (1024 * 1024) #define DEF_GLBAS_BUFF_LEN 24 @@ -342,14 +342,13 @@ main(int argc, char * argv[]) "found\n"); } else if (SG_LIB_CAT_INVALID_OP == res) fprintf(stderr, "Get LBA Status command not supported\n"); - else if (SG_LIB_CAT_ABORTED_COMMAND == res) - fprintf(stderr, "Get LBA Status, aborted command\n"); else if (SG_LIB_CAT_ILLEGAL_REQ == res) - fprintf(stderr, "Get LBA Status command has bad field in cdb\n"); + fprintf(stderr, "Get LBA Status command: bad field in cdb\n"); else { - fprintf(stderr, "Get LBA Status command failed\n"); - if (0 == verbose) - fprintf(stderr, " try '-v' option for more information\n"); + char b[80]; + + sg_get_category_sense_str(res, sizeof(b), b, verbose); + fprintf(stderr, "Get LBA Status command: %s\n", b); } the_end: |