diff options
| -rw-r--r-- | src/core/hle/service/acc/acc.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/web_browser.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/aoc/aoc_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/mii/mii.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nfp/nfp.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/ns/pl_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 2 |
15 files changed, 55 insertions, 58 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 0c0f7ed6e..7e3e311fb 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -84,7 +84,7 @@ protected: | |||
| 84 | LOG_ERROR(Service_ACC, "Failed to get profile base and data for user={}", | 84 | LOG_ERROR(Service_ACC, "Failed to get profile base and data for user={}", |
| 85 | user_id.Format()); | 85 | user_id.Format()); |
| 86 | IPC::ResponseBuilder rb{ctx, 2}; | 86 | IPC::ResponseBuilder rb{ctx, 2}; |
| 87 | rb.Push(ResultCode(-1)); // TODO(ogniK): Get actual error code | 87 | rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -98,7 +98,7 @@ protected: | |||
| 98 | } else { | 98 | } else { |
| 99 | LOG_ERROR(Service_ACC, "Failed to get profile base for user={}", user_id.Format()); | 99 | LOG_ERROR(Service_ACC, "Failed to get profile base for user={}", user_id.Format()); |
| 100 | IPC::ResponseBuilder rb{ctx, 2}; | 100 | IPC::ResponseBuilder rb{ctx, 2}; |
| 101 | rb.Push(ResultCode(-1)); // TODO(ogniK): Get actual error code | 101 | rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code |
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -442,7 +442,7 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex | |||
| 442 | const auto user_list = profile_manager->GetAllUsers(); | 442 | const auto user_list = profile_manager->GetAllUsers(); |
| 443 | if (std::all_of(user_list.begin(), user_list.end(), | 443 | if (std::all_of(user_list.begin(), user_list.end(), |
| 444 | [](const auto& user) { return user.uuid == Common::INVALID_UUID; })) { | 444 | [](const auto& user) { return user.uuid == Common::INVALID_UUID; })) { |
| 445 | rb.Push(ResultCode(-1)); // TODO(ogniK): Find the correct error code | 445 | rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Find the correct error code |
| 446 | rb.PushRaw<u128>(Common::INVALID_UUID); | 446 | rb.PushRaw<u128>(Common::INVALID_UUID); |
| 447 | return; | 447 | return; |
| 448 | } | 448 | } |
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 8f9986326..3e756e59e 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -31,8 +31,8 @@ struct ProfileDataRaw { | |||
| 31 | static_assert(sizeof(ProfileDataRaw) == 0x650, "ProfileDataRaw has incorrect size."); | 31 | static_assert(sizeof(ProfileDataRaw) == 0x650, "ProfileDataRaw has incorrect size."); |
| 32 | 32 | ||
| 33 | // TODO(ogniK): Get actual error codes | 33 | // TODO(ogniK): Get actual error codes |
| 34 | constexpr ResultCode ERROR_TOO_MANY_USERS(ErrorModule::Account, -1); | 34 | constexpr ResultCode ERROR_TOO_MANY_USERS(ErrorModule::Account, u32(-1)); |
| 35 | constexpr ResultCode ERROR_USER_ALREADY_EXISTS(ErrorModule::Account, -2); | 35 | constexpr ResultCode ERROR_USER_ALREADY_EXISTS(ErrorModule::Account, u32(-2)); |
| 36 | constexpr ResultCode ERROR_ARGUMENT_IS_NULL(ErrorModule::Account, 20); | 36 | constexpr ResultCode ERROR_ARGUMENT_IS_NULL(ErrorModule::Account, 20); |
| 37 | 37 | ||
| 38 | constexpr char ACC_SAVE_AVATORS_BASE_PATH[] = "/system/save/8000000000000010/su/avators/"; | 38 | constexpr char ACC_SAVE_AVATORS_BASE_PATH[] = "/system/save/8000000000000010/su/avators/"; |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index ba54b3040..74fe80e7c 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -991,7 +991,7 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) | |||
| 991 | LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", static_cast<u32>(applet_id)); | 991 | LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", static_cast<u32>(applet_id)); |
| 992 | 992 | ||
| 993 | IPC::ResponseBuilder rb{ctx, 2}; | 993 | IPC::ResponseBuilder rb{ctx, 2}; |
| 994 | rb.Push(ResultCode(-1)); | 994 | rb.Push(RESULT_UNKNOWN); |
| 995 | return; | 995 | return; |
| 996 | } | 996 | } |
| 997 | 997 | ||
| @@ -1027,7 +1027,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex | |||
| 1027 | if (transfer_mem == nullptr) { | 1027 | if (transfer_mem == nullptr) { |
| 1028 | LOG_ERROR(Service_AM, "shared_mem is a nullpr for handle={:08X}", handle); | 1028 | LOG_ERROR(Service_AM, "shared_mem is a nullpr for handle={:08X}", handle); |
| 1029 | IPC::ResponseBuilder rb{ctx, 2}; | 1029 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1030 | rb.Push(ResultCode(-1)); | 1030 | rb.Push(RESULT_UNKNOWN); |
| 1031 | return; | 1031 | return; |
| 1032 | } | 1032 | } |
| 1033 | 1033 | ||
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp index 32283e819..5546ef6e8 100644 --- a/src/core/hle/service/am/applets/web_browser.cpp +++ b/src/core/hle/service/am/applets/web_browser.cpp | |||
| @@ -337,7 +337,7 @@ void WebBrowser::ExecuteInternal() { | |||
| 337 | void WebBrowser::InitializeShop() { | 337 | void WebBrowser::InitializeShop() { |
| 338 | if (frontend_e_commerce == nullptr) { | 338 | if (frontend_e_commerce == nullptr) { |
| 339 | LOG_ERROR(Service_AM, "Missing ECommerce Applet frontend!"); | 339 | LOG_ERROR(Service_AM, "Missing ECommerce Applet frontend!"); |
| 340 | status = ResultCode(-1); | 340 | status = RESULT_UNKNOWN; |
| 341 | return; | 341 | return; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| @@ -353,7 +353,7 @@ void WebBrowser::InitializeShop() { | |||
| 353 | 353 | ||
| 354 | if (url == args.end()) { | 354 | if (url == args.end()) { |
| 355 | LOG_ERROR(Service_AM, "Missing EShop Arguments URL for initialization!"); | 355 | LOG_ERROR(Service_AM, "Missing EShop Arguments URL for initialization!"); |
| 356 | status = ResultCode(-1); | 356 | status = RESULT_UNKNOWN; |
| 357 | return; | 357 | return; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| @@ -366,7 +366,7 @@ void WebBrowser::InitializeShop() { | |||
| 366 | // Less is missing info, More is malformed | 366 | // Less is missing info, More is malformed |
| 367 | if (split_query.size() != 2) { | 367 | if (split_query.size() != 2) { |
| 368 | LOG_ERROR(Service_AM, "EShop Arguments has more than one question mark, malformed"); | 368 | LOG_ERROR(Service_AM, "EShop Arguments has more than one question mark, malformed"); |
| 369 | status = ResultCode(-1); | 369 | status = RESULT_UNKNOWN; |
| 370 | return; | 370 | return; |
| 371 | } | 371 | } |
| 372 | 372 | ||
| @@ -390,7 +390,7 @@ void WebBrowser::InitializeShop() { | |||
| 390 | 390 | ||
| 391 | if (scene == shop_query.end()) { | 391 | if (scene == shop_query.end()) { |
| 392 | LOG_ERROR(Service_AM, "No scene parameter was passed via shop query!"); | 392 | LOG_ERROR(Service_AM, "No scene parameter was passed via shop query!"); |
| 393 | status = ResultCode(-1); | 393 | status = RESULT_UNKNOWN; |
| 394 | return; | 394 | return; |
| 395 | } | 395 | } |
| 396 | 396 | ||
| @@ -406,7 +406,7 @@ void WebBrowser::InitializeShop() { | |||
| 406 | const auto target = target_map.find(scene->second); | 406 | const auto target = target_map.find(scene->second); |
| 407 | if (target == target_map.end()) { | 407 | if (target == target_map.end()) { |
| 408 | LOG_ERROR(Service_AM, "Scene for shop query is invalid! (scene={})", scene->second); | 408 | LOG_ERROR(Service_AM, "Scene for shop query is invalid! (scene={})", scene->second); |
| 409 | status = ResultCode(-1); | 409 | status = RESULT_UNKNOWN; |
| 410 | return; | 410 | return; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| @@ -427,7 +427,7 @@ void WebBrowser::InitializeOffline() { | |||
| 427 | if (args.find(WebArgTLVType::DocumentPath) == args.end() || | 427 | if (args.find(WebArgTLVType::DocumentPath) == args.end() || |
| 428 | args.find(WebArgTLVType::DocumentKind) == args.end() || | 428 | args.find(WebArgTLVType::DocumentKind) == args.end() || |
| 429 | args.find(WebArgTLVType::ApplicationID) == args.end()) { | 429 | args.find(WebArgTLVType::ApplicationID) == args.end()) { |
| 430 | status = ResultCode(-1); | 430 | status = RESULT_UNKNOWN; |
| 431 | LOG_ERROR(Service_AM, "Missing necessary parameters for initialization!"); | 431 | LOG_ERROR(Service_AM, "Missing necessary parameters for initialization!"); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| @@ -476,7 +476,7 @@ void WebBrowser::InitializeOffline() { | |||
| 476 | 476 | ||
| 477 | offline_romfs = GetApplicationRomFS(system, title_id, type); | 477 | offline_romfs = GetApplicationRomFS(system, title_id, type); |
| 478 | if (offline_romfs == nullptr) { | 478 | if (offline_romfs == nullptr) { |
| 479 | status = ResultCode(-1); | 479 | status = RESULT_UNKNOWN; |
| 480 | LOG_ERROR(Service_AM, "Failed to find offline data for request!"); | 480 | LOG_ERROR(Service_AM, "Failed to find offline data for request!"); |
| 481 | } | 481 | } |
| 482 | 482 | ||
| @@ -496,7 +496,7 @@ void WebBrowser::ExecuteShop() { | |||
| 496 | const auto check_optional_parameter = [this](const auto& p) { | 496 | const auto check_optional_parameter = [this](const auto& p) { |
| 497 | if (!p.has_value()) { | 497 | if (!p.has_value()) { |
| 498 | LOG_ERROR(Service_AM, "Missing one or more necessary parameters for execution!"); | 498 | LOG_ERROR(Service_AM, "Missing one or more necessary parameters for execution!"); |
| 499 | status = ResultCode(-1); | 499 | status = RESULT_UNKNOWN; |
| 500 | return false; | 500 | return false; |
| 501 | } | 501 | } |
| 502 | 502 | ||
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index f36ccbc49..30076a53e 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -131,7 +131,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { | |||
| 131 | if (out.size() < offset) { | 131 | if (out.size() < offset) { |
| 132 | IPC::ResponseBuilder rb{ctx, 2}; | 132 | IPC::ResponseBuilder rb{ctx, 2}; |
| 133 | // TODO(DarkLordZach): Find the correct error code. | 133 | // TODO(DarkLordZach): Find the correct error code. |
| 134 | rb.Push(ResultCode(-1)); | 134 | rb.Push(RESULT_UNKNOWN); |
| 135 | return; | 135 | return; |
| 136 | } | 136 | } |
| 137 | 137 | ||
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index cb4a1160d..cb839e4a2 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -80,7 +80,7 @@ private: | |||
| 80 | LOG_ERROR(Audio, "Failed to decode opus data"); | 80 | LOG_ERROR(Audio, "Failed to decode opus data"); |
| 81 | IPC::ResponseBuilder rb{ctx, 2}; | 81 | IPC::ResponseBuilder rb{ctx, 2}; |
| 82 | // TODO(ogniK): Use correct error code | 82 | // TODO(ogniK): Use correct error code |
| 83 | rb.Push(ResultCode(-1)); | 83 | rb.Push(RESULT_UNKNOWN); |
| 84 | return; | 84 | return; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| @@ -278,7 +278,7 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { | |||
| 278 | LOG_ERROR(Audio, "Failed to create Opus decoder (error={}).", error); | 278 | LOG_ERROR(Audio, "Failed to create Opus decoder (error={}).", error); |
| 279 | IPC::ResponseBuilder rb{ctx, 2}; | 279 | IPC::ResponseBuilder rb{ctx, 2}; |
| 280 | // TODO(ogniK): Use correct error code | 280 | // TODO(ogniK): Use correct error code |
| 281 | rb.Push(ResultCode(-1)); | 281 | rb.Push(RESULT_UNKNOWN); |
| 282 | return; | 282 | return; |
| 283 | } | 283 | } |
| 284 | 284 | ||
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 918159e11..e35e874fe 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp | |||
| @@ -114,7 +114,7 @@ void HandleDownloadDisplayResult(const AM::Applets::AppletManager& applet_manage | |||
| 114 | 114 | ||
| 115 | const auto& frontend{applet_manager.GetAppletFrontendSet()}; | 115 | const auto& frontend{applet_manager.GetAppletFrontendSet()}; |
| 116 | frontend.error->ShowCustomErrorText( | 116 | frontend.error->ShowCustomErrorText( |
| 117 | ResultCode(-1), "There was an error while attempting to use Boxcat.", | 117 | RESULT_UNKNOWN, "There was an error while attempting to use Boxcat.", |
| 118 | DOWNLOAD_RESULT_LOG_MESSAGES[static_cast<std::size_t>(res)], [] {}); | 118 | DOWNLOAD_RESULT_LOG_MESSAGES[static_cast<std::size_t>(res)], [] {}); |
| 119 | } | 119 | } |
| 120 | 120 | ||
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 11e5c56b7..102017d73 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp | |||
| @@ -58,11 +58,11 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64 | |||
| 58 | auto file = dir->CreateFile(FileUtil::GetFilename(path)); | 58 | auto file = dir->CreateFile(FileUtil::GetFilename(path)); |
| 59 | if (file == nullptr) { | 59 | if (file == nullptr) { |
| 60 | // TODO(DarkLordZach): Find a better error code for this | 60 | // TODO(DarkLordZach): Find a better error code for this |
| 61 | return ResultCode(-1); | 61 | return RESULT_UNKNOWN; |
| 62 | } | 62 | } |
| 63 | if (!file->Resize(size)) { | 63 | if (!file->Resize(size)) { |
| 64 | // TODO(DarkLordZach): Find a better error code for this | 64 | // TODO(DarkLordZach): Find a better error code for this |
| 65 | return ResultCode(-1); | 65 | return RESULT_UNKNOWN; |
| 66 | } | 66 | } |
| 67 | return RESULT_SUCCESS; | 67 | return RESULT_SUCCESS; |
| 68 | } | 68 | } |
| @@ -80,7 +80,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons | |||
| 80 | } | 80 | } |
| 81 | if (!dir->DeleteFile(FileUtil::GetFilename(path))) { | 81 | if (!dir->DeleteFile(FileUtil::GetFilename(path))) { |
| 82 | // TODO(DarkLordZach): Find a better error code for this | 82 | // TODO(DarkLordZach): Find a better error code for this |
| 83 | return ResultCode(-1); | 83 | return RESULT_UNKNOWN; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | return RESULT_SUCCESS; | 86 | return RESULT_SUCCESS; |
| @@ -94,7 +94,7 @@ ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) | |||
| 94 | auto new_dir = dir->CreateSubdirectory(FileUtil::GetFilename(path)); | 94 | auto new_dir = dir->CreateSubdirectory(FileUtil::GetFilename(path)); |
| 95 | if (new_dir == nullptr) { | 95 | if (new_dir == nullptr) { |
| 96 | // TODO(DarkLordZach): Find a better error code for this | 96 | // TODO(DarkLordZach): Find a better error code for this |
| 97 | return ResultCode(-1); | 97 | return RESULT_UNKNOWN; |
| 98 | } | 98 | } |
| 99 | return RESULT_SUCCESS; | 99 | return RESULT_SUCCESS; |
| 100 | } | 100 | } |
| @@ -104,7 +104,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_) | |||
| 104 | auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path)); | 104 | auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path)); |
| 105 | if (!dir->DeleteSubdirectory(FileUtil::GetFilename(path))) { | 105 | if (!dir->DeleteSubdirectory(FileUtil::GetFilename(path))) { |
| 106 | // TODO(DarkLordZach): Find a better error code for this | 106 | // TODO(DarkLordZach): Find a better error code for this |
| 107 | return ResultCode(-1); | 107 | return RESULT_UNKNOWN; |
| 108 | } | 108 | } |
| 109 | return RESULT_SUCCESS; | 109 | return RESULT_SUCCESS; |
| 110 | } | 110 | } |
| @@ -114,7 +114,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::str | |||
| 114 | auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path)); | 114 | auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path)); |
| 115 | if (!dir->DeleteSubdirectoryRecursive(FileUtil::GetFilename(path))) { | 115 | if (!dir->DeleteSubdirectoryRecursive(FileUtil::GetFilename(path))) { |
| 116 | // TODO(DarkLordZach): Find a better error code for this | 116 | // TODO(DarkLordZach): Find a better error code for this |
| 117 | return ResultCode(-1); | 117 | return RESULT_UNKNOWN; |
| 118 | } | 118 | } |
| 119 | return RESULT_SUCCESS; | 119 | return RESULT_SUCCESS; |
| 120 | } | 120 | } |
| @@ -125,7 +125,7 @@ ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::stri | |||
| 125 | 125 | ||
| 126 | if (!dir->CleanSubdirectoryRecursive(FileUtil::GetFilename(sanitized_path))) { | 126 | if (!dir->CleanSubdirectoryRecursive(FileUtil::GetFilename(sanitized_path))) { |
| 127 | // TODO(DarkLordZach): Find a better error code for this | 127 | // TODO(DarkLordZach): Find a better error code for this |
| 128 | return ResultCode(-1); | 128 | return RESULT_UNKNOWN; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | return RESULT_SUCCESS; | 131 | return RESULT_SUCCESS; |
| @@ -142,7 +142,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_, | |||
| 142 | return FileSys::ERROR_PATH_NOT_FOUND; | 142 | return FileSys::ERROR_PATH_NOT_FOUND; |
| 143 | if (!src->Rename(FileUtil::GetFilename(dest_path))) { | 143 | if (!src->Rename(FileUtil::GetFilename(dest_path))) { |
| 144 | // TODO(DarkLordZach): Find a better error code for this | 144 | // TODO(DarkLordZach): Find a better error code for this |
| 145 | return ResultCode(-1); | 145 | return RESULT_UNKNOWN; |
| 146 | } | 146 | } |
| 147 | return RESULT_SUCCESS; | 147 | return RESULT_SUCCESS; |
| 148 | } | 148 | } |
| @@ -160,7 +160,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_, | |||
| 160 | 160 | ||
| 161 | if (!src->GetContainingDirectory()->DeleteFile(FileUtil::GetFilename(src_path))) { | 161 | if (!src->GetContainingDirectory()->DeleteFile(FileUtil::GetFilename(src_path))) { |
| 162 | // TODO(DarkLordZach): Find a better error code for this | 162 | // TODO(DarkLordZach): Find a better error code for this |
| 163 | return ResultCode(-1); | 163 | return RESULT_UNKNOWN; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | return RESULT_SUCCESS; | 166 | return RESULT_SUCCESS; |
| @@ -177,7 +177,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa | |||
| 177 | return FileSys::ERROR_PATH_NOT_FOUND; | 177 | return FileSys::ERROR_PATH_NOT_FOUND; |
| 178 | if (!src->Rename(FileUtil::GetFilename(dest_path))) { | 178 | if (!src->Rename(FileUtil::GetFilename(dest_path))) { |
| 179 | // TODO(DarkLordZach): Find a better error code for this | 179 | // TODO(DarkLordZach): Find a better error code for this |
| 180 | return ResultCode(-1); | 180 | return RESULT_UNKNOWN; |
| 181 | } | 181 | } |
| 182 | return RESULT_SUCCESS; | 182 | return RESULT_SUCCESS; |
| 183 | } | 183 | } |
| @@ -189,7 +189,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa | |||
| 189 | src_path, dest_path); | 189 | src_path, dest_path); |
| 190 | 190 | ||
| 191 | // TODO(DarkLordZach): Find a better error code for this | 191 | // TODO(DarkLordZach): Find a better error code for this |
| 192 | return ResultCode(-1); | 192 | return RESULT_UNKNOWN; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_, | 195 | ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_, |
| @@ -287,7 +287,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess() | |||
| 287 | 287 | ||
| 288 | if (romfs_factory == nullptr) { | 288 | if (romfs_factory == nullptr) { |
| 289 | // TODO(bunnei): Find a better error code for this | 289 | // TODO(bunnei): Find a better error code for this |
| 290 | return ResultCode(-1); | 290 | return RESULT_UNKNOWN; |
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID()); | 293 | return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID()); |
| @@ -300,7 +300,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFS( | |||
| 300 | 300 | ||
| 301 | if (romfs_factory == nullptr) { | 301 | if (romfs_factory == nullptr) { |
| 302 | // TODO(bunnei): Find a better error code for this | 302 | // TODO(bunnei): Find a better error code for this |
| 303 | return ResultCode(-1); | 303 | return RESULT_UNKNOWN; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | return romfs_factory->Open(title_id, storage_id, type); | 306 | return romfs_factory->Open(title_id, storage_id, type); |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index cbd5466c1..92162d3e1 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -785,7 +785,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | |||
| 785 | static_cast<u8>(type), title_id); | 785 | static_cast<u8>(type), title_id); |
| 786 | 786 | ||
| 787 | IPC::ResponseBuilder rb{ctx, 2, 0, 0}; | 787 | IPC::ResponseBuilder rb{ctx, 2, 0, 0}; |
| 788 | rb.Push(ResultCode(-1)); | 788 | rb.Push(RESULT_UNKNOWN); |
| 789 | } | 789 | } |
| 790 | 790 | ||
| 791 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | 791 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { |
| @@ -891,7 +891,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 891 | // TODO (bunnei): Find the right error code to use here | 891 | // TODO (bunnei): Find the right error code to use here |
| 892 | LOG_CRITICAL(Service_FS, "no file system interface available!"); | 892 | LOG_CRITICAL(Service_FS, "no file system interface available!"); |
| 893 | IPC::ResponseBuilder rb{ctx, 2}; | 893 | IPC::ResponseBuilder rb{ctx, 2}; |
| 894 | rb.Push(ResultCode(-1)); | 894 | rb.Push(RESULT_UNKNOWN); |
| 895 | return; | 895 | return; |
| 896 | } | 896 | } |
| 897 | 897 | ||
| @@ -928,7 +928,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 928 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, | 928 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, |
| 929 | static_cast<u8>(storage_id)); | 929 | static_cast<u8>(storage_id)); |
| 930 | IPC::ResponseBuilder rb{ctx, 2}; | 930 | IPC::ResponseBuilder rb{ctx, 2}; |
| 931 | rb.Push(ResultCode(-1)); | 931 | rb.Push(RESULT_UNKNOWN); |
| 932 | return; | 932 | return; |
| 933 | } | 933 | } |
| 934 | 934 | ||
diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index 0b3923ad9..0ffc5009e 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp | |||
| @@ -242,7 +242,7 @@ private: | |||
| 242 | const auto index = db.IndexOf(uuid); | 242 | const auto index = db.IndexOf(uuid); |
| 243 | if (index > MAX_MIIS) { | 243 | if (index > MAX_MIIS) { |
| 244 | // TODO(DarkLordZach): Find a better error code | 244 | // TODO(DarkLordZach): Find a better error code |
| 245 | rb.Push(ResultCode(-1)); | 245 | rb.Push(RESULT_UNKNOWN); |
| 246 | rb.Push(index); | 246 | rb.Push(index); |
| 247 | } else { | 247 | } else { |
| 248 | rb.Push(RESULT_SUCCESS); | 248 | rb.Push(RESULT_SUCCESS); |
| @@ -268,7 +268,7 @@ private: | |||
| 268 | 268 | ||
| 269 | IPC::ResponseBuilder rb{ctx, 2}; | 269 | IPC::ResponseBuilder rb{ctx, 2}; |
| 270 | // TODO(DarkLordZach): Find a better error code | 270 | // TODO(DarkLordZach): Find a better error code |
| 271 | rb.Push(success ? RESULT_SUCCESS : ResultCode(-1)); | 271 | rb.Push(success ? RESULT_SUCCESS : RESULT_UNKNOWN); |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | void AddOrReplace(Kernel::HLERequestContext& ctx) { | 274 | void AddOrReplace(Kernel::HLERequestContext& ctx) { |
| @@ -282,7 +282,7 @@ private: | |||
| 282 | 282 | ||
| 283 | IPC::ResponseBuilder rb{ctx, 2}; | 283 | IPC::ResponseBuilder rb{ctx, 2}; |
| 284 | // TODO(DarkLordZach): Find a better error code | 284 | // TODO(DarkLordZach): Find a better error code |
| 285 | rb.Push(success ? RESULT_SUCCESS : ResultCode(-1)); | 285 | rb.Push(success ? RESULT_SUCCESS : RESULT_UNKNOWN); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | void Delete(Kernel::HLERequestContext& ctx) { | 288 | void Delete(Kernel::HLERequestContext& ctx) { |
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 795d7b716..3bf753dee 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp | |||
| @@ -16,10 +16,7 @@ | |||
| 16 | #include "core/hle/service/nfp/nfp_user.h" | 16 | #include "core/hle/service/nfp/nfp_user.h" |
| 17 | 17 | ||
| 18 | namespace Service::NFP { | 18 | namespace Service::NFP { |
| 19 | |||
| 20 | namespace ErrCodes { | 19 | namespace ErrCodes { |
| 21 | [[maybe_unused]] constexpr ResultCode ERR_TAG_FAILED(ErrorModule::NFP, | ||
| 22 | -1); // TODO(ogniK): Find the actual error code | ||
| 23 | constexpr ResultCode ERR_NO_APPLICATION_AREA(ErrorModule::NFP, 152); | 20 | constexpr ResultCode ERR_NO_APPLICATION_AREA(ErrorModule::NFP, 152); |
| 24 | } // namespace ErrCodes | 21 | } // namespace ErrCodes |
| 25 | 22 | ||
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 15c156ce1..eeba0aa19 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -271,7 +271,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC | |||
| 271 | "output buffer is too small! (actual={:016X}, expected_min=0x4000)", size); | 271 | "output buffer is too small! (actual={:016X}, expected_min=0x4000)", size); |
| 272 | IPC::ResponseBuilder rb{ctx, 2}; | 272 | IPC::ResponseBuilder rb{ctx, 2}; |
| 273 | // TODO(DarkLordZach): Find a better error code for this. | 273 | // TODO(DarkLordZach): Find a better error code for this. |
| 274 | rb.Push(ResultCode(-1)); | 274 | rb.Push(RESULT_UNKNOWN); |
| 275 | return; | 275 | return; |
| 276 | } | 276 | } |
| 277 | 277 | ||
| @@ -291,7 +291,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC | |||
| 291 | 0x4000 + control.second->GetSize()); | 291 | 0x4000 + control.second->GetSize()); |
| 292 | IPC::ResponseBuilder rb{ctx, 2}; | 292 | IPC::ResponseBuilder rb{ctx, 2}; |
| 293 | // TODO(DarkLordZach): Find a better error code for this. | 293 | // TODO(DarkLordZach): Find a better error code for this. |
| 294 | rb.Push(ResultCode(-1)); | 294 | rb.Push(RESULT_UNKNOWN); |
| 295 | return; | 295 | return; |
| 296 | } | 296 | } |
| 297 | 297 | ||
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index 23477315f..db433305f 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp | |||
| @@ -97,7 +97,7 @@ void EncryptSharedFont(const std::vector<u32>& input, std::vector<u8>& output, | |||
| 97 | const auto key = Common::swap32(EXPECTED_RESULT ^ EXPECTED_MAGIC); | 97 | const auto key = Common::swap32(EXPECTED_RESULT ^ EXPECTED_MAGIC); |
| 98 | std::vector<u32> transformed_font(input.size() + 2); | 98 | std::vector<u32> transformed_font(input.size() + 2); |
| 99 | transformed_font[0] = Common::swap32(EXPECTED_MAGIC); | 99 | transformed_font[0] = Common::swap32(EXPECTED_MAGIC); |
| 100 | transformed_font[1] = Common::swap32(input.size() * sizeof(u32)) ^ key; | 100 | transformed_font[1] = Common::swap32(static_cast<u32>(input.size() * sizeof(u32))) ^ key; |
| 101 | std::transform(input.begin(), input.end(), transformed_font.begin() + 2, | 101 | std::transform(input.begin(), input.end(), transformed_font.begin() + 2, |
| 102 | [key](u32 in) { return in ^ key; }); | 102 | [key](u32 in) { return in ^ key; }); |
| 103 | std::memcpy(output.data() + offset, transformed_font.data(), | 103 | std::memcpy(output.data() + offset, transformed_font.data(), |
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 1b9ab8401..62efe021e 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -34,12 +34,12 @@ static void PosixToCalendar(u64 posix_time, CalendarTime& calendar_time, | |||
| 34 | additional_info = {}; | 34 | additional_info = {}; |
| 35 | return; | 35 | return; |
| 36 | } | 36 | } |
| 37 | calendar_time.year = tm->tm_year + 1900; | 37 | calendar_time.year = static_cast<u16_le>(tm->tm_year + 1900); |
| 38 | calendar_time.month = tm->tm_mon + 1; | 38 | calendar_time.month = static_cast<u8>(tm->tm_mon + 1); |
| 39 | calendar_time.day = tm->tm_mday; | 39 | calendar_time.day = static_cast<u8>(tm->tm_mday); |
| 40 | calendar_time.hour = tm->tm_hour; | 40 | calendar_time.hour = static_cast<u8>(tm->tm_hour); |
| 41 | calendar_time.minute = tm->tm_min; | 41 | calendar_time.minute = static_cast<u8>(tm->tm_min); |
| 42 | calendar_time.second = tm->tm_sec; | 42 | calendar_time.second = static_cast<u8>(tm->tm_sec); |
| 43 | 43 | ||
| 44 | additional_info.day_of_week = tm->tm_wday; | 44 | additional_info.day_of_week = tm->tm_wday; |
| 45 | additional_info.day_of_year = tm->tm_yday; | 45 | additional_info.day_of_year = tm->tm_yday; |
| @@ -322,7 +322,7 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | |||
| 322 | if (tm == nullptr) { | 322 | if (tm == nullptr) { |
| 323 | LOG_ERROR(Service_Time, "tm is a nullptr"); | 323 | LOG_ERROR(Service_Time, "tm is a nullptr"); |
| 324 | IPC::ResponseBuilder rb{ctx, 2}; | 324 | IPC::ResponseBuilder rb{ctx, 2}; |
| 325 | rb.Push(ResultCode(-1)); // TODO(ogniK): Find appropriate error code | 325 | rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Find appropriate error code |
| 326 | return; | 326 | return; |
| 327 | } | 327 | } |
| 328 | 328 | ||
| @@ -331,12 +331,12 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | |||
| 331 | const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000), {}}; | 331 | const SteadyClockTimePoint steady_clock_time_point{static_cast<u64_le>(ms.count() / 1000), {}}; |
| 332 | 332 | ||
| 333 | CalendarTime calendar_time{}; | 333 | CalendarTime calendar_time{}; |
| 334 | calendar_time.year = tm->tm_year + 1900; | 334 | calendar_time.year = static_cast<u16_le>(tm->tm_year + 1900); |
| 335 | calendar_time.month = tm->tm_mon + 1; | 335 | calendar_time.month = static_cast<u8>(tm->tm_mon + 1); |
| 336 | calendar_time.day = tm->tm_mday; | 336 | calendar_time.day = static_cast<u8>(tm->tm_mday); |
| 337 | calendar_time.hour = tm->tm_hour; | 337 | calendar_time.hour = static_cast<u8>(tm->tm_hour); |
| 338 | calendar_time.minute = tm->tm_min; | 338 | calendar_time.minute = static_cast<u8>(tm->tm_min); |
| 339 | calendar_time.second = tm->tm_sec; | 339 | calendar_time.second = static_cast<u8>(tm->tm_sec); |
| 340 | 340 | ||
| 341 | ClockSnapshot clock_snapshot{}; | 341 | ClockSnapshot clock_snapshot{}; |
| 342 | clock_snapshot.system_posix_time = time_since_epoch; | 342 | clock_snapshot.system_posix_time = time_since_epoch; |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 611cecc20..abfc3a801 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -541,7 +541,7 @@ private: | |||
| 541 | } else { | 541 | } else { |
| 542 | // Wait the current thread until a buffer becomes available | 542 | // Wait the current thread until a buffer becomes available |
| 543 | ctx.SleepClientThread( | 543 | ctx.SleepClientThread( |
| 544 | "IHOSBinderDriver::DequeueBuffer", -1, | 544 | "IHOSBinderDriver::DequeueBuffer", UINT64_MAX, |
| 545 | [=](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, | 545 | [=](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, |
| 546 | Kernel::ThreadWakeupReason reason) { | 546 | Kernel::ThreadWakeupReason reason) { |
| 547 | // Repeat TransactParcel DequeueBuffer when a buffer is available | 547 | // Repeat TransactParcel DequeueBuffer when a buffer is available |