diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-04-13 18:15:46 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-04-13 18:15:46 +0000 |
commit | 07a024dc901e7c1aefc32a9f67d435c23a1d000c (patch) | |
tree | 41052e2e106838d0251a8c05cc9b6566b3781231 /capinfos.c | |
parent | 1daadad423a0eb96502acb17f24fda9ef380fcfd (diff) |
disable printing of all infos when USE_GOPTION is set and
a command line option for a specific info was set
(in other words: make the behaviour of goption and getopt the same)
svn path=/trunk/; revision=48841
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/capinfos.c b/capinfos.c index 0cdb981056..5bca75c46b 100644 --- a/capinfos.c +++ b/capinfos.c @@ -1189,7 +1189,11 @@ main(int argc, char *argv[]) ran. */ argv[0] = (char *)"capinfos"; - ; + + /* if we have at least one cmdline option, we disable printing all infos */ + if (argc>=2 && report_all_infos) + disable_all_infos(); + if( !g_option_context_parse(ctx, &argc, &argv, &parse_err) ) { if(parse_err) g_print ("option parsing failed: %s\n", parse_err->message); g_print("%s", g_option_context_get_help (ctx, TRUE, NULL)); |