From c1614ce2b4d4dfcda9532cbeeff25ad7a6558196 Mon Sep 17 00:00:00 2001 From: zhangfanfan2 Date: Wed, 11 Aug 2021 09:32:09 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8FLOSCFG=5FSUPPORT=5FFATFS?= =?UTF-8?q?=E5=9C=A8fs.c=E4=B8=AD=E5=AD=98=E5=9C=A8=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=97=A0fatfs?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码中使用#ifdef LOSCFG_SUPPORT_FATFS控制业务逻辑,但LOSCFG_SUPPORT_FATFS的 默认定义为:#define LOSCFG_SUPPORT_FATFS 0,这样#ifdef LOSCFG_SUPPORT_FATFS控制 的逻辑一定会被编译。修改方式:使用的地方统一为#if的形式 close: #I44XNR Signed-off-by: zff --- components/fs/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fs/fs.c b/components/fs/fs.c index bb08d3eb..a06212a3 100644 --- a/components/fs/fs.c +++ b/components/fs/fs.c @@ -30,7 +30,7 @@ */ #include "fs_operations.h" #include "los_config.h" -#ifdef LOSCFG_SUPPORT_FATFS +#if (LOSCFG_SUPPORT_FATFS == 1) #include "fatfs.h" #endif #include "dirent.h"