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>
This commit is contained in:
Christian Borntraeger 2011-09-23 03:38:12 +00:00 committed by Alexander Graf
parent e9d86b760c
commit 13449a6e0e
1 changed files with 1 additions and 1 deletions

View File

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