remove hardcoded package name from some utils

We have PACKAGE_STRING in config.h that includes package name and
version. It's better to use this macro that hardcoded strings.

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2007-07-27 12:12:00 +02:00
parent 9645b5cbe9
commit 8e522bb7e9
3 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ typedef struct blkelv_ioctl_arg_s {
static void
usage(void) {
fprintf(stderr, "elvtune (%s%s)\n", "util-linux-", VERSION);
fprintf(stderr, "elvtune (%s)\n", PACKAGE_STRING);
fprintf(stderr, _("usage:\n"));
fprintf(stderr, "\telvtune [-r r_lat] [-w w_lat] [-b b_lat]"
" /dev/blkdev1 [/dev/blkdev2...]\n");
@ -58,7 +58,7 @@ usage(void) {
static void
version(void) {
fprintf(stderr, "elvtune (%s%s)\n", "util-linux-", VERSION);
fprintf(stderr, "elvtune (%s)\n", PACKAGE_STRING);
}
#define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r))

View File

@ -1183,7 +1183,7 @@ manipulate_epoch(const bool getepoch, const bool setepoch,
static void
out_version(void) {
printf(_("%s from util-linux-%s\n"), MYNAME, PACKAGE_VERSION);
printf(_("%s from %s\n"), MYNAME, PACKAGE_STRING);
}
/*

View File

@ -186,7 +186,7 @@ int main (int argc, char *argv[])
}
if (! strcmp (arg, "-v") || ! strcmp (arg, "-V") ||
! strcmp (arg, "--version")) {
printf(_("%s from %s%s\n"), progname, "util-linux-", VERSION);
printf(_("%s from %s\n"), progname, PACKAGE_STRING);
return 0;
}
if (! strcmp (arg, "-a")) {