From: Ross Zwisler Date: Mon, 24 Apr 2017 17:49:31 +0000 (-0600) Subject: src/t_mmap_dio: fix incorrect argument count check X-Git-Tag: v2022.05.01~2078 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=47a3f8a8308ef62205a7014f0d48dc8f9cdf10e5;p=xfstests-dev.git src/t_mmap_dio: fix incorrect argument count check t_mmap_dio.c actually requires 4 arguments, not 3 as the current check enforces: usage: t_mmap_dio open src(No such file or directory) len 0 (null) Signed-off-by: Ross Zwisler Fixes: 456581661b4d ("xfs: test per-inode DAX flag by IO") Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/src/t_mmap_dio.c b/src/t_mmap_dio.c index 69b9ca8c..6c8ca1a3 100644 --- a/src/t_mmap_dio.c +++ b/src/t_mmap_dio.c @@ -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)