svn commit: trunk/busybox/modutils
landley at busybox.net
landley at busybox.net
Tue Aug 22 23:50:11 UTC 2006
Author: landley
Date: 2006-08-22 16:50:11 -0700 (Tue, 22 Aug 2006)
New Revision: 15906
Log:
Patch from Yann Morin so modprobe won't return failure if the module gets
loaded while it's running (ala multi-device hotplug).
Modified:
trunk/busybox/modutils/modprobe.c
Changeset:
Modified: trunk/busybox/modutils/modprobe.c
===================================================================
--- trunk/busybox/modutils/modprobe.c 2006-08-22 23:40:28 UTC (rev 15905)
+++ trunk/busybox/modutils/modprobe.c 2006-08-22 23:50:11 UTC (rev 15906)
@@ -679,7 +679,7 @@
}
if (!show_only) {
int rc2 = wait4pid(spawn(argv));
-
+
if (do_insert) {
rc = rc2; /* only last module matters */
}
@@ -859,7 +859,16 @@
}
// 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
rc = 1;
More information about the busybox-cvs
mailing list