aboutsummaryrefslogtreecommitdiff
path: root/src/binlogcat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-15 20:07:26 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-10-15 20:07:26 +0300
commit7d0beb6599c53544739409ca4aec104bf27a3f35 (patch)
treeb561fbba7c9acedec17cbc398cee12a465faad6e /src/binlogcat.c
parentef3f928cc712f6774e19f8cb8f880cbeac15e8ff (diff)
downloadvmod-binlog-7d0beb6599c53544739409ca4aec104bf27a3f35.tar.gz
vmod-binlog-7d0beb6599c53544739409ca4aec104bf27a3f35.tar.bz2
Add version and help output to command line utilities.
Diffstat (limited to 'src/binlogcat.c')
-rw-r--r--src/binlogcat.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/binlogcat.c b/src/binlogcat.c
index 656d8f2..ada8efe 100644
--- a/src/binlogcat.c
+++ b/src/binlogcat.c
@@ -142,3 +142,16 @@ help()
{
- printf("usage: %s [-dhnv] [-t FORMAT] [FILE...]\n", progname);
+ printf("usage: %s [-dhnVv] [-t FORMAT] [FILE...]\n", progname);
+ printf("Format binary log files in human-readable form\n");
+ printf("\nOptions are:\n\n");
+ printf(" -d print timestamps relative to first record in the file\n");
+ printf(" -n output record numbers\n");
+ printf(" -v print information about each file\n");
+ printf(" -t FORMAT format timestamps according to FORMAT\n");
+ printf("\n");
+ printf(" -h print this help summary\n");
+ printf(" -V show program version\n");
+ printf("\n");
+ printf("Report bugs and suggestions to <%s>\n", PACKAGE_BUGREPORT);
+ if (sizeof(PACKAGE_URL) > 1)
+ printf("%s home page: <%s>\n", PACKAGE_NAME, PACKAGE_URL);
}
@@ -151,3 +164,3 @@ main(int argc, char **argv)
setprogname(argv[0]);
- while ((c = getopt(argc, argv, "dht:nv")) != EOF)
+ while ((c = getopt(argc, argv, "dht:nVv")) != EOF)
switch (c) {
@@ -166,2 +179,5 @@ main(int argc, char **argv)
break;
+ case 'V':
+ version();
+ exit(0);
case 'v':

Return to:

Send suggestions and report system problems to the System administrator.