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

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

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 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

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:


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

Attachment: signature.asc
Description: OpenPGP digital signature

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