diff options
author | Amos Waterland <apw@us.ibm.com> | 2006-06-12 23:45:02 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-15 05:31:26 -0400 |
commit | 0e4aa9c2009187fff1c999fe0aaa134c1a84f48a (patch) | |
tree | 9680eac732205bd6e0c0b2135357b718a336b95c /arch/powerpc/kernel/prom_init.c | |
parent | 6fe87675314b4b1ac7ba339e2a4ab8d739b600d6 (diff) |
[POWERPC] Fix builtin command line interaction with firmware
It seems that prom_init's early_cmdline_parse is broken on at least
Apple 970 xserves and IBM JS20 blades with SLOF. The firmware of these
machines returns -1 and 1 respectively when getprop is called for the
bootargs property of /chosen, causing Linux to ignore its builtin
command line in favor of a null string. This patch makes Linux use its
builtin command line if getprop returns an error or a null string.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 57d8a16438a0..8c28eb0cbdac 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -567,7 +567,7 @@ static void __init early_cmdline_parse(void) | |||
567 | if ((long)_prom->chosen > 0) | 567 | if ((long)_prom->chosen > 0) |
568 | l = prom_getprop(_prom->chosen, "bootargs", p, COMMAND_LINE_SIZE-1); | 568 | l = prom_getprop(_prom->chosen, "bootargs", p, COMMAND_LINE_SIZE-1); |
569 | #ifdef CONFIG_CMDLINE | 569 | #ifdef CONFIG_CMDLINE |
570 | if (l == 0) /* dbl check */ | 570 | if (l <= 0 || p[0] == '\0') /* dbl check */ |
571 | strlcpy(RELOC(prom_cmd_line), | 571 | strlcpy(RELOC(prom_cmd_line), |
572 | RELOC(CONFIG_CMDLINE), sizeof(prom_cmd_line)); | 572 | RELOC(CONFIG_CMDLINE), sizeof(prom_cmd_line)); |
573 | #endif /* CONFIG_CMDLINE */ | 573 | #endif /* CONFIG_CMDLINE */ |