Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ int dfs_elm_flush(struct dfs_file *file)
off_t dfs_elm_lseek(struct dfs_file *file, off_t offset, int wherece)
{
FRESULT result = FR_OK;

off_t pos = 0;
switch (wherece)
{
case SEEK_SET:
Expand All @@ -656,11 +656,12 @@ off_t dfs_elm_lseek(struct dfs_file *file, off_t offset, int wherece)
RT_ASSERT(fd != RT_NULL);
rt_mutex_take(&file->vnode->lock, RT_WAITING_FOREVER);
result = f_lseek(fd, offset);
pos = fd->fptr;
rt_mutex_release(&file->vnode->lock);
if (result == FR_OK)
{
/* return current position */
return fd->fptr;
return pos;
}
}
else if (file->vnode->type == FT_DIRECTORY)
Expand Down