diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2018-02-09 15:38:30 +1100 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-02-12 14:50:47 +1100 |
commit | c155945c0b13547532b568282cb03521d2a63ad7 (patch) | |
tree | 6e0f64fbbd8c295344d76ec3af31123dd844e774 | |
parent | 7361b69d5c129091f52101bba182865462d56e47 (diff) | |
download | pdbg-c155945c0b13547532b568282cb03521d2a63ad7.tar.gz pdbg-c155945c0b13547532b568282cb03521d2a63ad7.zip |
main: Alphabetise getopt()
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
-rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -240,18 +240,19 @@ static bool parse_options(int argc, char *argv[]) static int current_processor = INT_MAX, current_chip = INT_MAX, current_thread = INT_MAX; struct option long_opts[] = { {"all", no_argument, NULL, 'a'}, - {"processor", required_argument, NULL, 'p'}, - {"chip", required_argument, NULL, 'c'}, - {"thread", required_argument, NULL, 't'}, {"backend", required_argument, NULL, 'b'}, + {"chip", required_argument, NULL, 'c'}, {"device", required_argument, NULL, 'd'}, + {"help", no_argument, NULL, 'h'}, + {"processor", required_argument, NULL, 'p'}, {"slave-address", required_argument, NULL, 's'}, + {"thread", required_argument, NULL, 't'}, {"version", no_argument, NULL, 'V'}, - {"help", no_argument, NULL, 'h'}, + {NULL, 0, NULL, 0} }; do { - c = getopt_long(argc, argv, "-p:c:t:b:d:s:haV", long_opts, NULL); + c = getopt_long(argc, argv, "-ab:c:d:hp:s:t:V", long_opts, NULL); switch(c) { case 1: /* Positional argument */ |