David Frascone <dave@frascone.com> noticed two problems. First, modprobe was

trying to call 'insmod -q', which wasn't supported.  Secondly, when modprobe
was fed blank lines from modules.dep, we ended up calling xstrndup(ptr, -1),
which with suitably bad results.  David provided a patch to catch the blank
lines, and I have added insmod -q support.  So modprobe should work again.
 -Erik
This commit is contained in:
Eric Andersen
2002-07-02 19:14:23 +00:00
parent 69d4178708
commit b493dec91e
2 changed files with 40 additions and 29 deletions

View File

@@ -178,6 +178,10 @@ static struct dep_t *build_dep ( void )
if (( *(end-1) == '.' ) && ( *end == 'o' ))
ext = 2;
/* Cope with blank lines */
if ((end-deps-ext+1) <= 0)
continue;
dep = xstrndup ( deps, end - deps - ext + 1 );