diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2015-07-16 23:32:12 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2015-07-16 23:44:57 +0000 |
commit | fd55b5411281022ee0d06b94144cbf922829ad54 (patch) | |
tree | 1a2dbfbd7a430b2e1f9713bcab38ce088d36f15c /statfs.c | |
parent | 9afb4d06c07dab4ad556e17b6b81eddb859a24eb (diff) | |
download | strace-fd55b5411281022ee0d06b94144cbf922829ad54.tar.gz |
statfs.c: use umove_or_printaddr
* statfs.c (printstatfs, printstatfs64, printcompat_statfs64):
Use umove_or_printaddr.
Diffstat (limited to 'statfs.c')
-rw-r--r-- | statfs.c | 24 |
1 files changed, 3 insertions, 21 deletions
@@ -24,14 +24,8 @@ printstatfs(struct tcb *tcp, const long addr) { struct statfs statbuf; - if (syserror(tcp) || !verbose(tcp)) { - tprintf("%#lx", addr); + if (umove_or_printaddr(tcp, addr, &statbuf)) return; - } - if (umove(tcp, addr, &statbuf) < 0) { - tprints("{...}"); - return; - } tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ", sprintfstype(statbuf.f_type), (unsigned long)statbuf.f_bsize, @@ -80,14 +74,8 @@ printstatfs64(struct tcb *tcp, long addr) { struct statfs64 statbuf; - if (syserror(tcp) || !verbose(tcp)) { - tprintf("%#lx", addr); - return; - } - if (umove(tcp, addr, &statbuf) < 0) { - tprints("{...}"); + if (umove_or_printaddr(tcp, addr, &statbuf)) return; - } tprintf("{f_type=%s, f_bsize=%llu, f_blocks=%llu, f_bfree=%llu, ", sprintfstype(statbuf.f_type), (unsigned long long)statbuf.f_bsize, @@ -136,14 +124,8 @@ printcompat_statfs64(struct tcb *tcp, const long addr) { struct compat_statfs64 statbuf; - if (syserror(tcp) || !verbose(tcp)) { - tprintf("%#lx", addr); - return; - } - if (umove(tcp, addr, &statbuf) < 0) { - tprints("{...}"); + if (umove_or_printaddr(tcp, addr, &statbuf)) return; - } tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%llu, f_bfree=%llu, ", sprintfstype(statbuf.f_type), (unsigned long)statbuf.f_bsize, |