]> git.cworth.org Git - fips/blobdiff - fips.c
Push final collection of CFLAGS/LDFLAGS from Makefile.config to Makefile.local
[fips] / fips.c
diff --git a/fips.c b/fips.c
index ce76e31421a586032012ae52dbaad8aabede699f..fca2da8ec7c6e6df1c9d199e8e3f5b470d088548 100644 (file)
--- a/fips.c
+++ b/fips.c
  * THE SOFTWARE.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include "fips.h"
+
 #include <limits.h>
 #include <getopt.h>
 
+#include "execute.h"
+
 static void
 usage (void)
 {
@@ -39,8 +41,19 @@ usage (void)
 int
 main (int argc, char *argv[])
 {
-       int opt;
-       const char *short_options = "h";
+       int opt, ret;
+
+       /* 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}
@@ -71,7 +84,9 @@ main (int argc, char *argv[])
                exit (1);
        }
 
-        return 0;
+       ret = execute_with_fips_preload (argc - optind, &argv[optind]);
+
+       return ret;
 }