ams: revamp assertion system

This commit is contained in:
Michael Scire
2020-02-22 23:05:14 -08:00
parent 9572fb2ce3
commit 40400aee1f
168 changed files with 1014 additions and 696 deletions

View File

@@ -29,9 +29,9 @@ namespace ams::updater {
}
Result BisSave::Initialize(void *work_buffer, size_t work_buffer_size) {
AMS_ASSERT(work_buffer_size >= SaveSize);
AMS_ASSERT(util::IsAligned(reinterpret_cast<uintptr_t>(work_buffer), os::MemoryPageSize));
AMS_ASSERT(util::IsAligned(work_buffer_size, 0x200));
AMS_ABORT_UNLESS(work_buffer_size >= SaveSize);
AMS_ABORT_UNLESS(util::IsAligned(reinterpret_cast<uintptr_t>(work_buffer), os::MemoryPageSize));
AMS_ABORT_UNLESS(util::IsAligned(work_buffer_size, 0x200));
R_TRY(this->accessor.Initialize());
this->save_buffer = work_buffer;