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
This commit is contained in:
Thomas Munro 2019-02-28 09:13:41 +00:00
parent a098959032
commit b5eab9d461

View File

@ -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,