From 510ca7ecb6c2dbe0fa4e2db7cecf14ba1f727c50 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Wed, 11 Mar 2020 13:45:37 +0100 Subject: [PATCH] dump_systemstate: Allow passing arbitrary flags for cmdflag= usage Change-Id: I0099e5248f5665af41dbbc22ef17932213f68abd --- src/dump_systemstate/dump_systemstate.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/dump_systemstate/dump_systemstate.c b/src/dump_systemstate/dump_systemstate.c index 9688bd9..8dbe9ce 100644 --- a/src/dump_systemstate/dump_systemstate.c +++ b/src/dump_systemstate/dump_systemstate.c @@ -106,13 +106,6 @@ int main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "hf:kdbjeEp", long_options, NULL)) != -1) { switch (c) { - case 'b': /* buxton */ - case 'd': /* dlog */ - case 'k': /* dmesg */ - case 'j': /* journal */ - case 'p': /* pkgs */ - // Above flags are handled through extra config files - break; case 'e': // This flag is here for backward compatibility arg_extras = true; break; @@ -122,12 +115,15 @@ int main(int argc, char *argv[]) case 'f': arg_file = optarg; break; - case '?': case 'h': printf("\n"); usage(); ret = 0; goto exit; + default: + // All other flags are ignored as might be handled through extra + // config files (cmdflag=) + continue; } } ret = 0; -- 2.7.4