mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
examples/filesystem: posix open needs mode if O_CREATE
umask is applied to mode (mode & ~umask) -> 00777 is a good default see: man 2 open
This commit is contained in:
parent
cfaa57fe6c
commit
2bd2384bc0
@ -287,7 +287,7 @@ static int _tee(int argc, char **argv)
|
||||
}
|
||||
fclose(f);
|
||||
#else
|
||||
int fd = open(argv[1], O_RDWR | O_CREAT);
|
||||
int fd = open(argv[1], O_RDWR | O_CREAT, 00777);
|
||||
if (fd < 0) {
|
||||
printf("error while trying to create %s\n", argv[1]);
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user