linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/4] xfs_io: Disable -V if pwritev is not available
@ 2017-11-09 19:26 Goldwyn Rodrigues
  2017-11-09 19:26 ` [PATCH v4 2/4] xfs_io: Add support for pwritev2() Goldwyn Rodrigues
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Goldwyn Rodrigues @ 2017-11-09 19:26 UTC (permalink / raw)
  To: linux-xfs; +Cc: sandeen, Goldwyn Rodrigues

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-09 20:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 19:26 [PATCH v4 1/4] xfs_io: Disable -V if pwritev is not available Goldwyn Rodrigues
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

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).