Change target directory of pm_state.log.
In addition, the script that dumps pm state is installed to
dump script directory (TZ_SYS_DUMPGEN).
Change-Id: I65a7647a738354b6a062fff502af4cebd0f25f2b
install -m 644 udev/99-usbhost.rules %{buildroot}%{_prefix}/lib/udev/rules.d/99-usbhost.rules
%endif
+mkdir -p %{buildroot}%{TZ_SYS_DUMPGEN}
+install -m 775 scripts/dump_pmstate_log.sh %{buildroot}%{TZ_SYS_DUMPGEN}/dump_pmstate_log.sh
+
%post
#memory type vconf key init
users_gid=$(getent group %{TZ_SYS_USER_GROUP} | cut -f3 -d':')
%{_bindir}/devicectl
%if %{?usb_module} == on
%{_bindir}/direct_set_debug.sh
+%{TZ_SYS_DUMPGEN}/dump_pmstate_log.sh
%endif
%files -n libdeviced
--- /dev/null
+#!/bin/sh
+#
+# Dump PM state log
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+/usr/bin/devicectl display savelog
#include <fcntl.h>
#include <vconf-keys.h>
#include <Ecore.h>
+#include <tzplatform_config.h>
#include "util.h"
#include "core.h"
#include "power/power-handler.h"
#include "dd-display.h"
-#define PM_STATE_LOG_FILE "/var/log/pm_state.log"
-#define DISPLAY_CONF_FILE "/etc/deviced/display.conf"
+#define PM_STATE_LOG_FILE tzplatform_mkpath2(TZ_SYS_ALLLOGS, "pm_state.log")
+#define DISPLAY_CONF_FILE "/etc/deviced/display.conf"
/**
* @addtogroup POWER_MANAGER