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

[libvirt] [PATCH 2/2] qemu: Stop checking for QEMU_CAPS_PCI_ROMBAR



This capability is enabled unconditionally these days, so we can
get rid of the check and carry one less translatable string.
---
 src/qemu/qemu_command.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0d6d5f8..e48e722 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -493,8 +493,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
 
 static int
 qemuBuildRomStr(virBufferPtr buf,
-                virDomainDeviceInfoPtr info,
-                virQEMUCapsPtr qemuCaps)
+                virDomainDeviceInfoPtr info)
 {
     if (info->rombar || info->romfile) {
         if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
@@ -502,11 +501,6 @@ qemuBuildRomStr(virBufferPtr buf,
                            "%s", _("rombar and romfile are supported only for PCI devices"));
             return -1;
         }
-        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_ROMBAR)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           "%s", _("rombar and romfile not supported in this QEMU binary"));
-            return -1;
-        }
 
         switch (info->rombar) {
         case VIR_TRISTATE_SWITCH_OFF:
@@ -3373,7 +3367,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
                       virMacAddrFormat(&net->mac, macaddr));
     if (qemuBuildDeviceAddressStr(&buf, def, &net->info, qemuCaps) < 0)
         goto error;
-    if (qemuBuildRomStr(&buf, &net->info, qemuCaps) < 0)
+    if (qemuBuildRomStr(&buf, &net->info) < 0)
         goto error;
     if (bootindex && virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX))
         virBufferAsprintf(&buf, ",bootindex=%u", bootindex);
@@ -4442,7 +4436,7 @@ qemuBuildPCIHostdevDevStr(const virDomainDef *def,
         virBufferAsprintf(&buf, ",bootindex=%u", bootIndex);
     if (qemuBuildDeviceAddressStr(&buf, def, dev->info, qemuCaps) < 0)
         goto error;
-    if (qemuBuildRomStr(&buf, dev->info, qemuCaps) < 0)
+    if (qemuBuildRomStr(&buf, dev->info) < 0)
         goto error;
 
     if (virBufferCheckError(&buf) < 0)
-- 
2.5.5


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