!696 FatFs升级r0.14a版本同步3.0分支

Merge pull request !696 from wangchen/05_31_up_m
This commit is contained in:
openharmony_ci 2022-06-02 07:43:02 +00:00 committed by Gitee
commit b9311b9aa0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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;