mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/fatfs/fatfs_vfs: fix flag translation in _open
This commit is contained in:
parent
05352b63e4
commit
4469d8f0fb
@ -151,7 +151,12 @@ static int _open(vfs_file_t *filp, const char *name, int flags, mode_t mode,
|
||||
fatfs_flags |= FA_CREATE_ALWAYS;
|
||||
}
|
||||
if ((flags & O_CREAT) == O_CREAT) {
|
||||
fatfs_flags |= FA_CREATE_NEW;
|
||||
if ((flags & O_EXCL) == O_EXCL) {
|
||||
fatfs_flags |= FA_CREATE_NEW;
|
||||
}
|
||||
else {
|
||||
fatfs_flags |= FA_OPEN_ALWAYS;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fatfs_flags |= FA_OPEN_EXISTING;
|
||||
|
Loading…
Reference in New Issue
Block a user