diff options
author | Kang-Che Sung | 2017-02-05 19:02:34 +0100 |
---|---|---|
committer | Denys Vlasenko | 2017-02-05 19:02:34 +0100 |
commit | 4ae658f077c9b8859e8f1aabee4b95c2c96dae1c (patch) | |
tree | ac0c91e705c2544f1041381895fac231b27ff442 /modutils/modprobe-small.c | |
parent | 8cc1ab3c11538773389060005ba9c053fae0f848 (diff) | |
download | busybox-4ae658f077c9b8859e8f1aabee4b95c2c96dae1c.zip busybox-4ae658f077c9b8859e8f1aabee4b95c2c96dae1c.tar.gz |
modutils: fix config options dependency (2)
- The modprobe-small implementation of rmmod no longer chdir's to
"/lib/modules/`uname -r`" as it was not necessary for rmmod's
operation. (And it no longer need to die if such modules directory
doesn't exist.)
- Configs DEFAULT_MODULES_DIR and DEFAULT_DEPMOD_FILE no longer depend
on MODPROBE_SMALL as the latter may not enable depmod or modprobe
that requires these configs.
- Clarify DEFAULT_DEPMOD_FILE's description regarding the ".bb" name
suffix.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r-- | modutils/modprobe-small.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 0424263..726a310 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -934,11 +934,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) /* Prevent ugly corner cases with no modules at all */ modinfo = xzalloc(sizeof(modinfo[0])); - if (!is_insmod) { + if (is_depmod || is_modprobe) { /* Goto modules directory */ xchdir(CONFIG_DEFAULT_MODULES_DIR); + uname(&uts); /* never fails */ } - uname(&uts); /* never fails */ /* depmod? */ if (is_depmod) { @@ -980,7 +980,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) getopt32(argv, "qrfsvwb"); argv += optind; - if (!is_insmod) { + if (is_modprobe) { /* Goto $VERSION directory */ xchdir(uts.release); } |