mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-17 07:09:37 +00:00
vfs, fatfs: Add file truncate for fatfs
This commit is contained in:

committed by
Renz Christian Bagaporo

parent
0e501e5edd
commit
ea711f2ee9
@@ -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 */
|
||||
|
Reference in New Issue
Block a user