From 1cec27787204f5310b75455ad29e441681556bde Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 1 Jun 2005 17:02:22 +1000 Subject: [PATCH] --- yaml --- r: 1754 b: refs/heads/master c: f93ea2349832c040bdf66dc7495aa87bfe3394b8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/ppc/syslib/prom_init.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cad03f539a96..3f087db88185 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44e4665cc9d856d15f04a012c78e4ab48f71290b +refs/heads/master: f93ea2349832c040bdf66dc7495aa87bfe3394b8 diff --git a/trunk/arch/ppc/syslib/prom_init.c b/trunk/arch/ppc/syslib/prom_init.c index 2cee87137f2e..7f15136830f4 100644 --- a/trunk/arch/ppc/syslib/prom_init.c +++ b/trunk/arch/ppc/syslib/prom_init.c @@ -626,8 +626,18 @@ inspect_node(phandle node, struct device_node *dad, l = call_prom("package-to-path", 3, 1, node, mem_start, mem_end - mem_start); if (l >= 0) { + char *p, *ep; + np->full_name = PTRUNRELOC((char *) mem_start); *(char *)(mem_start + l) = 0; + /* Fixup an Apple bug where they have bogus \0 chars in the + * middle of the path in some properties + */ + for (p = (char *)mem_start, ep = p + l; p < ep; p++) + if ((*p) == '\0') { + memmove(p, p+1, ep - p); + ep--; + } mem_start = ALIGNUL(mem_start + l + 1); }