diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-12-03 17:14:59 +0100 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-12-04 14:38:18 +0100 |
commit | 4480e19e555318d04a8b63f8e5ef827b627ea408 (patch) | |
tree | e163044ec3643727a5004d808eb71acc30a6f23d /filescan-utils.c | |
parent | 5b9cce9fd0a1da9aeaaba8465f9a2780282a2247 (diff) |
Add 'GetAFBRootDirPath' function
Add 'GetAFBRootDirPath' function that replace 'GetBindingDirPath'
function as previous 'GetBindingDirPath' was returning
'Binder root directory path' and not 'Binding directory path'.
'GetBindingDirPath' function has been kept to call 'GetAFBRootDirPath'
for compatibility issues.
FYI:
- 'Binding directory path' is the path to the directory that contains
the binding.
- 'Binder root directory path' is the path specified at binder launch
using '--rootdir' option. If no option is specified, binder root
directory is set to the current directory.
BUG-AGL: SPEC-3009
Change-Id: I3f4bb64f1d67558a291481e0987bd93666535add
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'filescan-utils.c')
-rw-r--r-- | filescan-utils.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/filescan-utils.c b/filescan-utils.c index 6c6cf84..236e192 100644 --- a/filescan-utils.c +++ b/filescan-utils.c @@ -151,7 +151,7 @@ const char* GetBinderName() return binderName; } -char *GetBindingDirPath_(int fd) +char *GetAFBRootDirPathUsingFd(int fd) { // A file description should not be greater than 999.999.999 char fd_link[CONTROL_MAXPATH_LEN]; @@ -170,6 +170,15 @@ char *GetBindingDirPath_(int fd) return strndup(retdir, sizeof(retdir)); } +char *GetAFBRootDirPath(afb_api_t apiHandle) +{ + int fd; + + fd = afb_api_rootdir_get_fd(apiHandle); + + return GetAFBRootDirPathUsingFd(fd); +} + |