Blame SOURCES/xfsprogs-4.9-xfs_io-fix-m-option.patch

9c4b3e
commit 41c702ce4b2bbea59e49384a90e17c64e46bd3ae
9c4b3e
Author: Andreas Gruenbacher <agruenba@redhat.com>
9c4b3e
Date:   Tue Nov 1 10:38:40 2016 +1100
9c4b3e
9c4b3e
    xfs_io: Fix initial -m option
9c4b3e
    
9c4b3e
    Like "open -m mode", the initial -m option requires a mode argument.
9c4b3e
    
9c4b3e
    Document these options correctly as well.
9c4b3e
    
9c4b3e
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
9c4b3e
    Reviewed-by: Dave Chinner <dchinner@redhat.com>
9c4b3e
    Signed-off-by: Dave Chinner <david@fromorbit.com>
9c4b3e
9c4b3e
Index: xfsprogs-4.5.0/io/init.c
9c4b3e
===================================================================
9c4b3e
--- xfsprogs-4.5.0.orig/io/init.c
9c4b3e
+++ xfsprogs-4.5.0/io/init.c
9c4b3e
@@ -32,7 +32,7 @@ void
9c4b3e
 usage(void)
9c4b3e
 {
9c4b3e
 	fprintf(stderr,
9c4b3e
-		_("Usage: %s [-adfmnrRstVx] [-p prog] [-c cmd]... file\n"),
9c4b3e
+		_("Usage: %s [-adfnrRstVx] [-m mode] [-p prog] [-c cmd]... file\n"),
9c4b3e
 		progname);
9c4b3e
 	exit(1);
9c4b3e
 }
9c4b3e
@@ -139,7 +139,7 @@ init(
9c4b3e
 	pagesize = getpagesize();
9c4b3e
 	gettimeofday(&stopwatch, NULL);
9c4b3e
 
9c4b3e
-	while ((c = getopt(argc, argv, "ac:dFfmp:nrRstTVx")) != EOF) {
9c4b3e
+	while ((c = getopt(argc, argv, "ac:dFfm:p:nrRstTVx")) != EOF) {
9c4b3e
 		switch (c) {
9c4b3e
 		case 'a':
9c4b3e
 			flags |= IO_APPEND;
9c4b3e
Index: xfsprogs-4.5.0/io/open.c
9c4b3e
===================================================================
9c4b3e
--- xfsprogs-4.5.0.orig/io/open.c
9c4b3e
+++ xfsprogs-4.5.0/io/open.c
9c4b3e
@@ -759,7 +759,7 @@ open_init(void)
9c4b3e
 	open_cmd.argmin = 0;
9c4b3e
 	open_cmd.argmax = -1;
9c4b3e
 	open_cmd.flags = CMD_NOMAP_OK | CMD_NOFILE_OK | CMD_FOREIGN_OK;
9c4b3e
-	open_cmd.args = _("[-acdrstxT] [path]");
9c4b3e
+	open_cmd.args = _("[-acdrstxT] [-m mode] [path]");
9c4b3e
 	open_cmd.oneline = _("open the file specified by path");
9c4b3e
 	open_cmd.help = open_help;
9c4b3e