diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2021-06-07 15:21:01 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2021-06-07 15:21:01 +0000 |
commit | 30363466e3580cae5f428c9bf35caa934cef469b (patch) | |
tree | 265f9bd6b4a8ebcf7102908ca0596dc1f42ce28a /src/sg_raw.c | |
parent | d65eadbdaa302c7b83c059569a28efd3304947e4 (diff) | |
download | sg3_utils-30363466e3580cae5f428c9bf35caa934cef469b.tar.gz |
sg_vpd: fix do_hex type on some recent pages; sg_dd: don't close negative file descriptors; pt_linux_nvme: fix fua setting
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@903 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_raw.c')
-rw-r--r-- | src/sg_raw.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sg_raw.c b/src/sg_raw.c index c831a172..9cfa19c3 100644 --- a/src/sg_raw.c +++ b/src/sg_raw.c @@ -39,7 +39,7 @@ #include "sg_pr2serr.h" #include "sg_unaligned.h" -#define SG_RAW_VERSION "0.4.36 (2021-04-29)" +#define SG_RAW_VERSION "0.4.37 (2021-06-01)" #define DEFAULT_TIMEOUT 20 #define MIN_SCSI_CDBSZ 6 @@ -300,13 +300,6 @@ parse_cmd_line(struct opts_t * op, int argc, char *argv[]) } } - if (optind >= argc) { - pr2serr("No device specified\n"); - return SG_LIB_SYNTAX_ERROR; - } - op->device_name = argv[optind]; - ++optind; - if (op->version_given #ifdef DEBUG && ! op->verbose_given @@ -314,6 +307,13 @@ parse_cmd_line(struct opts_t * op, int argc, char *argv[]) ) return 0; + if (optind >= argc) { + pr2serr("No device specified\n"); + return SG_LIB_SYNTAX_ERROR; + } + op->device_name = argv[optind]; + ++optind; + while (optind < argc) { char *opt = argv[optind++]; char *endptr; |