mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-08 14:43:04 +08:00
fix O_APPEND write issue in RAMFS
This commit is contained in:
1 parent
ac850ef3f0
commit
ac10730492
1 file changed
+4
-1
@@ -264,7 +264,10 @@ int dfs_ramfs_open(struct dfs_fd *file)
|
||||
|
||||
file->data = dirent;
|
||||
file->size = dirent->size;
|
||||
file->pos = 0;
|
||||
if (file->flags & DFS_O_APPEND)
|
||||
file->pos = file->size;
|
||||
else
|
||||
file->pos = 0;
|
||||
|
||||
return DFS_STATUS_OK;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user