From b2d000e697fc56c8c408432ed74a21f21d3e2423 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sun, 23 May 2021 14:54:06 +0200 Subject: src: Sort the program options alphabetically --- src/options.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3