vfs, fatfs: Add file truncate for fatfs

This commit is contained in:
Renz Bagaporo
2018-06-12 18:29:05 +08:00
committed by Renz Christian Bagaporo
parent 0e501e5edd
commit ea711f2ee9
9 changed files with 214 additions and 2 deletions

View File

@@ -4694,7 +4694,6 @@ FRESULT f_truncate (
FATFS *fs;
DWORD ncl;
res = validate(&fp->obj, &fs); /* Check validity of the file object */
if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res);
if (!(fp->flag & FA_WRITE)) LEAVE_FF(fs, FR_DENIED); /* Check access mode */