Skip to content

Commit

Permalink
pc-bios/s390-ccw: don't try to read the next block if end of chunk is…
Browse files Browse the repository at this point in the history
… reached

Don't read the block if a null block number is reached, because this means that
the end of chunk is reached.

Reviewed-by: Collin Walling <walling@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20210416074736.17409-1-mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
mhartmay authored and huth committed May 9, 2021
1 parent d90f154 commit a6625d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pc-bios/s390-ccw/bootmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int eckd_get_boot_menu_index(block_number_t s1b_block_nr)
next_block_nr = eckd_block_num(&s1b->seek[i + 1].chs);
}

if (next_block_nr) {
if (next_block_nr && !is_null_block_number(next_block_nr)) {
read_block(next_block_nr, s2_next_blk,
"Cannot read stage2 boot loader");
}
Expand Down

0 comments on commit a6625d3

Please sign in to comment.