From 727d807585fb621741a71dbcb3ee0948c8f53a81 Mon Sep 17 00:00:00 2001 From: youshugen Date: Thu, 13 Jun 2024 22:34:36 +0800 Subject: [PATCH] fix: power alarming improve Signed-off-by: youshugen --- thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp b/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp index e66a698362..d3c62d92c1 100644 --- a/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp +++ b/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp @@ -201,8 +201,12 @@ void ThermalHdfConfig::ParseTracingNode(xmlNodePtr node) { xmlChar* xmlOutpath = xmlGetProp(node, BAD_CAST"outpath"); if (xmlOutpath != nullptr) { - this->traceConfig_.outPath = std::string(reinterpret_cast(xmlOutpath)); - xmlFree(xmlOutpath); + if (strcmp(reinterpret_cast(xmlOutpath), "/data/log/thermal/thermal-log") == 0) { + this->traceConfig_.outPath = std::string(reinterpret_cast(xmlOutpath)); + xmlFree(xmlOutpath); + } else { + THERMAL_HILOGE(COMP_HDI, "xmlOutpath is not /data/log/thermal/thermal-log"); + } } auto cur = node->xmlChildrenNode; -- Gitee