diff options
author | fche <fche> | 2007-02-09 19:01:30 +0000 |
---|---|---|
committer | fche <fche> | 2007-02-09 19:01:30 +0000 |
commit | 07595edc9270134b32153c3e878442758960f47f (patch) | |
tree | 877f3a9996f04bd1840c5d8c980f5b216594aeb8 /tapset | |
parent | 34dde0d3b3f7edad0e449c7ba9113bd3cc123682 (diff) | |
download | systemtap-steved-07595edc9270134b32153c3e878442758960f47f.tar.gz systemtap-steved-07595edc9270134b32153c3e878442758960f47f.tar.xz systemtap-steved-07595edc9270134b32153c3e878442758960f47f.zip |
2007-02-09 Frank Ch. Eigler <fche@elastic.org>
* conversions.stp (*): Make errmsg usage uniform.
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/ChangeLog | 4 | ||||
-rw-r--r-- | tapset/conversions.stp | 22 |
2 files changed, 15 insertions, 11 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 9ac6e525..280398d8 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,7 @@ +2007-02-09 Frank Ch. Eigler <fche@elastic.org> + + * conversions.stp (*): Make errmsg usage uniform. + 2007-02-06 Josh Stone <joshua.i.stone@intel.com> * aux_syscalls.stp, inet_sock.stp, ioblock.stp, ioscheduler.stp, diff --git a/tapset/conversions.stp b/tapset/conversions.stp index fe5adc10..42443360 100644 --- a/tapset/conversions.stp +++ b/tapset/conversions.stp @@ -13,8 +13,8 @@ function kernel_string:string (addr:long) %{ /* pure */ deref_fault: /* branched to from deref() */ { /* XXX: concurrent errors could result in corrupted message string */ - static char errmsg[50]; - snprintf (errmsg, 40, "kernel string copy fault at 0x%p", + static char errmsg[60]; + snprintf (errmsg, sizeof(errmsg), "kernel string copy fault at 0x%p", (void *) (uintptr_t) THIS->addr); CONTEXT->last_error = errmsg; } @@ -26,8 +26,8 @@ function kernel_long:long (addr:long) %{ /* pure */ goto success; deref_fault: /* branched to from deref() */ { - static char errmsg[50]; - snprintf (errmsg, 40, "kernel long copy fault at 0x%p", + static char errmsg[60]; + snprintf (errmsg, sizeof(errmsg), "kernel long copy fault at 0x%p", (void *) (uintptr_t) THIS->addr); CONTEXT->last_error = errmsg; } @@ -38,8 +38,8 @@ function kernel_int:long (addr:long) %{ /* pure */ THIS->__retvalue = (int64_t) deref (sizeof (int), (int *) (intptr_t) THIS->addr); deref_fault: /* branched to from deref() */ { - static char errmsg[50]; - snprintf (errmsg, 40, "kernel int copy fault at 0x%p", + static char errmsg[60]; + snprintf (errmsg, sizeof(errmsg), "kernel int copy fault at 0x%p", (void *) (uintptr_t) THIS->addr); CONTEXT->last_error = errmsg; } @@ -51,8 +51,8 @@ function kernel_short:long (addr:long) %{ /* pure */ goto success; deref_fault: /* branched to from deref() */ { - static char errmsg[50]; - snprintf (errmsg, 40, "kernel short copy fault at 0x%p", + static char errmsg[60]; + snprintf (errmsg, sizeof(errmsg), "kernel short copy fault at 0x%p", (void *) (uintptr_t) THIS->addr); CONTEXT->last_error = errmsg; } @@ -64,8 +64,8 @@ function kernel_char:long (addr:long) %{ /* pure */ goto success; deref_fault: /* branched to from deref() */ { - static char errmsg[50]; - snprintf (errmsg, 40, "kernel char copy fault at 0x%p", + static char errmsg[60]; + snprintf (errmsg, sizeof(errmsg), "kernel char copy fault at 0x%p", (void *) (uintptr_t) THIS->addr); CONTEXT->last_error = errmsg; } @@ -97,7 +97,7 @@ function user_string_warn:string (addr:long) %{ /* pure */ (const char __user*) (uintptr_t) THIS->addr, MAXSTRINGLEN); if (rc < 0) { static char errmsg[60]; - snprintf (errmsg, 40, "user string copy fault %ld at %p", rc, + snprintf (errmsg, sizeof(errmsg), "user string copy fault %ld at %p", rc, (void *) (uintptr_t) THIS->addr); _stp_warn(errmsg); strlcpy (THIS->__retvalue, "<unknown>", MAXSTRINGLEN); |