mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00:00
api.c: Factor out SVC|JOB:ID string parser
This patch breaks out the JOB:ID parser from api.c, placing it in a new function called svc_parse_jobstr(). Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
1999956d91
commit
47b4850aa8
3 files changed
+75
-44
No files matched your search
@@ -171,6 +171,8 @@ const char *svc_dirtystr (svc_t *svc);
|
||||
int svc_next_id (char *cmd);
|
||||
int svc_is_unique (svc_t *svc);
|
||||
|
||||
int svc_parse_jobstr (char *str, size_t len, int (*found)(svc_t *), int (not_found)(char *, int));
|
||||
|
||||
static inline int svc_in_runlevel (svc_t *svc, int runlevel) { return svc && ISSET(svc->runlevels, runlevel); }
|
||||
static inline int svc_has_sighup (svc_t *svc) { return svc && 0 != svc->sighup; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user