aboutsummaryrefslogtreecommitdiffstats
path: root/filescan-utils.c
AgeCommit message (Collapse)AuthorFilesLines
2018-11-30filescan-utils: follow symbolic links in searchguppy_6.99.2guppy/6.99.26.99.2Thierry Bultel1-1/+3
Let the directory entities of symlink type be taken into account. Change-Id: Ic0197e81d1e0c761ca6a0fe9ea2dbcb56eee447b Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-07-25Add '@' as binder middle name separator.Romain Forlot1-1/+1
Used binder name if set using the application id which use '@' to separate name from version. Change-Id: I1c4d963250ac17d4e4104b6cc69aa08b8fa95505 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-20Fix: use of GetBindingDirPath without dynapisandbox/claneys/signalComposerFixRomain Forlot1-2/+6
For classic binding < 3 without dynapi this fix the error at compile time about conflicting type for this function. This worked on eel and previous version because 'struct dynapi' was declared and available for version 2 but now since binder is in V3 then it isn't the case so function signature is not valid anymore. Change-Id: I135a723d21d70b8c54f4cab1c534210757318ed0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-17Retrieve directory list from environment variablesRomain Forlot1-0/+78
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>
2018-07-10Use binding version to handle dynapiJonathan Aillet1-1/+1
Use binding version to define dynamic api debug messages function. It is also cleaner to define binding version directly into repository cmake than into a header like before this commit. Change-Id: Ia14f635a7a2cec05c29f27ee4ce645711a8574a4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-07-03At search, use the prefix parameter as a prefixJonathan Aillet1-1/+1
Be sure that prefix parameter is used as a prefix when searching for configuration files (when using 'ScanForConfig' function). Before this change, the function was only checking that the prefix parameter was present in the file name (but not necessarily at the beginning of the file name). Bug-AGL:SPEC-1239 Change-Id: I9986cce5fab0fd5cd6d3049731f4c5883056a5f4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-06-07Removed anonymous function in ScanDir and fixed warningsSebastien Douheret1-71/+78
Change-Id: Ie6b67506be077f8fe5c2108e5dd98f9460dda485 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-05-18Fixed spellingSebastien Douheret1-2/+2
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-05-17More secure way to use strncat and strncpyRomain Forlot1-3/+3
This ensure not data will be written out of bound of the destination variable buffer Change-Id: I4d736855f085fc5f728258c5928fed7191df46b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-15Fix: compile errors depending API versionRomain Forlot1-4/+7
Change-Id: I9c1476ab35f9bf70322ad4cd81ab0790e4d0724b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-11Fix: wrong searchPath parameterRomain Forlot1-5/+10
Change initialization parts of the function to be clearer and ensure that at least searchPath has been correctly passed Change-Id: Ic055e2c244b261b33960072f51193fcbbd48c222 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-09Documentate, formating, linting.Romain Forlot1-8/+8
Change-Id: Id77b9de1b847ca26133abd87511de4e78c7d01f7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-09Adapt function to dynamic APIRomain Forlot1-6/+7
A dynamic API being dynamic, you need to pass as parameter on behalf of which API you want to act. If you are using classic v2 API then just pass a NULL pointer value. Change-Id: I9ac6b606ff25c63a05a647e418a7c2bcc4b2a7fe Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-05-09FormatingRomain Forlot1-4/+4
Change-Id: I16ee9154f4f5a7e71af83a22899a94f00e07aa79 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-08Fix memory leakRomain Forlot1-1/+2
Change-Id: Ia02a639ea9210ed7961a88c91ff9e4cd1a732416 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-12-08Avoid memory collision.Romain Forlot1-1/+1
Change-Id: I805a725d6b9477fcb690d7c2c7cbb6bb4f112dfb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-10-24Fix to support pre-V3 DynAPIFulup Ar Foll1-6/+14
2017-10-23Prepare for future API-V3Fulup Ar Foll1-0/+2
2017-09-14Misc Fix/CleaningRomain Forlot1-3/+1
- Correct size type ssize_t to test - Remove free() statement because memory don't issued from a malloc causing exception - Remove redundant break statement after a return. Change-Id: I47824dd5cf7afe68cd32e1c3e94e69f31d802995 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-09Concatenate result directly from GetBindingDirPathRomain Forlot1-1/+1
Return non const char pointer. Change-Id: I975b18f72d26c1a2749ca54e4f096271497047dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-09Fix: mismatching function signature.Romain Forlot1-1/+1
Change-Id: I5d3c8b34a4e42c867fe1e3eccd96aaa2cc9c5ca6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-08Only return binding root dir.Romain Forlot1-26/+5
If subdirs path is needed then concatenation as to be done using the rootdir. Change-Id: I50a1eeb1f853ae26995a96e1661ff38cb7959f60 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-08More reliable GetBindingDirsPath function.Romain Forlot1-21/+29
Only return a wanted directory path not a complex structure. Change-Id: I5b5a1dea2c55ee6a76dbbbd52c3ebfdd684255e5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-04Retrieve binder rootdir and subfolder pathsRomain Forlot1-0/+37
Change-Id: I064bf4831be40de70dab68b72489c4fdfc69e9c4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-09-04Reduce scope for some variablesRomain Forlot1-2/+2
Change-Id: Ic89421054a83709eec6afaa22dbb4373bcff9b19 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-08-30Rename back define variable.Romain Forlot1-1/+1
Change-Id: Ie0d40f08230170ef780c46748889e153618d1c44 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-08-29fix strncat functRonan Le Martret1-2/+2
I: Statement might be overflowing a buffer in strncat. Common mistake: BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1) Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-08-29Fix: set default value if missing defined varRomain Forlot1-1/+1
Change-Id: I93f8546e2cfe7fc11fdf0f956f10429f6c0ad8d0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-08-22Format and missing header dependenciesRomain Forlot1-19/+21
Change-Id: If5890445bdb6a676ee6c435f50a27caa8ca5850d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-08-22Remove audio-bindings dependenciesRomain Forlot1-5/+1
Change-Id: Iad5c51cca8a659ca3c77dd63ce7920e0f54faf63 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2017-08-22Initializing the repoRomain Forlot1-0/+124
Change-Id: I354a1c136a57e1ec8d511041fbd13a19b730c419 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>