summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/ia64-fbsd.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2004-07-17 19:48:49 +0000
committeralfred <alfred@FreeBSD.org>2004-07-17 19:48:49 +0000
commitf770c48d15ef2b5512bab229842e7b8501c5f89b (patch)
tree2aab56b03449877fe5d7c17ce3b50fc426abb64d /usr.bin/truss/ia64-fbsd.c
parent71eccf2cf55ca05d858bd43ea8dcf26e64a94c66 (diff)
downloadFreeBSD-src-f770c48d15ef2b5512bab229842e7b8501c5f89b.zip
FreeBSD-src-f770c48d15ef2b5512bab229842e7b8501c5f89b.tar.gz
Support readlink(2) better. Readlink does not nul terminate the
result buffer, so we need to format it ourselves. The problem is that the length is stored as the return value from readlink, so we need to pass the return value from our syscall into print_arg. Motivated by: truss garbage on my screen from reading /etc/malloc.conf.
Diffstat (limited to 'usr.bin/truss/ia64-fbsd.c')
-rw-r--r--usr.bin/truss/ia64-fbsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/truss/ia64-fbsd.c b/usr.bin/truss/ia64-fbsd.c
index 15b60bf..7ca6d7f 100644
--- a/usr.bin/truss/ia64-fbsd.c
+++ b/usr.bin/truss/ia64-fbsd.c
@@ -204,7 +204,7 @@ ia64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
i < (fsc.nargs - 1) ? "," : "");
#endif
if (sc && !(sc->args[i].type & OUT)) {
- fsc.s_args[i] = print_arg(Procfd, &sc->args[i], fsc.args);
+ fsc.s_args[i] = print_arg(Procfd, &sc->args[i], fsc.args, 0);
}
}
#if DEBUG
@@ -308,7 +308,7 @@ ia64_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused)
if (errorp)
asprintf(&temp, "0x%lx", fsc.args[sc->args[i].offset]);
else
- temp = print_arg(Procfd, &sc->args[i], fsc.args);
+ temp = print_arg(Procfd, &sc->args[i], fsc.args, retval);
fsc.s_args[i] = temp;
}
}
OpenPOWER on IntegriCloud