diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-10-01 13:39:02 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-10-01 13:39:02 +0000 |
commit | e4d4ebabbda3eb64a41094cd121e3fdb36f032c8 (patch) | |
tree | e4f80d124776ebf631012b79f8becdb84559e62d | |
parent | afe83092020d37d1b8629b3b92f9179e925e72fe (diff) |
De-uglify the --version output (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2815 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | util/superiotool/README | 2 | ||||
-rw-r--r-- | util/superiotool/superiotool.c | 6 | ||||
-rw-r--r-- | util/superiotool/superiotool.h | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/util/superiotool/README b/util/superiotool/README index 9fef6306cc..dfe380098e 100644 --- a/util/superiotool/README +++ b/util/superiotool/README @@ -37,7 +37,7 @@ Usage -h | --help Show a short help text Per default (no options) superiotool will just probe for a Super I/O -and print its vendor, name, ID, version, and config port. +and print its vendor, name, ID, revision, and config port. Typical usage of superiotool: diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index 9bde779a81..df0b63ce53 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -172,6 +172,7 @@ void no_superio_found(const char *vendor, const char *info, uint16_t port) int main(int argc, char *argv[]) { int i, j, opt, option_index; + char tmp[80]; const static struct option long_options[] = { {"dump", no_argument, NULL, 'd'}, @@ -195,7 +196,10 @@ int main(int argc, char *argv[]) verbose = 1; break; case 'v': - printf("superiotool %s\n", SUPERIOTOOL_VERSION); + strncpy((char *)&tmp, + (const char *)&SUPERIOTOOL_VERSION[6], + strlen(SUPERIOTOOL_VERSION) - 8); + printf("superiotool r%s\n", (char *)&tmp); exit(0); break; case 'h': diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h index 3045124af9..9c9e55a238 100644 --- a/util/superiotool/superiotool.h +++ b/util/superiotool/superiotool.h @@ -29,7 +29,7 @@ #include <getopt.h> #include <sys/io.h> -#define SUPERIOTOOL_VERSION "r$Rev$" +#define SUPERIOTOOL_VERSION "$Rev$" #define USAGE "Usage: superiotool [-d] [-D] [-V] [-v] [-h]\n\n\ -d | --dump Dump Super I/O registers\n\ |