diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2016-04-02 00:33:00 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2016-04-02 00:33:00 +0000 |
commit | 61a0b017ebca98eca9c5d85264af45b3eb1853e5 (patch) | |
tree | a4eccd675fce2340b4a4ff78a4ce386df36a920f /lib/sg_cmds_basic.c | |
parent | 2133555f87aa82ee833494d2e55ca530132dfb4e (diff) | |
download | sg3_utils-61a0b017ebca98eca9c5d85264af45b3eb1853e5.tar.gz |
sg_raw: add '--enumerate' option
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@688 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_cmds_basic.c')
-rw-r--r-- | lib/sg_cmds_basic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sg_cmds_basic.c b/lib/sg_cmds_basic.c index 7a56d516..68dbd843 100644 --- a/lib/sg_cmds_basic.c +++ b/lib/sg_cmds_basic.c @@ -17,6 +17,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <unistd.h> #include "sg_lib.h" @@ -34,7 +35,7 @@ #endif -static const char * version_str = "1.72 20160126"; +static const char * version_str = "1.73 20160331"; #define SENSE_BUFF_LEN 64 /* Arbitrary, could be larger */ @@ -118,7 +119,7 @@ sg_cmds_process_helper(const char * leadin, int mx_di_len, int resid, { int scat, got; int n = 0; - int check_data_in = 0; + bool check_data_in = false; char b[512]; scat = sg_err_category_sense(sbp, slen); @@ -136,7 +137,7 @@ sg_cmds_process_helper(const char * leadin, int mx_di_len, int resid, break; case SG_LIB_CAT_RECOVERED: case SG_LIB_CAT_MEDIUM_HARD: - ++check_data_in; + check_data_in = true; /* drop through */ case SG_LIB_CAT_UNIT_ATTENTION: case SG_LIB_CAT_SENSE: |