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

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