diff options
Diffstat (limited to 'testsuite/systemtap.examples')
-rwxr-xr-x | testsuite/systemtap.examples/general/grapher.stp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/testsuite/systemtap.examples/general/grapher.stp b/testsuite/systemtap.examples/general/grapher.stp index 46f5063c..a830b153 100755 --- a/testsuite/systemtap.examples/general/grapher.stp +++ b/testsuite/systemtap.examples/general/grapher.stp @@ -38,17 +38,13 @@ probe kernel.function("pty_write") { count = %(kernel_v>="2.6.31" %? $c %: $count %) if (count > 0) { printf("pty %d ", gettimeofday_ms()) - str = kernel_string($buf) + str = $buf for (i = 0; i < count; ++i) { if (i > 1) printf("\n") - # yes it's gross - c = substr(str, i, 1) - printf("%s", text_str(c)) + c = kernel_char(str + i) + printf("%c", c) } printf("%c", 0) } } - - - |