mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Refactor abstraction of svc blocking state
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b4f385d2e0
commit
6b237b7b00
4 files changed
+27
-15
No files matched your search
@@ -115,15 +115,17 @@ static int call(int (*action)(svc_t *), char *buf, size_t len)
|
||||
|
||||
static int service_block(svc_t *svc)
|
||||
{
|
||||
svc->block = SVC_BLOCK_USER;
|
||||
svc_block(svc);
|
||||
service_step(svc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int service_unblock(svc_t *svc)
|
||||
{
|
||||
svc->block = SVC_BLOCK_NONE;
|
||||
svc_unblock(svc);
|
||||
service_step(svc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user