From 4f8a066b5fc254eeaabbbde56ba4f5b29cc68fdf Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 13 Sep 2013 15:51:47 +0200 Subject: blockdev: Remove IF_* check for read-only blockdev_init IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless. Instead, make sure that all devices for which the check would have errored out check in their init function that they don't get a read-only BlockDriverState. This catches even cases where IF_NONE and -device is used. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/qemu-iotests/051.out | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/qemu-iotests') diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index e58776a..2839e32 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -139,7 +139,10 @@ QEMU X.Y.Z monitor - type 'help' for more information (qemu) qququiquit Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on -QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on: read-only not supported by this bus type +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) QEMU_PROG: Can't use a read-only drive +QEMU_PROG: Device initialization failed. +QEMU_PROG: Initialization of device ide-hd failed Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on QEMU X.Y.Z monitor - type 'help' for more information -- cgit v1.1