Add all current fallocate flags
Also move them to the common Linux module, as they are not platform-specific. See include/uapi/linux/falloc.h.
This commit is contained in:
parent
39a75af8ee
commit
071a69b5c4
|
@ -903,6 +903,13 @@ pub const XATTR_REPLACE: ::c_int = 0x2;
|
|||
|
||||
pub const _POSIX_VDISABLE: ::cc_t = 0;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
|
||||
pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
|
||||
pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
|
||||
pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
|
||||
|
||||
// On Linux, libc doesn't define this constant, libattr does instead.
|
||||
// We still define it for Linux as it's defined by libc on other platforms,
|
||||
// and it's mentioned in the man pages for getxattr and setxattr.
|
||||
|
|
|
@ -153,9 +153,6 @@ pub const TCP_TIMESTAMP: ::c_int = 24;
|
|||
|
||||
pub const SIGUNUSED: ::c_int = ::SIGSYS;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
|
|
@ -269,9 +269,6 @@ pub const SIGWINCH: ::c_int = 28;
|
|||
|
||||
pub const SIGEV_THREAD_ID: ::c_int = 4;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 8192;
|
||||
pub const TMP_MAX: ::c_uint = 238328;
|
||||
pub const FOPEN_MAX: ::c_uint = 16;
|
||||
|
|
|
@ -542,9 +542,6 @@ pub const SIGPWR: ::c_int = 30;
|
|||
pub const SIG_BLOCK: ::c_int = 0x000000;
|
||||
pub const SIG_UNBLOCK: ::c_int = 0x01;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 8192;
|
||||
pub const TMP_MAX: ::c_uint = 238328;
|
||||
pub const FOPEN_MAX: ::c_uint = 16;
|
||||
|
|
Loading…
Reference in New Issue