[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#257201: modprobe returns failure code if module already loaded



On Thu, Jul 01, 2004 at 05:24:15PM -0400, Joey Hess wrote:
> On i386 with the 2.4.26 kernel, busybox modprobe returns a exit status
> of 1 if the module is already loaded. This diverges from the standard
> modutils modprobe, which returns 0 in this case, and it leads to
> unexpected bugs like #257191. busybox modprobe should have the same
> behavior as modutils modprobe.

The attached patch should fix the problem, please test.

Bastian

-- 
We have found all life forms in the galaxy are capable of superior
development.
		-- Kirk, "The Gamesters of Triskelion", stardate 3211.7
Index: modutils/modprobe.c
===================================================================
--- modutils/modprobe.c	(revision 477)
+++ modutils/modprobe.c	(working copy)
@@ -371,7 +371,7 @@
 static int mod_process ( struct mod_list_t *list, int do_insert )
 {
 	char lcmd [256];
-	int rc = 1;
+	int rc = 0;
 
 	while ( list ) {
 		*lcmd = '\0';

Attachment: signature.asc
Description: Digital signature


Reply to: