summaryrefslogtreecommitdiffstats
path: root/sys-utils/fallocate.c
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: [strutils] general purpose string handling functionsDavidlohr Bueso2010-11-231-1/+1
| | | | | | | | | | | | | This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* fallocate: fix build failure with old linux headersMike Frysinger2010-10-071-1/+5
| | | | | | | | 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>
* fallocate: check for number of argumentsKarel Zak2010-05-141-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: support suffixes for --offset and --lenghtKarel Zak2010-03-301-36/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: check for ERANGE errorsKarel Zak2009-10-061-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: new commandKarel Zak2009-09-221-0/+173
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>