summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2018-02-09 15:38:30 +1100
committerAlistair Popple <alistair@popple.id.au>2018-02-12 14:50:47 +1100
commitc155945c0b13547532b568282cb03521d2a63ad7 (patch)
tree6e0f64fbbd8c295344d76ec3af31123dd844e774
parent7361b69d5c129091f52101bba182865462d56e47 (diff)
downloadpdbg-c155945c0b13547532b568282cb03521d2a63ad7.tar.gz
pdbg-c155945c0b13547532b568282cb03521d2a63ad7.zip
main: Alphabetise getopt()
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
-rw-r--r--src/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 8570568..2c705b4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 */
OpenPOWER on IntegriCloud