[libvirt] Re: [PATCH] Compressed save image format for Qemu.

Chris Lalancette clalance at redhat.com
Fri Aug 7 13:55:00 UTC 2009


Chris Lalancette wrote:
> +    if (header.compressed == QEMUD_SAVE_FORMAT_RAW)
> +        internalret = virAsprintf(&command, "migrate \"exec:"
> +                                  "dd of='%s' oflag=append conv=notrunc 2>/dev/null"
> +                                  "\"", safe_path);
> +    else if (header.compressed == QEMUD_SAVE_FORMAT_GZIP)
> +        internalret = virAsprintf(&command, "migrate \"exec:"
> +                                  "gzip -c | dd of='%s' oflag=append conv=notrunc 2>/dev/null"
> +                                  "\"", safe_path);
> +    else if (header.compressed == QEMUD_SAVE_FORMAT_BZIP2)
> +        internalret = virAsprintf(&command, "migrate \"exec:"
> +                                  "bzip2 -c | dd of='%s' oflag=append conv=notrunc 2>/dev/null"
> +                                  "\"", safe_path);

Heh.  On IRC DanB pointed out that my use of dd here is redundant; I should just
be able to redirect with >>.  NACK to this patch, I'll post a new one.

-- 
Chris Lalancette




More information about the libvir-list mailing list