pkg/fatfs/fatfs_vfs: fix fstat
This commit is contained in:
parent
6053a223fa
commit
75a9ad0be1
@ -257,13 +257,10 @@ static off_t _lseek(vfs_file_t *filp, off_t off, int whence)
|
|||||||
|
|
||||||
static int _fstat(vfs_file_t *filp, struct stat *buf)
|
static int _fstat(vfs_file_t *filp, struct stat *buf)
|
||||||
{
|
{
|
||||||
fatfs_file_desc_t *fd = (fatfs_file_desc_t *)filp->private_data.buffer;
|
|
||||||
fatfs_desc_t *fs_desc = (fatfs_desc_t *)filp->mp->private_data;
|
fatfs_desc_t *fs_desc = (fatfs_desc_t *)filp->mp->private_data;
|
||||||
FILINFO fi;
|
FILINFO fi;
|
||||||
FRESULT res;
|
FRESULT res;
|
||||||
|
|
||||||
_build_abs_path(fs_desc, fd->fname);
|
|
||||||
|
|
||||||
memset(buf, 0, sizeof(*buf));
|
memset(buf, 0, sizeof(*buf));
|
||||||
|
|
||||||
res = f_stat(fs_desc->abs_path_str_buff, &fi);
|
res = f_stat(fs_desc->abs_path_str_buff, &fi);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user