Re: [PATCH v2] qemu: Run lzop with '--ignore-warn'

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

 



On Wed, Feb 20, 2013 at 13:32:02 +0100, Michal Privoznik wrote:
> Currently, if lzop decompression binary produces a warning, it
> doesn't exit with zero status but 2 instead. Terrifying, but
> true. However, warnings may be ignored using '--ignore-warn'
> command line argument.  Moreover, in which case, the exit status
> will be zero.
> ---
>  src/qemu/qemu_driver.c | 62 ++++++++++++++++++++++++++++++++------------------
>  1 file changed, 40 insertions(+), 22 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index dc35b91..a0a1f04 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2507,6 +2507,34 @@ qemuCompressProgramName(int compress)
>              qemuSaveCompressionTypeToString(compress));
>  }
>  
> +static virCommandPtr
> +qemuCompressGetCommand(virQEMUSaveFormat compression)
> +{
> +    virCommandPtr ret = NULL;
> +    const char *prog = qemuSaveCompressionTypeToString(compression);
> +
> +    if (!prog) {
> +        virReportError(VIR_ERR_OPERATION_FAILED,
> +                       _("Invalid compressed save format %d"),
> +                       compression);
> +        return NULL;
> +    }
> +
> +    ret = virCommandNew(prog);
> +    virCommandAddArg(ret, "-dc");
> +
> +    switch (compression) {
> +    case QEMU_SAVE_FORMAT_LZOP:
> +        virCommandAddArg(ret, "--ignore-warn");
> +        break;
> +    default:
> +        /* Ain't no valid compressed save format */

Just remove this comment as it's not worth the troubles it causes and
ACK :-)

Jirka

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