X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Ftwin%2Fpbt-main.c;h=cf546625090f8305e43fd777c42cbec2cfe45fe8;hp=51ff5f2cdf1f85118b9fc7f5559caf78991648cb;hb=44ab15ff671fae26af2b5c8a5db8bcded677ef74;hpb=ae0ba68f475ae5b057aad6538765bc8702134b9a diff --git a/ui/twin/pbt-main.c b/ui/twin/pbt-main.c index 51ff5f2..cf54662 100644 --- a/ui/twin/pbt-main.c +++ b/ui/twin/pbt-main.c @@ -19,7 +19,6 @@ #include "config.h" #endif -#define _GNU_SOURCE #include #include @@ -35,7 +34,8 @@ void pbt_print_usage(void) pbt_print_version(); printf( "Usage: petitboot-twin [-h, --help] [-l, --log log-file]\n" -" [-r, --reset-defaults][-t, --timeout] [-V, --version]" +" [-r, --reset-defaults] [-s, --start-daemon]\n" +" [-t, --timeout] [-V, --version]\n" " [[-f --fbdev] | [-x --x11]]\n"); } @@ -50,12 +50,13 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]) {"help", no_argument, NULL, 'h'}, {"log", required_argument, NULL, 'l'}, {"reset-defaults", no_argument, NULL, 'r'}, + {"start-daemon", no_argument, NULL, 's'}, {"timeout", no_argument, NULL, 't'}, {"version", no_argument, NULL, 'V'}, {"x11", no_argument, NULL, 'x'}, { NULL, 0, NULL, 0}, }; - static const char short_options[] = "fhl:trVx"; + static const char short_options[] = "dfhl:strVx"; static const struct pbt_opts default_values = { .backend = pbt_twin_x11, .log_file = "/var/log/petitboot/petitboot-twin.log", @@ -80,6 +81,9 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]) case 'l': opts->log_file = optarg; break; + case 's': + opts->start_daemon = pbt_opt_yes; + break; case 't': opts->use_timeout = pbt_opt_yes; break;