Lookup for alias in modules.alias.bin

This commit is contained in:
Lucas De Marchi 2011-12-01 16:27:04 -02:00
parent 7b30f4f4ff
commit 49e61ca347
3 changed files with 13 additions and 0 deletions

View File

@ -185,6 +185,9 @@ KMOD_EXPORT int kmod_module_new_from_lookup(struct kmod_ctx *ctx,
err = kmod_lookup_alias_from_symbols_file(ctx, alias, list);
CHECK_ERR_AND_FINISH(err, fail, list, finish);
err = kmod_lookup_alias_from_aliases_file(ctx, alias, list);
CHECK_ERR_AND_FINISH(err, fail, list, finish);
finish:
return err;

View File

@ -58,6 +58,7 @@ struct kmod_list *kmod_list_remove_n_latest(struct kmod_list *list,
const char *kmod_get_dirname(struct kmod_ctx *ctx) __attribute__((nonnull(1)));
int kmod_lookup_alias_from_config(struct kmod_ctx *ctx, const char *name, struct kmod_list **list);
int kmod_lookup_alias_from_symbols_file(struct kmod_ctx *ctx, const char *name, struct kmod_list **list);
int kmod_lookup_alias_from_aliases_file(struct kmod_ctx *ctx, const char *name, struct kmod_list **list);
int kmod_lookup_alias_from_moddep_file(struct kmod_ctx *ctx, const char *name, struct kmod_list **list);
/* libkmod-config.c */

View File

@ -326,6 +326,15 @@ int kmod_lookup_alias_from_symbols_file(struct kmod_ctx *ctx, const char *name,
return kmod_lookup_alias_from_alias_bin(ctx, symbols_file, name, list);
}
static const char *aliases_file = "modules.alias";
int kmod_lookup_alias_from_aliases_file(struct kmod_ctx *ctx, const char *name,
struct kmod_list **list)
{
return kmod_lookup_alias_from_alias_bin(ctx, aliases_file, name, list);
}
static const char *moddep_file = "modules.dep";
int kmod_lookup_alias_from_moddep_file(struct kmod_ctx *ctx, const char *name,