Follow-up Comment #4, patch #9754 (group findutils): [comment #3 comment #3:] > FreeBSD uses -flags for a similar feature. It may be worth using the same > name. -attr sounds like it might refer to extended attributes rather than > inode flags IMO.
Extended attributes would be referred to as "xattr" on Linux. That's an
established convention reflected in the names of the syscalls: getxattr,
lgetxattr, fgetxattr, getxattrat, listxattr, llistxattr, flistxattr,
listxattrat, setxattr, lsetxattr, fsetxattr, setxattrat, removexattr,
lremovexattr, fremovexattr, removexattrat. Alternatively, extended attributes
could conceivably be referred to as "fattr" since the userspace commands for
getting and setting them are 'getfattr' and 'setfattr'. However, nowhere are
extended attributes referred to simply as "attr".
I chose "attr" to refer to the inode flags because userspace consistently
refers to these flags as "file attributes," and the userspace commands for
listing and changing them are 'lsattr' and 'chattr'. Also, the 'statx' system
call returns them in a field named 'stx_attributes' using constants named like
"STATX_ATTR_*".
On the other hand, the 'xfs_io' command has 'lsattr' and 'chattr' subcommands,
and its man page does mention that those commands list and change the
"extended inode flags." Also, the original ext2 ioctls were named
EXT2_IOC_GETFLAGS and EXT2_IOC_SETFLAGS‎. However, confusingly, XFS has
ioctls XFS_IOC_FSGETXATTR and XFS_IOC_FSSETXATTR that pass a data structure
that carries the extended inode flags in a field named 'fsx_xflags'.
Despite the apparently rampant inconsistency in what to call these things
throughout the source codes, the user-facing commands are consistently named
'lsattr' and 'chattr', so keeping '-attr' for the name of the user-facing
'find' predicate makes the most sense.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9754>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
