man: document that XFS_IOC_FS[G|S]ETXATTR can not be used on special files
PATCH v2 1/1 man: document that XFS_IOC_FS[G|S]ETXATTR can not be used on special files
Add a CAVEATS section with an note that these ioctls can not be used on special files and leave a reference to an alternative pathname based syscall interface.
---
Changes from v1:
- Use semantic newlines
- pathname-based
- RvB
--- man/man2/ioctl_xfs_fsgetxattr.2 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
man/man2/ioctl_xfs_fsgetxattr.2 +22 -1
@@ -238,6 +238,27 @@ Caller did not have permission to change the attributes. This API is implemented by the ext4, xfs, btrfs, and f2fs filesystems on the Linux kernel. Not all fields may be understood by filesystems other than xfs. +.SH CAVEATS +The +.B XFS_IOC_FSGETXATTR +and +.B XFS_IOC_FSSETXATTR +.BR ioctl (2) +operations require the user to open the file, +but this may not be possible or +lead to side effects on special files such as FIFOs, +sockets, +block devices, +character devices, +and symlinks. +.P +For a pathname-based interface see the +.BR file_getattr (2) +and +.BR file_setattr (2) +syscalls. .SH SEE ALSO .BR ioctl (2), -.BR ioctl_iflags (2) +.BR ioctl_iflags (2), +.BR file_getattr (2), +.BR file_setattr (2)
Signature · 1 line
2.55.0
Hi Andrey,
Quoted 26 lines
Date: 2026-09-14 12:47:48+0200
From: Andrey Albershteyn <[email protected]>Add a CAVEATS section with an note that these ioctls can not be used on special files and leave a reference to an alternative pathname based syscall interface.
Signed-off-by Andrey Albershteyn <[email protected]>Reviewed-by Alejandro Colomar <[email protected]>---
Changes from v1:
- Use semantic newlines
- pathname-based
- RvB--- man/man2/ioctl_xfs_fsgetxattr.2 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)man/man2/ioctl_xfs_fsgetxattr.2 +0
-0@@ -238,6 +238,27 @@ Caller did not have permission to change the attributes. This API is implemented by the ext4, xfs, btrfs, and f2fs filesystems on the Linux kernel.
man/man2/ioctl_xfs_fsgetxattr.2 Caller did not have permission to change the attributes. · line 249
Quoted 10 lines
man/man2/ioctl_xfs_fsgetxattr.2 +9
-0Not all fields may be understood by filesystems other than xfs. +.SH CAVEATS +The +.B XFS_IOC_FSGETXATTR +and +.B XFS_IOC_FSSETXATTR +.BR ioctl (2) +operations require the user to open the file, +but this may not be possible or +lead to side effects on special files such as FIFOs,
I'd break the line before 'FIFOs' too. Since FIFOs is a member of a list that follows, it should be treated like the other elements in the list.
Other than that, LGTM.
Have a lovely day!
Alex
Quoted 19 lines
man/man2/ioctl_xfs_fsgetxattr.2 +13
-1+sockets, +block devices, +character devices, +and symlinks. +.P +For a pathname-based interface see the +.BR file_getattr (2) +and +.BR file_setattr (2) +syscalls. .SH SEE ALSO .BR ioctl (2), -.BR ioctl_iflags (2) +.BR ioctl_iflags (2), +.BR file_getattr (2), +.BR file_setattr (2)Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>