summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-16 00:08:41 -0500
committerGravatar Lioncash2018-11-16 00:13:50 -0500
commitedd5b6f12f4959588dbeb02d43180af3b3f7f226 (patch)
tree2aff3ba7d22d4ef410631cb92b59ec0a09fe9df9 /src/core/file_sys
parentfile_sys/errors: Extract FS-related error codes to file_sys/errors.h (diff)
downloadyuzu-edd5b6f12f4959588dbeb02d43180af3b3f7f226.tar.gz
yuzu-edd5b6f12f4959588dbeb02d43180af3b3f7f226.tar.xz
yuzu-edd5b6f12f4959588dbeb02d43180af3b3f7f226.zip
file_sys/errors: Get rid of the ErrCodes namespace
There's no real point to keeping the separate enum around, especially given the name of the error code itself is supposed to document what the value actually represents.
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/errors.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/core/file_sys/errors.h b/src/core/file_sys/errors.h
index 043fccf42..40e2b41b0 100644
--- a/src/core/file_sys/errors.h
+++ b/src/core/file_sys/errors.h
@@ -8,19 +8,6 @@
8 8
9namespace FileSys { 9namespace FileSys {
10 10
11namespace ErrCodes {
12enum {
13 NotFound = 1,
14 EntityNotFound = 1002,
15 SdCardNotFound = 2001,
16 RomFSNotFound = 2520,
17 InvalidOffset = 6061,
18 InvalidSize = 6062,
19};
20}
21
22constexpr ResultCode ERROR_PATH_NOT_FOUND(ErrorModule::FS, ErrCodes::NotFound);
23
24// TODO(bunnei): Replace these with correct errors for Switch OS 11// TODO(bunnei): Replace these with correct errors for Switch OS
25constexpr ResultCode ERROR_INVALID_PATH(-1); 12constexpr ResultCode ERROR_INVALID_PATH(-1);
26constexpr ResultCode ERROR_UNSUPPORTED_OPEN_FLAGS(-1); 13constexpr ResultCode ERROR_UNSUPPORTED_OPEN_FLAGS(-1);
@@ -31,9 +18,10 @@ constexpr ResultCode ERROR_DIRECTORY_ALREADY_EXISTS(-1);
31constexpr ResultCode ERROR_FILE_ALREADY_EXISTS(-1); 18constexpr ResultCode ERROR_FILE_ALREADY_EXISTS(-1);
32constexpr ResultCode ERROR_DIRECTORY_NOT_EMPTY(-1); 19constexpr ResultCode ERROR_DIRECTORY_NOT_EMPTY(-1);
33 20
34constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, ErrCodes::EntityNotFound}; 21constexpr ResultCode ERROR_PATH_NOT_FOUND{ErrorModule::FS, 1};
35constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, ErrCodes::SdCardNotFound}; 22constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, 1002};
36constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, ErrCodes::InvalidOffset}; 23constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, 2001};
37constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::FS, ErrCodes::InvalidSize}; 24constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, 6061};
25constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::FS, 6062};
38 26
39} // namespace FileSys 27} // namespace FileSys