[Bugfix][T800][bug-view-530] open mdlog transfer fail
Only Configure: No
Affected branch: unknown
Affected module: log
Is it affected on both ZXIC and MTK: only MTK
Self-test: yes
Doc Update: no
Change-Id: Iebeb15cafaad1c8e506a24e23837dbcc460acbf6
diff --git a/LYNQ_PUBLIC/IC_src/mtk/packages/apps/lynq-log-transfer/lynq_inner_log_transfer.sh b/LYNQ_PUBLIC/IC_src/mtk/packages/apps/lynq-log-transfer/lynq_inner_log_transfer.sh
index eeecbb6..bad2f31 100755
--- a/LYNQ_PUBLIC/IC_src/mtk/packages/apps/lynq-log-transfer/lynq_inner_log_transfer.sh
+++ b/LYNQ_PUBLIC/IC_src/mtk/packages/apps/lynq-log-transfer/lynq_inner_log_transfer.sh
@@ -230,26 +230,9 @@
}
#gpslog transfer to soc end@cz.li,20240314
-function is_process_running()
-{
- if pgrep -x "$1" > /dev/null; then
- return 1
- else
- return 0
- fi
-}
-
-function exe_emdlogger_cmd()
-{
- is_process_running emdlogger1
- if [ $? -eq 0 ]; then
- echo $1 | emdlogger_ctrl socket
- fi
-}
-
function stop_mtk_log_and_clear_dir()
{
- exe_emdlogger_cmd 7
+ echo 7 | emdlogger_ctrl socket
rm -rf $MTK_LOG_PATH*
}
@@ -888,7 +871,7 @@
if [ ! -d ${MTK_LOG_BUFF_PATH} ]; then
mkdir -p ${MTK_LOG_BUFF_PATH}
fi
- exe_emdlogger_cmd 6
+ echo 6 | emdlogger_ctrl socket
is_mtk_log_start
if [ $cur_uci_md_running -eq 0 ]; then
@@ -955,7 +938,7 @@
#rm -rf ${GPS_LOG_PATH}
#gpslog transfer to soc end@cz.li,20240314
if [ $index -eq 2 ]; then
- exe_emdlogger_cmd 7
+ echo 7 | emdlogger_ctrl socket
fi
stop_log_transfer $index
@@ -968,8 +951,9 @@
if [ ! -d $MTK_LOG_PATH ]; then
mkdir -p $MTK_LOG_PATH
fi
- stop_mtk_log_and_clear_dir
- mount -o bind $MTK_LOG_MOUNT_PATH $MTK_LOG_PATH
+ rm -rf $MTK_LOG_PATH*
+ mount -o bind $MTK_LOG_MOUNT_PATH $MTK_LOG_PATH
+ echo_debug_info "mount result is $?"
uci set mdlog.property.md_cyclic_size='36'
set_single_size_uci 2
uci commit