diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/librc.c | 7 | ||||
-rw-r--r-- | src/rc.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/librc.c b/src/librc.c index 3a3b53b0..0aecc4c7 100644 --- a/src/librc.c +++ b/src/librc.c @@ -591,15 +591,18 @@ bool rc_service_schedule_start (const char *service, } librc_hidden_def(rc_service_schedule_start) -void rc_service_schedule_clear (const char *service) +bool rc_service_schedule_clear (const char *service) { char *svc = rc_xstrdup (service); char *dir = rc_strcatpaths (RC_SVCDIR, "scheduled", basename (svc), (char *) NULL); + bool retval; free (svc); - rc_rm_dir (dir, true); + if (! (retval = rc_rm_dir (dir, true)) && errno == ENOENT) + retval = true; free (dir); + return (retval); } librc_hidden_def(rc_service_schedule_clear) @@ -153,8 +153,9 @@ bool rc_service_schedule_start (const char *service, char **rc_services_scheduled_by (const char *service); /*! Clear the list of services scheduled to be started by this service - * @param service to clear */ -void rc_service_schedule_clear (const char *service); + * @param service to clear + * @return true if no errors, otherwise false */ +bool rc_service_schedule_clear (const char *service); /*! Checks if a service in in a state * @param service to check |