Skip to content

Commit

Permalink
volume: Catch xfer_size==0 condition in cache_block()
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Dec 29, 2021
1 parent 63c3f48 commit 97eaf27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stage23/lib/part.s2.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ static bool cache_block(struct volume *volume, uint64_t block) {
first_sect + block * volume->fastest_xfer_size,
xfer_size)) {
xfer_size--;
if (xfer_size == 0) {
return false;
}
}

volume->cache_status = CACHE_READY;
Expand Down

0 comments on commit 97eaf27

Please sign in to comment.