These patches improve the error report if the file format was specified explicitly (example: -drive file=myfile,format=qcow2) and the given format does not match the real format.
This fixes those bugs: https://bugzilla.redhat.com/show_bug.cgi?id=556482 https://bugs.launchpad.net/qemu/+bug/1090600 [PATCH 1/4] block: Add special error code for wrong format [PATCH 2/4] block: Improve error report for wrong format [PATCH 3/4] block: Use new error code for wrong format in selected [PATCH 4/4] block/vdi: Improved return values from vdi_open and