[PATCH] xfs_io: Fix initial -m option

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Like "open -m mode", the initial -m option requires a mode argument.

Document these options correctly as well.

Signed-off-by: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
---
 io/init.c | 4 ++--
 io/open.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/io/init.c b/io/init.c
index efe7390..f792934 100644
--- a/io/init.c
+++ b/io/init.c
@@ -32,7 +32,7 @@ void
 usage(void)
 {
 	fprintf(stderr,
-		_("Usage: %s [-adfmnrRstVx] [-p prog] [-c cmd]... file\n"),
+		_("Usage: %s [-adfnrRstVx] [-m mode] [-p prog] [-c cmd]... file\n"),
 		progname);
 	exit(1);
 }
@@ -140,7 +140,7 @@ init(
 	pagesize = getpagesize();
 	gettimeofday(&stopwatch, NULL);
 
-	while ((c = getopt(argc, argv, "ac:dFfmp:nrRstTVx")) != EOF) {
+	while ((c = getopt(argc, argv, "ac:dFfm:p:nrRstTVx")) != EOF) {
 		switch (c) {
 		case 'a':
 			flags |= IO_APPEND;
diff --git a/io/open.c b/io/open.c
index 8f934ee..caf7895 100644
--- a/io/open.c
+++ b/io/open.c
@@ -918,7 +918,7 @@ open_init(void)
 	open_cmd.argmin = 0;
 	open_cmd.argmax = -1;
 	open_cmd.flags = CMD_NOMAP_OK | CMD_NOFILE_OK | CMD_FOREIGN_OK;
-	open_cmd.args = _("[-acdrstxT] [path]");
+	open_cmd.args = _("[-acdrstxT] [-m mode] [path]");
 	open_cmd.oneline = _("open the file specified by path");
 	open_cmd.help = open_help;
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux