From 8e522bb7e9c051a5123e05d8af302b0a1709fe98 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 27 Jul 2007 12:12:00 +0200 Subject: [PATCH] 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 --- disk-utils/elvtune.c | 4 ++-- hwclock/hwclock.c | 2 +- misc-utils/kill.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/disk-utils/elvtune.c b/disk-utils/elvtune.c index ec3083b3..dc264658 100644 --- a/disk-utils/elvtune.c +++ b/disk-utils/elvtune.c @@ -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)) diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c index 4b4d3ee8..bbacf5dc 100644 --- a/hwclock/hwclock.c +++ b/hwclock/hwclock.c @@ -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); } /* diff --git a/misc-utils/kill.c b/misc-utils/kill.c index 824735b4..579ae8ab 100644 --- a/misc-utils/kill.c +++ b/misc-utils/kill.c @@ -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")) { -- 2.39.5