Move the bootindex before the address so that the code is simpler.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 6 +-----
tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args | 2 +-
tests/qemuxml2argvdata/boot-complex.args | 2 +-
tests/qemuxml2argvdata/boot-order.args | 2 +-
tests/qemuxml2argvdata/controller-order.args | 2 +-
.../machine-loadparm-multiple-disks-nets-s390.args | 2 +-
tests/qemuxml2argvdata/machine-loadparm-net-s390.args | 2 +-
7 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 54f50c9a5e..2d47528d53 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3956,6 +3956,7 @@ qemuBuildNicDevProps(virDomainDef *def,
"f:netdev", g_strdup_printf("host%s",
net->info.alias),
"s:id", net->info.alias,
"s:mac", macaddr,
+ "p:bootindex", net->info.effectiveBootIndex,
NULL) < 0)
return NULL;
@@ -3965,11 +3966,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);
}
diff --git a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
index 49d918e393..ce3b68bf18 100644
--- a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
+++ b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
@@ -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
diff --git a/tests/qemuxml2argvdata/boot-complex.args
b/tests/qemuxml2argvdata/boot-complex.args
index 90d3770117..1fcd9df61e 100644
--- a/tests/qemuxml2argvdata/boot-complex.args
+++ b/tests/qemuxml2argvdata/boot-complex.args
@@ -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
diff --git a/tests/qemuxml2argvdata/boot-order.args
b/tests/qemuxml2argvdata/boot-order.args
index 0969ea9bd5..e2b9e8bbe8 100644
--- a/tests/qemuxml2argvdata/boot-order.args
+++ b/tests/qemuxml2argvdata/boot-order.args
@@ -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
diff --git a/tests/qemuxml2argvdata/controller-order.args
b/tests/qemuxml2argvdata/controller-order.args
index a97fbc7d5d..e5524f3413 100644
--- a/tests/qemuxml2argvdata/controller-order.args
+++ b/tests/qemuxml2argvdata/controller-order.args
@@ -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 \
diff --git a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args
b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args
index 68470173fb..6cba98b36f 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args
@@ -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 \
diff --git a/tests/qemuxml2argvdata/machine-loadparm-net-s390.args
b/tests/qemuxml2argvdata/machine-loadparm-net-s390.args
index 13e099bb80..44af82b787 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-net-s390.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-net-s390.args
@@ -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
--
2.31.1