diff options
author | Dave Brolley <brolley@redhat.com> | 2009-09-16 12:18:50 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-09-16 12:18:50 -0400 |
commit | 0f4a9cb5967714ace01e0941592040b8c1d83ee7 (patch) | |
tree | f97784dbd9392694931c1be99abf7920f6f0484b /runtime/io.c | |
parent | d83d7b513d38791751e46a05e382b1e6876abefc (diff) | |
parent | d833f810e4ffaf5c9c16eebc7f10b9d14e53e508 (diff) | |
download | systemtap-steved-0f4a9cb5967714ace01e0941592040b8c1d83ee7.tar.gz systemtap-steved-0f4a9cb5967714ace01e0941592040b8c1d83ee7.tar.xz systemtap-steved-0f4a9cb5967714ace01e0941592040b8c1d83ee7.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/io.c')
-rw-r--r-- | runtime/io.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/io.c b/runtime/io.c index 687926fd..0136aae5 100644 --- a/runtime/io.c +++ b/runtime/io.c @@ -32,7 +32,7 @@ static void _stp_vlog (enum code type, const char *func, int line, const char *f int start = 0; if (type == DBUG) { - start = _stp_snprintf(buf, STP_LOG_BUF_LEN, "\033[36m%s:%d:\033[0m ", func, line); + start = _stp_snprintf(buf, STP_LOG_BUF_LEN, "%s:%d: ", func, line); } else if (type == WARN) { strcpy (buf, WARN_STRING); start = sizeof(WARN_STRING) - 1; @@ -49,12 +49,19 @@ static void _stp_vlog (enum code type, const char *func, int line, const char *f buf[num + start] = '\0'; } +#ifdef STAP_DEBUG_PRINTK + if (type == DBUG) printk (KERN_DEBUG "%s", buf); + else if (type == WARN) printk (KERN_WARNING "%s", buf); + else if (type == ERROR) printk (KERN_ERR "%s", buf); + else printk (KERN_INFO "%s", buf); +#else if (type != DBUG) _stp_ctl_write(STP_OOB_DATA, buf, start + num + 1); else { _stp_print(buf); _stp_print_flush(); } +#endif } put_cpu(); } |