aboutsummaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-27 10:55:34 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-27 10:55:34 +0000
commitb85fb693c149e6e574b4693c3abadfb554bb18dc (patch)
tree5a02d581d4235ec8d86f8122bca0dd21f55026e9 /modutils/insmod.c
parent4fec3469668faf0022d32fc195c9451523219cb2 (diff)
downloadbusybox-w32-b85fb693c149e6e574b4693c3abadfb554bb18dc.tar.gz
busybox-w32-b85fb693c149e6e574b4693c3abadfb554bb18dc.tar.bz2
busybox-w32-b85fb693c149e6e574b4693c3abadfb554bb18dc.zip
- Add config option for DEFAULT_DEPMOD_FILE and DEFAULT_DEPMOD_FILE.
No obj-code changes.
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 30d471b78..9242e08e4 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -673,8 +673,6 @@ static int obj_gpl_license(struct obj_file *f, const char **license);
673#define SPFX "" 673#define SPFX ""
674#endif 674#endif
675 675
676
677#define _PATH_MODULES "/lib/modules"
678enum { STRVERSIONLEN = 64 }; 676enum { STRVERSIONLEN = 64 };
679 677
680/*======================================================================*/ 678/*======================================================================*/
@@ -3999,7 +3997,7 @@ int insmod_main(int argc, char **argv)
3999 char *module_dir; 3997 char *module_dir;
4000 char *tmdn; 3998 char *tmdn;
4001 3999
4002 tmdn = concat_path_file(_PATH_MODULES, myuname.release); 4000 tmdn = concat_path_file(CONFIG_DEFAULT_MODULES_DIR, myuname.release);
4003 /* Jump through hoops in case /lib/modules/`uname -r` 4001 /* Jump through hoops in case /lib/modules/`uname -r`
4004 * is a symlink. We do not want recursive_action to 4002 * is a symlink. We do not want recursive_action to
4005 * follow symlinks, but we do want to follow the 4003 * follow symlinks, but we do want to follow the
@@ -4021,9 +4019,9 @@ int insmod_main(int argc, char **argv)
4021 4019
4022 free(m_filename); 4020 free(m_filename);
4023 m_filename = NULL; 4021 m_filename = NULL;
4024 module_dir = xmalloc_readlink(_PATH_MODULES); 4022 module_dir = xmalloc_readlink(CONFIG_DEFAULT_MODULES_DIR);
4025 if (!module_dir) 4023 if (!module_dir)
4026 module_dir = xstrdup(_PATH_MODULES); 4024 module_dir = xstrdup(CONFIG_DEFAULT_MODULES_DIR);
4027 /* No module found under /lib/modules/`uname -r`, this 4025 /* No module found under /lib/modules/`uname -r`, this
4028 * time cast the net a bit wider. Search /lib/modules/ */ 4026 * time cast the net a bit wider. Search /lib/modules/ */
4029 r = recursive_action(module_dir, ACTION_RECURSE, 4027 r = recursive_action(module_dir, ACTION_RECURSE,