summaryrefslogtreecommitdiff
path: root/statfs.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2015-07-16 23:32:12 +0000
committerDmitry V. Levin <ldv@altlinux.org>2015-07-16 23:44:57 +0000
commitfd55b5411281022ee0d06b94144cbf922829ad54 (patch)
tree1a2dbfbd7a430b2e1f9713bcab38ce088d36f15c /statfs.c
parent9afb4d06c07dab4ad556e17b6b81eddb859a24eb (diff)
downloadstrace-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.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/statfs.c b/statfs.c
index 3845c2a7c..d851aa721 100644
--- a/statfs.c
+++ b/statfs.c
@@ -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,