X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=fips.c;h=fca2da8ec7c6e6df1c9d199e8e3f5b470d088548;hb=99eeb7e0771887efc60f295db6a30a76c677c933;hp=98cd9ba2ddf287ff3aeab11066b9f54c2124f723;hpb=1f4014b53a4dc77768f3998a6fd3b67024431fa3;p=fips diff --git a/fips.c b/fips.c index 98cd9ba..fca2da8 100644 --- a/fips.c +++ b/fips.c @@ -19,8 +19,8 @@ * THE SOFTWARE. */ -#include -#include +#include "fips.h" + #include #include @@ -43,7 +43,17 @@ main (int argc, char *argv[]) { int opt, ret; - const char *short_options = "h"; + /* The initial '+' means that getopt will stop looking for + * options after the first non-option argument. This means + * that a command such as: + * + * fips glxgears -fullscreen + * + * Will do what is intended, (namely, have fips invoke + * "glxgears -fullscreen" rather than trying to interpret + * -fullscreen as options to fips itself. + */ + const char *short_options = "+h"; const struct option long_options[] = { {"help", no_argument, 0, 'h'}, {0, 0, 0, 0} @@ -74,7 +84,7 @@ main (int argc, char *argv[]) exit (1); } - ret = execute_with_preload (argc - optind, &argv[optind], "libfips.so"); + ret = execute_with_fips_preload (argc - optind, &argv[optind]); return ret; }