[libvirt] [PATCH 03/16] command: Allow setting a NULL hook function

Eric Blake eblake at redhat.com
Tue May 10 23:15:42 UTC 2011


On 05/10/2011 02:07 PM, Cole Robinson wrote:
> This allows a caller to unset a hook function for an existing virCommand
> instance. Will be used in storage_backend.c
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/util/command.c |    2 +-
>  src/util/command.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

I had to peek at 4/16 to see, but it made sense there (build a single
set of arguments where the hook alters uid, then iteratively run until
success on either the hooked version or the straight version; that is,
reuse the virCommandPtr across multiple runs until we find a uid that
works).

I suppose this would also be possible by modifying the 'opaque'
parameter used by storage_backend.c to do work on the first time
through, and be a no-op on the second use.

I don't have any strong opinion on whether to keep 3 and 4 as-is, or
whether to drop 3 and rewrite 4 to let opaque do all the work.  You may
want to wait for anyone else to speak up with opinions, but if you go
with the former option, then:

ACK.

-- 
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/20110510/e7d5128a/attachment-0001.sig>


More information about the libvir-list mailing list