From 657cb3a6eb084d15121772ec13e9692a319c6fde Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 18 Apr 2009 00:57:17 +0000 Subject: Fix compile on FreeBSD. --- src/rc/runscript.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'src/rc') diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 1fd9e9ab..20b14ae4 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -529,39 +530,6 @@ svc_wait(const char *svc) return false; } -static RC_SERVICE -svc_status(void) -{ - char status[10]; - int (*e) (const char *fmt, ...) EINFO_PRINTF(1, 2) = einfo; - RC_SERVICE state = rc_service_state(service); - - if (state & RC_SERVICE_STOPPING) { - snprintf(status, sizeof(status), "stopping"); - e = ewarn; - } else if (state & RC_SERVICE_STARTING) { - snprintf(status, sizeof(status), "starting"); - e = ewarn; - } else if (state & RC_SERVICE_INACTIVE) { - snprintf(status, sizeof(status), "inactive"); - e = ewarn; - } else if (state & RC_SERVICE_STARTED) { - errno = 0; - if (_rc_can_find_pids() && - rc_service_daemons_crashed(service) && - errno != EACCES) - { - snprintf(status, sizeof(status), "crashed"); - e = eerror; - } else - snprintf(status, sizeof(status), "started"); - } else - snprintf(status, sizeof(status), "stopped"); - - e("status: %s", status); - return state; -} - static void get_started_services(void) { -- cgit v1.2.3