[libvirt] [PATCH 4/9] qemu: command: Rename and export qemuDiskBusNeedsDeviceArg

Ján Tomko jtomko at redhat.com
Tue Jul 10 08:56:54 UTC 2018


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 at 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 at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180710/6cc1589e/attachment-0001.sig>


More information about the libvir-list mailing list