diff options
author | Thomas Huth <thuth@redhat.com> | 2020-07-28 14:30:14 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2020-10-06 19:36:50 +0200 |
commit | 605751b5a5334e187761b0b8a8266a216897bf70 (patch) | |
tree | bff3d327095c3fbb4fbae13640df18a8b3b25a6d /pc-bios/s390-ccw/virtio-blkdev.c | |
parent | d2cf4af1f4af02f6f2d5827d9a06c31690084d3b (diff) |
pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk
In case the user did not specify a boot device, we want to continue
looking for other devices if there are no valid SCSI disks on a virtio-
scsi controller. As a first step, do not panic in this case and let
the control flow carry the error to the upper functions instead.
Message-Id: <20200806105349.632-6-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/virtio-blkdev.c')
-rw-r--r-- | pc-bios/s390-ccw/virtio-blkdev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pc-bios/s390-ccw/virtio-blkdev.c b/pc-bios/s390-ccw/virtio-blkdev.c index 11c56261ca..7d35050292 100644 --- a/pc-bios/s390-ccw/virtio-blkdev.c +++ b/pc-bios/s390-ccw/virtio-blkdev.c @@ -263,9 +263,10 @@ uint64_t virtio_get_blocks(void) return 0; } -void virtio_blk_setup_device(SubChannelId schid) +int virtio_blk_setup_device(SubChannelId schid) { VDev *vdev = virtio_get_device(); + int ret = 0; vdev->schid = schid; virtio_setup_ccw(vdev); @@ -288,9 +289,11 @@ void virtio_blk_setup_device(SubChannelId schid) "Config: CDB size mismatch"); sclp_print("Using virtio-scsi.\n"); - virtio_scsi_setup(vdev); + ret = virtio_scsi_setup(vdev); break; default: panic("\n! No IPL device available !\n"); } + + return ret; } |