Retrieve directory list from environment variables
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 12 Jul 2018 16:18:43 +0000 (18:18 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Thu, 13 Dec 2018 13:12:02 +0000 (14:12 +0100)
commit8e336b0822974695493a45445ec16908bd0c19c8
tree829a0012c7e8bc030aaafa2cbd38a4bac2483579
parent988eaf6000edbec0e86e2ee79b17cc758c1ae4a9
Retrieve directory list from environment variables

This adds a function able to retrieve from a prefix and suffix
an environment variable. This is meant to search config or plugin
files from potentially several sources, environment and source code.

This tries to get 2 environments variables:

- prefix+binderName+suffix (eg: AFT_LOWCAN_CONFIG_PATH)
- prefix+suffix (eg: AFT_CONFIG_PATH)

Then it returns the one found or both if they exist with the
most accurate one (with the binder name) first followed by the
other.

Change-Id: Ic448ff017e6158bec05895d63688b8968b5c6434
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
filescan-utils.c
filescan-utils.h