提交 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) ...@@ -3354,15 +3354,13 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem)
static char * static char *
qemuBuildLegacyNicStr(virDomainNetDefPtr net, qemuBuildLegacyNicStr(virDomainNetDefPtr net,
const char *prefix,
int vlan) int vlan)
{ {
char *str; char *str;
char macaddr[VIR_MAC_STRING_BUFLEN]; char macaddr[VIR_MAC_STRING_BUFLEN];
ignore_value(virAsprintf(&str, ignore_value(virAsprintf(&str,
"%smacaddr=%s,vlan=%d%s%s%s%s", "nic,macaddr=%s,vlan=%d%s%s%s%s",
prefix ? prefix : "",
virMacAddrFormat(&net->mac, macaddr), virMacAddrFormat(&net->mac, macaddr),
vlan, vlan,
(net->model ? ",model=" : ""), (net->model ? ",model=" : ""),
...@@ -8517,7 +8515,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, ...@@ -8517,7 +8515,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
goto cleanup; goto cleanup;
virCommandAddArgList(cmd, "-device", nic, NULL); virCommandAddArgList(cmd, "-device", nic, NULL);
} else { } else {
if (!(nic = qemuBuildLegacyNicStr(net, "nic,", vlan))) if (!(nic = qemuBuildLegacyNicStr(net, vlan)))
goto cleanup; goto cleanup;
virCommandAddArgList(cmd, "-net", nic, NULL); virCommandAddArgList(cmd, "-net", nic, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册