This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Define flags for fallocate


	[BZ #14964]
	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h (FALLOC_FL_KEEP_SIZE)
	(FALLOC_FL_PUNCH_HOLE) [__USE_GNU]: New macros.
---
 sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index a8bb090..9efea1e 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -296,6 +296,13 @@ struct f_owner_ex
 # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
 
 
+/* Flags for fallocate.  */
+# define FALLOC_FL_KEEP_SIZE		1 /* Don't extend size of file
+					     even if the offset + len is
+					     greater than file size.  */
+# define FALLOC_FL_PUNCH_HOLE		2 /* Create a hole in the file.  */
+
+
 /* File handle structure.  */
 struct file_handle
 {
-- 
1.8.1

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]