linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-xfs@vger.kernel.org
Cc: sandeen@sandeen.net, Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH v4 1/4] xfs_io: Disable -V if pwritev is not available
Date: Thu,  9 Nov 2017 13:26:45 -0600	[thread overview]
Message-ID: <20171109192648.6356-1-rgoldwyn@suse.de> (raw)

From: Goldwyn Rodrigues <rgoldwyn@suse.com>

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 <rgoldwyn@suse.com>
---
 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);
 		}
 	}
-- 
2.14.2


             reply	other threads:[~2017-11-09 19:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 19:26 Goldwyn Rodrigues [this message]
2017-11-09 19:26 ` [PATCH v4 2/4] xfs_io: Add support for pwritev2() Goldwyn Rodrigues
2017-11-09 19:26 ` [PATCH v4 3/4] xfs_io: Add RWF_NOWAIT to pwritev2() Goldwyn Rodrigues
2017-11-09 19:26 ` [PATCH v4 4/4] xfs_io: Allow partial writes Goldwyn Rodrigues
2017-11-09 20:46   ` Eric Sandeen
2017-11-09 20:33 ` [PATCH v4 1/4] xfs_io: Disable -V if pwritev is not available Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171109192648.6356-1-rgoldwyn@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=rgoldwyn@suse.com \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).