aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.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/modprobe.c
parent4fec3469668faf0022d32fc195c9451523219cb2 (diff)
downloadbusybox-b85fb693c149e6e574b4693c3abadfb554bb18dc.tar.gz
- Add config option for DEFAULT_DEPMOD_FILE and DEFAULT_DEPMOD_FILE.
No obj-code changes.
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index b7903469d..3a89d9814 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -364,15 +364,15 @@ static struct dep_t *build_dep(void)
k_version = un.release[2] - '0';
}
- filename = xasprintf("/lib/modules/%s/modules.dep", un.release);
+ filename = xasprintf(CONFIG_DEFAULT_MODULES_DIR"/%s/"CONFIG_DEFAULT_DEPMOD_FILE, un.release);
fd = open(filename, O_RDONLY);
if (ENABLE_FEATURE_CLEAN_UP)
free(filename);
if (fd < 0) {
/* Ok, that didn't work. Fall back to looking in /lib/modules */
- fd = open("/lib/modules/modules.dep", O_RDONLY);
+ fd = open(CONFIG_DEFAULT_MODULES_DIR"/"CONFIG_DEFAULT_DEPMOD_FILE, O_RDONLY);
if (fd < 0) {
- bb_error_msg_and_die("cannot parse modules.dep");
+ bb_error_msg_and_die("cannot parse " CONFIG_DEFAULT_DEPMOD_FILE);
}
}
@@ -522,11 +522,11 @@ static struct dep_t *build_dep(void)
/* Only 2.6 has a modules.alias file */
if (ENABLE_FEATURE_2_6_MODULES) {
/* Parse kernel-declared module aliases */
- filename = xasprintf("/lib/modules/%s/modules.alias", un.release);
+ filename = xasprintf(CONFIG_DEFAULT_MODULES_DIR"/%s/modules.alias", un.release);
fd = open(filename, O_RDONLY);
if (fd < 0) {
/* Ok, that didn't work. Fall back to looking in /lib/modules */
- fd = open("/lib/modules/modules.alias", O_RDONLY);
+ fd = open(CONFIG_DEFAULT_MODULES_DIR"/modules.alias", O_RDONLY);
}
if (ENABLE_FEATURE_CLEAN_UP)
free(filename);
@@ -537,11 +537,11 @@ static struct dep_t *build_dep(void)
}
/* Parse kernel-declared symbol aliases */
- filename = xasprintf("/lib/modules/%s/modules.symbols", un.release);
+ filename = xasprintf(CONFIG_DEFAULT_MODULES_DIR"/%s/modules.symbols", un.release);
fd = open(filename, O_RDONLY);
if (fd < 0) {
/* Ok, that didn't work. Fall back to looking in /lib/modules */
- fd = open("/lib/modules/modules.symbols", O_RDONLY);
+ fd = open(CONFIG_DEFAULT_MODULES_DIR"/modules.symbols", O_RDONLY);
}
if (ENABLE_FEATURE_CLEAN_UP)
free(filename);
@@ -895,7 +895,7 @@ int modprobe_main(int argc, char **argv)
depend = build_dep();
if (!depend)
- bb_error_msg_and_die("cannot parse modules.dep");
+ bb_error_msg_and_die("cannot parse "CONFIG_DEFAULT_DEPMOD_FILE);
if (remove_opt) {
do {