Added statvfs (with proper free and total storage size) Removed due to Wii U's fat32 driver blocking for 20 seconds while getting free space.
Improved error codes for unlink and rmdir regarding non-empty directories.
Return ENOENT on empty strings since it softlocks the Wii U. Since the devoptab relies on the cwd it's pretty easy to run into with stuff like recursive path creation for example.
Clean up open_r mode_t->string conversion
Improved FSStat->mode_t conversion
Added fchmod Doesn't work (without hacky workarounds), the file has to be closed to change modes on the Wii U.
Removed devoptab_fs_getmtime.c since it's not used (nor available, like with utimes_r, since Wii U only tracks file times up to seconds) Merged in other PRs
Renamed devoptab_fs_stat.c to devoptab_fs_lstat.c since stat/fstat doesn't resolve symlinks. Better suited for a later PR maybe.
Added lstat (although it's really just the previous stat behavior) Changed in other PRs.
Filesystem Changes:
Add FSOpenFileEx and flags
Fix FSBindUnmount capitalization Merged in other PRs
Things Not Implemented:
Symlinks aren't implemented in stat_r/fstat_r. This is partly because these "symlinks" don't store the target (they're resolved whenever the game files are mounted, and are often/always update or DLC files that "resolve" to the base game files). Another reason is that overall symlink support is kinda iffy without newlib fixes:
Doesn't really expose a good way to use FSOpenFileFlags inside the devoptab for now, which is useful for things for opening (new) special encrypted files. Is it worth adding to newlib (since it also has similar flags for cygwin) or is it fine as-is (the use-cases, like mine, that require it can still use this flag)? No longer applicable/required.
Devoptab Changes:
Added statvfs (with proper free and total storage size)Removed due to Wii U's fat32 driver blocking for 20 seconds while getting free space.open_r
mode_t->string conversionAdded fchmodDoesn't work (without hacky workarounds), the file has to be closed to change modes on the Wii U.Removed devoptab_fs_getmtime.c since it's not used (nor available, like withMerged in other PRsutimes_r
, since Wii U only tracks file times up to seconds)Renamed devoptab_fs_stat.c to devoptab_fs_lstat.c since stat/fstat doesn't resolve symlinks.Better suited for a later PR maybe.Added lstat (although it's really just the previous stat behavior)Changed in other PRs.Filesystem Changes:
Fix FSBindUnmount capitalizationMerged in other PRsThings Not Implemented:
Doesn't really expose a good way to use FSOpenFileFlags inside the devoptab for now, which is useful for things for opening (new) special encrypted files. Is it worth adding to newlib (since it also has similar flags for cygwin) or is it fine as-is (the use-cases, like mine, that require it can still use this flag)?No longer applicable/required.