提交 131ca8f4 编写于 作者: C Cole Robinson

qemu_command: remove unused LegacyNicStr arg 'prefix'

Hardcode the only string that's passed in
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 faf8a16d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册