While verifying, when reading the block device, read only as much as was read from the file.
This commit is contained in:
parent
e69243180f
commit
1e82124264
1 changed files with 2 additions and 2 deletions
|
|
@ -94,9 +94,9 @@ int perform_write(write_job_t *job) {
|
|||
|
||||
while (1) {
|
||||
ssize_t read_file = read(file_fd, job->buffer2, job->block_size);
|
||||
ssize_t read_block = read(block_fd, job->buffer, job->block_size);
|
||||
ssize_t read_block = read(block_fd, job->buffer, read_file);
|
||||
|
||||
assert(read_block >= read_file);
|
||||
assert(read_block == read_file);
|
||||
assert(read_block >= 0);
|
||||
assert(read_file >= 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue