diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-02-26 16:37:51 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:32 -0500 |
commit | 61fd330dee1606a6bdb741f9c156bca386a4e438 (patch) | |
tree | f75e704da40d315edc830e5fc729d7108f4bb262 /arch/s390/kernel/early.c | |
parent | 34b9243a300736c08dc32eaeb2f359401fcf9c0a (diff) |
[S390] codepage conversion of kernel parameter line
Move the ebcdic to ascii conversion of the kernel parameter line from
head.S to early.c and convert the assembler code to C.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 02e45861b55b..31d618a443af 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -405,8 +405,19 @@ static void __init append_to_cmdline(size_t (*ipl_data)(char *, size_t)) | |||
405 | 405 | ||
406 | static void __init setup_boot_command_line(void) | 406 | static void __init setup_boot_command_line(void) |
407 | { | 407 | { |
408 | int i; | ||
409 | |||
410 | /* convert arch command line to ascii */ | ||
411 | for (i = 0; i < ARCH_COMMAND_LINE_SIZE; i++) | ||
412 | if (COMMAND_LINE[i] & 0x80) | ||
413 | break; | ||
414 | if (i < ARCH_COMMAND_LINE_SIZE) | ||
415 | EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); | ||
416 | COMMAND_LINE[ARCH_COMMAND_LINE_SIZE-1] = 0; | ||
417 | |||
408 | /* copy arch command line */ | 418 | /* copy arch command line */ |
409 | strlcpy(boot_command_line, COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); | 419 | strlcpy(boot_command_line, strstrip(COMMAND_LINE), |
420 | ARCH_COMMAND_LINE_SIZE); | ||
410 | 421 | ||
411 | /* append IPL PARM data to the boot command line */ | 422 | /* append IPL PARM data to the boot command line */ |
412 | if (MACHINE_IS_VM) | 423 | if (MACHINE_IS_VM) |