mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
am: Add size parameter to am:IStorage logging
This commit is contained in:
parent
19bfbb28ce
commit
94db6e5f3f
1 changed files with 4 additions and 4 deletions
|
@ -721,10 +721,10 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 offset{rp.Pop<u64>()};
|
const u64 offset{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_AM, "called, offset={}", offset);
|
|
||||||
|
|
||||||
const std::vector<u8> data{ctx.ReadBuffer()};
|
const std::vector<u8> data{ctx.ReadBuffer()};
|
||||||
|
|
||||||
|
LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, data.size());
|
||||||
|
|
||||||
if (data.size() > backing.buffer.size() - offset) {
|
if (data.size() > backing.buffer.size() - offset) {
|
||||||
LOG_ERROR(Service_AM,
|
LOG_ERROR(Service_AM,
|
||||||
"offset is out of bounds, backing_buffer_sz={}, data_size={}, offset={}",
|
"offset is out of bounds, backing_buffer_sz={}, data_size={}, offset={}",
|
||||||
|
@ -744,10 +744,10 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 offset{rp.Pop<u64>()};
|
const u64 offset{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_AM, "called, offset={}", offset);
|
|
||||||
|
|
||||||
const std::size_t size{ctx.GetWriteBufferSize()};
|
const std::size_t size{ctx.GetWriteBufferSize()};
|
||||||
|
|
||||||
|
LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size);
|
||||||
|
|
||||||
if (size > backing.buffer.size() - offset) {
|
if (size > backing.buffer.size() - offset) {
|
||||||
LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, size={}, offset={}",
|
LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, size={}, offset={}",
|
||||||
backing.buffer.size(), size, offset);
|
backing.buffer.size(), size, offset);
|
||||||
|
|
Loading…
Reference in a new issue