devkitPro / wut

Let's try to make a Wii U Toolchain / SDK for creating rpx/rpl.
zlib License
236 stars 52 forks source link

wutdevoptab: Add support for opening files with more flag combinations #322

Closed Maschell closed 1 year ago

Maschell commented 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_RDWR

Very similar to O_CREAT | O_WRONLY