Skip to content

Commit

Permalink
truss: Add support for fsync(2) and fdatasync(2).
Browse files Browse the repository at this point in the history
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
  • Loading branch information
macdice committed Feb 28, 2019
1 parent a098959 commit b5eab9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions usr.bin/truss/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit b5eab9d

Please sign in to comment.