On Mon, Sep 16, 2013 at 02:50:24PM +0800, Fam Zheng wrote: > Added three types of modules: > > typedef enum { > MODULE_LOAD_BLOCK = 0, > MODULE_LOAD_UI, > MODULE_LOAD_NET, > MODULE_LOAD_MAX, > } module_load_type; > > and their loading function: > > void module_load(module_load_type). > > which loads whitelisted ".so" files of the given type under ${MODDIR}. > > Modules of each type should be loaded in respective subsystem > initialization code.
Based on Paolo's note that the SPICE .so module could likely end up containing functionality that is spread across several different sub-systems, this approach of loading per-type seems even more flawed. I think I'd just have one flat list of modules to load and ditch these MODULE_LOAD_XXXX enums. 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 :|