From patchwork Tue Apr 25 20:51:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 9699747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B20C360245 for ; Tue, 25 Apr 2017 20:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3D1C28404 for ; Tue, 25 Apr 2017 20:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9878328479; Tue, 25 Apr 2017 20:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3848728404 for ; Tue, 25 Apr 2017 20:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950748AbdDYUvn (ORCPT ); Tue, 25 Apr 2017 16:51:43 -0400 Received: from mga05.intel.com ([192.55.52.43]:31894 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753850AbdDYUvn (ORCPT ); Tue, 25 Apr 2017 16:51:43 -0400 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 25 Apr 2017 13:51:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,251,1488873600"; d="scan'208";a="93750130" Received: from theros.lm.intel.com ([10.232.112.77]) by fmsmga005.fm.intel.com with ESMTP; 25 Apr 2017 13:51:17 -0700 From: Ross Zwisler To: fstests@vger.kernel.org, Xiong Zhou , jmoyer@redhat.com, eguan@redhat.com Cc: Ross Zwisler , Christoph Hellwig , Dan Williams , "Darrick J. Wong" , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Andrew Morton Subject: [PATCH v2 1/2] xfs: fix incorrect argument count check Date: Tue, 25 Apr 2017 14:51:05 -0600 Message-Id: <20170425205106.20576-1-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.9.3 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP t_mmap_dio.c actually requires 4 arguments, not 3 as the current check enforces: # ./src/t_mmap_dio usage: t_mmap_dio # ./src/t_mmap_dio one two three 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") --- src/t_mmap_dio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_mmap_dio.c b/src/t_mmap_dio.c index 69b9ca8..6c8ca1a 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)