aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/virtio.c
diff options
context:
space:
mode:
authorCollin L. Walling <walling@linux.vnet.ibm.com>2018-02-23 10:43:16 -0500
committerThomas Huth <thuth@redhat.com>2018-02-26 07:56:55 +0100
commitff5dbf1bc3b81248f4f1c253b586491bc8daeda5 (patch)
tree4c98a2a5e9b2520462514da583775738effc50a2 /pc-bios/s390-ccw/virtio.c
parentf7178910845a73fcb69642476c3222af842e25e9 (diff)
s390-ccw: read user input for boot index via the SCLP console
Implements an sclp_read function to capture input from the console and a wrapper function that handles parsing certain characters and adding input to a buffer. The input is checked for any erroneous values and is handled appropriately. A prompt will persist until input is entered or the timeout expires (if one was set). Example: Please choose (default will boot in 10 seconds): Correct input will boot the respective boot index. If the user's input is empty, 0, or if the timeout expires, then the default zipl entry will be chosen. If the input is within the range of available boot entries, then the selection will be booted. Any erroneous input will cancel the timeout and re-prompt the user. Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/virtio.c')
-rw-r--r--pc-bios/s390-ccw/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index c890a0330b..817e7f56ea 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -176,7 +176,7 @@ void vring_send_buf(VRing *vr, void *p, int len, int flags)
}
}
-static u64 get_clock(void)
+u64 get_clock(void)
{
u64 r;