Re: [libvirt-designer 2/2] Add gvir_designer_get_osinfo_db

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

 



On Tue, Mar 19, 2013 at 10:46:36AM +0100, Christophe Fergeau wrote:
> virtxml was doing its own loading of the libosinfo database,
> and gvir_designer_init() was loading it a second time.
> By adding a gvir_designer_get_osinfo_db() method, virtxml can use
> the same libosinfo database as the rest of libvirt-designer.
> ---
>  examples/virtxml.c                           | 51 ++++++++++++----------------
>  libvirt-designer/libvirt-designer-domain.c   |  9 ++++-
>  libvirt-designer/libvirt-designer-internal.h |  3 --
>  libvirt-designer/libvirt-designer-main.c     | 39 ++++++++++++++++-----
>  libvirt-designer/libvirt-designer-main.h     |  3 ++
>  libvirt-designer/libvirt-designer.sym        |  1 +
>  6 files changed, 64 insertions(+), 42 deletions(-)

I don't think we should be using a global variable for the
osinfo database in libvirt-designer code at all. The libvirt
designer APIs should allow the database to be passed by the
caller where needed. This allows the app to have separate
DBs for different scenarios if they so need, which could be
useful in multi-threaded apps that want to avoid the need
todo mutex locking on the DBs.


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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]