diff mbox series

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

Message ID 439f1d8e3e1e6ff7e5ac3e71931e27c24e4acaf3.1529426092.git.crobinso@redhat.com
State Accepted
Commit 131ca8f4ff3508ca633906f664cb116b0c78e120
Headers show
Series qemu: command: Replace vlan= with netdev= | expand

Commit Message

Cole Robinson June 19, 2018, 4:40 p.m. UTC
Hardcode the only string that's passed in

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/qemu/qemu_command.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

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);