summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Kasanen <curaga@operamail.com>2010-07-08 08:22:30 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2010-07-09 23:27:03 (GMT)
commita48a29f921d9d50598784047b40c97c6850bb8ec (patch)
treea05a2000bb897a26fb80e1cb3f6d3b9be2a2c995
parent32a6baeefaf040fb04fee7be3ea7c6e60b95f5bd (diff)
downloadbusybox-a48a29f921d9d50598784047b40c97c6850bb8ec.tar.gz
busybox-a48a29f921d9d50598784047b40c97c6850bb8ec.tar.bz2
Modprobe: Make -l open the right file
Before: modprobe -l modules.dep not found No size change, just moved the chdir. Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--modutils/modprobe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index b4de65b..0a94242 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -483,6 +483,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS);
argv += optind;
+ /* Goto modules location */
+ xchdir(CONFIG_DEFAULT_MODULES_DIR);
+ uname(&uts);
+ xchdir(uts.release);
+
if (opt & MODPROBE_OPT_LIST_ONLY) {
char name[MODULE_NAME_LEN];
char *colon, *tokens[2];
@@ -524,11 +529,6 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
return EXIT_SUCCESS;
}
- /* Goto modules location */
- xchdir(CONFIG_DEFAULT_MODULES_DIR);
- uname(&uts);
- xchdir(uts.release);
-
/* Retrieve module names of already loaded modules */
{
char *s;