diff options
author | Roy Marples <roy@marples.name> | 2007-09-25 17:30:07 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-09-25 17:30:07 +0000 |
commit | c6c7df47a00a8a974eb026f31e94bfc07984ac13 (patch) | |
tree | e948cd07dae4554bdeebaeae95a60782d0b293ab /src/rc-status.c | |
parent | 1a6451654fe365c1981b18f35cb6e453166d1b32 (diff) |
Revert last patch
Diffstat (limited to 'src/rc-status.c')
-rw-r--r-- | src/rc-status.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/rc-status.c b/src/rc-status.c index 00612177..9ebd56c8 100644 --- a/src/rc-status.c +++ b/src/rc-status.c @@ -33,21 +33,20 @@ static void print_service (char *service) int cols = printf (" %s\n", service); einfo_color_t color = ecolor_bad; - if (rc_service_state (service, rc_service_stopping) == 0) + if (rc_service_state (service, rc_service_stopping)) snprintf (status, sizeof (status), "stopping "); - else if (rc_service_state (service, rc_service_starting) == 0) { + else if (rc_service_state (service, rc_service_starting)) { snprintf (status, sizeof (status), "starting "); color = ecolor_warn; - } else if (rc_service_state (service, rc_service_inactive) == 0) { + } else if (rc_service_state (service, rc_service_inactive)) { snprintf (status, sizeof (status), "inactive "); color = ecolor_warn; - } else if (geteuid () == 0 && - rc_service_state (service, rc_service_crashed) == 0) + } else if (geteuid () == 0 && rc_service_state (service, rc_service_crashed)) snprintf (status, sizeof (status), " crashed "); - else if (rc_service_state (service, rc_service_started) == 0) { + else if (rc_service_state (service, rc_service_started)) { snprintf (status, sizeof (status), " started "); color = ecolor_good; - } else if (rc_service_state (service, rc_service_scheduled) == 0) { + } else if (rc_service_state (service, rc_service_scheduled)) { snprintf (status, sizeof (status), "scheduled"); color = ecolor_warn; } else @@ -108,7 +107,7 @@ int rc_status (int argc, char **argv) STRLIST_FOREACH (services, service, i) { bool found = false; STRLIST_FOREACH (levels, level, j) - if (rc_service_in_runlevel (service, level) == 0) { + if (rc_service_in_runlevel (service, level)) { found = true; break; } |