diff mbox

s390: fix short kernel command lines

Message ID 4E7C8BC4.6090409@de.ibm.com
State New
Headers show

Commit Message

Christian Borntraeger Sept. 23, 2011, 1:38 p.m. UTC
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 <borntraeger@de.ibm.com>


---
 hw/s390-virtio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Graf Oct. 4, 2011, 12:08 p.m. UTC | #1
On 09/23/2011 03:38 PM, Christian Borntraeger wrote:
> 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<borntraeger@de.ibm.com>

Thanks, applied to s390-next.


Alex
diff mbox

Patch

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