X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=fips.c;h=7276ce9fb28fa24f8e41abaf5bd2fc8bbd9734b3;hb=6dcb864fcfa77c4bf4eb7e1c04f00e53f9fee446;hp=fca2da8ec7c6e6df1c9d199e8e3f5b470d088548;hpb=d09ba0c7af0f6aa513a3f05fa3c5e0a24729178d;p=fips diff --git a/fips.c b/fips.c index fca2da8..7276ce9 100644 --- a/fips.c +++ b/fips.c @@ -35,6 +35,7 @@ usage (void) "\n" "Options:\n" " -h, --help show this help message\n" + " -v, --verbose print verbose messages about fips activity" "\n"); } @@ -53,9 +54,10 @@ main (int argc, char *argv[]) * "glxgears -fullscreen" rather than trying to interpret * -fullscreen as options to fips itself. */ - const char *short_options = "+h"; + const char *short_options = "+hv"; const struct option long_options[] = { {"help", no_argument, 0, 'h'}, + {"verbose", no_argument, 0, 'v'}, {0, 0, 0, 0} }; @@ -69,10 +71,13 @@ main (int argc, char *argv[]) case 'h': usage (); return 0; + case 'v': + setenv ("FIPS_VERBOSE", "1", 1); + break; case '?': break; default: - fprintf(stderr, "Internal error: " + fprintf(stderr, "fips: Internal error: " "unexpected getopt value: %d\n", opt); exit (1); }