Page MenuHomeFreeBSD

Teach truss(1) about fsync(2) and fdatasync(2).
ClosedPublic

Authored by tmunro on Feb 22 2019, 12:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 18, 5:47 AM
Unknown Object (File)
Sat, Jul 4, 6:59 PM
Unknown Object (File)
Wed, Jul 1, 1:02 PM
Unknown Object (File)
Wed, Jul 1, 1:00 PM
Unknown Object (File)
Jun 12 2026, 3:47 AM
Unknown Object (File)
Jun 8 2026, 8:51 PM
Unknown Object (File)
Jun 7 2026, 6:08 AM
Unknown Object (File)
May 17 2026, 2:27 PM
Subscribers

Details

Summary

The convention is to show file descriptors as decimal. Add explicit entries to syscalls.c to avoid the default hex output.

Before:

fsync(0x12) = 0 (0x0)
fdatasync(0x12) = 0 (0x0)

After:

fsync(18) = 0 (0x0)
fdatasync(18) = 0 (0x0)

Test Plan

truss install -S foo /tmp/foo

See how the fsync() call (caused by -S) is displayed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable