diff options
| author | Subhani Shaik <subhanis@qca.qualcomm.com> | 2014-03-01 17:53:01 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-03 10:38:27 -0800 |
| commit | f9dbbafd311daf1c85c8b6d445d1b85b9406894d (patch) | |
| tree | c8328713ef4b426d655833e31f4d8f552931e583 /tools/fwdebuglog/parser.c | |
| parent | 6bfba9c2efa8dd2ca11a63f9a0da5252d5a96ffe (diff) | |
qxdm log missing for sub modules.
In the parser the QXDM log wrapper was missing for
some functions which was causing the logs to go to
console. Modified to check the global flag and route
accordingly.
Change-Id: I7e5b2009764c753ad1f3b27c7be4ad1cad832b24
CRs-fixed: 624844
Diffstat (limited to 'tools/fwdebuglog/parser.c')
| -rw-r--r-- | tools/fwdebuglog/parser.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/tools/fwdebuglog/parser.c b/tools/fwdebuglog/parser.c index 3b555aa6613c..5e90362ee11c 100644 --- a/tools/fwdebuglog/parser.c +++ b/tools/fwdebuglog/parser.c @@ -1057,18 +1057,25 @@ dbglog_printf( { char buf[128]; va_list ap; + int j; if (vap_id < DBGLOG_MAX_VDEVID) { - printf(DBGLOG_PRINT_PREFIX "[%u] vap-%u ", timestamp, vap_id); + j = snprintf(buf, sizeof(buf), DBGLOG_PRINT_PREFIX + "[%u] vap-%u ", timestamp, vap_id); } else { - printf(DBGLOG_PRINT_PREFIX "[%u] ", timestamp); + j = snprintf(buf, sizeof(buf), DBGLOG_PRINT_PREFIX + "[%u] ", timestamp); } va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); + vsnprintf(buf+j, sizeof(buf)-j, fmt, ap); va_end(ap); - printf("%s\n", buf); + if (optionflag & QXDM_FLAG) { + qxdm_log(buf); + } else { + printf("%s\n", buf); + } } void @@ -1079,18 +1086,25 @@ dbglog_printf_no_line_break( { char buf[128]; va_list ap; + int j; if (vap_id < DBGLOG_MAX_VDEVID) { - printf(DBGLOG_PRINT_PREFIX "[%u] vap-%u ", timestamp, vap_id); + j = snprintf(buf, sizeof(buf), DBGLOG_PRINT_PREFIX + "[%u] vap-%u ", timestamp, vap_id); } else { - printf(DBGLOG_PRINT_PREFIX "[%u] ", timestamp); + j = snprintf(buf, sizeof(buf), DBGLOG_PRINT_PREFIX + "[%u] ", timestamp); } va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); + vsnprintf(buf+j, sizeof(buf)-j, fmt, ap); va_end(ap); - printf("%s", buf); + if (optionflag & QXDM_FLAG) { + qxdm_log(buf); + } else { + printf("%s", buf); + } } #define USE_NUMERIC 0 |
