public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH 3/3 V2] xfsprogs: Fix up usage() errors and omissions
Date: Thu, 25 Apr 2013 10:16:34 -0500	[thread overview]
Message-ID: <517948D2.7070706@sandeen.net> (raw)
In-Reply-To: <5175BCBE.8040306@sandeen.net>

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@redhat.com>
---

V2: address Rich's nitpicky review ;)  (i.e. fix good stuff)

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/estimate/xfs_estimate.c b/estimate/xfs_estimate.c
index 54a72e9..ddc6f62 100644
--- a/estimate/xfs_estimate.c
+++ b/estimate/xfs_estimate.c
@@ -78,6 +78,7 @@ usage(char *progname)
 		"\t-i logsize (internal log size)\n"
 		"\t-e logsize (external log size)\n"
 		"\t-v prints more verbose messages\n"
+		"\t-V prints version and exits\n"
 		"\t-h prints this usage message\n\n"
 	"Note:\tblocksize may have 'k' appended to indicate x1024\n"
 	"\tlogsize may also have 'm' appended to indicate (1024 x 1024)\n"),
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 3d017ca..6852b3f 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -386,20 +386,19 @@ 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"
+"       %s -V\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"
+"       -p passes       Number of passes before terminating global re-org.\n"
 "       -f leftoff      Use this instead of %s.\n"
 "       -m mtab         Use something other than /etc/mtab.\n"
 "       -d              Debug, print even more.\n"
-"       -v		Verbose, more -v's more verbose.\n"
-		), progname, progname, _PATH_FSRLAST);
+"       -v              Verbose, more -v's more verbose.\n"
+"       -V              Print version number and exit.\n"
+		), progname, progname, progname, _PATH_FSRLAST);
 	exit(ret);
 }
 
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..a393607 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2899,13 +2899,16 @@ usage( void )
 /* data subvol */	[-d agcount=n,agsize=n,file,name=xxx,size=num,\n\
 			    (sunit=value,swidth=value|su=num,sw=num),\n\
 			    sectlog=n|sectsize=num\n\
+/* force overwrite */	[-f]\n\
 /* inode size */	[-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,\n\
 			    projid32bit=0|1]\n\
+/* no discard */	[-K]\n\
 /* log subvol */	[-l agnum=n,internal,size=num,logdev=xxx,version=n\n\
 			    sunit=value|su=num,sectlog=n|sectsize=num,\n\
 			    lazy-count=0|1]\n\
 /* label */		[-L label (maximum 12 characters)]\n\
 /* naming */		[-n log=n|size=num,version=2|ci]\n\
+/* no-op info only */	[-N]\n\
 /* prototype file */	[-p fname]\n\
 /* quiet */		[-q]\n\
 /* realtime subvol */	[-r extsize=num,size=num,rtdev=xxx]\n\
diff --git a/quota/init.c b/quota/init.c
index 0b481f7..639e9e7 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 [-V] [-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);
 }
 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2013-04-25 15:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 22:37 [PATCH 0/3] xfsprogs: manpage & usage string fixups Eric Sandeen
2013-04-22 22:39 ` [PATCH 1/3] xfsprogs: manpage spelling fixes Eric Sandeen
2013-04-23 15:18   ` Rich Johnston
2013-04-23 15:43     ` Dave Howorth
2013-04-23 15:59       ` Rich Johnston
2013-04-23 16:20         ` Stefan Ring
2013-04-23 19:36     ` Eric Sandeen
2013-04-25 14:12   ` [PATCH 1/3 V2] " Eric Sandeen
2013-04-25 14:59     ` Rich Johnston
2013-04-25 20:43     ` Rich Johnston
2013-04-22 22:40 ` [PATCH 2/3] xfsprogs: Fix manpages for missing or incorrect options Eric Sandeen
2013-04-23 18:35   ` Rich Johnston
2013-04-23 19:36     ` Eric Sandeen
2013-04-23 19:45       ` Rich Johnston
2013-04-25 15:03   ` [PATCH 2/3 V2] " Eric Sandeen
2013-04-25 15:26     ` Rich Johnston
2013-04-25 15:52     ` Rich Johnston
2013-04-22 22:42 ` [PATCH 3/3] xfsprogs: Fix up usage() errors and omissions Eric Sandeen
2013-04-23 19:37   ` Rich Johnston
2013-04-25 15:16   ` Eric Sandeen [this message]
2013-04-25 16:13     ` [PATCH 3/3 V2] " Rich Johnston
2013-04-25 16:15     ` Rich Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517948D2.7070706@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox