qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v2 07/12] vl: Create (most) objects before creati


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PULL v2 07/12] vl: Create (most) objects before creating chardev backends
Date: Fri, 19 Jun 2015 11:49:31 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jun 19, 2015 at 12:03:13PM +0200, Andreas Färber wrote:
> Am 27.05.2015 um 20:20 schrieb Andreas Färber:
> > From: "Daniel P. Berrange" <address@hidden>
> > 
> > Some types of object must be created before chardevs, other types of
> > object must be created after chardevs. As such there is no option but
> > to create objects in two phases.
> > 
> > This takes the decision to create as many object types as possible
> > right away before anyother backends are created, and only delay
> > creation of those few which have an explicit dependency on the
> > chardevs. Hopefully the set which need delaying will remain small
> > over time.
> > 
> > Signed-off-by: Daniel P. Berrange <address@hidden>
> > Reviewed-by: Paolo Bonzini <address@hidden>
> > Signed-off-by: Andreas Färber <address@hidden>
> > ---
> >  vl.c | 40 +++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 39 insertions(+), 1 deletion(-)
> 
> Rebasing my queue, I needed the attached changes to make it apply and
> build. Second pairs of eyes welcome.


> @@@ -4114,14 -4062,16 +4145,20 @@@ int main(int argc, char **argv, char **
>   
>       socket_init();
>   
> +     if (qemu_opts_foreach(qemu_find_opts("object"),
> +                           object_create,
>  -                          object_create_initial, 0) != 0) {
> ++                          object_create_initial, NULL)) {
> +         exit(1);
> +     }
> + 
>  -    if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, 
> NULL, 1) != 0)
>  +    if (qemu_opts_foreach(qemu_find_opts("chardev"),
>  +                          chardev_init_func, NULL, NULL)) {
>           exit(1);
>  +    }
>  +
>   #ifdef CONFIG_VIRTFS
>  -    if (qemu_opts_foreach(qemu_find_opts("fsdev"), fsdev_init_func, NULL, 
> 1) != 0) {
>  +    if (qemu_opts_foreach(qemu_find_opts("fsdev"),
>  +                          fsdev_init_func, NULL, NULL)) {
>           exit(1);
>       }
>   #endif
> @@@ -4137,7 -4087,8 +4174,8 @@@
>       }
>   
>       if (qemu_opts_foreach(qemu_find_opts("object"),
> -                           object_create, NULL, NULL)) {
> +                           object_create,
>  -                          object_create_delayed, 0) != 0) {
> ++                          object_create_delayed, NULL)) {
>           exit(1);
>       }

Yep, this looks correct wrt the change of Markus' that recently
merged in vl.c

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]