summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2016-09-20 17:04:04 +0200
committerMichael Grzeschik <m.grzeschik@pengutronix.de>2016-09-22 18:07:27 +0200
commit3c4b24e451116676bfa7dcf867d2c25fa21634a6 (patch)
tree6602753ae1dff13feb81fdf0b51424045ce15541
parent29d2ac62e2c220fee94def3e993ef57fd5eb2114 (diff)
downloaddt-utils-3c4b24e451116676bfa7dcf867d2c25fa21634a6.tar.gz
libdt: take the parent to search for block devices
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
-rw-r--r--src/libdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libdt.c b/src/libdt.c
index 752feab..49b29a5 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -2373,6 +2373,11 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
return ret;
return of_parse_partition(partition_node, offset, size);
+ } else {
+ ret = device_find_block_device(dev, devpath);
+ if (ret)
+ return ret;
+ return of_parse_partition(partition_node, offset, size);
}
return -EINVAL;