Closed Maschell closed 1 year ago
(O_EXCL | O_CREAT | O_RDWR) and (O_EXCL | O_CREAT | O_WRONLY)
Currently every O_CREAT needs a O_TRUNC as well because Cafe OS truncates the file when opened with w and w+. When O_EXCL is set this doesn't matter because we never touch (truncate) existing files.
O_CREAT
O_TRUNC
w
w+
O_EXCL
O_CREAT | O_RDWR
Very similar to O_CREAT | O_WRONLY
O_CREAT | O_WRONLY
(O_EXCL | O_CREAT | O_RDWR) and (O_EXCL | O_CREAT | O_WRONLY)
Currently every
O_CREAT
needs aO_TRUNC
as well because Cafe OS truncates the file when opened withw
andw+
. WhenO_EXCL
is set this doesn't matter because we never touch (truncate) existing files.O_CREAT | O_RDWR
Very similar to
O_CREAT | O_WRONLY