Codebase list kmod / d8d1d54
libkmod: allow modules.alias.builtin to be optional Lucas De Marchi 4 years ago
1 changed file(s) with 12 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
854854 */
855855 KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx)
856856 {
857 int ret = 0;
857858 size_t i;
858 int ret;
859859
860860 if (ctx == NULL)
861861 return -ENOENT;
873873 index_files[i].fn);
874874 ret = index_mm_open(ctx, path, &ctx->indexes_stamp[i],
875875 &ctx->indexes[i]);
876 if (ret)
877 break;
876
877 /*
878 * modules.builtin.alias are considered optional since it's
879 * recently added and older installations may not have it;
880 * we allow failing for any reason
881 */
882 if (ret) {
883 if (i != KMOD_INDEX_MODULES_BUILTIN_ALIAS)
884 break;
885 ret = 0;
886 }
878887 }
879888
880889 if (ret)