From: Janosch Frank Date: Wed, 24 Jun 2020 07:52:23 +0000 (-0400) Subject: pc-bios: s390x: Use ebcdic2ascii table X-Git-Tag: v5.1.0-rc0~36^2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78182aea78257edc6b03a167cf7159479aa2ae06;p=thirdparty%2Fqemu.git pc-bios: s390x: Use ebcdic2ascii table Why should we do conversion of a ebcdic value if we have a handy table where we could look up the ascii value instead? Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Message-Id: <20200624075226.92728-10-frankja@linux.ibm.com> Signed-off-by: Thomas Huth --- diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index d13b7cbd159..97205674e59 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -328,9 +328,7 @@ static void print_eckd_ldl_msg(ECKD_IPL_mode_t mode) msg[0] = '2'; break; default: - msg[0] = vlbl->LDL_version; - msg[0] &= 0x0f; /* convert EBCDIC */ - msg[0] |= 0x30; /* to ASCII (digit) */ + msg[0] = ebc2asc[vlbl->LDL_version]; msg[1] = '?'; break; }