summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-10-02 17:59:28 -0600
committerSimon Glass <sjg@chromium.org>2016-10-13 13:54:10 -0600
commitb02e4044ff8ee1f6ac83917a39514172a9b449fb (patch)
treed8f1e23e27364854c39a6592958382d5bdc1ef62 /test
parent9c07b9877cf07a1a971a79ed7c2369a58c0baca2 (diff)
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match. This applies the following upstream commits by Thierry Reding <treding@nvidia.com> : 604e61e fdt: Add functions to retrieve strings 8702bd1 fdt: Add a function to get the index of a string 2218387 fdt: Add a function to count strings Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/overlay/cmd_ut_overlay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index 87dc9328c6..cbef720b4c 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -52,12 +52,15 @@ static int fdt_getprop_str(void *fdt, const char *path, const char *name,
const char **out)
{
int node_off;
+ int len;
node_off = fdt_path_offset(fdt, path);
if (node_off < 0)
return node_off;
- return fdt_get_string(fdt, node_off, name, out);
+ *out = fdt_stringlist_get(fdt, node_off, name, 0, &len);
+
+ return len < 0 ? len : 0;
}
static int fdt_overlay_change_int_property(struct unit_test_state *uts)