diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-02 19:14:23 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-02 19:14:23 +0000 |
commit | a49df400dd019a7ef5cc73cc82c86fdc0bf765cb (patch) | |
tree | c665f9a7518ca63cac043553747c1902dd74bf93 /modutils/modprobe.c | |
parent | c2e6b01115b9bede7190de4137dd8d355948124e (diff) | |
download | busybox-w32-a49df400dd019a7ef5cc73cc82c86fdc0bf765cb.tar.gz busybox-w32-a49df400dd019a7ef5cc73cc82c86fdc0bf765cb.tar.bz2 busybox-w32-a49df400dd019a7ef5cc73cc82c86fdc0bf765cb.zip |
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
git-svn-id: svn://busybox.net/trunk/busybox@4984 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index fbe18b640..b05158ac0 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -178,6 +178,10 @@ static struct dep_t *build_dep ( void ) | |||
178 | 178 | ||
179 | if (( *(end-1) == '.' ) && ( *end == 'o' )) | 179 | if (( *(end-1) == '.' ) && ( *end == 'o' )) |
180 | ext = 2; | 180 | ext = 2; |
181 | |||
182 | /* Cope with blank lines */ | ||
183 | if ((end-deps-ext+1) <= 0) | ||
184 | continue; | ||
181 | 185 | ||
182 | dep = xstrndup ( deps, end - deps - ext + 1 ); | 186 | dep = xstrndup ( deps, end - deps - ext + 1 ); |
183 | 187 | ||