diff options
-rw-r--r-- | modutils/modprobe.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 3861dd1e3..fe399acfc 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -504,7 +504,7 @@ static struct dep_t *build_dep(void) | |||
504 | 504 | ||
505 | /* Only 2.6 has a modules.alias file */ | 505 | /* Only 2.6 has a modules.alias file */ |
506 | if (ENABLE_FEATURE_2_6_MODULES) { | 506 | if (ENABLE_FEATURE_2_6_MODULES) { |
507 | /* Parse kernel-declared aliases */ | 507 | /* Parse kernel-declared module aliases */ |
508 | filename = xasprintf("/lib/modules/%s/modules.alias", un.release); | 508 | filename = xasprintf("/lib/modules/%s/modules.alias", un.release); |
509 | fd = open(filename, O_RDONLY); | 509 | fd = open(filename, O_RDONLY); |
510 | if (fd < 0) { | 510 | if (fd < 0) { |
@@ -518,6 +518,21 @@ static struct dep_t *build_dep(void) | |||
518 | include_conf(&first, ¤t, buffer, sizeof(buffer), fd); | 518 | include_conf(&first, ¤t, buffer, sizeof(buffer), fd); |
519 | close(fd); | 519 | close(fd); |
520 | } | 520 | } |
521 | |||
522 | /* Parse kernel-declared symbol aliases */ | ||
523 | filename = xasprintf("/lib/modules/%s/modules.symbols", un.release); | ||
524 | fd = open(filename, O_RDONLY); | ||
525 | if (fd < 0) { | ||
526 | /* Ok, that didn't work. Fall back to looking in /lib/modules */ | ||
527 | fd = open("/lib/modules/modules.symbols", O_RDONLY); | ||
528 | } | ||
529 | if (ENABLE_FEATURE_CLEAN_UP) | ||
530 | free(filename); | ||
531 | |||
532 | if (fd >= 0) { | ||
533 | include_conf(&first, ¤t, buffer, sizeof(buffer), fd); | ||
534 | close(fd); | ||
535 | } | ||
521 | } | 536 | } |
522 | 537 | ||
523 | return first; | 538 | return first; |