X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-config.c;h=98dd4e553f805d1085af782beebd162158ddc386;hb=b67e18b39830a01750721787bf3bdc5d71983144;hp=dc3388e4496be41cc24281e6c5323cb26a7f9754;hpb=4dc768d67031aa99e2b885a0df7e643fdd1fa80c;p=src%2Fapp-framework-binder.git diff --git a/src/afb-config.c b/src/afb-config.c index dc3388e4..98dd4e55 100644 --- a/src/afb-config.c +++ b/src/afb-config.c @@ -87,6 +87,7 @@ #define ADD_CALL 'c' #define SET_TRACEDITF 'D' +#define SET_TRACEEVT 'E' #define SET_EXEC 'e' #define DISPLAY_HELP 'h' #define SET_QUIET 'q' @@ -99,7 +100,7 @@ #define SET_VERBOSE 'v' #define SET_WORK_DIR 'w' -#define SHORTOPTS "c:D:ehqrT:t:u:Vvw:" +#define SHORTOPTS "c:D:E:ehqrT:t:u:Vvw:" // Command line structure hold cli --command + help text typedef struct { @@ -154,6 +155,8 @@ static AFB_options cliOptions[] = { {SET_TRACEREQ, 1, "tracereq", "Log the requests: no, common, extra, all"}, {SET_TRACEDITF, 1, "traceditf", "Log the requests: no, common, extra, all"}, {SET_TRACESVC, 1, "tracesvc", "Log the requests: no, all"}, + {SET_TRACEEVT, 1, "traceevt", "Log the requests: no, common, extra, all"}, + {ADD_CALL, 1, "call", "call at start format of val: API/VERB:json-args"}, {SET_NO_HTTPD, 0, "no-httpd", "Forbids HTTP service"}, @@ -192,6 +195,14 @@ static struct enumdesc tracesvc_desc[] = { { NULL, 0 } }; +static struct enumdesc traceevt_desc[] = { + { "no", 0 }, + { "common", afb_hook_flags_evt_common }, + { "extra", afb_hook_flags_evt_extra }, + { "all", afb_hook_flags_evt_all }, + { NULL, 0 } +}; + static struct enumdesc mode_desc[] = { { "local", AFB_MODE_LOCAL }, { "remote", AFB_MODE_REMOTE }, @@ -518,6 +529,10 @@ static void parse_arguments(int argc, char **argv, struct afb_config *config) config->tracesvc = argvalenum(optc, tracesvc_desc); break; + case SET_TRACEEVT: + config->traceevt = argvalenum(optc, traceevt_desc); + break; + case SET_NO_HTTPD: noarg(optc); config->noHttpd = 1;