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>
This commit is contained in:
parent
8cc1ab3c11
commit
4ae658f077
2 changed files with 10 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue