]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: use "id" instead of deprecated "name" for -net
authorJán Tomko <jtomko@redhat.com>
Mon, 8 Oct 2018 14:36:05 +0000 (16:36 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 9 Oct 2018 07:44:36 +0000 (09:44 +0200)
-net name= will be deprecated in QEMU 3.1:
commit 101625a4d4ac7e96227a156bc5f6d21a9cc383cd
    net: Deprecate the "name" parameter of -net
git describe: v3.0.0-791-g101625a4d4

Use the id option instead, supported since QEMU 1.2:
commit 6687b79d636cd60ed9adb1177d0d946b58fa7717
    convert net_client_init() to OptsVisitor
git describe: v1.0-3564-g6687b79d63 contains: v1.2.0-rc0~142^2~8

Thankfully, libvirt only uses -net for non-PCI, non-virtio NICs
on ARM.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/arm-vexpressa9-basic.args

index d77cf8c2d6abaa8e945b8f32229bc881d3830c5e..269276f2f969a8a8cc7616ddbc6659fcbee6688b 100644 (file)
@@ -3516,7 +3516,7 @@ qemuBuildLegacyNicStr(virDomainNetDefPtr net)
                              net->info.alias,
                              (net->model ? ",model=" : ""),
                              (net->model ? net->model : ""),
-                             (net->info.alias ? ",name=" : ""),
+                             (net->info.alias ? ",id=" : ""),
                              (net->info.alias ? net->info.alias : "")));
     return str;
 }
index 90661d8b5557f455bca1aaed852fdffbce9b4ad2..b925baa0e0028bf027a9f603ba0aa4e283efd81e 100644 (file)
@@ -27,6 +27,6 @@ server,nowait \
 -usb \
 -drive file=/arm.raw,format=raw,if=sd,index=0 \
 -netdev user,id=hostnet0 \
--net nic,macaddr=52:54:00:09:a4:37,netdev=hostnet0,model=lan9118,name=net0 \
+-net nic,macaddr=52:54:00:09:a4:37,netdev=hostnet0,model=lan9118,id=net0 \
 -chardev pty,id=charserial0 \
 -serial chardev:charserial0