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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]