Crashed is not a baselayout state as such

This commit is contained in:
Roy Marples
2007-09-28 15:04:15 +00:00
parent 7274301be2
commit fc1bfe4234
4 changed files with 17 additions and 23 deletions

View File

@@ -35,23 +35,25 @@ static void print_service (char *service)
einfo_color_t color = ECOLOR_BAD;
if (state & RC_SERVICE_STOPPING)
snprintf (status, sizeof (status), "stopping ");
snprintf (status, sizeof (status), "stopping ");
else if (state & RC_SERVICE_STARTING) {
snprintf (status, sizeof (status), "starting ");
color = ECOLOR_WARN;
} else if (state & RC_SERVICE_INACTIVE) {
snprintf (status, sizeof (status), "inactive ");
color = ECOLOR_WARN;
} else if (state & RC_SERVICE_CRASHED)
snprintf (status, sizeof (status), " crashed ");
else if (state & RC_SERVICE_STARTED) {
snprintf (status, sizeof (status), " started ");
color = ECOLOR_GOOD;
} else if (state & RC_SERVICE_STARTED) {
if (geteuid () == 0 && rc_service_daemons_crashed (service))
snprintf (status, sizeof (status), " crashed ");
else {
snprintf (status, sizeof (status), " started ");
color = ECOLOR_GOOD;
}
} else if (state & RC_SERVICE_SCHEDULED) {
snprintf (status, sizeof (status), "scheduled");
color = ECOLOR_WARN;
} else
snprintf (status, sizeof (status), " stopped ");
snprintf (status, sizeof (status), " stopped ");
ebracket (cols, color, status);
}