[libvirt] [PATCH 2/4] virsh: Use do_job_watch in cmdDump

Eric Blake eblake at redhat.com
Wed Dec 21 19:08:43 UTC 2011


On 12/20/2011 08:21 AM, Michal Privoznik wrote:
> This patch alters dumping code, so we can report progress
> and allow cancel via ^C.
> ---
>  tools/virsh.c   |   79 ++++++++++++++++++++++++++++++++++++++++++++++++-------
>  tools/virsh.pod |    8 +++---
>  2 files changed, 73 insertions(+), 14 deletions(-)
> 
>  
> +    sigemptyset(&sigmask);
> +    sigaddset(&sigmask, SIGINT);
> +    if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) < 0)
> +        goto out_sig;
> +
>      if (!vshConnectionUsability(ctl, ctl->conn))
> -        return false;
> +        goto out;

Is it any more efficient to do the argument validation prior to the
pthread_sigmask?

> +
> +    ret = do_watch_job(ctl, dom, verbose, p[0], 0, NULL, "Dump");

_("Dump")

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list