summaryrefslogtreecommitdiffstats
path: root/sys-utils/fallocate.c
diff options
context:
space:
mode:
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 e41643a2f..d1f43c242 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);