add DFS_O_TRUNC option to ELM FatFs interface layer.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@358 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
82e7844cbf
commit
d2590bb99a
|
@ -142,6 +142,7 @@ int dfs_elm_open(struct dfs_fd* file)
|
|||
|
||||
if (file->flags & DFS_O_CREAT) mode |= FA_CREATE_NEW;
|
||||
if (file->flags & DFS_O_WRONLY) mode |= FA_WRITE;
|
||||
if (file->flags & DFS_O_TRUNC) mode |= FA_CREATE_ALWAYS;
|
||||
|
||||
/* allocate a fd */
|
||||
fd = (FIL*)rt_malloc(sizeof(FIL));
|
||||
|
|
Loading…
Reference in New Issue