summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenys Vlasenko2021-06-30 00:49:24 +0200
committerDenys Vlasenko2021-06-30 00:49:24 +0200
commitf99800758e24ff159808ca0b44064f548ed77a26 (patch)
treeaa37c73b7096c4426e7a761f0747067176871b27 /modutils
parent3aff3b9cb81c1f574aaafaf3981e755c6639e2bc (diff)
downloadbusybox-f99800758e24ff159808ca0b44064f548ed77a26.zip
busybox-f99800758e24ff159808ca0b44064f548ed77a26.tar.gz
modprobe: when reading modules.builtin, use basenames of files from it
function old new delta modprobe_main 798 803 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index c334186..235706f 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -629,8 +629,9 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
config_close(parser);
parser = config_open2("modules.builtin", fopen_for_read);
+ /* this file contains lines like "kernel/fs/binfmt_script.ko" */
while (config_read(parser, &s, 1, 1, "# \t", PARSE_NORMAL))
- get_or_add_modentry(s)->flags |= MODULE_FLAG_BUILTIN;
+ get_or_add_modentry(bb_basename(s))->flags |= MODULE_FLAG_BUILTIN;
config_close(parser);
}