[Toybox] [PATCH] Fix modprobe error handling.

enh enh at google.com
Wed Aug 1 12:21:40 PDT 2018

modprobe was failing if you `modprobe a.ko`, then `modprobe b.ko` where b.ko
depends on a.ko --- b.ko will fail to load because a.ko is already loaded.
The code to handle this was incorrectly checking `rc` rather than `errno`
against EEXIST.

(We should pull the insmod.c equivalent of `ins_mod` out into lib/
and reuse it in modprobe.c, but I didn't want to get bogged down.)

Bug: https://issuetracker.google.com/112069618
Reported-by: Wen Xie <xiewen3 at motorola.com>
 toys/pending/modprobe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180801/15e5d773/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-modprobe-error-handling.patch
Type: text/x-patch
Size: 1447 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180801/15e5d773/attachment.bin>

More information about the Toybox mailing list