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
This commit is contained in:
Martin Kaiser 2013-04-13 18:15:46 +00:00
parent 1daadad423
commit 07a024dc90
1 changed files with 5 additions and 1 deletions

View File

@ -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));