strat: 0 -> ResultSuccess

This commit is contained in:
Michael Scire 2019-03-28 22:39:39 -07:00
parent 9427a5cf46
commit c6d67eab6a
51 changed files with 166 additions and 166 deletions

View file

@ -27,7 +27,7 @@ void BpcMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *ct
Result BpcMitmService::ShutdownSystem() {
/* Use exosphere + reboot to perform real shutdown, instead of fake shutdown. */
PerformShutdownSmc();
return 0;
return ResultSuccess;
}
Result BpcMitmService::RebootSystem() {

View file

@ -92,10 +92,10 @@ Result BpcRebootManager::PerformReboot() {
return ResultAtmosphereMitmShouldForwardToSession;
case BpcRebootType::ToRcm:
RebootToRcm();
return 0;
return ResultSuccess;
case BpcRebootType::ToPayload:
default:
DoRebootToPayload();
return 0;
return ResultSuccess;
}
}

View file

@ -61,7 +61,7 @@ Result FsDirUtils::CopyFile(IFileSystem *dst_fs, IFileSystem *src_fs, const FsPa
offset += read_size;
}
return 0;
return ResultSuccess;
}
Result FsDirUtils::CopyDirectoryRecursively(IFileSystem *dst_fs, IFileSystem *src_fs, const FsPath &dst_path, const FsPath &src_path, void *work_buf, size_t work_buf_size) {
@ -88,7 +88,7 @@ Result FsDirUtils::CopyDirectoryRecursively(IFileSystem *dst_fs, IFileSystem *sr
}
p[1] = 0;
return 0;
return ResultSuccess;
},
[&](const FsPath &path, const FsDirectoryEntry *dir_ent) -> Result { /* On File */
/* Just copy the file to the new fs. */

View file

@ -84,7 +84,7 @@ class FsDirUtils {
work_path.str[parent_len] = 0;
}
return 0;
return ResultSuccess;
}
public:
@ -137,7 +137,7 @@ class FsDirUtils {
template<typename F>
static Result RetryUntilTargetNotLocked(F f) {
const size_t MaxRetries = 10;
Result rc = 0;
Result rc = ResultSuccess;
for (size_t i = 0; i < MaxRetries; i++) {
rc = f();

View file

@ -129,7 +129,7 @@ Result DirectorySaveDataFileSystem::AllocateWorkBuffer(void **out_buf, size_t *o
if (buf != nullptr) {
*out_buf = buf;
*out_size = try_size;
return 0;
return ResultSuccess;
}
/* Divide size by two. */
@ -303,7 +303,7 @@ Result DirectorySaveDataFileSystem::OpenFileImpl(std::unique_ptr<IFile> &out_fil
this->open_writable_files++;
}
return 0;
return ResultSuccess;
}
Result DirectorySaveDataFileSystem::OpenDirectoryImpl(std::unique_ptr<IDirectory> &out_dir, const FsPath &path, DirectoryOpenMode mode) {

View file

@ -33,7 +33,7 @@ class IDirectory {
}
if (max_entries == 0) {
*out_count = 0;
return 0;
return ResultSuccess;
}
if (out_entries == nullptr) {
return ResultFsNullptrArgument;

View file

@ -40,7 +40,7 @@ class IFile {
}
if (size == 0) {
*out = 0;
return 0;
return ResultSuccess;
}
if (buffer == nullptr) {
return ResultFsNullptrArgument;
@ -65,7 +65,7 @@ class IFile {
Result Write(uint64_t offset, void *buffer, uint64_t size, uint32_t flags) {
if (size == 0) {
return 0;
return ResultSuccess;
}
if (buffer == nullptr) {
return ResultFsNullptrArgument;
@ -76,7 +76,7 @@ class IFile {
Result Write(uint64_t offset, void *buffer, uint64_t size, bool flush = false) {
if (size == 0) {
return 0;
return ResultSuccess;
}
if (buffer == nullptr) {
return ResultFsNullptrArgument;

View file

@ -102,7 +102,7 @@ class IROStorage : public IStorage {
return ResultFsUnsupportedOperation;
};
virtual Result Flush() final {
return 0x0;
return ResultSuccess;
};
virtual Result SetSize(u64 size) final {
(void)(size);

View file

@ -28,7 +28,7 @@ Result FsPathUtils::VerifyPath(const char *path, size_t max_path_len, size_t max
const char c = *(cur++);
/* If terminated, we're done. */
if (c == 0) {
return 0;
return ResultSuccess;
}
/* TODO: Nintendo converts the path from utf-8 to utf-32, one character at a time. */
@ -110,7 +110,7 @@ Result FsPathUtils::IsNormalized(bool *out, const char *path) {
/* It is unclear why first separator and separator are separate states... */
if (c == '/') {
*out = false;
return 0;
return ResultSuccess;
} else if (c == '.') {
state = PathState::CurrentDir;
} else {
@ -120,7 +120,7 @@ Result FsPathUtils::IsNormalized(bool *out, const char *path) {
case PathState::CurrentDir:
if (c == '/') {
*out = false;
return 0;
return ResultSuccess;
} else if (c == '.') {
state = PathState::ParentDir;
} else {
@ -130,7 +130,7 @@ Result FsPathUtils::IsNormalized(bool *out, const char *path) {
case PathState::ParentDir:
if (c == '/') {
*out = false;
return 0;
return ResultSuccess;
} else {
state = PathState::Normal;
}
@ -138,7 +138,7 @@ Result FsPathUtils::IsNormalized(bool *out, const char *path) {
case PathState::WindowsDriveLetter:
if (c == ':') {
*out = true;
return 0;
return ResultSuccess;
} else {
return ResultFsInvalidPathFormat;
}
@ -161,7 +161,7 @@ Result FsPathUtils::IsNormalized(bool *out, const char *path) {
break;
}
return 0;
return ResultSuccess;
}
Result FsPathUtils::Normalize(char *out, size_t max_out_size, const char *src, size_t *out_len) {
@ -264,5 +264,5 @@ Result FsPathUtils::Normalize(char *out, size_t max_out_size, const char *src, s
std::abort();
}
return 0;
return ResultSuccess;
}

View file

@ -55,7 +55,7 @@ Result SubDirectoryFileSystem::Initialize(const char *bp) {
std::strncpy(this->base_path, normal_path, this->base_path_len);
this->base_path[this->base_path_len-1] = 0;
return 0;
return ResultSuccess;
}
Result SubDirectoryFileSystem::GetFullPath(char *out, size_t out_size, const char *relative_path) {

View file

@ -36,7 +36,7 @@ Result Boot0Storage::Read(void *_buffer, size_t size, u64 offset) {
Result Boot0Storage::Write(void *_buffer, size_t size, u64 offset) {
std::scoped_lock<HosMutex> lk{g_boot0_mutex};
Result rc = 0;
Result rc = ResultSuccess;
u8 *buffer = static_cast<u8 *>(_buffer);
/* Protect the keyblob region from writes. */
@ -61,7 +61,7 @@ Result Boot0Storage::Write(void *_buffer, size_t size, u64 offset) {
if (offset < EksEnd) {
if (offset + size < EksEnd) {
/* Ignore writes falling strictly within the region. */
return 0;
return ResultSuccess;
} else {
/* Only write past the end of the keyblob region. */
buffer = buffer + (EksEnd - offset);
@ -74,7 +74,7 @@ Result Boot0Storage::Write(void *_buffer, size_t size, u64 offset) {
}
if (size == 0) {
return 0;
return ResultSuccess;
}
/* We care about protecting autorcm from NS. */

View file

@ -39,7 +39,7 @@ class SectoredProxyStorage : public ProxyStorage {
SectoredProxyStorage(FsStorage s) : ProxyStorage(s) { }
public:
virtual Result Read(void *_buffer, size_t size, u64 offset) override {
Result rc = 0;
Result rc = ResultSuccess;
u8 *buffer = static_cast<u8 *>(_buffer);
this->Seek(offset);
@ -82,7 +82,7 @@ class SectoredProxyStorage : public ProxyStorage {
return rc;
};
virtual Result Write(void *_buffer, size_t size, u64 offset) override {
Result rc = 0;
Result rc = ResultSuccess;
u8 *buffer = static_cast<u8 *>(_buffer);
this->Seek(offset);

View file

@ -48,7 +48,7 @@ LayeredRomFS::LayeredRomFS(std::shared_ptr<RomInterfaceStorage> s_r, std::shared
Result LayeredRomFS::Read(void *buffer, size_t size, u64 offset) {
/* Size zero reads should always succeed. */
if (size == 0) {
return 0;
return ResultSuccess;
}
/* Validate size. */
@ -158,16 +158,16 @@ Result LayeredRomFS::Read(void *buffer, size_t size, u64 offset) {
}
}
return 0;
return ResultSuccess;
}
Result LayeredRomFS::GetSize(u64 *out_size) {
*out_size = (*this->p_source_infos)[this->p_source_infos->size() - 1].virtual_offset + (*this->p_source_infos)[this->p_source_infos->size() - 1].size;
return 0x0;
return ResultSuccess;
}
Result LayeredRomFS::OperateRange(u32 operation_type, u64 offset, u64 size, FsRangeInfo *out_range_info) {
/* TODO: How should I implement this for a virtual romfs? */
if (operation_type == 3) {
*out_range_info = {0};
}
return 0;
return ResultSuccess;
}

View file

@ -86,7 +86,7 @@ void FsMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx
Result FsMitmService::OpenHblWebContentFileSystem(Out<std::shared_ptr<IFileSystemInterface>> &out_fs) {
std::shared_ptr<IFileSystemInterface> fs = nullptr;
u32 out_domain_id = 0;
Result rc = 0;
Result rc = ResultSuccess;
ON_SCOPE_EXIT {
if (R_SUCCEEDED(rc)) {
@ -162,7 +162,7 @@ Result FsMitmService::OpenFileSystemWithId(Out<std::shared_ptr<IFileSystemInterf
Result FsMitmService::OpenBisStorage(Out<std::shared_ptr<IStorageInterface>> out_storage, u32 bis_partition_id) {
std::shared_ptr<IStorageInterface> storage = nullptr;
u32 out_domain_id = 0;
Result rc = 0;
Result rc = ResultSuccess;
ON_SCOPE_EXIT {
if (R_SUCCEEDED(rc)) {
@ -219,7 +219,7 @@ Result FsMitmService::OpenBisStorage(Out<std::shared_ptr<IStorageInterface>> out
Result FsMitmService::OpenDataStorageByCurrentProcess(Out<std::shared_ptr<IStorageInterface>> out_storage) {
std::shared_ptr<IStorageInterface> storage = nullptr;
u32 out_domain_id = 0;
Result rc = 0;
Result rc = ResultSuccess;
if (!this->should_override_contents) {
return ResultAtmosphereMitmShouldForwardToSession;
@ -249,7 +249,7 @@ Result FsMitmService::OpenDataStorageByCurrentProcess(Out<std::shared_ptr<IStora
out_domain_id = s.s.object_id;
}
} else {
rc = 0;
rc = ResultSuccess;
}
if (R_FAILED(rc)) {
storage.reset();
@ -295,7 +295,7 @@ Result FsMitmService::OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterf
std::shared_ptr<IStorageInterface> storage = nullptr;
u32 out_domain_id = 0;
Result rc = 0;
Result rc = ResultSuccess;
bool has_cache = StorageCacheGetEntry(data_id, &storage);
@ -320,7 +320,7 @@ Result FsMitmService::OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterf
out_domain_id = s.s.object_id;
}
} else {
rc = 0;
rc = ResultSuccess;
}
if (R_FAILED(rc)) {
storage.reset();

View file

@ -26,7 +26,7 @@ void NsWebMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *
Result NsWebMitmService::GetDocumentInterface(Out<std::shared_ptr<NsDocumentService>> out_intf) {
std::shared_ptr<NsDocumentService> intf = nullptr;
u32 out_domain_id = 0;
Result rc = 0;
Result rc = ResultSuccess;
ON_SCOPE_EXIT {
if (R_SUCCEEDED(rc)) {

View file

@ -81,5 +81,5 @@ Result VersionManager::GetFirmwareVersion(u64 title_id, SetSysFirmwareVersion *o
*out = g_fw_version;
}
return 0;
return ResultSuccess;
}

View file

@ -87,7 +87,7 @@ Result SettingsItemManager::ValidateName(const char *name, size_t max_size) {
return 0x20A69;
}
return 0x0;
return ResultSuccess;
}
Result SettingsItemManager::ValidateName(const char *name) {
@ -110,7 +110,7 @@ Result SettingsItemManager::ValidateKey(const char *key, size_t max_size) {
return 0x20C69;
}
return 0x0;
return ResultSuccess;
}
Result SettingsItemManager::ValidateKey(const char *key) {
@ -222,7 +222,7 @@ static Result ParseValue(const char *name, const char *key, const char *val_tup)
}
g_settings_items[kv] = value;
return 0x0;
return ResultSuccess;
}
static int SettingsItemIniHandler(void *user, const char *name, const char *key, const char *value) {
@ -287,7 +287,7 @@ Result SettingsItemManager::GetValueSize(const char *name, const char *key, u64
}
*out_size = it->second.size;
return 0x0;
return ResultSuccess;
}
Result SettingsItemManager::GetValue(const char *name, const char *key, void *out, size_t max_size, u64 *out_size) {
@ -305,5 +305,5 @@ Result SettingsItemManager::GetValue(const char *name, const char *key, void *ou
*out_size = copy_size;
memcpy(out, it->second.data, copy_size);
return 0x0;
return ResultSuccess;
}

View file

@ -343,7 +343,7 @@ Result Utils::SaveSdFileForAtmosphere(u64 title_id, const char *fn, void *data,
return ResultFsSdCardNotPresent;
}
Result rc = 0;
Result rc = ResultSuccess;
char path[FS_MAX_PATH];
if (*fn == '/') {
@ -458,7 +458,7 @@ Result Utils::GetKeysHeld(u64 *keys) {
hidScanInput();
*keys = hidKeysHeld(CONTROLLER_P1_AUTO);
return 0x0;
return ResultSuccess;
}
static bool HasOverrideKey(OverrideKey *cfg) {

View file

@ -1934,7 +1934,7 @@ static int pmc_init_wake_events(u64 pmc_base_vaddr, bool is_blink) {
pmc_dpd_pads_oride_val = *((u32 *)pmc_base_vaddr + 0x1C);
}
rc = 0;
rc = ResultSuccess;
return rc;
}
@ -2217,7 +2217,7 @@ static int pmc_set_wake_event_level(u64 pmc_base_vaddr, unsigned int wake_pin_id
/* Invalid */
}
rc = 0;
rc = ResultSuccess;
return rc;
}
@ -2279,7 +2279,7 @@ static int pmc_set_wake_event_enabled(u64 pmc_base_vaddr, unsigned int wake_pin_
pmc_wake_mask_val = *((u32 *)pmc_base_vaddr + pmc_wake_mask_reg_offset);
}
rc = 0;
rc = ResultSuccess;
return rc;
}
@ -2535,6 +2535,6 @@ int main(int argc, char **argv)
/* pmshellNotifyBootFinished(); */
rc = 0;
rc = ResultSuccess;
return rc;
}

View file

@ -190,7 +190,7 @@ Result DmntCheatManager::GetCheatProcessMappingCount(u64 *out_count) {
address = mem_info.addr + mem_info.size;
} while (address != 0);
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetCheatProcessMappings(MemoryInfo *mappings, size_t max_count, u64 *out_count, u64 offset) {
@ -221,7 +221,7 @@ Result DmntCheatManager::GetCheatProcessMappings(MemoryInfo *mappings, size_t ma
address = mem_info.addr + mem_info.size;
} while (address != 0 && *out_count < max_count);
return 0;
return ResultSuccess;
}
Result DmntCheatManager::ReadCheatProcessMemory(u64 proc_addr, void *out_data, size_t size) {
@ -601,7 +601,7 @@ Result DmntCheatManager::GetCheatCount(u64 *out_count) {
}
}
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetCheats(CheatEntry *cheats, size_t max_count, u64 *out_count, u64 offset) {
@ -622,7 +622,7 @@ Result DmntCheatManager::GetCheats(CheatEntry *cheats, size_t max_count, u64 *ou
}
}
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetCheatById(CheatEntry *out_cheat, u32 cheat_id) {
@ -638,7 +638,7 @@ Result DmntCheatManager::GetCheatById(CheatEntry *out_cheat, u32 cheat_id) {
}
*out_cheat = *entry;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::ToggleCheat(u32 cheat_id) {
@ -661,7 +661,7 @@ Result DmntCheatManager::ToggleCheat(u32 cheat_id) {
/* Trigger a VM reload. */
g_needs_reload_vm_program = true;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::AddCheat(u32 *out_id, CheatDefinition *def, bool enabled) {
@ -685,7 +685,7 @@ Result DmntCheatManager::AddCheat(u32 *out_id, CheatDefinition *def, bool enable
/* Trigger a VM reload. */
g_needs_reload_vm_program = true;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::RemoveCheat(u32 cheat_id) {
@ -703,7 +703,7 @@ Result DmntCheatManager::RemoveCheat(u32 cheat_id) {
/* Trigger a VM reload. */
g_needs_reload_vm_program = true;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetFrozenAddressCount(u64 *out_count) {
@ -714,7 +714,7 @@ Result DmntCheatManager::GetFrozenAddressCount(u64 *out_count) {
}
*out_count = g_frozen_addresses_map.size();
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetFrozenAddresses(FrozenAddressEntry *frz_addrs, size_t max_count, u64 *out_count, u64 offset) {
@ -739,7 +739,7 @@ Result DmntCheatManager::GetFrozenAddresses(FrozenAddressEntry *frz_addrs, size_
}
}
return 0;
return ResultSuccess;
}
Result DmntCheatManager::GetFrozenAddress(FrozenAddressEntry *frz_addr, u64 address) {
@ -756,7 +756,7 @@ Result DmntCheatManager::GetFrozenAddress(FrozenAddressEntry *frz_addr, u64 add
frz_addr->address = it->first;
frz_addr->value = it->second;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::EnableFrozenAddress(u64 *out_value, u64 address, u64 width) {
@ -784,7 +784,7 @@ Result DmntCheatManager::EnableFrozenAddress(u64 *out_value, u64 address, u64 wi
g_frozen_addresses_map[address] = value;
*out_value = value.value;
return 0;
return ResultSuccess;
}
Result DmntCheatManager::DisableFrozenAddress(u64 address) {
@ -800,7 +800,7 @@ Result DmntCheatManager::DisableFrozenAddress(u64 address) {
}
g_frozen_addresses_map.erase(address);
return 0;
return ResultSuccess;
}
Handle DmntCheatManager::PrepareDebugNextApplication() {
@ -842,7 +842,7 @@ Result DmntCheatManager::ForceOpenCheatProcess() {
std::scoped_lock<HosMutex> lk(g_cheat_lock);
if (HasActiveCheatProcess()) {
return 0;
return ResultSuccess;
}
/* Close the current application, if it's open. */
@ -1031,7 +1031,7 @@ void DmntCheatManager::DetectThread(void *arg) {
/* Setup detection for the next application, and close the duplicate handle. */
svcCloseHandle(PrepareDebugNextApplication());
return 0x0;
return ResultSuccess;
}, true));
waiter->Process();
@ -1099,7 +1099,7 @@ Result DmntCheatManager::GetCheatProcessMetadata(CheatProcessMetadata *out) {
if (HasActiveCheatProcess()) {
*out = g_cheat_process_metadata;
return 0;
return ResultSuccess;
}
return ResultDmntCheatNotAttached;

View file

@ -28,5 +28,5 @@ Result HidManagement::GetKeysDown(u64 *keys) {
hidScanInput();
*keys = hidKeysHeld(CONTROLLER_P1_AUTO);
return 0x0;
return ResultSuccess;
}

View file

@ -38,7 +38,7 @@ static std::unordered_map<u64, FsFile> g_file_handles;
static Result EnsureSdInitialized() {
std::scoped_lock<HosMutex> lk(g_sd_lock);
if (g_sd_initialized) {
return 0;
return ResultSuccess;
}
Result rc = fsMountSdcard(&g_sd_fs);
@ -60,7 +60,7 @@ static Result GetFileByHandle(FsFile *out, u64 handle) {
std::scoped_lock<HosMutex> lk(g_file_handle_lock);
if (g_file_handles.find(handle) != g_file_handles.end()) {
*out = g_file_handles[handle];
return 0;
return ResultSuccess;
}
return ResultFsInvalidArgument;
}
@ -70,7 +70,7 @@ static Result CloseFileByHandle(u64 handle) {
if (g_file_handles.find(handle) != g_file_handles.end()) {
fsFileClose(&g_file_handles[handle]);
g_file_handles.erase(handle);
return 0;
return ResultSuccess;
}
return ResultFsInvalidArgument;
}
@ -199,8 +199,8 @@ Result DebugMonitorService::TargetIO_FileWrite(InBuffer<u64> hnd, InBuffer<u8, B
Result DebugMonitorService::TargetIO_FileSetAttributes(InBuffer<char> path, InBuffer<u8> attributes) {
/* I don't really know why this command exists, Horizon doesn't allow you to set any attributes. */
/* N just returns 0x0 unconditionally here. */
return 0x0;
/* N just returns ResultSuccess unconditionally here. */
return ResultSuccess;
}
Result DebugMonitorService::TargetIO_FileGetInformation(InBuffer<char> path, OutBuffer<u64> out_info, Out<int> is_directory) {
@ -245,7 +245,7 @@ Result DebugMonitorService::TargetIO_FileGetInformation(InBuffer<char> path, Out
Result DebugMonitorService::TargetIO_FileSetTime(InBuffer<char> path, u64 create, u64 access, u64 modify) {
/* This is another function that doesn't really need to exist, because Horizon doesn't let you set anything. */
return 0x0;
return ResultSuccess;
}
Result DebugMonitorService::TargetIO_FileSetSize(InBuffer<char> input, u64 size) {

View file

@ -41,7 +41,7 @@ IEvent *GetFatalSettingsEvent() {
if (R_SUCCEEDED(setsysGetFatalDirtyFlags(&flags_0, &flags_1)) && (flags_0 & 1)) {
UpdateLanguageCode();
}
return 0;
return ResultSuccess;
}, true);
}

View file

@ -42,7 +42,7 @@ Result FatalEventManager::GetEvent(Handle *out) {
}
*out = this->events[this->events_gotten++].revent;
return 0;
return ResultSuccess;
}
void FatalEventManager::SignalEvents() {

View file

@ -23,7 +23,7 @@ Result AdjustClockTask::AdjustClock() {
constexpr u32 CPU_CLOCK_1020MHZ = 0x3CCBF700L;
constexpr u32 GPU_CLOCK_307MHZ = 0x124F8000L;
constexpr u32 EMC_CLOCK_1331MHZ = 0x4F588000L;
Result rc = 0;
Result rc = ResultSuccess;
if (R_FAILED((rc = pcvSetClockRate(PcvModule_Cpu, CPU_CLOCK_1020MHZ)))) {
return rc;

View file

@ -136,5 +136,5 @@ Result ErrorReportTask::Run() {
eventFire(this->erpt_event);
return 0;
return ResultSuccess;
}

View file

@ -120,7 +120,7 @@ void PowerButtonObserveTask::WaitForPowerButton() {
BpcSleepButtonState state;
GpioValue val;
while (true) {
Result rc = 0;
Result rc = ResultSuccess;
if (check_vol_up && R_SUCCEEDED((rc = gpioPadGetValue(&vol_up_btn, &val))) && val == GpioValue_Low) {
bpcRebootSystem();
@ -142,16 +142,16 @@ void PowerButtonObserveTask::WaitForPowerButton() {
Result PowerControlTask::Run() {
MonitorBatteryState();
return 0;
return ResultSuccess;
}
Result PowerButtonObserveTask::Run() {
WaitForPowerButton();
return 0;
return ResultSuccess;
}
Result StateTransitionStopTask::Run() {
/* Nintendo ignores the output of this call... */
spsmPutErrorState();
return 0;
return ResultSuccess;
}

View file

@ -48,7 +48,7 @@ Result ShowFatalTask::SetupDisplayInternal() {
/* Try to open the display. */
if (R_FAILED((rc = viOpenDisplay("Internal", &display)))) {
if (rc == ResultViNotFound) {
return 0;
return ResultSuccess;
} else {
return rc;
}
@ -75,7 +75,7 @@ Result ShowFatalTask::SetupDisplayExternal() {
/* Try to open the display. */
if (R_FAILED((rc = viOpenDisplay("External", &display)))) {
if (rc == ResultViNotFound) {
return 0;
return ResultSuccess;
} else {
return rc;
}
@ -92,7 +92,7 @@ Result ShowFatalTask::SetupDisplayExternal() {
}
Result ShowFatalTask::PrepareScreenForDrawing() {
Result rc = 0;
Result rc = ResultSuccess;
/* Connect to vi. */
if (R_FAILED((rc = viInitialize(ViServiceType_Manager)))) {
@ -175,7 +175,7 @@ Result ShowFatalTask::PrepareScreenForDrawing() {
}
Result ShowFatalTask::ShowFatal() {
Result rc = 0;
Result rc = ResultSuccess;
const FatalConfig *config = GetFatalConfig();
if (R_FAILED((rc = PrepareScreenForDrawing()))) {
@ -420,5 +420,5 @@ void BacklightControlTask::TurnOnBacklight() {
Result BacklightControlTask::Run() {
TurnOnBacklight();
return 0;
return ResultSuccess;
}

View file

@ -69,5 +69,5 @@ void StopSoundTask::StopSound() {
Result StopSoundTask::Run() {
StopSound();
return 0;
return ResultSuccess;
}

View file

@ -30,7 +30,7 @@ static Result SetThrown() {
}
g_thrown = true;
return 0;
return ResultSuccess;
}
Result ThrowFatalForSelf(u32 error) {
@ -41,7 +41,7 @@ Result ThrowFatalForSelf(u32 error) {
}
Result ThrowFatalImpl(u32 error, u64 pid, FatalType policy, FatalCpuContext *cpu_ctx) {
Result rc = 0;
Result rc = ResultSuccess;
FatalThrowContext ctx = {0};
ctx.error_code = error;
if (cpu_ctx != nullptr) {
@ -102,7 +102,7 @@ Result ThrowFatalImpl(u32 error, u64 pid, FatalType policy, FatalCpuContext *cpu
RunFatalTasks(&ctx, title_id, policy == FatalType_ErrorReportAndErrorScreen, &erpt_event, &battery_event);
} else {
/* If flag is not set, don't show the fatal screen. */
return 0;
return ResultSuccess;
}
}
@ -112,5 +112,5 @@ Result ThrowFatalImpl(u32 error, u64 pid, FatalType policy, FatalCpuContext *cpu
std::abort();
}
return 0;
return ResultSuccess;
}

@ -1 +1 @@
Subproject commit 5fcc1469c7c514ed4b2e40a4f8128a19b26df9ae
Subproject commit 1034e0744afcdaecaeb4ab6cb05c6011c75bfb3e

View file

@ -79,7 +79,7 @@ Result ContentManagement::MountCode(u64 tid, FsStorageId sid) {
}
if (ShouldOverrideContentsWithSD(tid) && R_SUCCEEDED(MountCodeNspOnSd(tid))) {
return 0x0;
return ResultSuccess;
}
if (R_FAILED(rc = ResolveContentPath(path, tid, sid))) {
@ -116,7 +116,7 @@ Result ContentManagement::UnmountCode() {
g_mounted_hbl_nsp = false;
}
fsdevUnmountDevice("code");
return 0;
return ResultSuccess;
}
@ -469,7 +469,7 @@ Result ContentManagement::SetExternalContentSource(u64 tid, FsFileSystem filesys
std::make_tuple(tid),
std::make_tuple(tid, mountpoint));
return 0;
return ResultSuccess;
}
void ContentManagement::ClearExternalContentSource(u64 tid) {

View file

@ -32,5 +32,5 @@ Result HidManagement::GetKeysHeld(u64 *keys) {
hidScanInput();
*keys = hidKeysHeld(CONTROLLER_P1_AUTO);
return 0x0;
return ResultSuccess;
}

View file

@ -38,13 +38,13 @@ Result LaunchQueue::Add(u64 tid, const char *args, u64 arg_size) {
g_launch_queue[idx].arg_size = arg_size;
std::copy(args, args + arg_size, g_launch_queue[idx].args);
return 0x0;
return ResultSuccess;
}
Result LaunchQueue::AddCopy(u64 tid_base, u64 tid) {
int idx = GetIndex(tid_base);
if (idx == LAUNCH_QUEUE_FULL) {
return 0x0;
return ResultSuccess;
}
return Add(tid, g_launch_queue[idx].args, g_launch_queue[idx].arg_size);
@ -62,7 +62,7 @@ Result LaunchQueue::AddItem(const LaunchItem *item) {
}
g_launch_queue[idx] = *item;
return 0x0;
return ResultSuccess;
}
int LaunchQueue::GetIndex(u64 tid) {

View file

@ -75,7 +75,7 @@ Result MapUtils::LocateSpaceForMapModern(u64 *out, u64 out_size) {
}
if (mem_info.type == 0 && mem_info.addr - cur_base + mem_info.size >= out_size) {
*out = cur_base;
return 0x0;
return ResultSuccess;
}
if (mem_info.addr + mem_info.size <= cur_base) {
return rc;
@ -110,7 +110,7 @@ Result MapUtils::LocateSpaceForMapDeprecated(u64 *out, u64 out_size) {
}
if (mem_info.type == 0 && mem_info.addr - cur_base + mem_info.size >= out_size) {
*out = cur_base;
return 0x0;
return ResultSuccess;
}
u64 mem_end = mem_info.addr + mem_info.size;
if (mem_end < cur_base) {
@ -214,5 +214,5 @@ Result MapUtils::GetAddressSpaceInfo(AddressSpaceInfo *out, Handle process_h) {
out->heap_end = out->heap_base + out->heap_size;
out->map_end = out->map_base + out->map_size;
out->addspace_end = out->addspace_base + out->addspace_size;
return 0;
return ResultSuccess;
}

View file

@ -72,7 +72,7 @@ class AutoCloseMap {
this->process_handle = process_h;
this->base_address = address;
this->size = size;
return 0;
return ResultSuccess;
}
void Close() {
@ -153,7 +153,7 @@ struct MappedCodeMemory {
}
Result Unmap() {
Result rc = 0;
Result rc = ResultSuccess;
if (this->IsMapped()) {
if (R_FAILED((rc = svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->code_memory_address, this->size)))) {
/* TODO: panic(). */

View file

@ -30,7 +30,7 @@ Result NpdmUtils::LoadNpdmFromCache(u64 tid, NpdmInfo *out) {
return LoadNpdm(tid, out);
}
*out = g_npdm_cache.info;
return 0;
return ResultSuccess;
}
FILE *NpdmUtils::OpenNpdmFromECS(ContentManagement::ExternalContentSource *ecs) {
@ -179,7 +179,7 @@ Result NpdmUtils::LoadNpdmInternal(FILE *f_npdm, NpdmUtils::NpdmCache *cache) {
info->acid_kac = (void *)((uintptr_t)info->acid + info->acid->kac_offset);
rc = 0;
rc = ResultSuccess;
return rc;
}
@ -223,13 +223,13 @@ Result NpdmUtils::LoadNpdm(u64 tid, NpdmInfo *out) {
/* We validated! */
info->title_id = tid;
*out = *info;
rc = 0;
rc = ResultSuccess;
return rc;
}
Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size_t num_restrict_caps, u32 *&cur_cap, size_t &caps_remaining) {
Result rc = 0;
Result rc = ResultSuccess;
u32 desc = *cur_cap++;
caps_remaining--;
unsigned int low_bits = 0;
@ -278,7 +278,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
break;
}
/* Valid! */
rc = 0;
rc = ResultSuccess;
break;
}
}
@ -299,7 +299,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
break;
}
/* Valid! */
rc = 0;
rc = ResultSuccess;
break;
}
}
@ -353,7 +353,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
continue;
}
/* Valid! */
rc = 0;
rc = ResultSuccess;
break;
}
}
@ -368,13 +368,13 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
continue;
}
/* Valid! */
rc = 0;
rc = ResultSuccess;
break;
}
}
break;
case 11: /* IRQ Pair. */
rc = 0x0;
rc = ResultSuccess;
for (unsigned int irq_i = 0; irq_i < 2; irq_i++) {
u32 irq = desc & 0x3FF;
desc >>= 10;
@ -411,7 +411,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
}
if (desc == r_desc) {
/* Valid! */
rc = 0;
rc = ResultSuccess;
}
break;
case 14: /* Kernel Release Version. */
@ -428,7 +428,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
}
if (desc == r_desc) {
/* Valid! */
rc = 0;
rc = ResultSuccess;
}
break;
case 15: /* Handle Table Size. */
@ -442,7 +442,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
break;
}
/* Valid! */
rc = 0;
rc = ResultSuccess;
break;
}
}
@ -461,11 +461,11 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
}
if ((desc & ~r_desc) == 0) {
/* Valid! */
rc = 0;
rc = ResultSuccess;
}
break;
case 32: /* Empty Descriptor. */
rc = 0;
rc = ResultSuccess;
break;
default: /* Unrecognized Descriptor. */
rc = ResultLoaderUnknownCapability;
@ -475,7 +475,7 @@ Result NpdmUtils::ValidateCapabilityAgainstRestrictions(u32 *restrict_caps, size
}
Result NpdmUtils::ValidateCapabilities(u32 *acid_caps, size_t num_acid_caps, u32 *aci0_caps, size_t num_aci0_caps) {
Result rc = 0;
Result rc = ResultSuccess;
size_t remaining = num_aci0_caps;
u32 *cur_cap = aci0_caps;
while (remaining) {

View file

@ -43,7 +43,7 @@ Result NroUtils::ValidateNrrHeader(NrrHeader *header, u64 size, u64 title_id_min
return ResultLoaderInvalidNrr;
}
return 0x0;
return ResultSuccess;
}
Result NroUtils::LoadNro(Registration::Process *target_proc, Handle process_h, u64 nro_heap_address, u64 nro_heap_size, u64 bss_heap_address, u64 bss_heap_size, u64 *out_address) {
@ -51,7 +51,7 @@ Result NroUtils::LoadNro(Registration::Process *target_proc, Handle process_h, u
MappedCodeMemory mcm_nro = {0};
MappedCodeMemory mcm_bss = {0};
unsigned int i;
Result rc = 0;
Result rc = ResultSuccess;
u8 nro_hash[0x20];
struct sha256_state sha_ctx;
@ -143,7 +143,7 @@ Result NroUtils::LoadNro(Registration::Process *target_proc, Handle process_h, u
Registration::AddNroToProcess(target_proc->index, &mcm_nro, &mcm_bss, nro_hdr.text_size, nro_hdr.ro_size, nro_hdr.rw_size, nro_hdr.build_id);
*out_address = mcm_nro.code_memory_address;
rc = 0x0;
rc = ResultSuccess;
return rc;
}

View file

@ -127,7 +127,7 @@ Result NsoUtils::LoadNsoHeaders(u64 title_id) {
}
}
return 0x0;
return ResultSuccess;
}
Result NsoUtils::ValidateNsoLoadSet() {
@ -157,7 +157,7 @@ Result NsoUtils::ValidateNsoLoadSet() {
}
}
return 0x0;
return ResultSuccess;
}
@ -239,7 +239,7 @@ Result NsoUtils::CalculateNsoLoadExtents(u32 addspace_type, u32 args_size, NsoLo
extents->args_address += extents->base_address;
}
return 0x0;
return ResultSuccess;
}
@ -286,7 +286,7 @@ Result NsoUtils::LoadNsoSegment(u64 title_id, unsigned int index, unsigned int s
}
}
return 0x0;
return ResultSuccess;
}
Result NsoUtils::LoadNsosIntoProcessMemory(Handle process_h, u64 title_id, NsoLoadExtents *extents, u8 *args, u32 args_size) {

View file

@ -107,7 +107,7 @@ Result ProcessCreation::InitializeProcessInfo(NpdmUtils::NpdmInfo *npdm, Handle
}
}
return 0x0;
return ResultSuccess;
}
Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nca_path, LaunchQueue::LaunchItem *launch_item, u64 arg_flags, Handle reslimit_h) {
@ -221,7 +221,7 @@ Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nc
/* Send the pid/tid pair to anyone interested in man-in-the-middle-attacking it. */
Registration::AssociatePidTidForMitM(index);
rc = 0;
rc = ResultSuccess;
/* If HBL, override HTML document path. */
if (ContentManagement::ShouldOverrideContentsWithHBL(target_process->tid_sid.title_id)) {

View file

@ -150,7 +150,7 @@ Result ProcessManagerService::PopulateProgramInfoBuffer(ProcessManagerService::P
out->aci0_fah_size = info.aci0->fah_size;
std::memcpy(out->ac_buffer + offset, info.aci0_fah, out->aci0_fah_size);
offset += out->aci0_fah_size;
rc = 0;
rc = ResultSuccess;
}
}
}

View file

@ -95,7 +95,7 @@ Result Registration::GetRegisteredTidSid(u64 index, Registration::TidSid *out) {
*out = target_process->tid_sid;
return 0;
return ResultSuccess;
}
void Registration::SetProcessIdTidAndIs64BitAddressSpace(u64 index, u64 process_id, u64 tid, bool is_64_bit_addspace) {
@ -149,7 +149,7 @@ Result Registration::AddNrrInfo(u64 index, MappedCodeMemory *nrr_info) {
return ResultLoaderInsufficientNrrRegistrations;
}
*nrr_info_it = *nrr_info;
return 0;
return ResultSuccess;
}
Result Registration::RemoveNrrInfo(u64 index, u64 base_address) {
@ -162,7 +162,7 @@ Result Registration::RemoveNrrInfo(u64 index, u64 base_address) {
for (unsigned int i = 0; i < NRR_INFO_MAX; i++) {
if (target_process->nrr_infos[i].IsActive() && target_process->nrr_infos[i].base_address == base_address) {
target_process->nrr_infos[i].Close();
return 0;
return ResultSuccess;
}
}
return ResultLoaderNotRegistered;
@ -273,7 +273,7 @@ Result Registration::GetNsoInfosForProcessId(Registration::NsoInfo *out, u32 max
*num_written = cur;
return 0;
return ResultSuccess;
}
void Registration::AssociatePidTidForMitM(u64 index) {

View file

@ -70,7 +70,7 @@ Result RelocatableObjectsService::UnloadNro(PidDescriptor pid_desc, u64 nro_addr
}
Result RelocatableObjectsService::LoadNrr(PidDescriptor pid_desc, u64 nrr_address, u64 nrr_size) {
Result rc = 0;
Result rc = ResultSuccess;
Registration::Process *target_proc = NULL;
MappedCodeMemory nrr_info = {0};
ON_SCOPE_EXIT {
@ -142,7 +142,7 @@ Result RelocatableObjectsService::Initialize(PidDescriptor pid_desc, CopiedHandl
this->process_handle = process_h.handle;
this->process_id = handle_pid;
this->has_initialized = true;
return 0;
return ResultSuccess;
}
return ResultLoaderInvalidProcess;
}

View file

@ -43,7 +43,7 @@ Result ShellService::SetExternalContentSource(Out<MovedHandle> out, u64 tid) {
serviceCreate(&service, client_h);
ContentManagement::SetExternalContentSource(tid, FsFileSystem {service});
out.SetValue(server_h);
return 0;
return ResultSuccess;
}
void ShellService::ClearExternalContentSource(u64 tid) {

View file

@ -27,7 +27,7 @@ Result DebugMonitorService::GetUnknownStub(Out<u32> count, OutBuffer<u8> out_buf
return ResultPmInvalidSize;
}
count.SetValue(0);
return 0x0;
return ResultSuccess;
}
Result DebugMonitorService::GetDebugProcessIds(Out<u32> count, OutBuffer<u64> out_pids) {
@ -47,7 +47,7 @@ Result DebugMonitorService::GetTitleProcessId(Out<u64> pid, u64 tid) {
std::shared_ptr<Registration::Process> proc = Registration::GetProcessByTitleId(tid);
if (proc != nullptr) {
pid.SetValue(proc->pid);
return 0;
return ResultSuccess;
}
return ResultPmProcessNotFound;
}
@ -62,7 +62,7 @@ Result DebugMonitorService::GetApplicationProcessId(Out<u64> pid) {
std::shared_ptr<Registration::Process> app_proc;
if (Registration::HasApplicationProcess(&app_proc)) {
pid.SetValue(app_proc->pid);
return 0x0;
return ResultSuccess;
}
return ResultPmProcessNotFound;
}
@ -81,7 +81,7 @@ Result DebugMonitorService::AtmosphereGetProcessInfo(Out<CopiedHandle> proc_hand
if (proc != nullptr) {
proc_hand.SetValue(proc->handle);
tid_sid.SetValue(proc->tid_sid);
return 0;
return ResultSuccess;
}
return ResultPmProcessNotFound;
}
@ -104,5 +104,5 @@ Result DebugMonitorService::AtmosphereGetCurrentLimitInfo(Out<u64> cur_val, Out<
return rc;
}
return 0;
return ResultSuccess;
}

View file

@ -24,7 +24,7 @@ Result InformationService::GetTitleId(Out<u64> tid, u64 pid) {
std::shared_ptr<Registration::Process> proc = Registration::GetProcess(pid);
if (proc != NULL) {
tid.SetValue(proc->tid_sid.title_id);
return 0;
return ResultSuccess;
}
return ResultPmProcessNotFound;
}

View file

@ -56,7 +56,7 @@ void Registration::InitializeSystemResources() {
Result Registration::ProcessLaunchStartCallback(u64 timeout) {
g_process_launch_start_event->Clear();
Registration::HandleProcessLaunch();
return 0;
return ResultSuccess;
}
IWaitable *Registration::GetProcessLaunchStartEvent() {
@ -137,13 +137,13 @@ void Registration::HandleProcessLaunch() {
if (new_process.tid_sid.title_id == g_debug_on_launch_tid.load()) {
g_debug_title_event->Signal();
g_debug_on_launch_tid = 0;
rc = 0;
rc = ResultSuccess;
} else if ((new_process.flags & PROCESSFLAGS_APPLICATION) && g_debug_next_application.load()) {
g_debug_application_event->Signal();
g_debug_next_application = false;
rc = 0;
rc = ResultSuccess;
} else if (LAUNCHFLAGS_STARTSUSPENDED(launch_flags)) {
rc = 0;
rc = ResultSuccess;
} else {
rc = svcStartProcess(new_process.handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size);
@ -283,7 +283,7 @@ Result Registration::HandleSignaledProcess(std::shared_ptr<Registration::Process
}
break;
}
return 0;
return ResultSuccess;
}
void Registration::FinalizeExitedProcess(std::shared_ptr<Registration::Process> process) {
@ -414,7 +414,7 @@ Result Registration::GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out
}
*num_out = num;
return 0;
return ResultSuccess;
}
Handle Registration::GetProcessEventHandle() {
@ -483,13 +483,13 @@ Result Registration::EnableDebugForTitleId(u64 tid, Handle *out) {
return ResultPmDebugHookInUse;
}
*out = g_debug_title_event->GetHandle();
return 0x0;
return ResultSuccess;
}
Result Registration::EnableDebugForApplication(Handle *out) {
g_debug_next_application = true;
*out = g_debug_application_event->GetHandle();
return 0;
return ResultSuccess;
}
Result Registration::DisableDebug(u32 which) {
@ -499,5 +499,5 @@ Result Registration::DisableDebug(u32 which) {
if (which & 2) {
g_debug_next_application = false;
}
return 0;
return ResultSuccess;
}

View file

@ -72,7 +72,7 @@ static u64 g_system_boost_size = 0;
/* Tries to set Resource limits for a category. */
static Result SetResourceLimits(ResourceLimitUtils::ResourceLimitCategory category, u64 new_memory_size) {
Result rc = 0;
Result rc = ResultSuccess;
u64 old_memory_size = g_resource_limits[category][LimitableResource_Memory];
g_resource_limits[category][LimitableResource_Memory] = new_memory_size;
for (unsigned int r = 0; r < 5; r++) {
@ -86,7 +86,7 @@ static Result SetResourceLimits(ResourceLimitUtils::ResourceLimitCategory catego
static Result SetNewMemoryResourceLimit(ResourceLimitUtils::ResourceLimitCategory category, u64 new_memory_size) {
Result rc = 0;
Result rc = ResultSuccess;
u64 old_memory_size = g_resource_limits[category][LimitableResource_Memory];
g_resource_limits[category][LimitableResource_Memory] = new_memory_size;
if (R_FAILED((rc = svcSetResourceLimitLimitValue(g_resource_limit_handles[category], LimitableResource_Memory, g_resource_limits[category][LimitableResource_Memory])))) {
@ -237,7 +237,7 @@ Handle ResourceLimitUtils::GetResourceLimitHandleByCategory(ResourceLimitCategor
}
Result ResourceLimitUtils::BoostSystemMemoryResourceLimit(u64 boost_size) {
Result rc = 0;
Result rc = ResultSuccess;
if (boost_size > g_memory_resource_limits[g_memory_limit_type][ResourceLimitCategory_Application]) {
return ResultPmInvalidSize;
}

View file

@ -67,7 +67,7 @@ Result ShellService::FinalizeExitedProcess(u64 pid) {
return ResultPmNotExited;
} else {
Registration::FinalizeExitedProcess(proc);
return 0x0;
return ResultSuccess;
}
}
@ -77,7 +77,7 @@ Result ShellService::ClearProcessNotificationFlag(u64 pid) {
auto proc = Registration::GetProcess(pid);
if (proc != NULL) {
proc->flags &= ~PROCESSFLAGS_CRASHED;
return 0x0;
return ResultSuccess;
} else {
return ResultPmProcessNotFound;
}
@ -96,7 +96,7 @@ Result ShellService::GetApplicationProcessId(Out<u64> pid) {
std::shared_ptr<Registration::Process> app_proc;
if (Registration::HasApplicationProcess(&app_proc)) {
pid.SetValue(app_proc->pid);
return 0;
return ResultSuccess;
}
return ResultPmProcessNotFound;
}
@ -109,5 +109,5 @@ Result ShellService::BoostSystemThreadsResourceLimit() {
/* Starting in 7.0.0, Nintendo reduces the number of system threads from 0x260 to 0x60, */
/* Until this command is called to double that amount to 0xC0. */
/* We will simply not reduce the number of system threads available for no reason. */
return 0x0;
return ResultSuccess;
}

View file

@ -204,7 +204,7 @@ Result Registration::RegisterProcess(u64 pid, u8 *acid_sac, size_t acid_sac_size
proc->pid = pid;
proc->sac_size = aci0_sac_size;
std::copy(aci0_sac, aci0_sac + aci0_sac_size, proc->sac);
return 0;
return ResultSuccess;
}
Result Registration::UnregisterProcess(u64 pid) {
@ -214,7 +214,7 @@ Result Registration::UnregisterProcess(u64 pid) {
}
proc->pid = 0;
return 0;
return ResultSuccess;
}
/* Service management. */
@ -436,7 +436,7 @@ Result Registration::UnregisterServiceForPid(u64 pid, u64 service) {
svcCloseHandle(target_service->mitm_port_h);
svcCloseHandle(target_service->mitm_query_h);
*target_service = (const Registration::Service){0};
return 0;
return ResultSuccess;
}
@ -510,7 +510,7 @@ Result Registration::UninstallMitmForPid(u64 pid, u64 service) {
svcCloseHandle(target_service->mitm_port_h);
svcCloseHandle(target_service->mitm_query_h);
target_service->mitm_pid = 0;
return 0;
return ResultSuccess;
}
Result Registration::AcknowledgeMitmSessionForPid(u64 pid, u64 service, Handle *out, u64 *out_pid) {
@ -539,7 +539,7 @@ Result Registration::AcknowledgeMitmSessionForPid(u64 pid, u64 service, Handle *
target_service->mitm_fwd_sess_h = 0;
target_service->mitm_waiting_ack_pid = 0;
target_service->mitm_waiting_ack = false;
return 0;
return ResultSuccess;
}
Result Registration::AssociatePidTidForMitm(u64 pid, u64 tid) {
@ -560,7 +560,7 @@ Result Registration::AssociatePidTidForMitm(u64 pid, u64 tid) {
ipcDispatch(service.mitm_query_h);
}
}
return 0x0;
return ResultSuccess;
}
void Registration::ConvertServiceToRecord(Registration::Service *service, SmServiceRecord *record) {
@ -591,7 +591,7 @@ Result Registration::GetServiceRecord(u64 service, SmServiceRecord *out) {
}
ConvertServiceToRecord(target_service, out);
return 0x0;
return ResultSuccess;
}
void Registration::ListServiceRecords(u64 offset, u64 max_out, SmServiceRecord *out, u64 *out_count) {

View file

@ -22,7 +22,7 @@
Result UserService::Initialize(PidDescriptor pid) {
this->pid = pid.pid;
this->has_initialized = true;
return 0;
return ResultSuccess;
}
Result UserService::GetService(Out<MovedHandle> out_h, SmServiceName service) {