xfs
[Top] [All Lists]

[PATCH 3/3] xfsprogs: Fix up usage() errors and omissions

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH 3/3] xfsprogs: Fix up usage() errors and omissions
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 22 Apr 2013 17:42:06 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5175BB8F.5090604@xxxxxxxxxxx>
References: <5175BB8F.5090604@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
Add missing options and remove invalid options in usage() output
strings.

* Add -V to several usage() strings
* Remove deprecated/invalid -n and -s otions from xfs_fsr's usage
* Remove invalid -I option from xfs_growfs's usage
* Add -n (O_NONBLOCK) option to xfs_io's usage
* Add -e (exit on error) option to xfs_logprint's usage
* Remove invalid -b option from xfs_mdrestore's usage
* Add -N (no-op), -K (no discard), and -f (force) to mkfs.xfs's usage
* Add -x (expert) option to xfs_quota's usage

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index c01e0b9..7f65de3 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -301,7 +301,7 @@ void
 usage(void)
 {
        fprintf(stderr,
-               _("Usage: %s [-bd] [-L logfile] source target [target ...]\n"),
+               _("Usage: %s [-bdV] [-L logfile] source target [target ...]\n"),
                progname);
        exit(1);
 }
diff --git a/db/init.c b/db/init.c
index 2a31cb8..0e9e1a2 100644
--- a/db/init.c
+++ b/db/init.c
@@ -43,7 +43,7 @@ static void
 usage(void)
 {
        fprintf(stderr, _(
-               "Usage: %s [-fFrxV] [-p prog] [-l logdev] [-c cmd]... device\n"
+               "Usage: %s [-ifFrxV] [-p prog] [-l logdev] [-c cmd]... device\n"
                ), progname);
        exit(1);
 }
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 3d017ca..2440bab 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -386,12 +386,9 @@ void
 usage(int ret)
 {
        fprintf(stderr, _(
-"Usage: %s [-d] [-v] [-n] [-s] [-g] [-t time] [-p passes] [-f leftf] [-m 
mtab]\n"
-"       %s [-d] [-v] [-n] [-s] [-g] xfsdev | dir | file ...\n\n"
+"Usage: %s [-d] [-v] [-g] [-t time] [-p passes] [-f leftf] [-m mtab]\n"
+"       %s [-d] [-v] [-g] xfsdev | dir | file ...\n\n"
 "Options:\n"
-"       -n              Do nothing, only interesting with -v. Not\n"
-"                       effective with in mtab mode.\n"
-"       -s             Print statistics only.\n"
 "       -g              Print to syslog (default if stdout not a tty).\n"
 "       -t time         How long to run in seconds.\n"
 "       -p passes      Number of passes before terminating global re-org.\n"
diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
index a6d298b..5d544da 100644
--- a/growfs/xfs_growfs.c
+++ b/growfs/xfs_growfs.c
@@ -19,14 +19,6 @@
 #include <xfs/libxfs.h>
 #include <xfs/path.h>
 
-/*
- * When growing a filesystem, this is the most significant
- * bits we'll accept in the resulting inode numbers
- * without warning the user.
- */
-
-#define XFS_MAX_INODE_SIG_BITS 32
-
 static void
 usage(void)
 {
@@ -37,7 +29,6 @@ Options:\n\
        -l          grow log section\n\
        -r          grow realtime section\n\
        -n          don't change anything, just show geometry\n\
-       -I          allow inode numbers to exceed %d significant bits\n\
        -i          convert log from external to internal format\n\
        -t          alternate location for mount table (/etc/mtab)\n\
        -x          convert log from internal to external format\n\
@@ -47,7 +38,7 @@ Options:\n\
        -e size     set realtime extent size to size blks\n\
        -m imaxpct  set inode max percent to imaxpct\n\
        -V          print version information\n"),
-               progname, XFS_MAX_INODE_SIG_BITS);
+               progname);
        exit(2);
 }
 
diff --git a/io/init.c b/io/init.c
index fb93082..ca3055a 100644
--- a/io/init.c
+++ b/io/init.c
@@ -32,7 +32,7 @@ void
 usage(void)
 {
        fprintf(stderr,
-               _("Usage: %s [-adfmrRstx] [-p prog] [-c cmd]... file\n"),
+               _("Usage: %s [-adfmnrRstVx] [-p prog] [-c cmd]... file\n"),
                progname);
        exit(1);
 }
diff --git a/io/xfs_freeze.sh b/io/xfs_freeze.sh
index 45e20d2..647aa96 100644
--- a/io/xfs_freeze.sh
+++ b/io/xfs_freeze.sh
@@ -4,7 +4,7 @@
 #
 
 OPTS=""
-USAGE="Usage: xfs_freeze -f | -u <mountpoint>"
+USAGE="Usage: xfs_freeze [-V] [-f | -u] <mountpoint>"
 DIRNAME=`dirname $0`
 VERSION=false
 FREEZE=false
diff --git a/logprint/logprint.c b/logprint/logprint.c
index 482fd4e..0923b0a 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -44,6 +44,7 @@ Options:\n\
     -c             try to continue if error found in log\n\
     -C <filename>   copy the log from the filesystem to filename\n\
     -d             dump the log in log-record format\n\
+    -e             exit when an error is found in the log\n\
     -f             specified device is actually a file\n\
     -l <device>     filename of external log\n\
     -n             don't try and interpret log data\n\
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 509a3ed..479e677 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -178,7 +178,7 @@ perform_restore(
 static void
 usage(void)
 {
-       fprintf(stderr, "Usage: %s [-bg] source target\n", progname);
+       fprintf(stderr, "Usage: %s [-V] [-g] source target\n", progname);
        exit(1);
 }
 
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index c57a855..09b5d5b 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2911,6 +2911,9 @@ usage( void )
 /* realtime subvol */  [-r extsize=num,size=num,rtdev=xxx]\n\
 /* sectorsize */       [-s log=n|size=num]\n\
 /* version */          [-V]\n\
+/* no-op info only */  [-N]\n\
+/* no discard */       [-K]\n\
+/* force overwrite */  [-f]\n\
                        devicename\n\
 <devicename> is required unless -d name=xxx is given.\n\
 <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),\n\
diff --git a/quota/init.c b/quota/init.c
index 0b481f7..aa99b1b 100644
--- a/quota/init.c
+++ b/quota/init.c
@@ -45,7 +45,7 @@ static void
 usage(void)
 {
        fprintf(stderr,
-               _("Usage: %s [-p prog] [-c cmd]... [-d project]... [path]\n"),
+               _("Usage: %s [-x] [-p prog] [-c cmd]... [-d project]... 
[path]\n"),
                progname);
        exit(1);
 }
diff --git a/rtcp/xfs_rtcp.c b/rtcp/xfs_rtcp.c
index 6ea7ab9..f0b5936 100644
--- a/rtcp/xfs_rtcp.c
+++ b/rtcp/xfs_rtcp.c
@@ -27,7 +27,7 @@ char *progname;
 void
 usage()
 {
-       fprintf(stderr, _("%s [-e extsize] [-p] source target\n"), progname);
+       fprintf(stderr, _("%s [-e extsize] [-p] [-V] source target\n"), 
progname);
        exit(2);
 }
 


<Prev in Thread] Current Thread [Next in Thread>