This actually happens in case users try to use 4k sectors with seabios. Printing the error to the screen instead of only the debug log helps users to figure why their guest doesn't boot.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com --- src/hw/blockcmd.c | 2 +- src/hw/virtio-blk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index 6b6fea970748..ff88680b16b6 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -336,7 +336,7 @@ scsi_drive_setup(struct drive_s *drive, const char *s, int prio) // 64-bit LBA anyway. drive->blksize = be32_to_cpu(capdata.blksize); if (drive->blksize != DISK_SECTOR_SIZE) { - dprintf(1, "%s: unsupported block size %d\n", s, drive->blksize); + hwerr_printf("%s: unsupported block size %d\n", s, drive->blksize); return -1; } drive->sectors = (u64)be32_to_cpu(capdata.sectors) + 1; diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index e087fe4fb0e3..9d2bcb0f38f4 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -193,8 +193,8 @@ init_virtio_blk(void *data) vdrive->drive.blksize = DISK_SECTOR_SIZE; } if (vdrive->drive.blksize != DISK_SECTOR_SIZE) { - dprintf(1, "virtio-blk %pP block size %d is unsupported\n", - pci, vdrive->drive.blksize); + hwerr_printf("virtio-blk %pP block size %d is unsupported\n", + pci, vdrive->drive.blksize); goto fail; } dprintf(3, "virtio-blk %pP blksize=%d sectors=%u size_max=%u "