Skip to content

Commit 0e61ed7

Browse files
committed
Add helper function, svc_is_stopped() when stopped by user
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent e9d60a6 commit 0e61ed7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/svc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ static inline void svc_started (svc_t *svc) { if (svc) svc->starting = 0;
286286
static inline int svc_is_starting (svc_t *svc) { return svc && 0 != svc->starting; }
287287
static inline int svc_is_running (svc_t *svc) { return svc && svc->state == SVC_RUNNING_STATE; }
288288
static inline int svc_is_stopping (svc_t *svc) { return svc && svc->state == SVC_STOPPING_STATE; }
289+
static inline int svc_is_stopped (svc_t *svc) { return svc && svc->block == SVC_BLOCK_USER; }
289290

290291
static inline int svc_is_removed (svc_t *svc) { return svc && svc->removed; }
291292
static inline int svc_is_changed (svc_t *svc) { return svc && 0 != svc->dirty; }

0 commit comments

Comments
 (0)