summaryrefslogtreecommitdiff
path: root/test/boot/bootdev.c
diff options
context:
space:
mode:
authorJulius Lehmann <[email protected]>2024-10-26 20:06:44 +0200
committerTom Rini <[email protected]>2024-11-01 13:34:32 -0600
commit5f7c06bdc3c6b20362992cd1b6d137f5bb599a0a (patch)
tree1c7c515fe21266fab4254759bd508e9ca5ee2283 /test/boot/bootdev.c
parent99ce74a41baede05b20639f3839588b3a9678df8 (diff)
scsi: fix disk capacity too small by one sector
SCSI READ CAPACITY reports the address of the last block and the block size. The total number of blocks is thus last block address plus one. This also fixes the corresponding test case.
Diffstat (limited to 'test/boot/bootdev.c')
-rw-r--r--test/boot/bootdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 369105ca4cf..369c611d924 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -630,7 +630,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts)
ut_assertok(bootdev_next_label(&iter, &dev, &mflags));
ut_assert_nextline("scanning bus for devices...");
ut_assert_skip_to_line(
- " Capacity: 1.9 MB = 0.0 GB (4095 x 512)");
+ " Capacity: 2.0 MB = 0.0 GB (4096 x 512)");
ut_assert_console_end();
ut_assertnonnull(dev);
ut_asserteq_str("scsi.id0lun0.bootdev", dev->name);