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

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