From d55a36255d003c7093de67b615607f1ebb850838 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 12 Mar 2007 23:14:42 +0000 Subject: sv: make code trivially smaller --- runit/sv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runit') diff --git a/runit/sv.c b/runit/sv.c index 7635330e4..ac23a2da3 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -117,13 +117,13 @@ static unsigned svstatus_print(const char *m) 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; } -- cgit v1.2.3