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)
Mon, Oct 13, 7:16 PM
Unknown Object (File)
Mon, Oct 13, 3:11 PM
Unknown Object (File)
Tue, Sep 16, 12:22 PM
Unknown Object (File)
Tue, Sep 16, 8:56 AM
Unknown Object (File)
Aug 25 2025, 9:43 AM
Unknown Object (File)
Aug 19 2025, 9:29 AM
Unknown Object (File)
Aug 17 2025, 2:31 PM
Unknown Object (File)
Aug 15 2025, 11:05 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