Change-Id: I56c9e398bd176930e5ae05fafdce440ef459d2fe
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
if (power_lock_support >= 0)
goto out;
- ret_val = sys_check_node(POWER_LOCK_PATH);
+ ret_val = access(POWER_LOCK_PATH, F_OK);
if (ret_val < 0)
power_lock_support = false;
else
#define BUFF_MAX 255
-/*
- * Helper function
- * - Read from sysfs entry
- * - Write to sysfs entry
- */
-int sys_check_node(char *path)
-{
- int fd;
-
- fd = open(path, O_RDONLY);
- if (fd == -1)
- return -1;
-
- close(fd);
- return 0;
-}
-
int get_systemd_reboot_param(char *buf, unsigned bufsize)
{
int r = sys_read_buf("/run/systemd/reboot-param", buf, bufsize);
#endif
int run_child(int argc, const char *argv[]);
-int sys_check_node(char *path);
int get_systemd_reboot_param(char *buf, unsigned bufsize);
int mount_check(const char* path);
void umount_partition_by_kill(const char *path, const int max_retry);