Hardcode the only string that's passed in
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
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