diff options
Diffstat (limited to 'tests/zfs-tests/cmd/mkfiles/mkfiles.c')
-rw-r--r-- | tests/zfs-tests/cmd/mkfiles/mkfiles.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/zfs-tests/cmd/mkfiles/mkfiles.c b/tests/zfs-tests/cmd/mkfiles/mkfiles.c index 418fb9d07..62dee1627 100644 --- a/tests/zfs-tests/cmd/mkfiles/mkfiles.c +++ b/tests/zfs-tests/cmd/mkfiles/mkfiles.c @@ -48,10 +48,7 @@ main(int argc, char **argv) if (argc == 4 && sscanf(argv[3], "%u", &first_file) != 1) usage("Invalid first file", -3); - if (numfiles < first_file) - usage("First file larger than last file", -3); - - for (i = first_file; i <= numfiles; i++) { + for (i = first_file; i < first_file + numfiles; i++) { int fd; (void) snprintf(buf, MAXPATHLEN, "%s%u", argv[1], i); if ((fd = open(buf, O_CREAT | O_EXCL, O_RDWR)) == -1) { |