Fix getfsstat(2) handling of flags. The 'flags' argument is an enum,
not a bitfield. For the intended usage - being passed either MNT_WAIT,
or MNT_NOWAIT - this shouldn't introduce any changes in behaviour.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
As some followups:
- We should probably validate 'flags' and fail with EINVAL for bad values.
- We should rename 'flags' to 'flag' to note it is an enum and not a mask of values. Along with this, libsysdecode/kdump should be fixed to treat it as an enum rather than a mask.
Comment Actions
Indeed, the command should be checked. I think I already asked this question in the discussion elsewhere, are there wrong callers of the fstatfs(2) ? It would be more natural to check flags == MNT_WAIT there, but feasibility of the change depends on the existing apps.
Comment Actions
I agree about the 'flag' thing, and being more strict about validating it. Still, I'd prefer to do it separately, to make merging easier. Yes, I did review the callers in the tree; I didn't look at the ports, though.