From patchwork Fri Sep 23 13:38:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 116072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 282711007D3 for ; Fri, 23 Sep 2011 23:38:33 +1000 (EST) Received: from localhost ([::1]:45550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R75xW-0002ZA-L2 for incoming@patchwork.ozlabs.org; Fri, 23 Sep 2011 09:38:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R75xQ-0002XK-0x for qemu-devel@nongnu.org; Fri, 23 Sep 2011 09:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R75xO-0006EZ-Tm for qemu-devel@nongnu.org; Fri, 23 Sep 2011 09:38:23 -0400 Received: from mtagate7.uk.ibm.com ([194.196.100.167]:37211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R75xO-00063j-MA for qemu-devel@nongnu.org; Fri, 23 Sep 2011 09:38:22 -0400 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8NDcEIU016196 for ; Fri, 23 Sep 2011 13:38:14 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8NDcEnp2412674 for ; Fri, 23 Sep 2011 14:38:14 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8NKcMlT024110 for ; Fri, 23 Sep 2011 14:38:22 -0600 Received: from [9.152.224.64] (dyn-9-152-224-64.boeblingen.de.ibm.com [9.152.224.64]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p8NKcM1G024103; Fri, 23 Sep 2011 14:38:22 -0600 Message-ID: <4E7C8BC4.6090409@de.ibm.com> Date: Fri, 23 Sep 2011 15:38:12 +0200 From: Christian Borntraeger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 MIME-Version: 1.0 To: Alexander Graf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.167 Cc: Carsten Otte , "qemu-devel@nongnu.org" Subject: [Qemu-devel] [PATCH] s390: fix short kernel command lines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- hw/s390-virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/hw/s390-virtio.c =================================================================== --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -238,7 +238,7 @@ static void s390_init(ram_addr_t my_ram_ if (kernel_cmdline) { cpu_physical_memory_write(KERN_PARM_AREA, kernel_cmdline, - strlen(kernel_cmdline)); + strlen(kernel_cmdline) + 1); } /* Create VirtIO network adapters */