diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-12 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-12 08:00:00 +0000 |
commit | f2915826421954e32595e903f7af1871503fc10b (patch) | |
tree | 07948a8da79558f1780d2be333565a293b7f1f97 | |
parent | c51a27e526476228513aedf1f1fdb5703aed7a01 (diff) | |
download | strace-f2915826421954e32595e903f7af1871503fc10b.tar.gz |
ustat: use print_fields.h macros
* ustat.c: Include "print_fields.h".
(SYS_FUNC(ustat)): Use PRINT_FIELD_* macros from print_fields.h.
-rw-r--r-- | ustat.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -15,6 +15,8 @@ typedef struct ustat struct_ustat; #include MPERS_DEFS +#include "print_fields.h" + SYS_FUNC(ustat) { if (entering(tcp)) @@ -24,10 +26,11 @@ SYS_FUNC(ustat) #ifdef HAVE_USTAT_H struct_ustat ust; - if (!umove_or_printaddr(tcp, tcp->u_arg[1], &ust)) - tprintf("{f_tfree=%llu, f_tinode=%llu}", - zero_extend_signed_to_ull(ust.f_tfree), - zero_extend_signed_to_ull(ust.f_tinode)); + if (!umove_or_printaddr(tcp, tcp->u_arg[1], &ust)) { + PRINT_FIELD_U("{", ust, f_tfree); + PRINT_FIELD_U(", ", ust, f_tinode); + tprints("}"); + } #else /* !HAVE_USTAT_H */ printaddr(tcp->u_arg[1]); #endif /* HAVE_USTAT_H */ |