]> git.sur5r.net Git - u-boot/blobdiff - test/overlay/cmd_ut_overlay.c
libfdt: Bring in upstream stringlist functions
[u-boot] / test / overlay / cmd_ut_overlay.c
index 87dc9328c674bda7f13773e3183b7b2ba9983208..cbef720b4c091fd0b8075e0c60ca852b582032ff 100644 (file)
@@ -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)