svn commit: trunk/busybox/runit

vda at busybox.net vda at busybox.net
Mon Mar 12 23:14:42 UTC 2007


Author: vda
Date: 2007-03-12 16:14:42 -0700 (Mon, 12 Mar 2007)
New Revision: 18078

Log:
sv: make code trivially smaller


Modified:
   trunk/busybox/runit/sv.c


Changeset:
Modified: trunk/busybox/runit/sv.c
===================================================================
--- trunk/busybox/runit/sv.c	2007-03-12 19:49:07 UTC (rev 18077)
+++ trunk/busybox/runit/sv.c	2007-03-12 23:14:42 UTC (rev 18078)
@@ -117,13 +117,13 @@
 	printf("%lds", (diff < 0 ? 0L : diff));
 	if (pid) {
 		if (!normallyup) printf(", normally down");
+		if (svstatus[16]) printf(", paused");
+		if (svstatus[17] == 'd') printf(", want down");
+		if (svstatus[18]) printf(", got TERM");
 	} else {
 		if (normallyup) printf(", normally up");
+		if (svstatus[17] == 'u') printf(", want up");
 	}
-	if (pid && svstatus[16]) printf(", paused");
-	if (!pid && (svstatus[17] == 'u')) printf(", want up");
-	if (pid && (svstatus[17] == 'd')) printf(", want down");
-	if (pid && svstatus[18]) printf(", got TERM");
 	return pid ? 1 : 2;
 }
 




More information about the busybox-cvs mailing list