]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: remove virRun
authorJán Tomko <jtomko@redhat.com>
Wed, 22 Apr 2020 14:20:10 +0000 (16:20 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 23 Apr 2020 10:49:30 +0000 (12:49 +0200)
Everything is using virCommand now.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/vircommand.c
src/util/vircommand.h

index c43e8b0ca6e7ffa89b5af2b0005f11dc95471d21..a9694f34c075871037931b1301cd0f60eda847d6 100644 (file)
@@ -1876,7 +1876,6 @@ virCommandToString;
 virCommandWait;
 virCommandWriteArgLog;
 virFork;
-virRun;
 
 
 # util/virconf.h
index b84fb4094821532dd165d5bdd999e33d106a4968..20f196104f214e13e3057e76ef92acf9ba9aaac3 100644 (file)
@@ -893,43 +893,8 @@ virExec(virCommandPtr cmd)
 }
 
 
-/**
- * virRun:
- * @argv NULL terminated argv to run
- * @status optional variable to return exit status in
- *
- * Run a command without using the shell.
- *
- * If status is NULL, then return 0 if the command run and
- * exited with 0 status; Otherwise return -1
- *
- * If status is not-NULL, then return 0 if the command ran.
- * The status variable is filled with the command exit status
- * and should be checked by caller for success. Return -1
- * only if the command could not be run.
- */
-int
-virRun(const char *const*argv, int *status)
-{
-    g_autoptr(virCommand) cmd = virCommandNewArgs(argv);
-
-    return virCommandRun(cmd, status);
-}
-
 #else /* WIN32 */
 
-int
-virRun(const char *const *argv G_GNUC_UNUSED,
-       int *status)
-{
-    if (status)
-        *status = ENOTSUP;
-    else
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("virRun is not implemented for WIN32"));
-    return -1;
-}
-
 pid_t
 virFork(void)
 {
index 9086f9a90caaacdbcdaabb2cce50a59a4a695054..e2be5bcf1c8b7cee6ae595e87e4f9a5a44456970 100644 (file)
@@ -34,8 +34,6 @@ typedef int (*virExecHook)(void *data);
 
 pid_t virFork(void) G_GNUC_WARN_UNUSED_RESULT;
 
-int virRun(const char *const*argv, int *status) G_GNUC_WARN_UNUSED_RESULT;
-
 virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
 
 virCommandPtr virCommandNewArgs(const char *const*args) ATTRIBUTE_NONNULL(1);