diff options
| author | Stephen Gregoratto <dev@sgregoratto.me> | 2025-12-24 13:10:38 +1100 |
|---|---|---|
| committer | Stephen Gregoratto <dev@sgregoratto.me> | 2025-12-24 13:10:38 +1100 |
| commit | c3f2de5e519926eb0029062fe8e782a6f9df9c05 (patch) | |
| tree | 137740d5ff2f6197afbca44ca74593d8f98fa6ce /lib/libcxx/include/__functional | |
| parent | 985a3565c6130c7279319e9c36642f0b958e6944 (diff) | |
| download | zig-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 'lib/libcxx/include/__functional')
0 files changed, 0 insertions, 0 deletions
