On Fri, 09/13 07:52, Richard Henderson wrote:
> On 09/13/2013 02:59 AM, Fam Zheng wrote:
> > +const char *module_whitelist[] = {
> > +CONFIG_MODULE_WHITELIST
> > +};
>
> static const char * const module_whitelist[] = ...
>
OK, thanks.
> > +switch (type) {
> > +case MO
On Fri, 09/13 15:07, Daniel P. Berrange wrote:
> On Fri, Sep 13, 2013 at 05:59:13PM +0800, Fam Zheng wrote:
> > +void module_load(module_load_type type)
> > +{
> > +#ifdef CONFIG_MODULES
> > +const char *path;
> > +char *fname = NULL;
> > +const char **mp;
> > +const char *module_wh
On 09/13/2013 09:20 AM, Michael Tokarev wrote:
> 13.09.2013 18:52, Richard Henderson wrote:
>
>> Also, separate the whitelists by type. I.e.
>
> What for?
We are talking about a function whose interface is to
only load modules of a particular type, right?
Given that we know the set of all modu
13.09.2013 18:52, Richard Henderson wrote:
> Also, separate the whitelists by type. I.e.
What for?
Thanks,
/mjt
On 09/13/2013 02:59 AM, Fam Zheng wrote:
> +const char *module_whitelist[] = {
> +CONFIG_MODULE_WHITELIST
> +};
static const char * const module_whitelist[] = ...
> +switch (type) {
> +case MODULE_LOAD_BLOCK:
> +path = CONFIG_MODDIR "/block/";
> +break;
>
On Fri, Sep 13, 2013 at 05:59:13PM +0800, Fam Zheng wrote:
> +void module_load(module_load_type type)
> +{
> +#ifdef CONFIG_MODULES
> +const char *path;
> +char *fname = NULL;
> +const char **mp;
> +const char *module_whitelist[] = {
> +CONFIG_MODULE_WHITELIST
> +};
> +
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 in a subdir u