mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
3a9b6dc313
SVN-Revision: 31336
32 lines
1023 B
Diff
32 lines
1023 B
Diff
From 3ea88c1089b88b4860919a9cdea0cc5da4d09e2c Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <blogic@openwrt.org>
|
|
Date: Fri, 12 Aug 2011 16:27:38 +0200
|
|
Subject: [PATCH 09/70] MIPS: lantiq: fix cmdline parsing
|
|
|
|
The code tested if the KSEG1 mapped address of argv was != 0. We need to use
|
|
CPHYSADDR instead to make the conditional actually work.
|
|
|
|
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
---
|
|
arch/mips/lantiq/prom.c | 6 ++++--
|
|
1 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- a/arch/mips/lantiq/prom.c
|
|
+++ b/arch/mips/lantiq/prom.c
|
|
@@ -49,10 +49,12 @@ static void __init prom_init_cmdline(voi
|
|
char **argv = (char **) KSEG1ADDR(fw_arg1);
|
|
int i;
|
|
|
|
+ arcs_cmdline[0] = '\0';
|
|
+
|
|
for (i = 0; i < argc; i++) {
|
|
- char *p = (char *) KSEG1ADDR(argv[i]);
|
|
+ char *p = (char *) KSEG1ADDR(argv[i]);
|
|
|
|
- if (p && *p) {
|
|
+ if (CPHYSADDR(p) && *p) {
|
|
strlcat(arcs_cmdline, p, sizeof(arcs_cmdline));
|
|
strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
|
|
}
|