[libvirt] [PATCH 14/16] Move virRun, virExec*, virFork to util/command

Eric Blake eblake at redhat.com
Wed May 11 21:54:05 UTC 2011


On 05/10/2011 02:07 PM, Cole Robinson wrote:
> Seems reasonable to have all command wrappers in the same place
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>

> @@ -41,6 +48,14 @@
>      virReportErrorHelper(VIR_FROM_NONE, code, __FILE__,                 \
>                           __FUNCTION__, __LINE__, __VA_ARGS__)
>  
> +/* Flags for virExecWithHook */
> +enum {
> +    VIR_EXEC_NONE   = 0,
> +    VIR_EXEC_NONBLOCK = (1 << 0),
> +    VIR_EXEC_DAEMON = (1 << 1),
> +    VIR_EXEC_CLEAR_CAPS = (1 << 2),
> +};
> +
>  enum {
>      /* Internal-use extension beyond public VIR_EXEC_ flags */
>      VIR_EXEC_RUN_SYNC = 0x40000000,

Merge these two enums into one, now that the entire enum is internal-use
only since virExecWithHook is now static.

> @@ -84,6 +99,581 @@ struct _virCommand {
>      bool reap;
>  };
>  
> +#ifndef WIN32
> +
> +int virSetInherit(int fd, bool inherit) {

I don't think you meant to move this function (at least, util.h and
libvirt_private.syms don't reflect the move).

> +#else /* WIN32 */
> +
> +int virSetInherit(int fd ATTRIBUTE_UNUSED, bool inherit ATTRIBUTE_UNUSED)

Again, I don't think you meant to move this one.

The rest of the move is okay, though.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110511/57042a61/attachment-0001.sig>


More information about the libvir-list mailing list