De-uglify the --version output (trivial).
authorUwe Hermann <uwe@hermann-uwe.de>
Mon, 1 Oct 2007 13:39:02 +0000 (13:39 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Mon, 1 Oct 2007 13:39:02 +0000 (13:39 +0000)
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

util/superiotool/README
util/superiotool/superiotool.c
util/superiotool/superiotool.h

index 9fef6306ccf02cb6bc5a8d0ce56f4d5b01c6c7d1..dfe380098ef7bf6c2cb28f58b4837f71718214b3 100644 (file)
@@ -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:
 
index 9bde779a81aee8becd240b9bb8f6b85d4f0891f0..df0b63ce5383ecc2660a80c1ee645a5b3c359e88 100644 (file)
@@ -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':
index 3045124af9b0d162d27a0536bd929070356fb4e7..9c9e55a23871e2a44e55cadea923ec3c4834ae3f 100644 (file)
@@ -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\