summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2021-04-25 20:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2021-04-25 20:00:00 +0000
commitdfb113fa1b83f72a577aea2bd37ae7727b014a31 (patch)
tree58164d4de6fa07a43125912f613768cf924323c3
parent752fa90e4661e3fa4bb26e9cda629207a4842a8e (diff)
downloadstrace-dfb113fa1b83f72a577aea2bd37ae7727b014a31.tar.gz
swapon: use print_fields.h helpers
* src/swapon.c (SYS_FUNC(swapon)): Use tprint_arg_next and PRINT_VAL_U.
-rw-r--r--src/swapon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/swapon.c b/src/swapon.c
index 94bc677aa..72ac42308 100644
--- a/src/swapon.c
+++ b/src/swapon.c
@@ -17,13 +17,16 @@ SYS_FUNC(swapon)
unsigned int prio = flags & SWAP_FLAG_PRIO_MASK;
flags &= ~SWAP_FLAG_PRIO_MASK;
+ /* path */
printpath(tcp, tcp->u_arg[0]);
- tprints(", ");
+ tprint_arg_next();
+
+ /* swapflags */
if (flags) {
printflags(swap_flags, flags, "SWAP_FLAG_???");
tprintf("|%u", prio);
} else {
- tprintf("%u", prio);
+ PRINT_VAL_U(prio);
}
return RVAL_DECODED;