]> granicus.if.org Git - strace/commitdiff
alpha: fix decoding of osf_statfs and osf_fstatfs syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 25 Apr 2016 23:52:03 +0000 (23:52 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 25 Apr 2016 23:52:03 +0000 (23:52 +0000)
Do not attempt to print struct osf_statfs as if it was the same as
struct statfs.  Since struct osf_statfs has never been decoded properly,
it is probably too late to implement a decoder, so let's just print the
pointer.

* statfs.c [ALPHA] (SYS_FUNC(osf_statfs), SYS_FUNC(osf_fstatfs)): Move ...
* alpha.c: ... here.  Replace printstatfs with printaddr.

alpha.c
statfs.c

diff --git a/alpha.c b/alpha.c
index e343b7ebd3639240ad9d09aad392354809fe971d..70d4ca5a377ce03e6469918582b6d1adbff0c4c7 100644 (file)
--- a/alpha.c
+++ b/alpha.c
@@ -60,4 +60,24 @@ SYS_FUNC(getxgid)
        return decode_getxxid(tcp, "egid");
 }
 
+SYS_FUNC(osf_statfs)
+{
+       printpath(tcp, tcp->u_arg[0]);
+       tprints(", ");
+       printaddr(tcp->u_arg[1]);
+       tprints(", ");
+       tprintf("%lu", tcp->u_arg[2]);
+       return RVAL_DECODED;
+}
+
+SYS_FUNC(osf_fstatfs)
+{
+       printfd(tcp, tcp->u_arg[0]);
+       tprints(", ");
+       printaddr(tcp->u_arg[1]);
+       tprints(", ");
+       tprintf("%lu", tcp->u_arg[2]);
+       return RVAL_DECODED;
+}
+
 #endif /* ALPHA */
index 73892b6c2ac8ced77e8c016d8bb2199e350054f4..bcbb73d2546bd4df19ec6d9d40359dffe166012a 100644 (file)
--- a/statfs.c
+++ b/statfs.c
@@ -217,28 +217,3 @@ SYS_FUNC(fstatfs64)
        return do_statfs64_fstatfs64(tcp);
 }
 #endif /* HAVE_STRUCT_STATFS64 */
-
-#ifdef ALPHA
-SYS_FUNC(osf_statfs)
-{
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[0]);
-               tprints(", ");
-       } else {
-               printstatfs(tcp, tcp->u_arg[1]);
-               tprintf(", %lu", tcp->u_arg[2]);
-       }
-       return 0;
-}
-
-SYS_FUNC(osf_fstatfs)
-{
-       if (entering(tcp)) {
-               tprintf("%lu, ", tcp->u_arg[0]);
-       } else {
-               printstatfs(tcp, tcp->u_arg[1]);
-               tprintf(", %lu", tcp->u_arg[2]);
-       }
-       return 0;
-}
-#endif /* ALPHA */