1
0
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:
Karl Fessel 2021-03-12 13:13:32 +01:00
parent cfaa57fe6c
commit 2bd2384bc0

View File

@ -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;