From 6d2dbdf0e8e5512628e7686c9a400a88fe5fe570 Mon Sep 17 00:00:00 2001 From: wangchen Date: Wed, 12 Apr 2023 16:27:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9E=E9=80=80los=5Fpanic=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案描述: 1, 暂时回退https://gitee.com/openharmony/kernel_liteos_m/pulls/1035的修改 fix #I6V3U5 Signed-off-by: wangchen --- kernel/src/los_init.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/kernel/src/los_init.c b/kernel/src/los_init.c index eba1a3c8..e5ed4b32 100644 --- a/kernel/src/los_init.c +++ b/kernel/src/los_init.c @@ -37,7 +37,6 @@ #include "los_mux.h" #include "los_queue.h" #include "los_sem.h" -#include "securec.h" #if (LOSCFG_PLATFORM_HWI == 1) #include "los_interrupt.h" @@ -96,8 +95,6 @@ #include "los_trace_pri.h" #endif -#define BUFSIZE 256 - /***************************************************************************** Function : LOS_Reboot Description : system exception, die in here, wait for watchdog. @@ -113,14 +110,10 @@ LITE_OS_SEC_TEXT_INIT VOID LOS_Reboot(VOID) LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...) { - char buf[BUFSIZE] = { 0 }; va_list ap; va_start(ap, fmt); - int len = vsnprintf_s(buf, sizeof(buf), BUFSIZE - 1, fmt, ap); + PRINT_ERR(fmt, ap); va_end(ap); - if (len > 0) { - PRINT_ERR("%s\n", buf); - } OsDoExcHook(EXC_PANIC); #if (LOSCFG_BACKTRACE_TYPE != 0) LOS_BackTrace();