[PATCH v7] Implement decoding of statx syscall

Victor Krapivensky krapivenskiy.va at phystech.edu
Sat Mar 18 10:10:33 UTC 2017


On Sat, Mar 18, 2017 at 04:00:50AM +0300, Dmitry V. Levin wrote:
> I suggest placing AT_STATX_SYNC_TYPE before AT_STATX_FORCE_SYNC
> so we could use printflags.

I don't see any sense in that:
AT_STATX_{SYNC_AS_STAT,FORCE_SYNC,DONT_SYNC} are mutually exclusive, and
statx called with flags=AT_STATX_SYNC_TYPE (aka
AT_STATX_FORCE_SYNC|AT_STATX_DONT_SYNC) fails with EINVAL.

I think it would be more appropriate to print
"AT_STATX_FORCE_SYNC|AT_STATX_DONT_SYNC" it that case, so that one can
clearly see that the flags passed are self-contradictory.

> I think at_statx_sync_types should go first so the output would be
> a more traditional AT_STATX_SYNC_AS_STAT|AT_SYMLINK_FOLLOW|0xffff0000,
> e.g.

Agreed.




More information about the Strace-devel mailing list