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/sym.c | |
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/sym.c')
-rw-r--r-- | runtime/sym.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/sym.c b/runtime/sym.c index 30b6fc5a..dd2235cc 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -276,24 +276,22 @@ static int _stp_module_check(void) continue; if (memcmp(m->build_id_bits, (unsigned char*) notes_addr, m->build_id_len)) { const char *basename; - basename = strrchr(m->path, '/'); if (basename) basename++; else basename = m->path; + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) - _stp_error ("Build-id mismatch: \"%s\" %.*M" - " vs. \"%s\" %.*M\n", - m->name, m->build_id_len, notes_addr, - basename, m->build_id_len, m->build_id_bits); + _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\"\n", + m->name, basename); return 1; #else /* This branch is a surrogate for kernels * affected by Fedora bug #465873. */ - printk(KERN_WARNING - "Build-id mismatch: \"%s\" vs. \"%s\"\n", - m->name, basename); + _stp_warn (KERN_WARNING + "Build-id mismatch: \"%s\" vs. \"%s\"\n", + m->name, basename); #endif } } /* end checking */ |