From b3678f44b71159554aa537bf6fddf7ff064ae643 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 13 Apr 2022 13:46:07 +0200 Subject: [PATCH] libports/fatfs: handle split block I/O jobs Issue #4474 --- repos/libports/src/lib/fatfs/diskio_block.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repos/libports/src/lib/fatfs/diskio_block.cc b/repos/libports/src/lib/fatfs/diskio_block.cc index dd9d02b21f..f358ce5e7a 100644 --- a/repos/libports/src/lib/fatfs/diskio_block.cc +++ b/repos/libports/src/lib/fatfs/diskio_block.cc @@ -101,18 +101,18 @@ extern "C" { { struct Update_jobs_policy { - void produce_write_content(Job &job, Block::seek_off_t offset, + void produce_write_content(Job &job, off_t offset, char *dst, size_t length) { Write_job &write_job = static_cast(job); - memcpy(dst, write_job.src_ptr, length); + memcpy(dst, write_job.src_ptr + offset, length); } - void consume_read_result(Job &job, Block::seek_off_t offset, + void consume_read_result(Job &job, off_t offset, char const *src, size_t length) { Read_job &read_job = static_cast(job); - memcpy(read_job.dst_ptr, src, length); + memcpy(read_job.dst_ptr + offset, src, length); } void completed(Job &, bool success) { }