svn commit: trunk/busybox/init

aldot at busybox.net aldot at busybox.net
Fri Feb 16 17:17:08 UTC 2007


Author: aldot
Date: 2007-02-16 09:17:07 -0800 (Fri, 16 Feb 2007)
New Revision: 17909

Log:
- whitespace cleanup and add a possible shrinkage suggestion


Modified:
   trunk/busybox/init/init.c


Changeset:
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c	2007-02-16 15:19:49 UTC (rev 17908)
+++ trunk/busybox/init/init.c	2007-02-16 17:17:07 UTC (rev 17909)
@@ -577,7 +577,7 @@
 
 	runpid = (NULL == a)? pid : run(a);
 	while (1) {
-		wpid = waitpid(runpid,&status,0);
+		wpid = waitpid(runpid, &status, 0);
 		if (wpid == runpid)
 			break;
 		if (wpid == -1 && errno == ECHILD) {
@@ -793,7 +793,7 @@
 		/* don't enter action if it's already in the list,
 		 * but do overwrite existing actions */
 		if ((strcmp(a->command, command) == 0) &&
-		    (strcmp(a->terminal, cons) ==0)) {
+		    (strcmp(a->terminal, cons) == 0)) {
 			a->action = action;
 			free(new_action);
 			return;
@@ -855,7 +855,7 @@
 		/* Umount all filesystems on halt/reboot */
 		new_init_action(SHUTDOWN, "umount -a -r", "");
 		/* Swapoff on halt/reboot */
-		if(ENABLE_SWAPONOFF) new_init_action(SHUTDOWN, "swapoff -a", "");
+		if (ENABLE_SWAPONOFF) new_init_action(SHUTDOWN, "swapoff -a", "");
 		/* Prepare to restart init when a HUP is received */
 		new_init_action(RESTART, "init", "");
 		/* Askfirst shell on tty1-4 */
@@ -879,6 +879,7 @@
 			continue;
 
 		/* Trim the trailing \n */
+		//XXX: chomp() ?
 		eol = strrchr(id, '\n');
 		if (eol != NULL)
 			*eol = '\0';




More information about the busybox-cvs mailing list