From 13449a6e0ecf6c73e34657100566a471f0c26bbb Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Fri, 23 Sep 2011 03:38:12 +0000 Subject: [PATCH] s390: fix short kernel command lines 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index 003d5ab984..ee850f0559 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 */ -- 2.30.2