From 22f0e9ac30e6584f1faf761809df49627d7ff8ad Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 8 Oct 2020 18:48:41 +0800 Subject: [PATCH] Fix build when HILOG is disabled Fix build when BASE_CORE_HILOG option is disabled. Use similar printing function to output missing HILOG logs. Signed-off-by: Zbigniew Bodek Change-Id: Id5c63568ccb1ba90daadddf7e26d3e0f6c9f30ce --- kernel/base/misc/kill_shellcmd.c | 7 +++++++ platform/Makefile | 3 +++ 2 files changed, 10 insertions(+) diff --git a/kernel/base/misc/kill_shellcmd.c b/kernel/base/misc/kill_shellcmd.c index 96b3d7e0..c1a0231a 100644 --- a/kernel/base/misc/kill_shellcmd.c +++ b/kernel/base/misc/kill_shellcmd.c @@ -35,7 +35,14 @@ #include "los_printf.h" #include "los_task_pri.h" #include "los_process_pri.h" + +#ifdef LOSCFG_BASE_CORE_HILOG #include "log.h" +#else +#define HILOG_INFO(type, fmt, ...) PRINT_INFO(fmt, __VA_ARGS__) +#define HILOG_ERROR(type, fmt, ...) PRINT_ERR(fmt, __VA_ARGS__) +#endif + #ifdef LOSCFG_SHELL #include "shcmd.h" #include "shell.h" diff --git a/platform/Makefile b/platform/Makefile index 40e4757e..eee94a0a 100644 --- a/platform/Makefile +++ b/platform/Makefile @@ -49,6 +49,9 @@ LOCAL_SRCS := $(filter-out ../kernel/common/los_rootfs.c, $(LOCAL_SRCS)) ifneq ($(LOSCFG_FS_VFS), y) LOCAL_SRCS := $(filter-out ../kernel/common/console.c ../kernel/common/virtual_serial.c, $(LOCAL_SRCS)) endif +ifneq ($(LOSCFG_BASE_CORE_HILOG), y) +LOCAL_SRCS := $(filter-out ../kernel/common/los_hilog.c, $(LOCAL_SRCS)) +endif else LOCAL_SRCS += $(wildcard ../kernel/common/los_config.c) LOCAL_SRCS += $(wildcard ../kernel/common/los_printf.c)