[BusyBox-cvs] CVS update of busybox/modutils (modprobe.c)

Glenn McGrath bug1 at codepoet.org
Wed Aug 11 05:56:31 UTC 2004


    Date: Tuesday, August 10, 2004 @ 23:56:31
  Author: bug1
    Path: /var/cvs/busybox/modutils

Modified: modprobe.c (1.36 -> 1.37)

Patch from Mike Castle, dont print an empty line (patch modified by me to
change formatting).


Index: busybox/modutils/modprobe.c
diff -u busybox/modutils/modprobe.c:1.36 busybox/modutils/modprobe.c:1.37
--- busybox/modutils/modprobe.c:1.36	Tue Aug 10 20:32:18 2004
+++ busybox/modutils/modprobe.c	Tue Aug 10 23:56:30 2004
@@ -426,14 +426,20 @@
 						do_syslog ? "-s" : "", list-> m_module );
 		}
 
-		if ( verbose )
-			printf ( "%s\n", lcmd );
-		if ( !show_only && *lcmd) {
-			int rc2 = system ( lcmd );
-			if (do_insert) rc = rc2; /* only last module matters */
-			else if (!rc2) rc = 0; /* success if remove any mod */
+		if (*lcmd) {
+			if (verbose) {
+				printf("%s\n", lcmd);
+			}
+			if (!show_only) {
+				int rc2 = system(lcmd);
+				if (do_insert) {
+					rc = rc2; /* only last module matters */
+				}
+				else if (!rc2) {
+					rc = 0; /* success if remove any mod */
+				}
+			}
 		}
-
 		list = do_insert ? list-> m_prev : list-> m_next;
 	}
 	return (show_only) ? 0 : rc;
@@ -665,5 +671,3 @@
 
 	return EXIT_SUCCESS;
 }
-
-



More information about the busybox-cvs mailing list