diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp index 9541f2d4e..85e48bd0a 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp @@ -189,7 +189,7 @@ Result FsMitmService::OpenBisStorage(Out> out } else { /* Do not allow non-sysmodules to read *or* write CAL0. */ fsStorageClose(&bis_storage); - return 0x320002; + return ResultFsPermissionDenied; } } else { if (is_sysmodule || has_bis_write_flag) { diff --git a/stratosphere/ams_mitm/source/utils.cpp b/stratosphere/ams_mitm/source/utils.cpp index df507ae54..e6f9d6ab2 100644 --- a/stratosphere/ams_mitm/source/utils.cpp +++ b/stratosphere/ams_mitm/source/utils.cpp @@ -237,7 +237,7 @@ bool Utils::IsHidAvailable() { Result Utils::OpenSdFile(const char *fn, int flags, FsFile *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } return fsFsOpenFile(&g_sd_filesystem, fn, flags, out); @@ -245,7 +245,7 @@ Result Utils::OpenSdFile(const char *fn, int flags, FsFile *out) { Result Utils::OpenSdFileForAtmosphere(u64 title_id, const char *fn, int flags, FsFile *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } char path[FS_MAX_PATH]; @@ -259,7 +259,7 @@ Result Utils::OpenSdFileForAtmosphere(u64 title_id, const char *fn, int flags, F Result Utils::OpenRomFSSdFile(u64 title_id, const char *fn, int flags, FsFile *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } return OpenRomFSFile(&g_sd_filesystem, title_id, fn, flags, out); @@ -267,7 +267,7 @@ Result Utils::OpenRomFSSdFile(u64 title_id, const char *fn, int flags, FsFile *o Result Utils::OpenSdDir(const char *path, FsDir *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } return fsFsOpenDirectory(&g_sd_filesystem, path, FS_DIROPEN_DIRECTORY | FS_DIROPEN_FILE, out); @@ -275,7 +275,7 @@ Result Utils::OpenSdDir(const char *path, FsDir *out) { Result Utils::OpenSdDirForAtmosphere(u64 title_id, const char *path, FsDir *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } char safe_path[FS_MAX_PATH]; @@ -289,7 +289,7 @@ Result Utils::OpenSdDirForAtmosphere(u64 title_id, const char *path, FsDir *out) Result Utils::OpenRomFSSdDir(u64 title_id, const char *path, FsDir *out) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } return OpenRomFSDir(&g_sd_filesystem, title_id, path, out); @@ -340,7 +340,7 @@ bool Utils::HasSdRomfsContent(u64 title_id) { Result Utils::SaveSdFileForAtmosphere(u64 title_id, const char *fn, void *data, size_t size) { if (!IsSdInitialized()) { - return 0xFA202; + return ResultFsSdCardNotPresent; } Result rc = 0; diff --git a/stratosphere/dmnt/source/dmnt_service_target_io.cpp b/stratosphere/dmnt/source/dmnt_service_target_io.cpp index 0a3d71496..540e555a8 100644 --- a/stratosphere/dmnt/source/dmnt_service_target_io.cpp +++ b/stratosphere/dmnt/source/dmnt_service_target_io.cpp @@ -62,7 +62,7 @@ static Result GetFileByHandle(FsFile *out, u64 handle) { *out = g_file_handles[handle]; return 0; } - return 0x2EE202; + return ResultFsInvalidArgument; } static Result CloseFileByHandle(u64 handle) { @@ -72,7 +72,7 @@ static Result CloseFileByHandle(u64 handle) { g_file_handles.erase(handle); return 0; } - return 0x2EE202; + return ResultFsInvalidArgument; } static void FixPath(char *dst, size_t dst_size, InBuffer &path) { diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index a3ca9cf1a..033c77716 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit a3ca9cf1a352899b3a4289e210f094997cbacbaf +Subproject commit 033c77716cece22ad1ee0d606f75c4659ff4ed76 diff --git a/stratosphere/loader/source/ldr_content_management.cpp b/stratosphere/loader/source/ldr_content_management.cpp index 6087138d3..e4943a8c4 100644 --- a/stratosphere/loader/source/ldr_content_management.cpp +++ b/stratosphere/loader/source/ldr_content_management.cpp @@ -462,7 +462,7 @@ Result ContentManagement::SetExternalContentSource(u64 tid, FsFileSystem filesys char mountpoint[32]; ExternalContentSource::GenerateMountpointName(tid, mountpoint, sizeof(mountpoint)); if (fsdevMountDevice(mountpoint, filesystem) == -1) { - return 0x7802; /* specified mount name already exists */ + return ResultFsMountNameAlreadyExists; } g_external_content_sources.emplace( std::piecewise_construct,