]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildNicDevProps: Move formatting of bootindex
authorPeter Krempa <pkrempa@redhat.com>
Mon, 4 Oct 2021 15:57:29 +0000 (17:57 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Oct 2021 08:26:05 +0000 (10:26 +0200)
Move the bootindex before the address so that the code is simpler.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
tests/qemuxml2argvdata/boot-complex.args
tests/qemuxml2argvdata/boot-order.args
tests/qemuxml2argvdata/controller-order.args
tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args
tests/qemuxml2argvdata/machine-loadparm-net-s390.args

index 43de684eb55fb6f4b6ad74f9cda65633d140de72..11751b31e2f04122ac9718357f22df13877432f1 100644 (file)
@@ -3968,6 +3968,7 @@ qemuBuildNicDevProps(virDomainDef *def,
                               "s:netdev", netdev,
                               "s:id", net->info.alias,
                               "s:mac", macaddr,
+                              "p:bootindex", net->info.effectiveBootIndex,
                               NULL) < 0)
         return NULL;
 
@@ -3977,11 +3978,6 @@ qemuBuildNicDevProps(virDomainDef *def,
     if (qemuBuildRomProps(props, &net->info) < 0)
         return NULL;
 
-    if (virJSONValueObjectAdd(props,
-                              "p:bootindex", net->info.effectiveBootIndex,
-                              NULL) < 0)
-        return NULL;
-
     return g_steal_pointer(&props);
 }
 
index 49d918e39344f5dfacd19a79f3e613c0b810bb0d..ce3b68bf189abc2380af887a6bebc8d41a4daa63 100644 (file)
@@ -29,6 +29,6 @@ QEMU_AUDIO_DRV=none \
 -device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
 -device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,multifunction=on,addr=0x1.0x1 \
 -netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:73:34:53,bus=pci.1,addr=0x0,bootindex=1 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:73:34:53,bootindex=1,bus=pci.1,addr=0x0 \
 -device virtio-gpu-pci,id=video0,bus=pci.2,addr=0x0 \
 -msg timestamp=on
index 90d3770117abaee035df84fac9e5b3e4d1a42f58..1fcd9df61e3172eca5649dbcee183ffa10084ec3 100644 (file)
@@ -42,7 +42,7 @@ QEMU_AUDIO_DRV=none \
 -global isa-fdc.bootindexA=4 \
 -global isa-fdc.driveB=drive-fdc0-0-1 \
 -netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:11,bus=pci.0,addr=0x2,bootindex=2 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:11,bootindex=2,bus=pci.0,addr=0x2 \
 -netdev user,id=hostnet1 \
 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:11:22:33:44:22,bus=pci.0,addr=0x3 \
 -msg timestamp=on
index 0969ea9bd56a61360f25823379d3cf617c7397ac..e2b9e8bbe8231a5b43daef5bbcfe3bd5a626a782 100644 (file)
@@ -36,6 +36,6 @@ QEMU_AUDIO_DRV=none \
 -global isa-fdc.driveB=drive-fdc0-0-1 \
 -global isa-fdc.bootindexB=4 \
 -netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,addr=0x2,bootindex=2 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bootindex=2,bus=pci.0,addr=0x2 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \
 -msg timestamp=on
index a97fbc7d5d1f3c9fab0850ee1cac1fbe90ad219f..e5524f3413dc4c32e60b0b323255d864475e01f1 100644 (file)
@@ -32,7 +32,7 @@ QEMU_AUDIO_DRV=spice \
 -drive file=/tmp/Fedora-17-x86_64-Live-Desktop.iso,format=raw,if=none,id=drive-ide0-1-0,readonly=on \
 -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
 -netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:4d:4b:19,bus=pci.0,addr=0x3,bootindex=2 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:4d:4b:19,bootindex=2,bus=pci.0,addr=0x3 \
 -chardev spicevmc,id=charsmartcard0,name=smartcard \
 -device ccid-card-passthru,chardev=charsmartcard0,id=smartcard0,bus=ccid0.0 \
 -chardev pty,id=charserial0 \
index 68470173fb6058580b199719908e13ec756ea3f7..6cba98b36fde8474668d3afeaf12a919feba01ba 100644 (file)
@@ -29,7 +29,7 @@ QEMU_AUDIO_DRV=none \
 -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-virtio-disk1 \
 -device virtio-blk-ccw,devno=fe.0.0003,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=3 \
 -netdev user,id=hostnet0 \
--device virtio-net-ccw,netdev=hostnet0,id=net0,mac=00:11:22:33:44:54,devno=fe.0.0000,bootindex=2 \
+-device virtio-net-ccw,netdev=hostnet0,id=net0,mac=00:11:22:33:44:54,bootindex=2,devno=fe.0.0000 \
 -netdev user,id=hostnet1 \
 -device virtio-net-ccw,netdev=hostnet1,id=net1,mac=00:11:22:33:42:36,devno=fe.0.0004 \
 -device virtio-balloon-ccw,id=balloon0,devno=fe.0.0001 \
index 13e099bb80498129fc382239aff3b25b3ee0682b..44af82b787580f7c11c9442c10d2e15df864bc79 100644 (file)
@@ -25,6 +25,6 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -boot strict=on \
 -netdev user,id=hostnet0 \
--device virtio-net-ccw,netdev=hostnet0,id=net0,mac=00:11:22:33:44:54,devno=fe.0.0000,bootindex=1 \
+-device virtio-net-ccw,netdev=hostnet0,id=net0,mac=00:11:22:33:44:54,bootindex=1,devno=fe.0.0000 \
 -device virtio-balloon-ccw,id=balloon0,devno=fe.0.0001 \
 -msg timestamp=on