/dev/fs: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
Crediar (talk | contribs)
m fixed Ioctl 0x01
Lunatik (talk | contribs)
No edit summary
Line 25: Line 25:
   
   
/sys
/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.


== Ioctl listing ==
== Ioctl listing ==

Revision as of 07:02, 30 January 2010

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

/shared2

/shared1

/title

/ticket

/sys

Ioctl listing

Request number Name input output notes
0x1 Format 0 0 Don't try this!!!
0x2 GetStats ? ?
0x3 CreateDir ? ?
0x4 ReadDir
0x5 SetAttr ? ?
0x6 GetAttr ? ?
0x7 Delete ? ?
0x8 Rename ? 0
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
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
-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