Commit 9f069af5 authored by Michael Ellerman's avatar Michael Ellerman Committed by Grant Likely

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: default avatarMichael Ellerman <michael@ellerman.id.au>
Tested-by: default avatarChristian Kujau <lists@nerdbynature.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 7e27d6e7
...@@ -209,6 +209,9 @@ void proc_device_tree_add_node(struct device_node *np, ...@@ -209,6 +209,9 @@ void proc_device_tree_add_node(struct device_node *np,
for (pp = np->properties; pp != NULL; pp = pp->next) { for (pp = np->properties; pp != NULL; pp = pp->next) {
p = pp->name; p = pp->name;
if (strchr(p, '/'))
continue;
if (duplicate_name(de, p)) if (duplicate_name(de, p))
p = fixup_name(np, de, p); p = fixup_name(np, de, p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment