diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2017-10-09 23:49:50 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2017-10-09 23:49:50 +0000 |
commit | b2e59f46a39f19ffc18be02fad71df68974a8d0b (patch) | |
tree | 83b037b8108830c5f04d93fa50d19bbda5fb6ea1 /src/sg_get_lba_status.c | |
parent | dc469cf010ce1c840d6a1790cc4179ea0f5912dd (diff) | |
download | sg3_utils-b2e59f46a39f19ffc18be02fad71df68974a8d0b.tar.gz |
convert lots of two valued 'int's to bool; add sg_ll_inquiry_v2() sg_ll_write_buffer_v2() sg_get_sfs_name() and sg_decode_transportid_str()
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@719 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_get_lba_status.c')
-rw-r--r-- | src/sg_get_lba_status.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/sg_get_lba_status.c b/src/sg_get_lba_status.c index 88da0214..7fb6c723 100644 --- a/src/sg_get_lba_status.c +++ b/src/sg_get_lba_status.c @@ -9,6 +9,8 @@ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> +#include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <getopt.h> #define __STDC_FORMAT_MACROS 1 @@ -30,7 +32,7 @@ * device. */ -static const char * version_str = "1.11 20170921"; +static const char * version_str = "1.12 20171005"; #ifndef UINT32_MAX #define UINT32_MAX ((uint32_t)-1) @@ -157,12 +159,12 @@ main(int argc, char * argv[]) uint32_t element_id = 0; uint32_t scan_len = 0; int maxlen = DEF_GLBAS_BUFF_LEN; - int do_raw = 0; - int o_readonly = 0; int rt = 0; int verbose = 0; bool do_16 = false; bool do_32 = false; + bool do_raw = false; + bool o_readonly = false; const char * device_name = NULL; const unsigned char * bp; int ret = 0; @@ -212,10 +214,10 @@ main(int argc, char * argv[]) } break; case 'r': - ++do_raw; + do_raw = true; break; case 'R': - ++o_readonly; + o_readonly = true; break; case 's': ll = sg_get_llnum(optarg); |