diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/til_args.c | 2 | ||||
-rw-r--r-- | src/til_args.h | 1 |
3 files changed, 5 insertions, 2 deletions
@@ -177,7 +177,7 @@ static int print_setup_as_args(setup_t *setup) goto _out_module; } - r = printf("\nConfigured settings as flags:\n --module=%s --video=%s\n\nPress enter to continue...\n", + r = printf("\nConfigured settings as flags:\n --module=%s --video=%s\n\nPress enter to continue, add --go to disable this notice...\n", module_args, video_args); @@ -258,7 +258,7 @@ int main(int argc, const char *argv[]) exit_if((r = setup_from_args(&args, &setup)) < 0, "unable to setup: %s", strerror(-r)); - exit_if(r && print_setup_as_args(&setup) < 0, + exit_if(!args.gogogo && r && print_setup_as_args(&setup) < 0, "unable to print setup"); exit_if(!(rototiller.module = til_lookup_module(til_settings_get_key(setup.module, 0, NULL))), diff --git a/src/til_args.c b/src/til_args.c index e06d0d9..97b5ce7 100644 --- a/src/til_args.c +++ b/src/til_args.c @@ -48,6 +48,8 @@ static int args_parse(int argc, const char *argv[], til_args_t *res_args, int *r res_args->use_defaults = 1; } else if (!strcasecmp("--help", argv[i])) { res_args->help = 1; + } else if (!strcasecmp("--go", argv[i])) { + res_args->gogogo = 1; } else { if (!res_argv) return -EINVAL; diff --git a/src/til_args.h b/src/til_args.h index a94b7a1..efe1e3c 100644 --- a/src/til_args.h +++ b/src/til_args.h @@ -9,6 +9,7 @@ typedef struct til_args_t { unsigned use_defaults:1; unsigned help:1; + unsigned gogogo:1; } til_args_t; int til_args_parse(int argc, const char *argv[], til_args_t *res_args); |