From 4480e19e555318d04a8b63f8e5ef827b627ea408 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Tue, 3 Dec 2019 17:14:59 +0100 Subject: 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 --- docs/filescan-utils.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'docs/filescan-utils.md') diff --git a/docs/filescan-utils.md b/docs/filescan-utils.md index 4a4c2d2..d91ff1c 100644 --- a/docs/filescan-utils.md +++ b/docs/filescan-utils.md @@ -26,13 +26,37 @@ Scan a directory searching all files matching pattern: 'prefix*extention'. Returns a json_object array of object with 2 parts a 'fullpath' describing the fullpath to reach the file and 'filename' containing the matched files. -## char *GetBindingDirPath_(afb_api_t api) +## char *GetAFBRootDirPathUsingFd(int fd) -For binding with a version >= 3, get the root directory path. +Get the binder root directory path (the path specified with '--rootdir' option +at binder launch, if the option is not used, the path from where the binder +is launched) using binder root directory file descriptor. -* `api` : pointer to the AFB API. +* `fd` : Binder root directory file descriptor. -Returns a string representing the path to binding root directory. +Returns a string representing the path to binder root directory. + +## char *GetAFBRootDirPath(afb_api_t apiHandle) + +For binding with a version >= 3, same as 'GetAFBRootDirPathUsingFd' function, +but use pointer to the AFB API as parameter instead of +binder root directory file descriptor. + +* `apiHandle` : pointer to the AFB API. + +Returns a string representing the path to binder root directory. + +## char* GetBindingDirPath() + +For binding with a version <= 2, same as 'GetAFBRootDirPath' function, +but the pointer to the AFB API is not needed. +Kept for compatibility issues. + +## char* GetBindingDirPath(afb_api_t api) + +For binding with a version >= 3, same as 'GetAFBRootDirPath' function. +Deprecated, please use 'GetAFBRootDirPath' function. +Kept for compatibility issues. ## const char *getEnvDirList(const char *prefix, const char *suffix) -- cgit 1.2.3-korg