Implement usage for --help and put the same information into the README, too.
authorUwe Hermann <uwe@hermann-uwe.de>
Wed, 19 Sep 2007 16:26:18 +0000 (16:26 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Wed, 19 Sep 2007 16:26:18 +0000 (16:26 +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@2790 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

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

index 2502fbfcea81fed04aa6d66247c214e10ad3ab3f..f0294d41cc9a8a77c6234b18693d805b55c951db 100644 (file)
@@ -28,10 +28,25 @@ Installation
 Usage
 -----
 
- $ superiotool
+  $ superiotool [-d] [-V] [-v] [-h]
 
-Currently the tool will automatically try to detect which Super I/O you
-have, and also dump the register contents.
+  -d | --dump      Dump Super I/O registers
+  -V | --verbose   Verbose mode
+  -v | --version   Show the superiotool version
+  -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.
+
+Typical usage of superiotool:
+
+ - Probe/detect the Super I/O in your mainboard:
+
+   $ superiotool
+
+ - Detailed register dump of the Super I/O (if detected):
+
+   $ superiotool -d
 
 
 Supported Super I/O Chips
index 2ff56fb5c08420347127767ffde4103103ff03f0..479c47f7cc8b7362f36eb1f65c09b6b55cb8ed65 100644 (file)
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
                        exit(0);
                        break;
                case 'h':
-                       printf("Usage: superiotool [-d] [-V] [-v] [-h]\n");
+                       printf(USAGE);
                        exit(0);
                        break;
                default:
index 03592bbca2e3cc9223d6795e2d9d88e3af8c913a..7b6ef904ae6d18e856149ee8cfbbc70c60a51196 100644 (file)
 
 #define SUPERIOTOOL_VERSION "0.1"
 
+#define USAGE "Usage: superiotool [-d] [-V] [-v] [-h]\n\n\
+  -d | --dump      Dump Super I/O registers\n\
+  -V | --verbose   Verbose mode\n\
+  -v | --version   Show the superiotool version\n\
+  -h | --help      Show a short help text\n\n\
+Per default (no options) superiotool will just probe for a Super I/O\n\
+and print its vendor, name, ID, version, and config port.\n"
+
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
 #define EOT            -1              /* End Of Table */