summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2014-07-25 08:30:47 +0000
committerdholland <dholland@NetBSD.org>2014-07-25 08:30:47 +0000
commitaba6c69692ef16402b229d6d3f408bd5fef33688 (patch)
treecba45749866081e7fe1c71ccd52dd84ef4b47cac /include
parentce361948b1bc0154bba909990f8b8b8e17be3e14 (diff)
Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page. Allow wiggle room in the man page for implementations of fallocate that either (a) don't fully unwind on failure, leaving new blocks allocated without changing the file size, or (b) create only in-memory transient reservations that disappear when crashing or rebooting. Also, add crossreference to fdiscard from ftruncate(2), and remove the old BUGS entry from there that called for a generalized version that allows discarding ranges of a file: that's what fdiscard is.
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h
index b0ade94f1f1..764cb7e5f53 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $NetBSD: unistd.h,v 1.141 2014/06/18 17:48:22 christos Exp $ */
+/* $NetBSD: unistd.h,v 1.142 2014/07/25 08:30:47 dholland Exp $ */
/*-
* Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -173,6 +173,7 @@ ssize_t readlink(const char * __restrict, char * __restrict, size_t);
*/
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \
defined(_NETBSD_SOURCE)
+int posix_fallocate(int, off_t, off_t);
int setegid(gid_t);
int seteuid(uid_t);
#endif
@@ -328,6 +329,7 @@ int dup3(int, int, int);
void endusershell(void);
int exect(const char *, char * const *, char * const *);
int fchroot(int);
+int fdiscard(int, off_t, off_t);
int fsync_range(int, int, off_t, off_t);
int getdomainname(char *, size_t);
int getgrouplist(const char *, gid_t, gid_t *, int *);