From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLtD3-0008OG-Ix for qemu-devel@nongnu.org; Mon, 25 Aug 2014 08:17:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLtCx-0005sf-DZ for qemu-devel@nongnu.org; Mon, 25 Aug 2014 08:17:17 -0400 Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 25 Aug 2014 14:17:04 +0200 Message-Id: <1408969024-22548-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] vl: process -object after other backend options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, akong@redhat.com, qemu-stable@nongnu.org QOM backends can refer to chardevs, but not vice versa. So process -chardev and -fsdev options before -object This fixes the rng-egd backend to virtio-rng. Reported-by: Amos Kong Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- vl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index b796c67..1d8eb27 100644 --- a/vl.c +++ b/vl.c @@ -4033,11 +4033,6 @@ int main(int argc, char **argv, char **envp) qemu_set_version(machine_class->hw_version); } - if (qemu_opts_foreach(qemu_find_opts("object"), - object_create, NULL, 0) != 0) { - exit(1); - } - /* Init CPU def lists, based on config * - Must be called after all the qemu_read_config_file() calls * - Must be called before list_cpus() @@ -4256,6 +4251,11 @@ int main(int argc, char **argv, char **envp) exit(1); } + if (qemu_opts_foreach(qemu_find_opts("object"), + object_create, NULL, 0) != 0) { + exit(1); + } + configure_accelerator(machine_class); if (qtest_chrdev) { -- 1.8.3.1