diff options
Diffstat (limited to 'libkmod')
-rw-r--r-- | libkmod/libkmod.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index ab5c1e8..43423d6 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -855,8 +855,8 @@ KMOD_EXPORT int kmod_validate_resources(struct kmod_ctx *ctx) */ KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) { + int ret = 0; size_t i; - int ret; if (ctx == NULL) return -ENOENT; @@ -874,8 +874,17 @@ KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) index_files[i].fn); ret = index_mm_open(ctx, path, &ctx->indexes_stamp[i], &ctx->indexes[i]); - if (ret) - break; + + /* + * modules.builtin.alias are considered optional since it's + * recently added and older installations may not have it; + * we allow failing for any reason + */ + if (ret) { + if (i != KMOD_INDEX_MODULES_BUILTIN_ALIAS) + break; + ret = 0; + } } if (ret) |