diff options
author | 2018-01-25 05:13:40 +0000 | |
---|---|---|
committer | 2018-01-27 18:43:21 +1100 | |
commit | f1879e1a50ebc3786540a075701ccaead2bfbe1f (patch) | |
tree | bfc6f37f2055cb4d253254701f43391c5b563abe /fdtget.c | |
parent | 37dea76e9700fa4799b4cb1abfd74b121f6e3dd8 (diff) |
Add limited read-only support for older (V2 and V3) device tree to libfdt.
This can be useful in particular in the kernel when booting on systems
with FDT-emitting firmware that is out of date. Releases of kexec-tools
on ppc64 prior to the end of 2014 are notable examples of such.
Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
[dwg: Some whitespace cleanups]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'fdtget.c')
-rw-r--r-- | fdtget.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -140,7 +140,6 @@ static int show_data(struct display_info *disp, const char *data, int len) */ static int list_properties(const void *blob, int node) { - const struct fdt_property *data; const char *name; int prop; @@ -149,8 +148,7 @@ static int list_properties(const void *blob, int node) /* Stop silently when there are no more properties */ if (prop < 0) return prop == -FDT_ERR_NOTFOUND ? 0 : prop; - data = fdt_get_property_by_offset(blob, prop, NULL); - name = fdt_string(blob, fdt32_to_cpu(data->nameoff)); + fdt_getprop_by_offset(blob, prop, &name, NULL); if (name) puts(name); prop = fdt_next_property_offset(blob, prop); |