ams: use R_SUCCEED, R_THROW globally

This commit is contained in:
Michael Scire
2022-03-26 00:14:36 -07:00
parent e5b1739f65
commit dd78ede99f
370 changed files with 2107 additions and 2107 deletions

View File

@@ -46,14 +46,14 @@ namespace ams::fssystem::buffers {
}
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
}
template<typename F>
Result DoContinuouslyUntilBufferIsAllocated(F f, const char *function_name) {
R_TRY(DoContinuouslyUntilBufferIsAllocated(f, []() ALWAYS_INLINE_LAMBDA { return ResultSuccess(); }, function_name));
return ResultSuccess();
R_TRY(DoContinuouslyUntilBufferIsAllocated(f, []() ALWAYS_INLINE_LAMBDA { R_SUCCEED(); }, function_name));
R_SUCCEED();
}
/* ACCURATE_TO_VERSION: Unknown */
@@ -110,10 +110,10 @@ namespace ams::fssystem::buffers {
if (buffer.first != 0) {
buffer_manager->DeallocateBuffer(buffer.first, buffer.second);
}
return fs::ResultBufferAllocationFailed();
R_THROW(fs::ResultBufferAllocationFailed());
}
*out = buffer;
return ResultSuccess();
R_SUCCEED();
};
if (context == nullptr || !context->IsNeedBlocking()) {
@@ -125,7 +125,7 @@ namespace ams::fssystem::buffers {
}
AMS_ASSERT(out->first != 0);
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -155,7 +155,7 @@ namespace ams::fssystem {
m_external_attr_info_buffer = reinterpret_cast<char *>(aligned_attr_info_buf);
m_external_attr_info_count = static_cast<s32>((work_end - aligned_attr_info_buf) / sizeof(AttrInfo));
return ResultSuccess();
R_SUCCEED();
}
void Finalize();
@@ -216,7 +216,7 @@ namespace ams::fssystem {
m_peak_free_size = m_total_size;
m_peak_total_allocatable_size = m_total_size;
return ResultSuccess();
R_SUCCEED();
}
Result Initialize(s32 max_cache_count, uintptr_t address, size_t buffer_size, size_t block_size, s32 max_order) {
@@ -228,7 +228,7 @@ namespace ams::fssystem {
m_peak_free_size = m_total_size;
m_peak_total_allocatable_size = m_total_size;
return ResultSuccess();
R_SUCCEED();
}
Result Initialize(s32 max_cache_count, uintptr_t address, size_t buffer_size, size_t block_size, void *work, size_t work_size) {
@@ -245,7 +245,7 @@ namespace ams::fssystem {
m_peak_free_size = m_total_size;
m_peak_total_allocatable_size = m_total_size;
return ResultSuccess();
R_SUCCEED();
}
Result Initialize(s32 max_cache_count, uintptr_t address, size_t buffer_size, size_t block_size, s32 max_order, void *work, size_t work_size) {
@@ -262,7 +262,7 @@ namespace ams::fssystem {
m_peak_free_size = m_total_size;
m_peak_total_allocatable_size = m_total_size;
return ResultSuccess();
R_SUCCEED();
}
void Finalize() {