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