From: Andreas Gruenbacher Date: Mon, 31 Oct 2016 23:38:40 +0000 (+1100) Subject: xfs_io: Fix initial -m option X-Git-Tag: v4.9.0-rc1~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41c702ce4b2bbea59e49384a90e17c64e46bd3ae;p=thirdparty%2Fxfsprogs-dev.git xfs_io: Fix initial -m option Like "open -m mode", the initial -m option requires a mode argument. Document these options correctly as well. Signed-off-by: Andreas Gruenbacher Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/io/init.c b/io/init.c index 2db48a282..a9191cfa0 100644 --- a/io/init.c +++ b/io/init.c @@ -34,7 +34,7 @@ void usage(void) { fprintf(stderr, - _("Usage: %s [-adfimnrRstTVx] [-p prog] [-c cmd]... file\n"), + _("Usage: %s [-adfinrRstVx] [-m mode] [-p prog] [-c cmd]... file\n"), progname); exit(1); } @@ -143,7 +143,7 @@ init( pagesize = getpagesize(); gettimeofday(&stopwatch, NULL); - while ((c = getopt(argc, argv, "ac:dFfimp:nrRstTVx")) != EOF) { + while ((c = getopt(argc, argv, "ac:dFfim:p:nrRstTVx")) != EOF) { switch (c) { case 'a': flags |= IO_APPEND; diff --git a/io/open.c b/io/open.c index 69ec38838..628fa8535 100644 --- a/io/open.c +++ b/io/open.c @@ -919,7 +919,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;