OSDN Git Service

vl: Fix latent bug with -global and onboard devices
authorMarkus Armbruster <armbru@redhat.com>
Fri, 8 Mar 2019 13:14:36 +0000 (14:14 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 11 Mar 2019 21:53:44 +0000 (22:53 +0100)
commitfc4a473482d595da08ae20ce239f0b62fa55d0f2
tree4abd61e4c87c8b0db58b8a252827ca64478b4da0
parent617902af2c9203f4bb4112eb384870e248d42ad7
vl: Fix latent bug with -global and onboard devices

main() registers the user's -global only after we create the machine
object, i.e. too late for devices created in the machine's
.instance_init().

Fortunately, we know the bug is only latent: the commit before
previous fixed a bug that would've crashed any attempt to create a
device in an .instance_init().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190308131445.17502-4-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
vl.c