From d87cfefcdd22939a9a0c86e3e8fcb467f4181b2a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sun, 19 Jan 2014 20:22:49 +0100 Subject: [PATCH] daemon: add missing GUESTFSD_EXT_CMD usage Signed-off-by: Olaf Hering --- daemon/btrfs.c | 2 +- daemon/command.c | 3 ++- daemon/debug.c | 3 ++- daemon/ldm.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 0b877f81d..a0c154223 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -597,7 +597,7 @@ test_btrfs_device_add_needs_force (void) int r; CLEANUP_FREE char *out = NULL, *err = NULL; - r = command (&out, &err, "btrfs", "device", "add", "--help", NULL); + r = command (&out, &err, str_btrfs, "device", "add", "--help", NULL); if (r == -1) { reply_with_error ("%s: %s", "btrfs device add --help", err); return -1; diff --git a/daemon/command.c b/daemon/command.c index 02e1dd42d..066c77367 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -30,6 +30,7 @@ #include "ignore-value.h" +GUESTFSD_EXT_CMD(str_cp, cp); GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); @@ -179,7 +180,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's /etc/resolv.conf is out the way, we * can create our own copy of the appliance /etc/resolv.conf. */ - ignore_value (command (NULL, NULL, "cp", "/etc/resolv.conf", + ignore_value (command (NULL, NULL, str_cp, "/etc/resolv.conf", rs->sysroot_etc_resolv_conf, NULL)); rs->mounted = true; diff --git a/daemon/debug.c b/daemon/debug.c index 9fe57fc9e..b5470d71c 100644 --- a/daemon/debug.c +++ b/daemon/debug.c @@ -41,6 +41,7 @@ GUESTFSD_EXT_CMD(str_xargs, xargs); GUESTFSD_EXT_CMD(str_file, file); GUESTFSD_EXT_CMD(str_grep, grep); GUESTFSD_EXT_CMD(str_gawk, gawk); +GUESTFSD_EXT_CMD(str_sh, sh); /* This command exposes debugging information, internals and * status. There is no comprehensive documentation for this @@ -335,7 +336,7 @@ debug_binaries (const char *subcmd, size_t argc, char *const *const argv) "| %s -F: '{print $1}'", str_find, str_xargs, str_file, str_grep, str_gawk); - r = command (&out, &err, "sh", "-c", cmd, NULL); + r = command (&out, &err, str_sh, "-c", cmd, NULL); if (r == -1) { reply_with_error ("find: %s", err); free (out); diff --git a/daemon/ldm.c b/daemon/ldm.c index aed8a0df9..e89fc9001 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -130,7 +130,7 @@ do_ldmtool_create_all (void) int r; CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, "ldmtool", "create", "all", NULL); + r = command (NULL, &err, str_ldmtool, "create", "all", NULL); if (r == -1) { reply_with_error ("%s", err); return -1; @@ -144,7 +144,7 @@ do_ldmtool_remove_all (void) int r; CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, "ldmtool", "remove", "all", NULL); + r = command (NULL, &err, str_ldmtool, "remove", "all", NULL); if (r == -1) { reply_with_error ("%s", err); return -1;