[libvirt] [PATCH 12/16] util: Remove unused virExec wrapper

Daniel P. Berrange berrange at redhat.com
Wed May 11 10:34:40 UTC 2011


On Tue, May 10, 2011 at 04:07:51PM -0400, Cole Robinson wrote:
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/libvirt_private.syms |    1 -
>  src/util/util.c          |   35 -----------------------------------
>  src/util/util.h          |    8 --------
>  3 files changed, 0 insertions(+), 44 deletions(-)
> 
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index a70fef6..cc900e7 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -908,7 +908,6 @@ virEnumFromString;
>  virEnumToString;
>  virEventAddHandle;
>  virEventRemoveHandle;
> -virExec;
>  virExecWithHook;
>  virFileAbsPath;
>  virFileDeletePid;
> diff --git a/src/util/util.c b/src/util/util.c
> index 824e64e..2f2fbc8 100644
> --- a/src/util/util.c
> +++ b/src/util/util.c
> @@ -752,26 +752,6 @@ virExecWithHook(const char *const*argv,
>      return -1;
>  }
>  
> -/*
> - * See virExecWithHook for explanation of the arguments.
> - *
> - * Wrapper function for virExecWithHook, with a simpler set of parameters.
> - * Used to insulate the numerous callers from changes to virExecWithHook
> - * argument list.
> - */
> -int
> -virExec(const char *const*argv,
> -        const char *const*envp,
> -        const fd_set *keepfd,
> -        pid_t *retpid,
> -        int infd, int *outfd, int *errfd,
> -        int flags)
> -{
> -    return virExecWithHook(argv, envp, keepfd, retpid,
> -                           infd, outfd, errfd,
> -                           flags, NULL, NULL, NULL);
> -}
> -
>  /**
>   * @argv NULL terminated argv to run
>   * @status optional variable to return exit status in
> @@ -874,21 +854,6 @@ virRun(const char *const *argv ATTRIBUTE_UNUSED,
>  }
>  
>  int
> -virExec(const char *const*argv ATTRIBUTE_UNUSED,
> -        const char *const*envp ATTRIBUTE_UNUSED,
> -        const fd_set *keepfd ATTRIBUTE_UNUSED,
> -        int *retpid ATTRIBUTE_UNUSED,
> -        int infd ATTRIBUTE_UNUSED,
> -        int *outfd ATTRIBUTE_UNUSED,
> -        int *errfd ATTRIBUTE_UNUSED,
> -        int flags ATTRIBUTE_UNUSED)
> -{
> -    virUtilError(VIR_ERR_INTERNAL_ERROR,
> -                 "%s", _("virExec is not implemented for WIN32"));
> -    return -1;
> -}
> -
> -int
>  virExecWithHook(const char *const*argv ATTRIBUTE_UNUSED,
>                  const char *const*envp ATTRIBUTE_UNUSED,
>                  const fd_set *keepfd ATTRIBUTE_UNUSED,
> diff --git a/src/util/util.h b/src/util/util.h
> index e2b8eb3..3e95cae 100644
> --- a/src/util/util.h
> +++ b/src/util/util.h
> @@ -69,14 +69,6 @@ int virExecWithHook(const char *const*argv,
>                      virExecHook hook,
>                      void *data,
>                      char *pidfile) ATTRIBUTE_RETURN_CHECK;
> -int virExec(const char *const*argv,
> -            const char *const*envp,
> -            const fd_set *keepfd,
> -            pid_t *retpid,
> -            int infd,
> -            int *outfd,
> -            int *errfd,
> -            int flags) ATTRIBUTE_RETURN_CHECK;
>  int virRun(const char *const*argv, int *status) ATTRIBUTE_RETURN_CHECK;
>  int virPipeReadUntilEOF(int outfd, int errfd,
>                          char **outbuf, char **errbuf);

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list