diff options
Diffstat (limited to 'src/uapi/conf.c')
| -rw-r--r-- | src/uapi/conf.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/uapi/conf.c b/src/uapi/conf.c index 894b98a..497aef0 100644 --- a/src/uapi/conf.c +++ b/src/uapi/conf.c @@ -108,8 +108,16 @@ SYSCALL_DEFINE1(poweroff)(struct tcb *t, sys_arg_t type) case SHUTDOWN: case COLD_REBOOT: case WARM_REBOOT: - return_args2(t, OK, poweroff(type)); + return_args1(t, poweroff(type)); }; return_args1(t, ERR_INVAL); } + +SYSCALL_DEFINE0(sleep)(struct tcb *t) +{ + if (!(has_cap(t->caps, CAP_POWER))) + return_args1(t, ERR_PERM); + + return_args1(t, sleep()); +} |
