From e0ada2baa45ea0d550fd9d7a9f4ed25b1bc63062 Mon Sep 17 00:00:00 2001 From: sandman Date: Thu, 22 Jul 2004 00:03:39 +0000 Subject: Patch from Mike Snitzer : Support for /etc/modprobe.conf (for 2.6 kernels) should likely be added to bb's modprobe, see attached patch. modprobe.conf is just a (even simpler) variant of modules.conf git-svn-id: svn://busybox.net/trunk/busybox@8996 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- modutils/modprobe.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modutils/modprobe.c') diff --git a/modutils/modprobe.c b/modutils/modprobe.c index c584d8a61..612e33a9e 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -275,9 +275,12 @@ static struct dep_t *build_dep ( void ) // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) ! - if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 ) - if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 ) - return first; +#if defined(CONFIG_FEATURE_2_6_MODULES) + if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 ) +#endif + if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 ) + if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 ) + return first; continuation_line = 0; while ( reads ( fd, buffer, sizeof( buffer ))) { -- cgit v1.2.3-55-g6feb