From 2fdb30a571564253d110d27329a898a1d169553c Mon Sep 17 00:00:00 2001 From: Joran Dirk Greef Date: Sun, 1 Nov 2020 11:47:09 +0200 Subject: Add definitions for FALLOC_FL_ mode flags --- lib/std/os/bits/linux.zig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib/std/os/bits/linux.zig') diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig index 8dbf21fcf2..29ea74d6a9 100644 --- a/lib/std/os/bits/linux.zig +++ b/lib/std/os/bits/linux.zig @@ -82,6 +82,27 @@ pub const AT_STATX_DONT_SYNC = 0x4000; /// Apply to the entire subtree pub const AT_RECURSIVE = 0x8000; +/// Default is extend size +pub const FALLOC_FL_KEEP_SIZE = 0x01; + +/// De-allocates range +pub const FALLOC_FL_PUNCH_HOLE = 0x02; + +/// Reserved codepoint +pub const FALLOC_FL_NO_HIDE_STALE = 0x04; + +/// Removes a range of a file without leaving a hole in the file +pub const FALLOC_FL_COLLAPSE_RANGE = 0x08; + +/// Converts a range of file to zeros preferably without issuing data IO +pub const FALLOC_FL_ZERO_RANGE = 0x10; + +/// Inserts space within the file size without overwriting any existing data +pub const FALLOC_FL_INSERT_RANGE = 0x20; + +/// Unshares shared blocks within the file size without overwriting any existing data +pub const FALLOC_FL_UNSHARE_RANGE = 0x40; + pub const FUTEX_WAIT = 0; pub const FUTEX_WAKE = 1; pub const FUTEX_FD = 2; -- cgit v1.2.3