int umount_partition(const char *path, const bool force);
int get_privilege(pid_t pid, char *name, size_t len);
bool is_emulator(void);
+void watchdog_notify(void);
#endif /* __CORE_COMMON_H__ */
#include "device-notifier.h"
#define PIDFILE_PATH "/var/run/.deviced.pid"
-#define WATCHDOG_TIMEOUT 10
+#define WATCHDOG_TIMEOUT 15
static void writepid(char *pidpath)
{
ecore_main_loop_quit();
}
-static Eina_Bool watchdog_cb(void *data)
+void watchdog_notify(void)
{
int ret = aw_notify();
if (ret < 0)
- _E("aw_notify failed");
+ _E("aw_notify failed(%d)", ret);
+}
+
+static Eina_Bool watchdog_cb(void *data)
+{
+ watchdog_notify();
return ECORE_CALLBACK_RENEW;
}
return 0;
}
-static void poweroff_stop_systemd_service(void)
-{
- _D("systemd service stop");
- umount2("/sys/fs/cgroup", MNT_FORCE |MNT_DETACH);
-}
-
static int stop_systemd_journald(void)
{
int ret;
break;
}
- poweroff_stop_systemd_service();
+ watchdog_notify();
#ifndef EMULATOR
unmount_rw_partition();
display_device_ops->exit(NULL);
sync();
+ watchdog_notify();
ret = telephony_off(POWER_OFF_DIRECT);
if (ret < 0) {
powerdown_ap(NULL);
display_device_ops->exit(NULL);
sync();
+ watchdog_notify();
ret = telephony_off(POWER_OFF_RESTART);
if (ret < 0) {
restart_ap(NULL);
{
enum poweroff_type val = (long)data;
+ watchdog_notify();
+
make_power_flag(val, NULL);
pm_lock_internal(INTERNAL_LOCK_POWEROFF, LCD_OFF, STAY_CUR_STATE, 0);
#include "core/edbus-handler.h"
#include "power/power-handler.h"
-#define TELEPHONY_NOTI_TIMEOUT 15000 /* milliseconds */
+#define TELEPHONY_NOTI_TIMEOUT 10000 /* milliseconds */
static TapiHandle *tapi_handle;
static enum poweroff_type type;