summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2010-05-19 02:32:29 +0000
committerGrant Likely <grant.likely@secretlab.ca>2010-06-13 18:12:24 -0600
commit9f069af5b62919151d76b37a3b168cbb34c874c3 (patch)
treea6ea761977c26adaada8e4b242832e1474cfbb58 /fs
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (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.c3
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,
for (pp = np->properties; pp != NULL; pp = pp->next) {
p = pp->name;
+ if (strchr(p, '/'))
+ continue;
+
if (duplicate_name(de, p))
p = fixup_name(np, de, p);