Received: from eggs.gnu.org ([2001:4830:134:3::10]:58854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOR7u-0001cw-9e for qemu-devel@nongnu.org; Mon, 01 Sep 2014 08:54:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOR7e-00054p-TJ for qemu-devel@nongnu.org; Mon, 01 Sep 2014 08:54:30 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:54910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOR7e-00054K-LF for qemu-devel@nongnu.org; Mon, 01 Sep 2014 08:54:14 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Sep 2014 13:54:13 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id DB70F1B0804B for ; Mon, 1 Sep 2014 13:55:10 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s81CsAbx41550040 for ; Mon, 1 Sep 2014 12:54:10 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s817ql3H021877 for ; Mon, 1 Sep 2014 03:52:48 -0400 From: Christian Borntraeger Date: Mon, 1 Sep 2014 14:54:18 +0200 Message-Id: <1409576070-55803-8-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1409576070-55803-1-git-send-email-borntraeger@de.ibm.com> References: <1409576070-55803-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 07/19] pc-bios/s390-ccw Improve ECKD informational message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Anthony Liguori , Cornelia Huck , "Eugene (jno) Dvurechenski" , Richard Henderson From: "Eugene (jno) Dvurechenski" Add block size display to ECKD scheme report. Signed-off-by: Eugene (jno) Dvurechenski Reviewed-by: David Hildenbrand Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Jens Freimann Signed-off-by: Christian Borntraeger --- pc-bios/s390-ccw/bootmap.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index f175679..e4352b1 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -298,6 +298,25 @@ static void ipl_eckd(ECKD_IPL_mode_t mode) } } +static void print_eckd_msg(void) +{ + char msg[] = "Using ECKD scheme (block size *****), "; + char *p = &msg[34], *q = &msg[30]; + int n = virtio_get_block_size(); + + /* Fill in the block size and show up the message */ + if (n > 0 && n <= 99999) { + while (n) { + *p-- = '0' + (n % 10); + n /= 10; + } + while (p >= q) { + *p-- = ' '; + } + } + sclp_print(msg); +} + /*********************************************************************** * IPL a SCSI disk */ @@ -447,12 +466,11 @@ void zipl_load(void) } /* We have failed to follow the SCSI scheme, so */ - sclp_print("Using ECKD scheme.\n"); if (virtio_guessed_disk_nature()) { sclp_print("Using guessed DASD geometry.\n"); virtio_assume_eckd(); } - + print_eckd_msg(); if (magic_match(mbr->magic, IPL1_MAGIC)) { ipl_eckd(ECKD_CDL); /* no return */ } -- 1.8.4.2