From 1e7ed33ba2be35bdcb1681481f85937ea538f485 Mon Sep 17 00:00:00 2001 From: sunchanglong Date: Thu, 5 Dec 2024 15:37:22 +0800 Subject: [PATCH] =?UTF-8?q?TicketNo:#IB9A4W=20Description:updater=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E7=9A=84=E4=BA=A7=E5=93=81=E5=90=8D=E4=B8=BA=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=80=BC=20=20Signed-off-by:=20sunchanglong=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/utils.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/utils.cpp b/utils/utils.cpp index eb953fcf..9239fbd3 100644 --- a/utils/utils.cpp +++ b/utils/utils.cpp @@ -442,7 +442,14 @@ bool CopyDir(const std::string &srcPath, const std::string &dstPath) std::string GetLocalBoardId() { - return "HI3516"; + char productName[PARAM_SIZE + 1] = {0}; + if (GetParameter("const.product.name", "", productName, sizeof(productName) - 1) <= 0) { + LOG(ERROR) << "get product name failed"; + return false; + } + LOG(INFO) << "product name is " << productName; + + return productName; } int32_t CreateCompressLogFile(const std::string &pkgName, std::vector> &files) -- Gitee