diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2020-04-23 14:11:11 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-04-30 15:35:41 +0100 |
commit | 80972d3bb2dbc6a47bae84b694c14acba9c1de64 (patch) | |
tree | 8d96c454a21ce2c747619bef49f610eeb8675260 /device_tree.c | |
parent | 51c510aa5876a681cd0059ed3bacaa17590dc2d5 (diff) | |
download | qemu-80972d3bb2dbc6a47bae84b694c14acba9c1de64.zip qemu-80972d3bb2dbc6a47bae84b694c14acba9c1de64.tar.gz qemu-80972d3bb2dbc6a47bae84b694c14acba9c1de64.tar.bz2 |
device_tree: Allow name wildcards in qemu_fdt_node_path()
Allow name wildcards in qemu_fdt_node_path(). This is useful
to find all nodes with a given compatibility string.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 20200423121114.4274-2-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'device_tree.c')
-rw-r--r-- | device_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device_tree.c b/device_tree.c index bba6cc2..f5b4699 100644 --- a/device_tree.c +++ b/device_tree.c @@ -308,7 +308,7 @@ char **qemu_fdt_node_path(void *fdt, const char *name, char *compat, offset = len; break; } - if (!strcmp(iter_name, name)) { + if (!name || !strcmp(iter_name, name)) { char *path; path = g_malloc(path_len); |