qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] s390: fix short kernel command lines


From: Christian Borntraeger
Subject: [Qemu-devel] [PATCH] s390: fix short kernel command lines
Date: Fri, 23 Sep 2011 15:38:12 +0200
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

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 <address@hidden>


---
 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 */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]