* THE SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
+#include "fips.h"
+
#include <limits.h>
#include <getopt.h>
+#include "execute.h"
+
static void
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}
exit (1);
}
- return 0;
+ ret = execute_with_fips_preload (argc - optind, &argv[optind]);
+
+ return ret;
}