summaryrefslogtreecommitdiffstats
path: root/ui/common
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2012-03-30 16:58:32 -0700
committerGeoff Levand <geoff@infradead.org>2012-03-30 18:08:57 -0700
commit52b9db95764fcdee9195113d7df225634a19c9f4 (patch)
treec1d649ca1316a816430728ce097acb1806f2fad9 /ui/common
parent45e253470f2cd7c6dfc38e7f533c62c454039873 (diff)
downloadtalos-petitboot-52b9db95764fcdee9195113d7df225634a19c9f4.tar.gz
talos-petitboot-52b9db95764fcdee9195113d7df225634a19c9f4.zip
Cleanup --dry-run option code
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'ui/common')
-rw-r--r--ui/common/loader.c10
-rw-r--r--ui/common/ui-system.c9
2 files changed, 9 insertions, 10 deletions
diff --git a/ui/common/loader.c b/ui/common/loader.c
index 009871d..775f211 100644
--- a/ui/common/loader.c
+++ b/ui/common/loader.c
@@ -94,7 +94,7 @@ static char *pb_load_nfs(void *ctx, struct pb_url *url)
*p++ = local; /* 7 */
*p++ = NULL; /* 8 */
- result = pb_run_cmd(argv, 1);
+ result = pb_run_cmd(argv, 1, 0);
talloc_free(opts);
@@ -138,7 +138,7 @@ static char *pb_load_sftp(void *ctx, struct pb_url __attribute__((unused)) *url)
*p++ = local; /* 4 */
*p++ = NULL; /* 5 */
- result = pb_run_cmd(argv, 1);
+ result = pb_run_cmd(argv, 1, 0);
if (result)
goto fail;
@@ -183,7 +183,7 @@ static char *pb_load_tftp(void *ctx, struct pb_url *url)
*p++ = url->port; /* 8 */
*p++ = NULL; /* 9 */
- result = pb_run_cmd(argv, 1);
+ result = pb_run_cmd(argv, 1, 0);
if (!result)
return local;
@@ -203,7 +203,7 @@ static char *pb_load_tftp(void *ctx, struct pb_url *url)
*p++ = local; /* 9 */
*p++ = NULL; /* 10 */
- result = pb_run_cmd(argv, 1);
+ result = pb_run_cmd(argv, 1, 0);
if (!result)
return local;
@@ -248,7 +248,7 @@ static char *pb_load_wget(void *ctx, struct pb_url *url, enum wget_flags flags)
*p++ = "--no-check-certificate"; /* 6 */
*p++ = NULL; /* 7 */
- result = pb_run_cmd(argv, 1);
+ result = pb_run_cmd(argv, 1, 0);
if (result)
goto fail;
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;
OpenPOWER on IntegriCloud