diff options
Diffstat (limited to 'runtime/io.c')
-rw-r--r-- | runtime/io.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/io.c b/runtime/io.c new file mode 100644 index 00000000..3371df16 --- /dev/null +++ b/runtime/io.c @@ -0,0 +1,19 @@ +/** Logs data. + * This function is compatible with printk. In fact it currently + * sends all output to vprintk, after sending "STP: ". This allows + * us to easily detect SystemTap output in the log file. + * + * @param fmt A variable number of args. + * @bug Lines are limited in length by printk buffer. + * @todo Needs replaced with something much faster that does not + * use the system log. + */ +void dlog (const char *fmt, ...) +{ + va_list args; + printk("STP: "); + va_start(args, fmt); + vprintk(fmt, args); + va_end(args); +} + |