OSDN Git Service

libc: add fallocate() and fallocate64()
authorAnthony G. Basile <blueness@gentoo.org>
Sun, 7 Sep 2014 19:33:46 +0000 (15:33 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 9 Sep 2014 11:48:45 +0000 (13:48 +0200)
commit33a12b5540b8abbc4ee0ecb3a51912b3c7868517
tree399a161fa8ae09eab39c25f17686c496a05b9b2b
parent7efe10ec5fc772f5328b35ba6716bde815212b45
libc: add fallocate() and fallocate64()

We add the Linux-specific function fallocate() which allows the user to
directly manipulate allocate space for a file.  fallocate() can operate
in different modes, but the default mode is equivalent to posix_fallocate()
which is specified in POSIX.1.

Recent releases of e2fsprogs 1.42.11 and above expect fallocate64() to be
available.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
extra/Configs/Config.in
include/fcntl.h
libc/sysdeps/linux/common/Makefile.in
libc/sysdeps/linux/common/fallocate.c [new file with mode: 0644]
libc/sysdeps/linux/common/fallocate64.c [new file with mode: 0644]
libc/sysdeps/linux/common/posix_fallocate.c
libc/sysdeps/linux/common/posix_fallocate64.c
test/.gitignore
test/unistd/Makefile.in
test/unistd/tst-fallocate.c [new file with mode: 0644]
test/unistd/tst-fallocate64.c [new file with mode: 0644]