mirror of
https://github.com/sheumann/hush.git
synced 2025-01-15 18:30:43 +00:00
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>
This commit is contained in:
parent
32a6baeefa
commit
a48a29f921
@ -483,6 +483,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS);
|
opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS);
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
|
/* Goto modules location */
|
||||||
|
xchdir(CONFIG_DEFAULT_MODULES_DIR);
|
||||||
|
uname(&uts);
|
||||||
|
xchdir(uts.release);
|
||||||
|
|
||||||
if (opt & MODPROBE_OPT_LIST_ONLY) {
|
if (opt & MODPROBE_OPT_LIST_ONLY) {
|
||||||
char name[MODULE_NAME_LEN];
|
char name[MODULE_NAME_LEN];
|
||||||
char *colon, *tokens[2];
|
char *colon, *tokens[2];
|
||||||
@ -524,11 +529,6 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Goto modules location */
|
|
||||||
xchdir(CONFIG_DEFAULT_MODULES_DIR);
|
|
||||||
uname(&uts);
|
|
||||||
xchdir(uts.release);
|
|
||||||
|
|
||||||
/* Retrieve module names of already loaded modules */
|
/* Retrieve module names of already loaded modules */
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user