[PATCH 098/103] qemu: Command remove unused 'qemuBuildVirtioDevStr'

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

 



All virtio devices were converted to the new JSON formatter so we can
remove the old one.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 65 +----------------------------------------
 1 file changed, 1 insertion(+), 64 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b9c9027748..324da4adc5 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1182,7 +1182,7 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device,
  *
  * Build the qemu virtio -device JSON properties name from the passed parameters.
  */
-static G_GNUC_UNUSED virJSONValue *
+static virJSONValue *
 qemuBuildVirtioDevProps(virDomainDeviceType devtype,
                         void *devdata,
                         virQEMUCaps *qemuCaps)
@@ -1220,69 +1220,6 @@ qemuBuildVirtioDevProps(virDomainDeviceType devtype,
 }


-/**
- * qemuBuildVirtioDevStr
- * @buf: virBuffer * to append the built string
- * @qemuCaps: virQEMUCapPtr
- * @devtype: virDomainDeviceType of the device. Ex: VIR_DOMAIN_DEVICE_TYPE_RNG
- * @devdata: *Def * of the device definition
- *
- * Build the qemu virtio -device name from the passed parameters. Currently
- * this is mostly about attaching the correct string prefix to @baseName for
- * the passed @type. So for @baseName "virtio-rng" and devdata->info.type
- * VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI, generate "virtio-rng-pci"
- *
- * Returns: -1 on failure, 0 on success
- */
-static G_GNUC_UNUSED int
-qemuBuildVirtioDevStr(virBuffer *buf,
-                      virQEMUCaps *qemuCaps,
-                      virDomainDeviceType devtype,
-                      void *devdata)
-{
-    virDomainDeviceDef device = { .type = devtype };
-    g_autofree char *model = NULL;
-    virTristateSwitch disableLegacy = VIR_TRISTATE_SWITCH_ABSENT;
-    virTristateSwitch disableModern = VIR_TRISTATE_SWITCH_ABSENT;
-    virDomainVirtioOptions *virtioOptions = NULL;
-
-    virDomainDeviceSetData(&device, devdata);
-
-    if (qemuBuildVirtioDevGetConfig(&device, qemuCaps, &model, &virtioOptions,
-                                    &disableLegacy, &disableModern) < 0)
-        return -1;
-
-    virBufferAdd(buf, model, -1);
-
-    if (disableLegacy != VIR_TRISTATE_SWITCH_ABSENT) {
-        virBufferAsprintf(buf, ",disable-legacy=%s",
-                          virTristateSwitchTypeToString(disableLegacy));
-    }
-
-    if (disableModern != VIR_TRISTATE_SWITCH_ABSENT) {
-        virBufferAsprintf(buf, ",disable-modern=%s",
-                          virTristateSwitchTypeToString(disableModern));
-    }
-
-    if (virtioOptions) {
-        if (virtioOptions->iommu != VIR_TRISTATE_SWITCH_ABSENT) {
-            virBufferAsprintf(buf, ",iommu_platform=%s",
-                              virTristateSwitchTypeToString(virtioOptions->iommu));
-        }
-        if (virtioOptions->ats != VIR_TRISTATE_SWITCH_ABSENT) {
-            virBufferAsprintf(buf, ",ats=%s",
-                              virTristateSwitchTypeToString(virtioOptions->ats));
-        }
-        if (virtioOptions->packed != VIR_TRISTATE_SWITCH_ABSENT) {
-            virBufferAsprintf(buf, ",packed=%s",
-                              virTristateSwitchTypeToString(virtioOptions->packed));
-        }
-    }
-
-    return 0;
-}
-
-
 static int
 qemuBuildRomProps(virJSONValue *props,
                   virDomainDeviceInfo *info)
-- 
2.31.1




[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