X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Ftwin%2Fpbt-main.c;h=a8c1ea5fe2408acfceda14079087fc62e2373eda;hp=cc69b4b22362eca5f38af00fb7db5e730e833886;hb=604a1ccf072f9f33326fb6dc919c1b6233d40866;hpb=bd0c684c9941c24ee4191f4550ec966d5b1fa8ab diff --git a/ui/twin/pbt-main.c b/ui/twin/pbt-main.c index cc69b4b..a8c1ea5 100644 --- a/ui/twin/pbt-main.c +++ b/ui/twin/pbt-main.c @@ -27,15 +27,16 @@ void pbt_print_version(void) { - printf("pb-twin (" PACKAGE_NAME ") " PACKAGE_VERSION "\n"); + printf("petitboot-twin (" PACKAGE_NAME ") " PACKAGE_VERSION "\n"); } void pbt_print_usage(void) { pbt_print_version(); printf( -"Usage: pb-twin [-h, --help] [-l, --log log-file] [-r, --reset-defaults]\n" -" [-t, --timeout] [-V, --version] [[-f --fbdev] | [-x --x11]]\n"); +"Usage: petitboot-twin [-d, --start-daemon] [-h, --help] [-l, --log log-file]\n" +" [-r, --reset-defaults][-t, --timeout] [-V, --version]\n" +" [[-f --fbdev] | [-x --x11]]\n"); } /** @@ -45,6 +46,7 @@ void pbt_print_usage(void) int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]) { static const struct option long_options[] = { + {"start-daemon", no_argument, NULL, 'd'}, {"fbdev", no_argument, NULL, 'f'}, {"help", no_argument, NULL, 'h'}, {"log", required_argument, NULL, 'l'}, @@ -54,10 +56,10 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]) {"x11", no_argument, NULL, 'x'}, { NULL, 0, NULL, 0}, }; - static const char short_options[] = "fhl:trVx"; + static const char short_options[] = "dfhl:trVx"; static const struct pbt_opts default_values = { .backend = pbt_twin_x11, - .log_file = "pb-twin.log", + .log_file = "/var/log/petitboot/petitboot-twin.log", }; *opts = default_values; @@ -70,6 +72,9 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]) break; switch (c) { + case 'd': + opts->start_daemon = pbt_opt_yes; + break; case 'f': opts->backend = pbt_twin_fbdev; break;