fix: FatFs升级r0.14a版本同步3.0分支

【背景】FatFs升级r0.14a版本同步3.0分支

【修改方案】
将三方库FatFs升级至r0.14a版本
主要修改点为:
适配f_mkfs接口更新
【影响】
对现有的产品编译不会有影响。
re #I5A7AS
Signed-off-by: wangchen <wangchen64@huawei.com>

Change-Id: I571f458a19d04520c86ab0ed63edcabb25d80e5e
This commit is contained in:
wangchen 2022-05-31 09:00:54 +00:00
parent 4491d561c7
commit 8cf75d80fd
1 changed files with 4 additions and 1 deletions

View File

@ -1432,6 +1432,7 @@ int fatfs_format(const char *dev, int sectors, int option)
INT32 index;
FRESULT res;
INT32 ret;
MKFS_PARM opt = {0};
if (dev == NULL) {
errno = EFAULT;
@ -1458,7 +1459,9 @@ int fatfs_format(const char *dev, int sectors, int option)
goto OUT;
}
res = f_mkfs(dev, option, sectors, g_workBuffer, FF_MAX_SS);
opt.n_sect = sectors;
opt.fmt = (BYTE)option;
res = f_mkfs(dev, &opt, g_workBuffer, FF_MAX_SS);
if (res != FR_OK) {
errno = FatfsErrno(res);
ret = FS_FAILURE;