summaryrefslogtreecommitdiffstats
path: root/libcutils/android_reboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/android_reboot.c')
-rw-r--r--libcutils/android_reboot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libcutils/android_reboot.c b/libcutils/android_reboot.c
index 16f82bb..b7895fa 100644
--- a/libcutils/android_reboot.c
+++ b/libcutils/android_reboot.c
@@ -16,6 +16,7 @@
#include <unistd.h>
#include <sys/reboot.h>
+#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -24,6 +25,8 @@
#include <cutils/android_reboot.h>
+#define UNUSED __attribute__((unused))
+
/* Check to see if /proc/mounts contains any writeable filesystems
* backed by a block device.
* Return true if none found, else return false.
@@ -101,7 +104,7 @@ static void remount_ro(void)
}
-int android_reboot(int cmd, int flags, char *arg)
+int android_reboot(int cmd, int flags UNUSED, char *arg)
{
int ret;
@@ -118,7 +121,7 @@ int android_reboot(int cmd, int flags, char *arg)
break;
case ANDROID_RB_RESTART2:
- ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
+ ret = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
LINUX_REBOOT_CMD_RESTART2, arg);
break;