]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: Fix initial -m option
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 31 Oct 2016 23:38:40 +0000 (10:38 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 31 Oct 2016 23:38:40 +0000 (10:38 +1100)
Like "open -m mode", the initial -m option requires a mode argument.

Document these options correctly as well.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
io/init.c
io/open.c

index 2db48a2827e5af3d50f172f9ef12cbe5d4ca8c83..a9191cfa072d4193d5bad9966a8d52f3d1d524bf 100644 (file)
--- 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;
index 69ec3883836d613c606b952e08e9f7d9d0b73d99..628fa853537c9345ef947d8488d72a59e56c7e6e 100644 (file)
--- 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;