From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPzyL-0000JB-Po for qemu-devel@nongnu.org; Mon, 14 Nov 2011 12:05:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPzyG-0003ll-UI for qemu-devel@nongnu.org; Mon, 14 Nov 2011 12:05:29 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49778 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPzyG-0003lW-PT for qemu-devel@nongnu.org; Mon, 14 Nov 2011 12:05:24 -0500 From: Alexander Graf Date: Mon, 14 Nov 2011 18:06:35 +0100 Message-Id: <1321290400-32717-8-git-send-email-agraf@suse.de> In-Reply-To: <1321290400-32717-1-git-send-email-agraf@suse.de> References: <1321290400-32717-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 07/12] s390: fix short kernel command lines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Developers Cc: blauwirbel@gmail.com, Christian Borntraeger From: Christian Borntraeger The default kernel command line for s390 is "root=/dev/ram0 ro" When overriding this line, we have to ensure to also copy the \0 to avoid false lines, for example, -append "root=/dev/vda" will result in "root=/dev/vda0 ro" with the current code. Signed-off-by: Christian Borntraeger Signed-off-by: Alexander Graf --- 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 003d5ab..ee850f0 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -230,7 +230,7 @@ static void s390_init(ram_addr_t my_ram_size, if (kernel_cmdline) { cpu_physical_memory_write(KERN_PARM_AREA, kernel_cmdline, - strlen(kernel_cmdline)); + strlen(kernel_cmdline) + 1); } /* Create VirtIO network adapters */ -- 1.6.0.2