mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Patch from Yann Morin so modprobe won't return failure if the module gets
loaded while it's running (ala multi-device hotplug).
This commit is contained in:
parent
ecb29573e9
commit
4b5827a69b
@ -859,7 +859,16 @@ static int mod_insert ( char *mod, int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// process tail ---> head
|
// process tail ---> head
|
||||||
rc = mod_process ( tail, 1 );
|
if ((rc = mod_process ( tail, 1 )) != 0) {
|
||||||
|
/*
|
||||||
|
* In case of using udev, multiple instances of modprobe can be
|
||||||
|
* spawned to load the same module (think of two same usb devices,
|
||||||
|
* for example; or cold-plugging at boot time). Thus we shouldn't
|
||||||
|
* fail if the module was loaded, and not by us.
|
||||||
|
*/
|
||||||
|
if (already_loaded (mod) )
|
||||||
|
rc = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = 1;
|
rc = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user