]> git.ozlabs.org Git - petitboot/blobdiff - ui/twin/pbt-main.c
lib/pb-config: Implement config_set
[petitboot] / ui / twin / pbt-main.c
index cc69b4b22362eca5f38af00fb7db5e730e833886..542f9497a8c07f45e4d1c8b283200c3b5d276bfc 100644 (file)
 
 void pbt_print_version(void)
 {
 
 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(
 }
 
 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 [-h, --help] [-l, --log log-file]\n"
+"                      [-r, --reset-defaults] [-s, --start-daemon]\n"
+"                      [-t, --timeout] [-V, --version]\n"
+"                      [[-f --fbdev] | [-x --x11]]\n");
 }
 
 /**
 }
 
 /**
@@ -49,15 +51,16 @@ 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'},
                {"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},
        };
                {"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,
        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;
        };
 
        *opts = default_values;
@@ -79,6 +82,9 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[])
                case 'l':
                        opts->log_file = optarg;
                        break;
                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;
                case 't':
                        opts->use_timeout = pbt_opt_yes;
                        break;