diff options
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 04242634b..726a3108c 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -934,11 +934,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
934 | /* Prevent ugly corner cases with no modules at all */ | 934 | /* Prevent ugly corner cases with no modules at all */ |
935 | modinfo = xzalloc(sizeof(modinfo[0])); | 935 | modinfo = xzalloc(sizeof(modinfo[0])); |
936 | 936 | ||
937 | if (!is_insmod) { | 937 | if (is_depmod || is_modprobe) { |
938 | /* Goto modules directory */ | 938 | /* Goto modules directory */ |
939 | xchdir(CONFIG_DEFAULT_MODULES_DIR); | 939 | xchdir(CONFIG_DEFAULT_MODULES_DIR); |
940 | uname(&uts); /* never fails */ | ||
940 | } | 941 | } |
941 | uname(&uts); /* never fails */ | ||
942 | 942 | ||
943 | /* depmod? */ | 943 | /* depmod? */ |
944 | if (is_depmod) { | 944 | if (is_depmod) { |
@@ -980,7 +980,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
980 | getopt32(argv, "qrfsvwb"); | 980 | getopt32(argv, "qrfsvwb"); |
981 | argv += optind; | 981 | argv += optind; |
982 | 982 | ||
983 | if (!is_insmod) { | 983 | if (is_modprobe) { |
984 | /* Goto $VERSION directory */ | 984 | /* Goto $VERSION directory */ |
985 | xchdir(uts.release); | 985 | xchdir(uts.release); |
986 | } | 986 | } |