Previously
dd if=/dev/zero of=raw_image count=100
./qemu-img-xen create -b raw_image -f qcow2 cow_image
would fail because it would attempt to autodetect the format of
base_image. With this change, it works. However,
./qemu-img-xen create -b cow_image -f qcow2 cow_image_2
will now fail because we now always expect the backing file to be raw.
Thanks to Xin Li and Dongxiao Xu for the bug report.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
if (!drv)
error("Unknown file format '%s'", fmt);
} else {
- drv = NULL;
+ drv = &bdrv_raw;
}
if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
error("Could not open '%s'", filename);