From 4d1793e25fd6691f8a2407d6d2dfb23809086ef0 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 27 Jun 2011 11:27:24 -0700 Subject: mtd-utils: switch more utils to unified versioning More utilities now use the common VERSION system. For utils that printed a very simple message, we use the new common_print_version() "function." Signed-off-by: Brian Norris Acked-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- ubi-utils/mtdinfo.c | 5 ++--- ubi-utils/ubiattach.c | 5 ++--- ubi-utils/ubicrc32.c | 5 ++--- ubi-utils/ubidetach.c | 5 ++--- ubi-utils/ubiformat.c | 5 ++--- ubi-utils/ubimkvol.c | 5 ++--- ubi-utils/ubinfo.c | 5 ++--- ubi-utils/ubinize.c | 5 ++--- ubi-utils/ubirename.c | 1 - ubi-utils/ubirmvol.c | 5 ++--- ubi-utils/ubirsvol.c | 5 ++--- ubi-utils/ubiupdatevol.c | 5 ++--- 12 files changed, 22 insertions(+), 34 deletions(-) (limited to 'ubi-utils') diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c index bfd7e6d..ab00ce0 100644 --- a/ubi-utils/mtdinfo.c +++ b/ubi-utils/mtdinfo.c @@ -21,7 +21,6 @@ * Author: Artem Bityutskiy */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "mtdinfo" #include @@ -53,7 +52,7 @@ static struct args args = { .node = NULL, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to print MTD information."; static const char optionsstr[] = @@ -125,7 +124,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - printf("%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubiattach.c b/ubi-utils/ubiattach.c index 4f18e99..27e7c09 100644 --- a/ubi-utils/ubiattach.c +++ b/ubi-utils/ubiattach.c @@ -21,7 +21,6 @@ * Author: Artem Bityutskiy */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubiattach" #include @@ -53,7 +52,7 @@ static struct args args = { .dev = NULL, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to attach MTD device to UBI."; static const char optionsstr[] = @@ -129,7 +128,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubicrc32.c b/ubi-utils/ubicrc32.c index 73ec595..0ea255d 100644 --- a/ubi-utils/ubicrc32.c +++ b/ubi-utils/ubicrc32.c @@ -22,7 +22,6 @@ * Author: Oliver Lohmann */ -#define PROGRAM_VERSION "1.0" #define PROGRAM_NAME "ubicrc32" #include @@ -37,7 +36,7 @@ #define BUFSIZE 4096 -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to calculate CRC32 with UBI start value (0xFFFFFFFF)"; static const char optionsstr[] = @@ -70,7 +69,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubidetach.c b/ubi-utils/ubidetach.c index 668f1bd..64b748e 100644 --- a/ubi-utils/ubidetach.c +++ b/ubi-utils/ubidetach.c @@ -21,7 +21,6 @@ * Author: Artem Bityutskiy */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubidetach" #include @@ -50,7 +49,7 @@ static struct args args = { .dev = NULL, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - tool to remove UBI devices (detach MTD devices from UBI)"; static const char optionsstr[] = @@ -113,7 +112,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c index c4b944a..bfa1730 100644 --- a/ubi-utils/ubiformat.c +++ b/ubi-utils/ubiformat.c @@ -29,7 +29,6 @@ */ #define MAX_CONSECUTIVE_BAD_BLOCKS 4 -#define PROGRAM_VERSION "1.5" #define PROGRAM_NAME "ubiformat" #include @@ -72,7 +71,7 @@ static struct args args = .ubi_ver = 1, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to format MTD devices and flash UBI images"; static const char optionsstr[] = @@ -206,7 +205,7 @@ static int parse_opt(int argc, char * const argv[]) break; case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case 'h': diff --git a/ubi-utils/ubimkvol.c b/ubi-utils/ubimkvol.c index 25065e3..7c2a234 100644 --- a/ubi-utils/ubimkvol.c +++ b/ubi-utils/ubimkvol.c @@ -23,7 +23,6 @@ * Frank Haverkamp */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubimkvol" #include @@ -56,7 +55,7 @@ static struct args args = { .vol_id = UBI_VOL_NUM_AUTO, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to create UBI volumes."; static const char optionsstr[] = @@ -173,7 +172,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case 'm': diff --git a/ubi-utils/ubinfo.c b/ubi-utils/ubinfo.c index 8e14e6e..7aa4aa4 100644 --- a/ubi-utils/ubinfo.c +++ b/ubi-utils/ubinfo.c @@ -21,7 +21,6 @@ * Author: Artem Bityutskiy */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubinfo" #include @@ -51,7 +50,7 @@ static struct args args = { .vol_name = NULL, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to print UBI information."; static const char optionsstr[] = @@ -124,7 +123,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubinize.c b/ubi-utils/ubinize.c index 3085b66..453494d 100644 --- a/ubi-utils/ubinize.c +++ b/ubi-utils/ubinize.c @@ -24,7 +24,6 @@ * Oliver Lohmann */ -#define PROGRAM_VERSION "1.2" #define PROGRAM_NAME "ubinize" #include @@ -39,7 +38,7 @@ #include "common.h" #include "ubiutils-common.h" -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to generate UBI images. An UBI image may contain one or more UBI " "volumes which have to be defined in the input configuration ini-file. The " "ini file defines all the UBI volumes - their characteristics and the and the " @@ -234,7 +233,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); default: diff --git a/ubi-utils/ubirename.c b/ubi-utils/ubirename.c index 070e32e..288475b 100644 --- a/ubi-utils/ubirename.c +++ b/ubi-utils/ubirename.c @@ -21,7 +21,6 @@ * Author: Richard Titmuss */ -#define PROGRAM_VERSION "1.0" #define PROGRAM_NAME "ubirename" #include diff --git a/ubi-utils/ubirmvol.c b/ubi-utils/ubirmvol.c index 5725d90..464f05d 100644 --- a/ubi-utils/ubirmvol.c +++ b/ubi-utils/ubirmvol.c @@ -23,7 +23,6 @@ * Frank Haverkamp */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubirmvol" #include @@ -46,7 +45,7 @@ static struct args args = { .vol_id = -1, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to remove UBI volumes."; static const char optionsstr[] = @@ -117,7 +116,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubirsvol.c b/ubi-utils/ubirsvol.c index 65f579c..c469060 100644 --- a/ubi-utils/ubirsvol.c +++ b/ubi-utils/ubirsvol.c @@ -23,7 +23,6 @@ * Frank Haverkamp */ -#define PROGRAM_VERSION "1.1" #define PROGRAM_NAME "ubirsvol" #include @@ -51,7 +50,7 @@ static struct args args = { .lebs = -1, }; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to resize UBI volumes."; static const char optionsstr[] = @@ -146,7 +145,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/ubiupdatevol.c b/ubi-utils/ubiupdatevol.c index 24f38fe..7fedb3c 100644 --- a/ubi-utils/ubiupdatevol.c +++ b/ubi-utils/ubiupdatevol.c @@ -24,7 +24,6 @@ * Artem Bityutskiy */ -#define PROGRAM_VERSION "1.2" #define PROGRAM_NAME "ubiupdatevol" #include @@ -52,7 +51,7 @@ struct args { static struct args args; -static const char doc[] = PROGRAM_NAME " version " PROGRAM_VERSION +static const char doc[] = PROGRAM_NAME " version " VERSION " - a tool to write data to UBI volumes."; static const char optionsstr[] = @@ -103,7 +102,7 @@ static int parse_opt(int argc, char * const argv[]) exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + common_print_version(); exit(EXIT_SUCCESS); case ':': -- cgit v1.2.3