diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-09-02 12:01:27 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-09-02 12:01:27 -0400 |
commit | e66aaecc057ef417d0dd1d0b94454f6704147e7f (patch) | |
tree | 9eb27159000da1d759c4b12c9af4cb04ebc9abed /runtime/runtime.h | |
parent | cce3b4efd1f1401246f1e1301040414db00891fa (diff) | |
download | systemtap-steved-e66aaecc057ef417d0dd1d0b94454f6704147e7f.tar.gz systemtap-steved-e66aaecc057ef417d0dd1d0b94454f6704147e7f.tar.xz systemtap-steved-e66aaecc057ef417d0dd1d0b94454f6704147e7f.zip |
PR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtime
_stp_vscnprintf is only suitable for calls from the script, with slightly
different conventions (64-bit ints/pointers, extra formatting directives).
* runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf).
* runtime/io.c (_stp_vlog): Ditto. Use vscnprintf().
* runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching
buildids. Switch to _stp_warn from printk (KERN_WARNING).
* translate.cxx, runtime/unwind.c: Numerous print formatting tweaks.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index c3bf501d..064ded7b 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -48,9 +48,9 @@ #define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) #endif -static void _stp_dbug (const char *func, int line, const char *fmt, ...); -static void _stp_error (const char *fmt, ...); -static void _stp_warn (const char *fmt, ...); +static void _stp_dbug (const char *func, int line, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); +static void _stp_error (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +static void _stp_warn (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); static void _stp_exit(void); |