]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix QEMU restore from file in raw format
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 12 Oct 2009 19:03:50 +0000 (20:03 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Oct 2009 14:49:20 +0000 (15:49 +0100)
The logic for running the decompression programs was broken in
commit f238709304f9f6c57204cdd943e542cbae38fa5f, so that for
non-raw formats the decompression program was never run, and
for raw formats, it tried to exec an argv[] with initial NULL
in the program name.

* src/qemu/qemu_driver.c: Fix logic in runing decompression program

src/qemu/qemu_driver.c

index 3812f9107721b784d8dec99b2aa696cdcb662e9d..c544c4b4c741eb3807ce28cc8c0626ed360a2ae8 100644 (file)
@@ -3794,9 +3794,8 @@ static int qemudDomainRestore(virConnectPtr conn,
             goto cleanup;
         }
 
-        if (header.compressed != QEMUD_SAVE_FORMAT_RAW)
+        if (header.compressed != QEMUD_SAVE_FORMAT_RAW) {
             intermediate_argv[0] = prog;
-        else {
             intermediatefd = fd;
             fd = -1;
             if (virExec(conn, intermediate_argv, NULL, NULL,