From: Lucas De Marchi Date: Tue, 11 May 2021 16:48:04 +0000 (-0700) Subject: depmod: fix modules.builtin.alias.bin output X-Git-Tag: v29~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0a136076189b50e252773ff79d800e56e840b14;p=thirdparty%2Fkmod.git depmod: fix modules.builtin.alias.bin output Due to wrong documentation on kmod_module_get_info() we ended up checking for 0 as return. Check for > 0 to decided if we want to write the index to the file, otherwise we would output a 0-sized index on success. --- diff --git a/tools/depmod.c b/tools/depmod.c index 170a1d8d..eb810b81 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -2457,7 +2457,7 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) out: /* do not bother writing the index if we are going to discard it */ - if (!ret) + if (ret > 0) index_write(idx, out); if (builtin)