svn commit: trunk/busybox/modutils

aldot at busybox.net aldot at busybox.net
Sat May 31 11:50:18 PDT 2008


Author: aldot
Date: 2008-05-31 11:50:17 -0700 (Sat, 31 May 2008)
New Revision: 22154

Log:
- shrink modprobe a little bit (~-40 bytes). ACKed by Yann.


Modified:
   trunk/busybox/modutils/modprobe.c


Changeset:
Modified: trunk/busybox/modutils/modprobe.c
===================================================================
--- trunk/busybox/modutils/modprobe.c	2008-05-31 18:32:56 UTC (rev 22153)
+++ trunk/busybox/modutils/modprobe.c	2008-05-31 18:50:17 UTC (rev 22154)
@@ -443,8 +443,7 @@
 			/* It's a dep description continuation */
 			p = line_buffer;
 
-		while (p && *p && isblank(*p))
-			p++;
+		p = skip_whitespace(p);
 
 		/* p points to the first dependable module; if NULL, no dependable module */
 		if (p && *p) {
@@ -468,10 +467,8 @@
 
 				/* find the beginning of the module file name */
 				deps = bb_basename(p);
-				if (deps == p) {
-					while (isblank(*deps))
-						deps++;
-				}
+				if (deps == p)
+					deps = skip_whitespace(deps);
 
 				/* find the end of the module name in the file name */
 				if (ENABLE_FEATURE_2_6_MODULES
@@ -901,7 +898,7 @@
 		do {
 			/* argv[optind] can be NULL here */
 			if (mod_remove(argv[optind])) {
-				bb_error_msg("failed to remove module %s",
+				bb_error_msg("failed to %s module %s", "remove",
 						argv[optind]);
 				rc = EXIT_FAILURE;
 			}
@@ -911,7 +908,7 @@
 			bb_error_msg_and_die("no module or pattern provided");
 
 		if (mod_insert(argv[optind], argc - optind - 1, argv + optind + 1))
-			bb_error_msg_and_die("failed to load module %s", argv[optind]);
+			bb_error_msg_and_die("failed to %s module %s", "load", argv[optind]);
 	}
 
 	/* Here would be a good place to free up memory allocated during the dependencies build. */



More information about the busybox-cvs mailing list