Merge pull request #21 from fischerling/fix-creat-fd-flags

creat: set flags in opened file descriptor
This commit is contained in:
Enrico Fraccaroli
2024-01-29 05:24:58 +01:00
committed by GitHub
+1
View File
@@ -58,6 +58,7 @@ int sys_creat(const char *path, mode_t mode)
// Set the file descriptor id.
task->fd_list[fd].file_struct = file;
task->fd_list[fd].flags_mask = O_WRONLY|O_CREAT|O_TRUNC;
// Return the file descriptor and increment it.
return fd;