summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-06-22 07:49:37 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-06-22 07:49:37 +0100
commit57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2 (patch)
tree562ff6957b43932f240e27f9c0855bdb4584951d /daemon
parent6654f617a6f720baa8f1ced89179e11679353d1e (diff)
downloadlibguestfs-57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2.tar.gz
libguestfs-57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2.tar.xz
libguestfs-57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2.zip
Add 'sh' and 'sh-lines' commands.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/command.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/daemon/command.c b/daemon/command.c
index 3254de58..b33f2dbe 100644
--- a/daemon/command.c
+++ b/daemon/command.c
@@ -101,3 +101,19 @@ do_command_lines (char **argv)
return lines; /* Caller frees. */
}
+
+char *
+do_sh (char *command)
+{
+ char *argv[] = { "/bin/sh", "-c", command, NULL };
+
+ return do_command (argv);
+}
+
+char **
+do_sh_lines (char *command)
+{
+ char *argv[] = { "/bin/sh", "-c", command, NULL };
+
+ return do_command_lines (argv);
+}