From 39e7e1f05da2ba045f73362b05fa6cc3de0ed1fc Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 25 Apr 2016 23:52:03 +0000 Subject: [PATCH] alpha: fix decoding of osf_statfs and osf_fstatfs syscalls 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 | 20 ++++++++++++++++++++ statfs.c | 25 ------------------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/alpha.c b/alpha.c index e343b7eb..70d4ca5a 100644 --- 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 */ diff --git a/statfs.c b/statfs.c index 73892b6c..bcbb73d2 100644 --- 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 */ -- 2.50.1