From 4dcf39f58d3f7e2176d4e18fd60f9091728ef666 Mon Sep 17 00:00:00 2001 From: chakradhar pogiri Date: Thu, 29 Apr 2021 15:07:31 +0530 Subject: [PATCH] change install path of nmea_replay.log from /etc to /hal/etc Change-Id: I93e94cfe45872bf86be2f153aee5b04ce68c466f --- gps-plugin/src/gps_plugin_replay.c | 8 +++++--- packaging/lbs-server-plugin-replay.spec | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) mode change 100644 => 100755 gps-plugin/src/gps_plugin_replay.c mode change 100644 => 100755 packaging/lbs-server-plugin-replay.spec diff --git a/gps-plugin/src/gps_plugin_replay.c b/gps-plugin/src/gps_plugin_replay.c old mode 100644 new mode 100755 index faf9c54..3958fd6 --- a/gps-plugin/src/gps_plugin_replay.c +++ b/gps-plugin/src/gps_plugin_replay.c @@ -434,6 +434,7 @@ void gps_plugin_stop_replay_mode(replay_timeout *timer) gboolean gps_plugin_get_nmea_fd(replay_timeout *timer) { char replay_file_path[256]; + char nmea_log_path[256]; char *str; str = setting_get_string(VCONFKEY_LOCATION_NMEA_FILE_NAME); @@ -448,10 +449,11 @@ gboolean gps_plugin_get_nmea_fd(replay_timeout *timer) timer->fd = fopen(replay_file_path, "r"); if (timer->fd == NULL) { const char *default_nmea_log = tzplatform_mkpath(TZ_SYS_RO_ETC, "location/nmea_replay.log"); - SECLOG_PLUGIN(DBG_ERR, "fopen failed(%s). loading default(%s) ", replay_file_path, default_nmea_log); - timer->fd = fopen(default_nmea_log, "r"); + snprintf(nmea_log_path, sizeof(nmea_log_path), "%s%s", "/hal", default_nmea_log); + SECLOG_PLUGIN(DBG_ERR, "fopen failed(%s). loading default(%s) ", replay_file_path, nmea_log_path); + timer->fd = fopen(nmea_log_path, "r"); if (timer->fd == NULL) { - SECLOG_PLUGIN(DBG_ERR, "fopen(%s) failed", default_nmea_log); + SECLOG_PLUGIN(DBG_ERR, "fopen(%s) failed", nmea_log_path); return FALSE; } } diff --git a/packaging/lbs-server-plugin-replay.spec b/packaging/lbs-server-plugin-replay.spec old mode 100644 new mode 100755 index eb86192..82d8302 --- a/packaging/lbs-server-plugin-replay.spec +++ b/packaging/lbs-server-plugin-replay.spec @@ -44,8 +44,8 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} %make_install -mkdir -p %{buildroot}%{TZ_SYS_RO_ETC}/location -cp -a nmea-log/*.log %{buildroot}%{TZ_SYS_RO_ETC}/location +mkdir -p %{buildroot}/hal%{TZ_SYS_RO_ETC}/location +cp -a nmea-log/*.log %{buildroot}/hal%{TZ_SYS_RO_ETC}/location %post rm -rf %{_libdir}/liblbs-server-plugin.so @@ -62,4 +62,4 @@ ln -sf %{_hal_libdir}/libhal-backend-location.so %{_libdir}/liblbs-server-plugin %{_hal_licensedir}/%{name}/LICENSE %defattr(-,root,root,-) %{_hal_libdir}/*.so* -%{TZ_SYS_RO_ETC}/location/* +/hal%{TZ_SYS_RO_ETC}/location/* -- 2.34.1