[LinuxBIOS] r2815 - trunk/util/superiotool

svn at openbios.org svn at openbios.org
Mon Oct 1 15:39:03 CEST 2007


Author: uwe
Date: 2007-10-01 15:39:02 +0200 (Mon, 01 Oct 2007)
New Revision: 2815

Modified:
   trunk/util/superiotool/README
   trunk/util/superiotool/superiotool.c
   trunk/util/superiotool/superiotool.h
Log:
De-uglify the --version output (trivial).

Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>



Modified: trunk/util/superiotool/README
===================================================================
--- trunk/util/superiotool/README	2007-09-28 15:45:43 UTC (rev 2814)
+++ trunk/util/superiotool/README	2007-10-01 13:39:02 UTC (rev 2815)
@@ -37,7 +37,7 @@
  -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:
 

Modified: trunk/util/superiotool/superiotool.c
===================================================================
--- trunk/util/superiotool/superiotool.c	2007-09-28 15:45:43 UTC (rev 2814)
+++ trunk/util/superiotool/superiotool.c	2007-10-01 13:39:02 UTC (rev 2815)
@@ -172,6 +172,7 @@
 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 @@
 			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':

Modified: trunk/util/superiotool/superiotool.h
===================================================================
--- trunk/util/superiotool/superiotool.h	2007-09-28 15:45:43 UTC (rev 2814)
+++ trunk/util/superiotool/superiotool.h	2007-10-01 13:39:02 UTC (rev 2815)
@@ -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\





More information about the coreboot mailing list