[PATCHv3 3/5] qemu: make irq optional when formatting the ISA address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some devices (e.g. debugcon) only use the iobase.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c28ced6919..17237e4fc6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -408,9 +408,9 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
                               info->addr.ccw.ssid,
                               info->addr.ccw.devno);
     } else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA) {
-        virBufferAsprintf(buf, ",iobase=0x%x,irq=0x%x",
-                          info->addr.isa.iobase,
-                          info->addr.isa.irq);
+        virBufferAsprintf(buf, ",iobase=0x%x", info->addr.isa.iobase);
+        if (info->addr.isa.irq)
+            virBufferAsprintf(buf, ",irq=0x%x", info->addr.isa.irq);
     }
 
     ret = 0;
-- 
2.19.2


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux