/dev/fs: Difference between revisions
< /dev
added error codes |
ProdigySim (talk | contribs) Adding some info about current FS access capabilities |
||
| Line 27: | Line 27: | ||
For a more detailed example of how the file system structure can look, see http://www.openwii.org/forums/viewtopic.php?p=1241#1241. | For a more detailed example of how the file system structure can look, see http://www.openwii.org/forums/viewtopic.php?p=1241#1241. | ||
Currently, under the [[Twilight Hack]], we are only able to access [[/shared2]] and the [[/title]] folder for the running game, and some contents of /title/00010002 (Wii Hxxx channels). | |||
Revision as of 18:45, 5 March 2008
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 looks like that:
/tmp
/meta
/import
/shared1
/ticket
/sys
For a more detailed example of how the file system structure can look, see http://www.openwii.org/forums/viewtopic.php?p=1241#1241.
Currently, under the Twilight Hack, we are only able to access /shared2 and the /title folder for the running game, and some contents of /title/00010002 (Wii Hxxx channels).
Ioctl listing
| Request number | Name | input | output | notes |
| 0x9 | CreateFile | 0x4C bytes. First 0x40 are used for the filename, 0x40-0x45 are unused,0x46-0x48 unknown but used, 0x49 is used for the attribute, 0x4A-0x4C unused. | 0 |
/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 |
| -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 | EFBIG? | max block count reached? |
| -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 |