qemuBuildNicDevProps: Move formatting of bootindex

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>
This commit is contained in:
Peter Krempa 2021-10-04 17:57:29 +02:00
parent ee996fbf7a
commit e840ed6f3d
7 changed files with 7 additions and 11 deletions

View 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);
}

View 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

View 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

View 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

View 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 \

View 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 \

View 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