]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
src/t_mmap_dio: fix incorrect argument count check
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Mon, 24 Apr 2017 17:49:31 +0000 (11:49 -0600)
committerEryu Guan <eguan@redhat.com>
Tue, 25 Apr 2017 11:32:52 +0000 (19:32 +0800)
t_mmap_dio.c actually requires 4 arguments, not 3 as the current
check enforces:

usage: t_mmap_dio <src file> <dest file> <size> <msg>
open src(No such file or directory) len 0 (null)

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Fixes: 456581661b4d ("xfs: test per-inode DAX flag by IO")
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/t_mmap_dio.c

index 69b9ca8c1abd9b70b8459ce78cad3be9af1aafd4..6c8ca1a391812ea737f169370c9cd25fd1370e5d 100644 (file)
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
        char *dfile;
        unsigned long len, opt;
 
-       if (argc < 4)
+       if (argc < 5)
                usage(basename(argv[0]));
 
        while ((opt = getopt(argc, argv, "b")) != -1)