1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fixed bug in fopen(3) where it didn't open correctly.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-01-18 12:40:31 +01:00
parent ba2cb5103a
commit 17d1b67a77

View file

@ -184,7 +184,7 @@ FILE* fopen(const char* path, const char* mode)
default: errno = EINVAL; return 0;
}
}
int fd = open(path, fd, 0666);
int fd = open(path, omode | oflags, 0666);
if ( fd < 0 ) { return NULL; }
FILE* fp = fdopen(fd, mode);
if ( !fp ) { close(fd); return NULL; }