From 286aa3bdb8cd6461de58999a179a388805450fde Mon Sep 17 00:00:00 2001 From: tmunro Date: Thu, 28 Feb 2019 09:13:41 +0000 Subject: [PATCH] truss: Add support for fsync(2) and fdatasync(2). The default handling showed the argument as hex. Add explicit handling so we can show it as decimal, since that's how we show file descriptors everywhere else. Approved by: mjg (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19295 --- usr.bin/truss/syscalls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 46077fddf5d..3c8418c4811 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -231,6 +231,8 @@ static struct syscall decoded_syscalls[] = { { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "fdatasync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, { .name = "flock", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, @@ -240,6 +242,8 @@ static struct syscall decoded_syscalls[] = { { Atflags, 3 } } }, { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, + { .name = "fsync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, { .name = "ftruncate", .ret_type = 1, .nargs = 2, .args = { { Int | IN, 0 }, { QuadHex | IN, 1 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, -- 2.45.0