summaryrefslogtreecommitdiff
path: root/sys-utils/fallocate.c
diff options
context:
space:
mode:
authorLaMont Jones <lamont@debian.org>2010-08-02 23:02:28 -0600
committerLaMont Jones <lamont@debian.org>2010-08-02 23:02:28 -0600
commit0864d694ca05ea9383ef09bc1bc3a182e15e2ffa (patch)
tree2e5237f1d4e2cac2efad97ce31abc386c1e37b6d /sys-utils/fallocate.c
parent3cbdfd84fde6159d7778e70618fbbc8df219cafe (diff)
parent6c91f5e3e1de32c45ea0b38227ce35eb43eb2ebc (diff)
downloadutil-linux-old-0864d694ca05ea9383ef09bc1bc3a182e15e2ffa.tar.gz
Merge remote branch 'origin/master'
Conflicts: mount/Makefile.am sys-utils/ipcs.c tests/ts/blkid/images-fs/befs.img.bz2 tests/ts/blkid/images-fs/ddf-raid.img.bz2
Diffstat (limited to 'sys-utils/fallocate.c')
-rw-r--r--sys-utils/fallocate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index e41643a2..d1f43c24 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -122,6 +122,11 @@ int main(int argc, char **argv)
fname = argv[optind++];
+ if (optind != argc) {
+ warnx(_("unexpected number of arguments"));
+ usage(stderr);
+ }
+
fd = open(fname, O_WRONLY|O_CREAT, 0644);
if (fd < 0)
err(EXIT_FAILURE, _("%s: open failed"), fname);