mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-23 23:10:53 +07:00
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.
This commit is contained in:
parent
729f0f6853
commit
f0a1360761
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user