aboutsummaryrefslogtreecommitdiff
path: root/doc/langref
diff options
context:
space:
mode:
authorStephen Gregoratto <dev@sgregoratto.me>2025-12-24 13:10:38 +1100
committerStephen Gregoratto <dev@sgregoratto.me>2025-12-24 13:10:38 +1100
commitc3f2de5e519926eb0029062fe8e782a6f9df9c05 (patch)
tree137740d5ff2f6197afbca44ca74593d8f98fa6ce /doc/langref
parent985a3565c6130c7279319e9c36642f0b958e6944 (diff)
downloadzig-c3f2de5e519926eb0029062fe8e782a6f9df9c05.tar.gz
zig-c3f2de5e519926eb0029062fe8e782a6f9df9c05.zip
Linux: Update syscall list for 6.17
The 6.17 kernel added[1] syscalls for getting/setting certain file flags and attributes. It's meant to be a more extensible replacement for these ioctl's: - `FS_IOC_GETFLAGS`/`FS_IOC_SETFLAGS`. - `FS_IOC_FSGETXATTR`/`FS_IOC_FSSETXATTR`. The definitions of these calls are as follows: ```zig const file_attr = extern struct { /// Extended flags that apply to this file. (get/set). xflags: u64, /// Preferred extent allocation size, in bytes. (get/set). extsize: u32, /// One of: /// - The number of data extents in this file. /// - If `FS_IOC_FSGETXATTRA` is set, the number of extended attribute events in the file. /// (get) nextents: u32, /// Project Identifier (get/set). projid: u32, /// Preferred extent allocation size for CoW operations, in bytes (get/set). cowextsize: u32, }; // size=@sizeOf(file_attr) fn file_getattr(dirfd: fd_t, path: [*:0], fattr: *file_attr, size: usize, at_flags: u32) {} fn file_setattr(dirfd: fd_t, path: [*:0], fattr: *file_attr, size: usize, at_flags: u32) {} ``` Users need to set/check `xflags` with the `FS_XFLAG` flags defined in `linux/fs.h`. `ioctl_xfs_fsgetxattr(2)` has more information about the type of information one can retrieve. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57fcb7d930d8f00f383e995aeebdcd2b416a187a
Diffstat (limited to 'doc/langref')
0 files changed, 0 insertions, 0 deletions