| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is a hold over from the 3DS error codes in Citra.
|
|
|
|
|
|
| |
Previously this was required, as BitField wasn't trivially copyable.
BitField has since been made trivially copyable, so now this isn't
required anymore.
|
|
|
|
|
| |
Gets rid of another holdover from Citra, and describes the OS on the
Switch instead.
|
|
|
|
|
| |
Now that the final stray ErrorDescription member was relocated, we can
finally remove it and its relevant constructor in the ResultCode union.
|
|
|
|
|
|
| |
Relocates the error code to where it's most related, similar to how all
the other error codes are. Previously we were including a non-generic
error in the main result code header.
|
|
|
|
|
|
|
|
|
|
|
| |
Removes a few inclusion dependencies from the headers or replaces
existing ones with ones that don't indirectly include the required
headers.
This allows removing an inclusion of core/memory.h, meaning that if the
memory header is ever changed in the future, it won't result in
rebuilding the entirety of the HLE services (as the IPC headers are used
quite ubiquitously throughout the HLE service implementations).
|
|
|
|
| |
Keeps filesystem-related error codes in one spot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many containers within the standard library provide different behaviors
based on whether or not a move constructor/assignment operator can be
guaranteed not to throw or not.
Notably, implementations will generally use std::move_if_noexcept (or an
internal implementation of it) to provide strong exception guarantees.
If a move constructor potentially throws (in other words, is not
noexcept), then certain behaviors will create copies, rather than moving
the values.
For example, consider std::vector. When a std::vector calls resize(),
there are two ways the elements can be relocated to the new block of
memory (if a reallocation happens), by copy, or by moving the existing
elements into the new block of memory. If a type does not have a
guarantee that it will not throw in the move constructor, a copy will
happen. However, if it can be guaranteed that the move constructor won't
throw, then the elements will be moved.
This just allows ResultVal to be moved instead of copied all the time if
ever used in conjunction with containers for whatever reason.
|
| |
|
|
|
|
| |
* Add and correct some Error Modules
|
|
|
|
| |
Avoids doing work that doesn't need to be done.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It is now known that result code description vary depending on the
module, and so they're best defined on a per-module basis. To support
this, allow passing in an arbitrary integer instead of limiting to the
ones in the ErrorDescription enum. These will be gradually migrated to
their individual users, but a few will be kept as "common" codes shared
by all modules.
|
| |
|
|
|
|
| |
Reduce the associated port's connection count when a ServerSession is destroyed.
|
| |
|
|\
| |
| | |
Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
|
| |
| |
| |
| | |
The error code was taken from the 3DS kernel.
|
|/ |
|
| |
|
|
|
|
| |
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
|
|
|
|
| |
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
|
|
|
|
|
|
|
| |
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
|
|
|
|
| |
These operations are limited by the open flags specified while opening the file.
|
| |
|
| |
|
| |
|
|
|
|
| |
This implementation will need to be (almost completely) changed when we implement multiprocess support.
|
| |
|
| |
|
|
|
|
| |
It's unnecessary to make copies for simple comparisons like this.
|
| |
|
|
|
|
|
|
|
| |
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
|
| |
|
|
|
|
|
| |
It was only being used in two places, where it was replaced by a local
constant.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information
Got rid of the code duplication in File and Directory
Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.
FS_U: Use the correct error code when a file wasn't found
|
|
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.
|