Commit graph

10 commits

Author SHA1 Message Date
Yuri Kunde Schlesner
c2588403c0 HLE: Revamp error handling throrough the HLE code
All service calls in the CTR OS return result codes indicating the
success or failure of the call. Previous to this commit, Citra's HLE
emulation of services and the kernel universally either ignored errors
or returned dummy -1 error codes.

This commit makes an initial effort to provide an infrastructure for
error reporting and propagation which can be use going forward to make
HLE calls accurately return errors as the original system. A few parts
of the code have been updated to use the new system where applicable.

One part of this effort is the definition of the `ResultCode` type,
which provides facilities for constructing and parsing error codes in
the structured format used by the CTR.

The `ResultVal` type builds on `ResultCode` by providing a container for
values returned by function that can report errors. It enforces that
correct error checking will be done on function returns by preventing
the use of the return value if the function returned an error code.

Currently this change is mostly internal since errors are still
suppressed on the ARM<->HLE border, as a temporary compatibility hack.
As functionality is implemented and tested this hack can be eventually
removed.
2014-11-24 17:08:36 -02:00
archshift
8aeadbd95a Added DeleteFile and DeleteDirectory functions to FS:USER and the archives. 2014-11-23 00:33:43 -08:00
bunnei
a3107a6b57 FileSys: Updated backend code to use FileSys::Path instead of string for paths. 2014-11-17 21:49:24 -05:00
archshift
04c90c395d Added CreateDirectory function to service/fs.cpp, and in Archive. 2014-11-02 10:48:28 -08:00
Emmanuel Gil Peyrot
3a570a9fee Kernel: Implement the Close command for Archive, File and Directory. 2014-09-17 14:35:46 +00:00
Emmanuel Gil Peyrot
c197ce2180 Kernel: Add a Directory object and a getter for it from an Archive object. 2014-09-17 14:35:46 +00:00
Emmanuel Gil Peyrot
19d04f3abe Kernel: Add a File object and a getter for it from an Archive object. 2014-09-17 14:35:46 +00:00
bunnei
542700ccb7 Archive: Added Init/Shutdown methods to reset kernel archive state. 2014-07-04 20:37:51 -04:00
bunnei
17a6148f9d FileSys: Added preliminary support for applications reading the RomFS archive.
Archive: Fixed brace ugliness for neobrain :)

FS: Commented out unused local variables to prevent warnings.

...But keeping them here for future use.

archive_romfs: Removed unused #include.
2014-07-04 20:37:45 -04:00
bunnei
8b8c8f4c13 Kernel: Added stubbed code to support creation of kernel Archive objects. 2014-06-27 16:58:30 -04:00