[PATCH 083/103] qemu: command: Remove unused qemuBuildRomStr

Peter Krempa pkrempa at redhat.com
Thu Oct 7 15:18:11 UTC 2021


Now that all users were converted to qemuBuildRomProps we can remove the
old code and un-mark qemuBuildRomProps as unused.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_command.c | 34 +---------------------------------
 1 file changed, 1 insertion(+), 33 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2d47528d53..f6466b3248 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1264,7 +1264,7 @@ qemuBuildVirtioDevStr(virBuffer *buf,
 }


-static int G_GNUC_UNUSED
+static int
 qemuBuildRomProps(virJSONValue *props,
                   virDomainDeviceInfo *info)
 {
@@ -1304,38 +1304,6 @@ qemuBuildRomProps(virJSONValue *props,
 }


-static int G_GNUC_UNUSED
-qemuBuildRomStr(virBuffer *buf,
-                virDomainDeviceInfo *info)
-{
-    if (info->romenabled || info->rombar || info->romfile) {
-        /* Passing an empty romfile= tells QEMU to disable ROM entirely for
-         * this device, and makes other settings irrelevant */
-        if (info->romenabled == VIR_TRISTATE_BOOL_NO) {
-            virBufferAddLit(buf, ",romfile=");
-            return 0;
-        }
-
-        switch (info->rombar) {
-        case VIR_TRISTATE_SWITCH_OFF:
-            virBufferAddLit(buf, ",rombar=0");
-            break;
-        case VIR_TRISTATE_SWITCH_ON:
-            virBufferAddLit(buf, ",rombar=1");
-            break;
-        case VIR_TRISTATE_SWITCH_ABSENT:
-        case VIR_TRISTATE_SWITCH_LAST:
-            break;
-        }
-        if (info->romfile) {
-           virBufferAddLit(buf, ",romfile=");
-           virQEMUBuildBufferEscapeComma(buf, info->romfile);
-        }
-    }
-
-    return 0;
-}
-
 static int
 qemuBuildIoEventFdStr(virBuffer *buf,
                       virTristateSwitch use,
-- 
2.31.1




More information about the libvir-list mailing list