qemu-devel
[Top][All Lists]
Advanced

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

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


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 08/13] s390: fix short kernel command lines
Date: Sun, 13 Nov 2011 16:33:49 +0100

From: Christian Borntraeger <address@hidden>

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>
Signed-off-by: Alexander Graf <address@hidden>
---
 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




reply via email to

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