On Tue, Jul 10, 2018 at 10:44:44AM +0200, Peter Krempa wrote:
Change the semantics to exactly opposite and rename it to
qemuDiskBusNeedsDriveArg. This will be necessary as some devices can't
be used with -blockdev.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 23 +++++++++++++----------
src/qemu/qemu_command.h | 1 +
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cea31e6a24..8f5303ed95 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1330,15 +1330,18 @@ qemuCheckFips(void)
}
-/* Unfortunately it is not possible to use
- -device for floppies, or SD
- devices. Fortunately, those don't need
- static PCI addresses, so we don't really
- care that we can't use -device */
-static bool
-qemuDiskBusNeedsDeviceArg(int bus)
+/**
+ * qemuDiskBusNeedsDriveArg:
+ * @bus: disk bus
+ *
+ * Unfortunately it is not possible to use -device for SD devices.
+ * Fortunately, those don't need static PCI addresses, so we can use -drive
Double space betweeen 'need' and 'static'.
+ * without -device.
+ */
+bool
+qemuDiskBusNeedsDriveArg(int bus)
{
- return bus != VIR_DOMAIN_DISK_BUS_SD;
+ return bus == VIR_DOMAIN_DISK_BUS_SD;
}
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano