From 9c8c90abbb0041f04578b9eed2c3e6b405886e5b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 20 Sep 2018 01:53:50 +0100 Subject: [PATCH] syscall_other: add support for suspend/resume --- Kernel/syscall_other.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.34.1