Signed-off-by: Mike Leach mike.leach@linaro.org --- decoder/tests/source/c_api_pkt_print_test.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/decoder/tests/source/c_api_pkt_print_test.c b/decoder/tests/source/c_api_pkt_print_test.c index bc64d4c..7ae09f6 100644 --- a/decoder/tests/source/c_api_pkt_print_test.c +++ b/decoder/tests/source/c_api_pkt_print_test.c @@ -882,7 +882,7 @@ int main(int argc, char *argv[]) { FILE *trace_data; char trace_file_path[512]; - int ret = 0; + int ret = 0, i, len; char message[512];
/* command line params */ @@ -910,6 +910,22 @@ int main(int argc, char *argv[]) sprintf(message, "C-API packet print test\nLibrary Version %s\n\n",ocsd_get_version_str()); ocsd_def_errlog_msgout(message);
+ /* print command line used */ + message[0] = 0; + len = 0; + for (i = 0; i < argc; i++) + { + len += strlen(argv[i]) + 1; + if (len < 512) + { + strcat(message, argv[i]); + strcat(message, " "); + } + } + if((len + 2) < 512) + strcat(message, "\n\n"); + ocsd_def_errlog_msgout(message); + /* process the trace data */ if(ret == 0) ret = process_trace_data(trace_data);