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
F150040104: D19295.id.diff
Sat, Mar 28, 10:38 PM
F150022593: D19295.id.diff
Sat, Mar 28, 7:49 PM
F149952570: D19295.id54521.diff
Sat, Mar 28, 8:34 AM
Unknown Object (File)
Wed, Mar 18, 2:19 PM
Unknown Object (File)
Wed, Mar 18, 10:04 AM
Unknown Object (File)
Mon, Mar 16, 5:54 PM
Unknown Object (File)
Sat, Feb 28, 9:56 PM
Unknown Object (File)
Feb 8 2026, 1:47 AM
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