On Thu, Feb 26, 2009 at 11:52:18AM -0500, John Levon wrote: > On Thu, Feb 26, 2009 at 05:00:47PM +0100, Pritesh Kothari wrote: > > > > I think it depends on exactly how you are doing it - best to just post the > > > patches and we can discuss whether it looks reasonable then. Why did you > > > dlopen() instead of just linking to it directly ? > > > > Basically my code depends on three libraries used in virtualbox namely: > > VBoxXPCOMC.so, VBoxRT.so, VBoxXPCOM.so and if i link to them then these > > dependencies would trickle down to other programs as well, for example: > > virsh would need to be relinked, for that matter any program who depends on > > libvirt with virtualbox support compiled in it would need to be relinked. so > > currently i am trying to make as minimal change to any of the libvirt files > > as possible and restrict my code to the following 6 files: vbox_driver.c/h > > and vbox_conf.c/h. I am not sure if this approach is valid? > > Perhaps you want to enable DRIVER_MODULES, which uses dlopen to open > individual drivers. That way you don't need to dlopen the vbox modules, > but libvirt apps don't need to know about them. Even without the DRIVER_MODULES setting, you can setup the Makefile.am rules so that it is only linked into the libvirtd daemon and not in the main libvirt.so. Take a look at the qemud/Makefile.am and src/Makefile.am files and what they do with libvirt_driver_qemu.la Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list