From patchwork Thu Nov 9 19:26:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 10051705 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 DC80A601EA for ; Thu, 9 Nov 2017 19:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE8DF2B08C for ; Thu, 9 Nov 2017 19:27:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C33B52B08F; Thu, 9 Nov 2017 19:27:03 +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 597D72B08C for ; Thu, 9 Nov 2017 19:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754074AbdKIT1C (ORCPT ); Thu, 9 Nov 2017 14:27:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:42001 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754002AbdKIT1C (ORCPT ); Thu, 9 Nov 2017 14:27:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D6869ACBC; Thu, 9 Nov 2017 19:27:00 +0000 (UTC) From: Goldwyn Rodrigues To: linux-xfs@vger.kernel.org Cc: sandeen@sandeen.net, Goldwyn Rodrigues Subject: [PATCH v4 1/4] xfs_io: Disable -V if pwritev is not available Date: Thu, 9 Nov 2017 13:26:45 -0600 Message-Id: <20171109192648.6356-1-rgoldwyn@suse.de> X-Mailer: git-send-email 2.14.2 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Goldwyn Rodrigues This results in default case which will display the error message that command is not found. This is required for xfs_io builds which did not support pwritev and an attempt is made to use -V. Signed-off-by: Goldwyn Rodrigues Reviewed-by: Eric Sandeen --- io/pwrite.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/io/pwrite.c b/io/pwrite.c index 1c5dfca1..5f149a68 100644 --- a/io/pwrite.c +++ b/io/pwrite.c @@ -312,6 +312,7 @@ pwrite_f( case 'u': uflag = 1; break; +#ifdef HAVE_PWRITEV case 'V': vectors = strtoul(optarg, &sp, 0); if (!sp || sp == optarg) { @@ -320,6 +321,7 @@ pwrite_f( return 0; } break; +#endif case 'w': wflag = 1; break; @@ -334,6 +336,7 @@ pwrite_f( } break; default: + printf(_("command -%c not supported\n"), c); return command_usage(&pwrite_cmd); } }