summaryrefslogtreecommitdiffstats
path: root/runtime/io.c
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-09-14 17:47:26 -0400
committerDave Brolley <brolley@redhat.com>2009-09-14 17:47:26 -0400
commit9df741675d7e36008869dfff46ccc602875dc091 (patch)
tree1deafeacb302f9154586708ada7a240470aa6b4a /runtime/io.c
parentb232fab3a271c4c787462295d7ffbeca750c1092 (diff)
parent775c3771bb4a5f663a763d7c65b1571e24e4b212 (diff)
downloadsystemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.gz
systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.xz
systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: aclocal.m4 configure doc/SystemTap_Tapset_Reference/Makefile.in testsuite/aclocal.m4 testsuite/configure
Diffstat (limited to 'runtime/io.c')
-rw-r--r--runtime/io.c9
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();
}