lib: posix:fs: handle O_TRUNC in open()
handling of O_TRUNC flag from posix open() to zephyr filesystem flag Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
This commit is contained in:
parent
20288c254b
commit
063d938aa5
|
@ -64,6 +64,7 @@ static int posix_mode_to_zephyr(int mf)
|
|||
int mode = (mf & O_CREAT) ? FS_O_CREATE : 0;
|
||||
|
||||
mode |= (mf & O_APPEND) ? FS_O_APPEND : 0;
|
||||
mode |= (mf & O_TRUNC) ? FS_O_TRUNC : 0;
|
||||
|
||||
switch (mf & O_ACCMODE) {
|
||||
case O_RDONLY:
|
||||
|
|
Loading…
Reference in New Issue