/dev/fs: Difference between revisions
< /dev
Hallowizer (talk | contribs) m Linked to the root folder |
Hallowizer (talk | contribs) →Ioctl listing: ReadDir |
||
| Line 56: | Line 56: | ||
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x4 | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x4 | ||
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | ReadDir | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | ReadDir | ||
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | Max file count | ||
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #fe9;" | | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #fe9;" | File names | ||
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | | ||
Revision as of 22:42, 23 October 2021
| This article is a stub. You can help WiiBrew by expanding it. |
The filesystem can be directly accessed through "/dev/fs".
There are several IOS functions for FS like Delete/Create/List/Rename/.. .
Files can be directly opened with IOS_Open("/tmp/data.bin",1);
The root folder contains these subfolders, some of which have their own pages:
/wfs (4.3 only)
Ioctl listing
| Request number | Name | input | output | notes |
| 0x1 | Format | 0 | 0 | Don't try this!!! |
| 0x2 | GetStats | ? | ? | |
| 0x3 | CreateDir | ? | ? | |
| 0x4 | ReadDir | Max file count | File names | |
| 0x5 | SetAttr | ? | ? | |
| 0x6 | GetAttr | 64 bytes for filename | 78 bytes for file attributes | |
| 0x7 | Delete | ? | ? | |
| 0x8 | Rename | ? | 0 | |
| 0x9 | CreateFile | 0x4C bytes: 4 for owner ID, 2 for group ID, 0x40 filename, 1 for each owner/group/other permissions, 1 for attributes, 2 unused (?) | 0 | |
| 0xb | GetFileStats | ? | ? | |
| 0xd | Shutdown |
/dev/fs error codes
| Error code | POSIX equivalent | notes |
| -1 | EACCES | Permission denied |
| -2 | EEXIST | File exists |
| -4 | EINVAL | Invalid argument |
| -6 | ENOENT | File not found |
| -8 | EBUSY | Resource busy |
| -12 | EIO ? | returned on ECC error |
| -22 | ENOMEM | Alloc failed during request |
| -101 | EINVAL | Invalid argument (again? Returned e.g. by /dev/fs IOCtls) |
| -102 | EACCESS | Permission denied |
| -103 | EIO? | returned for "corrupted" NAND |
| -105 | EEXIST | File exists |
| -106 | ENOENT | File not found |
| -107 | ENFILE | Too many fds open |
| -108 | ? | Memory is full |
| -109 | ENFILE | Too many fds open |
| -110 | ENAMETOOLONG | pathname is too long |
| -111 | ? | FD is already open |
| -114 | EIO? | returned on ECC error |
| -115 | ENOTEMPTY | Directory not empty |
| -116 | ENAMETOOLONG? | max directory depth exceeded |
| -118 | EBUSY | Resource busy |
| -119 | ? | fatal error |