mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-19 21:16:11 +07:00
Lookup for alias in modules.alias.bin
This commit is contained in:
parent
7b30f4f4ff
commit
49e61ca347
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user