Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/util/testdb.c
diff options
context:
space:
mode:
authorJason St. John <jstjohn@purdue.edu>2013-09-03 15:20:50 -0400
committerAllan McRae <allan@archlinux.org>2013-09-04 09:51:20 +1000
commita86015f73fdda878287a2ad21011594862bf506a (patch)
tree61a580ebc898312361abe79f5bfa99441698ddec /src/util/testdb.c
parent4245c6b222703dda7bd6000e180c777f480e4420 (diff)
Improve --help switch output for pacman utils
Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message The --help switch does not exist for a couple of the utils, so the help/usage text for those will be displayed when the util is run with no arguments. Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/util/testdb.c')
-rw-r--r--src/util/testdb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 0ca7ffc8..3d341b35 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -27,8 +27,6 @@
#include <alpm.h>
#include <alpm_list.h>
-#define BASENAME "testdb"
-
alpm_handle_t *handle = NULL;
static void cleanup(int signum)
@@ -244,11 +242,11 @@ cleanup:
static void usage(void)
{
- fprintf(stderr, "usage:\n");
- fprintf(stderr,
- "\t%s [-b <pacman db>] : check the local database\n", BASENAME);
- fprintf(stderr,
- "\t%s [-b <pacman db>] core extra ... : check the listed sync databases\n", BASENAME);
+ fprintf(stderr, "testdb (pacman) v" PACKAGE_VERSION "\n\n"
+ "Test a pacman local database for validity.\n\n"
+ "Usage: testdb [options]\n\n"
+ " -b <pacman db> : check the local database\n"
+ " -b <pacman db> core extra ... : check the listed sync databases\n");
exit(1);
}