Commit Graph

55 Commits

Author SHA1 Message Date
Mike Frysinger fac8b4bd78 fallocate: fix build failure with old linux headers
If linux/falloc.h does not exist, the build system still enables the
fallocate util, but ultimately fails when it tries to include the
header and use a define from it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-07 09:49:01 +02:00
Karel Zak fd1ee3b92e fallocate: check for number of arguments
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-14 13:04:50 +02:00
Karel Zak 3b6b039ae8 fallocate: support suffixes for --offset and --lenght
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-30 14:45:37 +02:00
Karel Zak 6264af59fd fallocate: check for ERANGE errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 23:57:11 +02:00
Karel Zak d46a54994e fallocate: new command
The fallocate(1) utility is used to preallocate blocks to a file.

This can be useful for virtual images, database files, testing, etc.
Normally we'd hope that various tools will start using preallocation
internally, but until then such a utility may be useful, and could be
scripted as well.

The original Eric's version is available at:
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2490

This version:
 - checks for fallocate glibc function and kernel syscall
 - does not provide a fallback and does not call posix_fallocate()
 - adds long options
 - uses err.h for errro messages
 - adds NLS support
 - cleanups man page

Co-Author: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-22 15:26:18 +02:00