From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgyP7-0000Y0-21 for qemu-devel@nongnu.org; Fri, 07 Dec 2012 08:55:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgyP1-0004vl-UX for qemu-devel@nongnu.org; Fri, 07 Dec 2012 08:55:48 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:38345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgyP1-0004vf-J9 for qemu-devel@nongnu.org; Fri, 07 Dec 2012 08:55:43 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Dec 2012 13:55:34 -0000 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qB7DtVnc33882362 for ; Fri, 7 Dec 2012 13:55:31 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qB7D7XZ8028593 for ; Fri, 7 Dec 2012 08:07:34 -0500 From: Jens Freimann Date: Fri, 7 Dec 2012 14:55:29 +0100 Message-Id: <1354888531-47836-2-git-send-email-jfrei@linux.vnet.ibm.com> In-Reply-To: <1354888531-47836-1-git-send-email-jfrei@linux.vnet.ibm.com> References: <1354888531-47836-1-git-send-email-jfrei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/3] s390: Fix empty kernel command line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Heinz Graalfs , qemu-devel , Christian Borntraeger , Jens Freimann , Cornelia Huck , Einar Lueck From: Christian Borntraeger Since commit 967c0da73a7b0da186baba6632301d83644a570c vl.c: Avoid segfault when started with no arguments the user can specify a kernel without a command line. Lets not overwrite the default command line with \0 in that case. Signed-off-by: Christian Borntraeger Signed-off-by: Jens Freimann --- hw/s390-virtio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index ca1bb09..d77871a 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -290,7 +290,7 @@ static void s390_init(QEMUMachineInitArgs *args) stq_p(rom_ptr(INITRD_PARM_SIZE), initrd_size); } - if (rom_ptr(KERN_PARM_AREA)) { + if (rom_ptr(KERN_PARM_AREA) && strlen(kernel_cmdline)) { /* we have to overwrite values in the kernel image, which are "rom" */ memcpy(rom_ptr(KERN_PARM_AREA), kernel_cmdline, strlen(kernel_cmdline) + 1); -- 1.7.1