aboutsummaryrefslogtreecommitdiff
path: root/src/sg_raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sg_raw.c')
-rw-r--r--src/sg_raw.c16
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;