diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2010-05-18 22:32:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-13 20:12:24 -0400 |
commit | 9f069af5b62919151d76b37a3b168cbb34c874c3 (patch) | |
tree | a6ea761977c26adaada8e4b242832e1474cfbb58 /fs | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
of: Drop properties with "/" in their name
Some bogus firmwares include properties with "/" in their name. This
causes problems when creating the /proc/device-tree file system,
because the slash is taken to indicate a directory.
We don't care about those properties, and we don't want to encourage
them, so just throw them away when creating /proc/device-tree.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/proc_devtree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index ce94801f48c..d9396a4fc7f 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c | |||
@@ -209,6 +209,9 @@ void proc_device_tree_add_node(struct device_node *np, | |||
209 | for (pp = np->properties; pp != NULL; pp = pp->next) { | 209 | for (pp = np->properties; pp != NULL; pp = pp->next) { |
210 | p = pp->name; | 210 | p = pp->name; |
211 | 211 | ||
212 | if (strchr(p, '/')) | ||
213 | continue; | ||
214 | |||
212 | if (duplicate_name(de, p)) | 215 | if (duplicate_name(de, p)) |
213 | p = fixup_name(np, de, p); | 216 | p = fixup_name(np, de, p); |
214 | 217 | ||