change install path of nmea_replay.log from /etc to /hal/etc 80/257680/1 accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_unified tizen tizen_6.5 tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/6.5/unified/20211028.093413 accepted/tizen/7.0/unified/20221110.063627 accepted/tizen/7.0/unified/hotfix/20221116.104456 accepted/tizen/8.0/unified/20231005.092518 accepted/tizen/unified/20210608.130910 submit/tizen/20210429.122510 submit/tizen/20210608.062515 submit/tizen_6.5/20211028.161501 tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorchakradhar pogiri <v.pogiri@samsung.com>
Thu, 29 Apr 2021 09:50:59 +0000 (15:20 +0530)
committerchakradhar pogiri <v.pogiri@samsung.com>
Thu, 29 Apr 2021 09:50:59 +0000 (15:20 +0530)
Change-Id: I3d8e80ce7d08ea40d510bd1dfbc4050a8026af9c

gps-plugin/src/gps_plugin_replay.c [changed mode: 0644->0755]
packaging/lbs-plugin-gps-rpi3.spec

old mode 100644 (file)
new mode 100755 (executable)
index 6fa36cf..ab5da95
@@ -567,6 +567,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);
@@ -581,10 +582,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;
                }
        }
index 2e9e889..07567da 100755 (executable)
@@ -43,8 +43,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
@@ -61,4 +61,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/*