]> xenbits.xensource.com Git - qemu-xen.git/commit
s390-ccw: read user input for boot index via the SCLP console
authorCollin L. Walling <walling@linux.vnet.ibm.com>
Fri, 23 Feb 2018 15:43:16 +0000 (10:43 -0500)
committerThomas Huth <thuth@redhat.com>
Mon, 26 Feb 2018 06:56:55 +0000 (07:56 +0100)
commitff5dbf1bc3b81248f4f1c253b586491bc8daeda5
tree4c98a2a5e9b2520462514da583775738effc50a2
parentf7178910845a73fcb69642476c3222af842e25e9
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>
pc-bios/s390-ccw/menu.c
pc-bios/s390-ccw/s390-ccw.h
pc-bios/s390-ccw/sclp.c
pc-bios/s390-ccw/virtio.c