Fall back to looking in /lib/modules/modules.dep if
/lib/modules/<kernel version>/modules.dep is missing
This commit is contained in:
parent
908e362133
commit
25ea42de9b
@ -128,8 +128,13 @@ static struct dep_t *build_dep ( void )
|
|||||||
strcat ( filename, un.release );
|
strcat ( filename, un.release );
|
||||||
strcat ( filename, "/modules.dep" );
|
strcat ( filename, "/modules.dep" );
|
||||||
|
|
||||||
if (( fd = open ( filename, O_RDONLY )) < 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;
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while ( reads ( fd, buffer, sizeof( buffer ))) {
|
while ( reads ( fd, buffer, sizeof( buffer ))) {
|
||||||
int l = bb_strlen ( buffer );
|
int l = bb_strlen ( buffer );
|
||||||
|
Loading…
Reference in New Issue
Block a user