X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fcommand.c;h=3f21807f3b8df74b1f1796dbbe6647fe111aac81;hp=3254de58462b23fe83a3cf1dc6970008711a6be0;hb=4c54721ad46b77c52eb6bb7e3ffe74325ac52797;hpb=887290e949d54c6ac4c9b787231e588f84f2367c diff --git a/daemon/command.c b/daemon/command.c index 3254de5..3f21807 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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); +}