From: José Bollo Date: Tue, 24 Jul 2018 08:00:17 +0000 (+0200) Subject: afb-api: Define the function afb_api_is_public X-Git-Tag: 5.99.3~22 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=commitdiff_plain;h=4c0f6ce66c66d39dc61ec661d88277c51d2fd9ae afb-api: Define the function afb_api_is_public And remove the info line setting that the API . is added. Change-Id: I42e247036b9a1016797bb2674ad95f8a8c30e9be Signed-off-by: José Bollo --- diff --git a/src/afb-api.h b/src/afb-api.h index 821bccbe..c21f3bb9 100644 --- a/src/afb-api.h +++ b/src/afb-api.h @@ -41,4 +41,9 @@ struct afb_api_item extern int afb_api_is_valid_name(const char *name); +static inline int afb_api_is_public(const char *name) +{ + return *name != '.'; +} + diff --git a/src/afb-apiset.c b/src/afb-apiset.c index 994a9c7e..f837fae7 100644 --- a/src/afb-apiset.c +++ b/src/afb-apiset.c @@ -495,7 +495,8 @@ int afb_apiset_add(struct afb_apiset *set, const char *name, struct afb_api_item desc->next = all_apis; all_apis = desc; - INFO("API %s added", name); + if (afb_api_is_public(name)) + INFO("API %s added", name); return 0; diff --git a/src/afb-hook.c b/src/afb-hook.c index 48eb582a..6956a837 100644 --- a/src/afb-hook.c +++ b/src/afb-hook.c @@ -45,7 +45,7 @@ #define MATCH(pattern,string) (\ pattern \ ? !fnmatch((pattern),(string),FNM_CASEFOLD|FNM_EXTMATCH|FNM_PERIOD) \ - : (string)[0] != '.') + : afb_api_is_public(string)) #define MATCH_API(pattern,string) MATCH(pattern,string) #define MATCH_VERB(pattern,string) MATCH(pattern,string)