ams_mitm: Implement emummc Nintendo folder redirection

This commit is contained in:
Michael Scire
2019-12-05 23:41:33 -08:00
committed by SciresM
parent 733f2b3cdd
commit 746dbfe018
78 changed files with 2190 additions and 187 deletions

View File

@@ -54,15 +54,9 @@ namespace ams::updater {
/* Implementations. */
Result ValidateWorkBuffer(const void *work_buffer, size_t work_buffer_size) {
if (work_buffer_size < BctSize + EksSize) {
return ResultTooSmallWorkBuffer();
}
if (!util::IsAligned(work_buffer, 0x1000)) {
return ResultNotAlignedWorkBuffer();
}
if (util::IsAligned(work_buffer_size, 0x200)) {
return ResultNotAlignedWorkBuffer();
}
R_UNLESS(work_buffer_size >= BctSize + EksSize, ResultTooSmallWorkBuffer());
R_UNLESS(util::IsAligned(work_buffer, os::MemoryPageSize), ResultNotAlignedWorkBuffer());
R_UNLESS(util::IsAligned(work_buffer_size, 0x200), ResultNotAlignedWorkBuffer());
return ResultSuccess();
}