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 /translate.cxx | |
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 'translate.cxx')
-rw-r--r-- | translate.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx index 56d6de4c..65acd2ca 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1189,7 +1189,7 @@ c_unparser::emit_module_init () o->newline() << "if (sizeof (struct context) <= 131072)"; o->newline(1) << "contexts = alloc_percpu (struct context);"; o->newline(-1) << "if (contexts == NULL) {"; - o->newline(1) << "_stp_error (\"percpu context (size %lu) allocation failed\", sizeof (struct context));"; + o->newline(1) << "_stp_error (\"percpu context (size %lu) allocation failed\", (unsigned long) sizeof (struct context));"; o->newline() << "rc = -ENOMEM;"; o->newline() << "goto out;"; o->newline(-1) << "}"; |