aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2011-09-23 03:38:12 +0000
committerAlexander Graf <agraf@suse.de>2011-11-14 17:47:26 +0100
commit13449a6e0ecf6c73e34657100566a471f0c26bbb (patch)
tree30a680459eb7731510c38b37f9bb11662e9b0b01
parente9d86b760cca52dc35c7716873c342eb03c22b61 (diff)
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 <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--hw/s390-virtio.c2
1 files changed, 1 insertions, 1 deletions
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 */