!431 修复FATFS中不同内部接口不支持FAT12/FAT16 FAT表结标志
Merge pull request !431 from Far/fatfs
This commit is contained in:
commit
c40e1464b9
|
@ -904,11 +904,13 @@ int fatfs_fallocate64(struct file *filep, int mode, off64_t offset, off64_t len)
|
|||
return -EBUSY;
|
||||
}
|
||||
result = f_expand(fp, (FSIZE_t)offset, (FSIZE_t)len, 1);
|
||||
if (result == FR_OK && finfo->sclst == 0) {
|
||||
finfo->sclst = fp->obj.sclust;
|
||||
if (result == FR_OK) {
|
||||
if (finfo->sclst == 0) {
|
||||
finfo->sclst = fp->obj.sclust;
|
||||
}
|
||||
result = f_sync(fp);
|
||||
}
|
||||
result = f_sync(fp);
|
||||
unlock_fs(fs, FR_OK);
|
||||
unlock_fs(fs, result);
|
||||
|
||||
return -fatfs_2_vfs(result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue