diff options
author | zhaolei <zhaolei> | 2007-09-26 00:57:37 +0000 |
---|---|---|
committer | zhaolei <zhaolei> | 2007-09-26 00:57:37 +0000 |
commit | 3f728ca446a1dd563c3a87829c38b91860d94758 (patch) | |
tree | c9e81999abf3246969cb39c186a16d17f0422017 | |
parent | 4e6cc599843a7abbe22518b25428167558facc30 (diff) | |
download | systemtap-steved-3f728ca446a1dd563c3a87829c38b91860d94758.tar.gz systemtap-steved-3f728ca446a1dd563c3a87829c38b91860d94758.tar.xz systemtap-steved-3f728ca446a1dd563c3a87829c38b91860d94758.zip |
2007-09-26 Zhaolei <zhaolei@cn.fujitsu.com>
* syscalls.stp (adjtimex.return): Improve retstr.
* aux_syscalls.stp: Add a function(_adjtimex_return_str) for
adjtimex.return.
-rw-r--r-- | tapset/ChangeLog | 6 | ||||
-rw-r--r-- | tapset/aux_syscalls.stp | 21 | ||||
-rw-r--r-- | tapset/syscalls.stp | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index a1cf0132..8eea09eb 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,9 @@ +2007-09-26 Zhaolei <zhaolei@cn.fujitsu.com> + + * syscalls.stp (adjtimex.return): Improve retstr. + * aux_syscalls.stp: Add a function(_adjtimex_return_str) for + adjtimex.return. + 2007-09-25 Frank Ch. Eigler <fche@elastic.org> * socket.stp (sock_flags_num2str): Define SOCK_PASSCRED if needed. diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 94444d7a..25984d57 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1798,3 +1798,24 @@ function _at_flag_str(f) { if (f == 0x400) return "AT_SYMLINK_FOLLOW" return sprintf("0x%x", f) } + +function _adjtimex_return_str(ret) { + if (ret == 0) + val = "OK" + else if (ret == 1) + val = "INS" + else if (ret == 2) + val = "DEL" + else if (ret == 3) + val = "OOP" + else if (ret == 4) + val = "WAIT" + else if (ret == 5) + val = "BAD" + + if (val != "") + return sprintf("%d (TIME_%s)", ret, val) + else + return returnstr(1) +} + diff --git a/tapset/syscalls.stp b/tapset/syscalls.stp index a66f3ed1..58282552 100644 --- a/tapset/syscalls.stp +++ b/tapset/syscalls.stp @@ -113,7 +113,7 @@ probe syscall.adjtimex = kernel.function("sys_adjtimex") { } probe syscall.adjtimex.return = kernel.function("sys_adjtimex").return { name = "adjtimex" - retstr = returnstr(1) + retstr = _adjtimex_return_str($return) } # long compat_sys_adjtimex(struct compat_timex __user *utp) probe syscall.compat_adjtimex = kernel.function("compat_sys_adjtimex") ? { |