From: Thierry Reding <treding@xxxxxxxxxx> These three patches add a couple of string functions that have proven useful in U-Boot's copy of libfdt, so they are likely to be useful for other users as well. Patch 1 adds a function to count the number of strings in a property's value. This also adds a new DTS sample along with a small test program to validate the implemented functions. Patch 2 adds a function to retrieve the index of a given string in any given property's value. This adds code to the test program introduced in the previous patch to exercise the new functionality. Patch 3 adds a function to retrieve a string by index from a property's value along with a shortcut for index 0. This extends the test program introduced in patch 1 to validate the new functionality. Thierry Thierry Reding (3): fdt: Add a function to count strings fdt: Add a function to get the index of a string fdt: Add functions to retrieve strings libfdt/fdt_ro.c | 76 +++++++++++++++++++++++++++++++++++ libfdt/libfdt.h | 47 ++++++++++++++++++++++ tests/.gitignore | 1 + tests/Makefile.tests | 1 + tests/run_tests.sh | 3 ++ tests/strings.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/strings.dts | 10 +++++ 7 files changed, 248 insertions(+) create mode 100644 tests/strings.c create mode 100644 tests/strings.dts -- 2.4.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html