From: Alan Cox Date: Thu, 20 Sep 2018 00:53:50 +0000 (+0100) Subject: syscall_other: add support for suspend/resume X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9c8c90abbb0041f04578b9eed2c3e6b405886e5b;p=FUZIX.git syscall_other: add support for suspend/resume --- diff --git a/Kernel/syscall_other.c b/Kernel/syscall_other.c index ead1e2cf..e7357794 100644 --- a/Kernel/syscall_other.c +++ b/Kernel/syscall_other.c @@ -541,7 +541,14 @@ arg_t _uadmin(void) } if (cmd == A_REBOOT) platform_reboot(); - +#ifdef CONFIG_PLATFORM_SUSPEND + if (cmd == A_SUSPEND) { + udata.u_error = platform_suspend(); + if (udata.u_error) + return -1; + return 0; + } +#endif /* We don't do SWAPCTL yet */ udata.u_error = EINVAL; return -1;