Retrieve directory list from environment variables 77/15377/4
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 12 Jul 2018 16:18:43 +0000 (18:18 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Mon, 16 Jul 2018 22:51:53 +0000 (00:51 +0200)
commit4f99d163cb8a993f176f305566dbd8a93c79144c
tree829a0012c7e8bc030aaafa2cbd38a4bac2483579
parentf46a0dca64c56d78d08b5c4f84d011f8beaa55d3
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