diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-17 13:40:56 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-17 13:40:56 +0300 |
| commit | 1ceed7525272b82c1028ebd353e65c3a63bd2714 (patch) | |
| tree | 828105db350e36df681bf79740434b47e6748e36 /common/uapi/conf.c | |
| parent | 2a256aa4f1abb65afa6f3856998bfe00ac960d61 (diff) | |
| download | kmi-1ceed7525272b82c1028ebd353e65c3a63bd2714.tar.gz kmi-1ceed7525272b82c1028ebd353e65c3a63bd2714.zip | |
expand sbi implementation a bit
Diffstat (limited to 'common/uapi/conf.c')
| -rw-r--r-- | common/uapi/conf.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/common/uapi/conf.c b/common/uapi/conf.c index 56e07a1..7acb540 100644 --- a/common/uapi/conf.c +++ b/common/uapi/conf.c @@ -1,3 +1,4 @@ +#include <apos/power.h> #include <apos/sizes.h> #include <apos/uapi.h> @@ -8,8 +9,12 @@ vm_t sys_conf(vm_t param, vm_t val, vm_t u0, vm_t u1) { UNUSED(u0); UNUSED(u1); + UNUSED(param); + UNUSED(val); + /* no parameters supported atm */ - return 0; + + return OK; } vm_t sys_poweroff(vm_t type, vm_t u0, vm_t u1, vm_t u2) @@ -17,6 +22,12 @@ vm_t sys_poweroff(vm_t type, vm_t u0, vm_t u1, vm_t u2) UNUSED(u0); UNUSED(u1); UNUSED(u2); - /* powering off not supported yet, you're stuck here >:D */ - return 0; + switch (type) { + case SHUTDOWN: + case COLD_REBOOT: + case WARM_REBOOT: + return poweroff(type); + }; + + return ERR_INVAL; } |
