feat: 适配三方库FatFs升级至r0.14a版本

适配了f_mkfs接口的修改

Signed-off-by: Far <yesiyuan2@huawei.com>
This commit is contained in:
Far 2021-09-07 14:43:36 +08:00
parent 459cabf7de
commit 92ea355756
1 changed files with 5 additions and 2 deletions

View File

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