projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
908e362
)
Fall back to looking in /lib/modules/modules.dep if
author
Eric Andersen
<andersen@codepoet.org>
Fri, 20 Jun 2003 09:57:30 +0000
(09:57 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Fri, 20 Jun 2003 09:57:30 +0000
(09:57 -0000)
/lib/modules/<kernel version>/modules.dep is missing
modutils/modprobe.c
patch
|
blob
|
history
diff --git
a/modutils/modprobe.c
b/modutils/modprobe.c
index 13f17b869f371f839c01713addc75fa35e6532e2..b4bff51000b69250bd44bb4b0dce8f774a61454a 100644
(file)
--- a/
modutils/modprobe.c
+++ b/
modutils/modprobe.c
@@
-128,8
+128,13
@@
static struct dep_t *build_dep ( void )
strcat ( filename, un.release );
strcat ( filename, "/modules.dep" );
- if (( fd = open ( filename, O_RDONLY )) < 0 )
- return 0;
+ if (( fd = open ( filename, O_RDONLY )) < 0 ) {
+
+ /* Ok, that didn't work. Fall back to looking in /lib/modules */
+ if (( fd = open ( "/lib/modules/modules.dep", O_RDONLY )) < 0 ) {
+ return 0;
+ }
+ }
while ( reads ( fd, buffer, sizeof( buffer ))) {
int l = bb_strlen ( buffer );