[PATCH 3/6] qemu: command: remove unused LegacyNicStr arg 'prefix'

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

 



Hardcode the only string that's passed in

Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f7038a8c5e..31a0b7761a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3354,15 +3354,13 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem)
 
 static char *
 qemuBuildLegacyNicStr(virDomainNetDefPtr net,
-                      const char *prefix,
                       int vlan)
 {
     char *str;
     char macaddr[VIR_MAC_STRING_BUFLEN];
 
     ignore_value(virAsprintf(&str,
-                             "%smacaddr=%s,vlan=%d%s%s%s%s",
-                             prefix ? prefix : "",
+                             "nic,macaddr=%s,vlan=%d%s%s%s%s",
                              virMacAddrFormat(&net->mac, macaddr),
                              vlan,
                              (net->model ? ",model=" : ""),
@@ -8517,7 +8515,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
             goto cleanup;
         virCommandAddArgList(cmd, "-device", nic, NULL);
     } else {
-        if (!(nic = qemuBuildLegacyNicStr(net, "nic,", vlan)))
+        if (!(nic = qemuBuildLegacyNicStr(net, vlan)))
             goto cleanup;
         virCommandAddArgList(cmd, "-net", nic, NULL);
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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