blob: c9b503fc89f9a42255a398b3ee59ed5fdd4e8850 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <errno.h>
#include <sys/reboot.h>
#include <bits/ensure.h>
#include <mlibc/linux-sysdeps.hpp>
int reboot(int what) {
MLIBC_CHECK_OR_ENOSYS(mlibc::sys_reboot, -1);
if (int e = mlibc::sys_reboot(what); e) {
errno = e;
return -1;
}
return 0;
}
|