diff options
Diffstat (limited to 'src/options.c')
| -rw-r--r-- | src/options.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/options.c b/src/options.c index 2017ba5..019136b 100644 --- a/src/options.c +++ b/src/options.c @@ -22,12 +22,8 @@ options_parse(int argc, char **argv, options_t *const opts) char *arg_sector_size = NULL; char *arg_buffer_size = NULL; - while ((ch = getopt(argc, argv, ":s:b:h")) != -1) { + while ((ch = getopt(argc, argv, ":b:hs:")) != -1) { switch (ch) { - case 's': - arg_sector_size = optarg; - break; - case 'b': arg_buffer_size = optarg; break; @@ -36,6 +32,10 @@ options_parse(int argc, char **argv, options_t *const opts) opts->help = true; break; + case 's': + arg_sector_size = optarg; + break; + case ':': print_error("missing argument for option '-%c'", optopt); return 1; |
