diff options
author | Denis Vlasenko | 2007-03-12 23:14:42 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-03-12 23:14:42 +0000 |
commit | d55a36255d003c7093de67b615607f1ebb850838 (patch) | |
tree | e83648191d52c4de8156ce2c3ad1b35144ccfb15 /runit/sv.c | |
parent | b5c33b10b9f4019757833538c82f64bd49c00f38 (diff) | |
download | busybox-d55a36255d003c7093de67b615607f1ebb850838.zip busybox-d55a36255d003c7093de67b615607f1ebb850838.tar.gz |
sv: make code trivially smaller
Diffstat (limited to 'runit/sv.c')
-rw-r--r-- | runit/sv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |