Move the alias name right after the object type for rng-egd backend so
that we can later use the JSON to commandline generator to create the
command line.
---
src/qemu/qemu_command.c | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4fef942..7d4af4c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6194,7 +6194,7 @@ qemuBuildRNGBackendArgs(virCommandPtr cmd,
virCommandAddArgList(cmd, "-chardev", backend, NULL);
virCommandAddArg(cmd, "-object");
- virCommandAddArgFormat(cmd, "rng-egd,chardev=char%s,id=obj%s",
+ virCommandAddArgFormat(cmd, "rng-egd,id=obj%s,chardev=char%s",
dev->info.alias, dev->info.alias);
break;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args
b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args
index 67c5047..c6d8e2b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args
@@ -4,5 +4,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test
QEMU_AUDIO_DRV=none \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-chardev socket,id=charrng0,host=1.2.3.4,port=1234 \
--object rng-egd,chardev=charrng0,id=objrng0 \
+-object rng-egd,id=objrng0,chardev=charrng0 \
-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x4
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args
b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args
index aa99384..7fdf1ef 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args
@@ -6,5 +6,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test
QEMU_AUDIO_DRV=none \
-object rng-random,id=objrng0,filename=/dev/random \
-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 \
-chardev socket,id=charrng1,host=1.2.3.4,port=1234 \
--object rng-egd,chardev=charrng1,id=objrng1 \
+-object rng-egd,id=objrng1,chardev=charrng1 \
-device virtio-rng-pci,rng=objrng1,id=rng1,bus=pci.0,addr=0x4
--
2.2.2