mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
parent
b3678f44b7
commit
25ae54223a
@ -396,19 +396,16 @@ class Block::Main : Rpc_object<Typed_root<Session>>,
|
||||
** Update_jobs_policy **
|
||||
************************/
|
||||
|
||||
void consume_read_result(Job &job, seek_off_t,
|
||||
char const *src, size_t length)
|
||||
void consume_read_result(Job &job, off_t offset, char const *src, size_t length)
|
||||
{
|
||||
if (!_sessions[job.number]) return;
|
||||
|
||||
memcpy((void *)(job.addr + job.offset), src, length);
|
||||
job.offset += length;
|
||||
memcpy((void *)(job.addr + offset), src, length);
|
||||
}
|
||||
|
||||
void produce_write_content(Job &job, seek_off_t, char *dst, size_t length)
|
||||
void produce_write_content(Job &job, off_t offset, char *dst, size_t length)
|
||||
{
|
||||
memcpy(dst, (void *)(job.addr + job.offset), length);
|
||||
job.offset += length;
|
||||
memcpy(dst, (void *)(job.addr + offset), length);
|
||||
}
|
||||
|
||||
void completed(Job &job, bool success)
|
||||
|
@ -49,7 +49,6 @@ struct Block::Job : public Block_connection::Job
|
||||
Request request;
|
||||
addr_t const addr; /* target payload address */
|
||||
bool completed { false };
|
||||
off_t offset { 0 }; /* current offset in payload for partial jobs */
|
||||
|
||||
Job(Block_connection &connection,
|
||||
Operation operation,
|
||||
@ -128,15 +127,15 @@ struct Block::Partition_table : Interface
|
||||
_data.block.update_jobs(*this);
|
||||
}
|
||||
|
||||
void consume_read_result(Block_connection::Job &, seek_off_t,
|
||||
void consume_read_result(Block_connection::Job &, off_t offset,
|
||||
char const *src, size_t length)
|
||||
{
|
||||
_buffer = _data.alloc.alloc(length);
|
||||
memcpy(_buffer, src, length);
|
||||
_size = length;
|
||||
memcpy((char *)_buffer + offset, src, length);
|
||||
_size += length;
|
||||
}
|
||||
|
||||
void produce_write_content(Block_connection::Job &, seek_off_t,
|
||||
void produce_write_content(Block_connection::Job &, off_t,
|
||||
char *, size_t) { }
|
||||
|
||||
void completed(Block_connection::Job &, bool success)
|
||||
|
Loading…
x
Reference in New Issue
Block a user