X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fcommon%2Fui-system.c;h=b4ae8f8c101fd0cf1ea3b66dfe513656eb1e2691;hp=4b0f144e41eb2d64cce7812e421236e4cb761042;hb=b6a6c19d0fb138a14bbcb73f3f104c4c885dc2d2;hpb=59e81c46a962da51e51474e9b36258ff0e04ae42 diff --git a/ui/common/ui-system.c b/ui/common/ui-system.c index 4b0f144..b4ae8f8 100644 --- a/ui/common/ui-system.c +++ b/ui/common/ui-system.c @@ -46,7 +46,7 @@ int pb_start_daemon(void) argv[0] = name; argv[1] = NULL; - result = pb_run_cmd(argv, 0); + result = pb_run_cmd(argv, 0, 0); talloc_free(name); @@ -91,7 +91,7 @@ static int kexec_load(const char *l_image, const char *l_initrd, *p++ = l_image; /* 5 */ *p++ = NULL; /* 6 */ - result = dry_run ? 0 : pb_run_cmd(argv, 1); + result = pb_run_cmd(argv, 1, dry_run); if (result) pb_log("%s: failed: (%d)\n", __func__, result); @@ -122,7 +122,7 @@ static int kexec_reboot(int dry_run) *p++ = "now"; /* 3 */ *p++ = NULL; /* 4 */ - result = dry_run ? 0 : pb_run_cmd(argv, 1); + result = pb_run_cmd(argv, 1, dry_run); /* On error, force a kexec with the -e option */ @@ -132,7 +132,7 @@ static int kexec_reboot(int dry_run) *p++ = "-e"; /* 2 */ *p++ = NULL; /* 3 */ - result = pb_run_cmd(argv, 1); + result = pb_run_cmd(argv, 1, 0); } if (result) @@ -156,7 +156,6 @@ int pb_run_kexec(const struct pb_kexec_data *kd, int dry_run) pb_log("%s: image: '%s'\n", __func__, kd->image); pb_log("%s: initrd: '%s'\n", __func__, kd->initrd); pb_log("%s: args: '%s'\n", __func__, kd->args); - pb_log("%s: dry_run: '%d'\n", __func__, dry_run); result = -1;