Various smaller fixes in superiotool:
authorUwe Hermann <uwe@hermann-uwe.de>
Mon, 17 Mar 2008 13:43:48 +0000 (13:43 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Mon, 17 Mar 2008 13:43:48 +0000 (13:43 +0000)
 - Also dump the extra registers (e.g. EC regs) in --list-supported.

 - Small fix in the code to allow for building with -pedantic (yes,
   the fix is a bit silly, but it's simple and allows us to use the
   -pedantic flag to keep the code even cleaner and nicer).

 - Install the binary in /usr/sbin, as it's meant to be run as root.

 - Small typo in README.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3163 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/superiotool/Makefile
util/superiotool/README
util/superiotool/ite.c
util/superiotool/superiotool.c
util/superiotool/superiotool.h

index 87faecb05b8d2c0d7d70e89382bd7cc82e8f5133..d8ac62c1f355efd47f89e960cf006d55f864cd3c 100644 (file)
@@ -29,9 +29,8 @@ PREFIX  = /usr/local
 SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
           | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
 
-# TODO: -pedantic
 CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-         -Werror-implicit-function-declaration -ansi $(SVNDEF)
+         -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
 
 OBJS = superiotool.o ali.o fintek.o ite.o nsc.o smsc.o winbond.o
 
@@ -43,7 +42,7 @@ $(PROGRAM): $(OBJS) superiotool.h
        $(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS)
 
 install: $(PROGRAM)
-       $(INSTALL) $(PROGRAM) $(PREFIX)/bin
+       $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
        mkdir -p $(PREFIX)/share/man/man8
        $(INSTALL) $(PROGRAM).8 $(PREFIX)/share/man/man8
 
index 0b4505cbb50b5d4d06fc55a0ad91b69f118e82bf..178df8370c9f545c7e21861a148384e1266316f3 100644 (file)
@@ -30,7 +30,7 @@ Installation
 Usage
 -----
 
-Please read the superiotool(1) manpage or type 'superiotool --help'.
+Please read the superiotool(8) manpage or type 'superiotool --help'.
 
 Per default (no options) superiotool will just probe for a Super I/O
 and print its vendor, name, ID, revision, and config port.
index 784c4efcdab73324d58fc41f38bd7ed14122ffb4..44ec64c8a10b25b85153f033d3c171c0cefff40a 100644 (file)
@@ -428,4 +428,5 @@ void probe_idregs_ite(uint16_t port)
 void print_ite_chips(void)
 {
        print_vendor_chips("ITE", reg_table);
+       print_vendor_chips("ITE EC", ec_table);
 }
index 637c0b089e4059b61a6e103a8a3294aed3d0db3f..c70aff947c3385f309b08896fc7e782271baa22e 100644 (file)
@@ -237,6 +237,7 @@ int main(int argc, char *argv[])
                        break;
                case 'h':
                        printf(USAGE);
+                       printf(USAGE_INFO);
                        exit(0);
                        break;
                default:
index 6961325388ebf691f6282d149b76db90bffeb640..26851484c1247cc1e96a0f4e0fbb52005fca0e08 100644 (file)
@@ -36,7 +36,9 @@
   -l | --list-supported  Show the list of supported Super I/O chips\n\
   -V | --verbose         Verbose mode\n\
   -v | --version         Show the superiotool version\n\
-  -h | --help            Show a short help text\n\n\
+  -h | --help            Show a short help text\n\n"
+
+#define USAGE_INFO "\
 Per default (no options) superiotool will just probe for a Super I/O\n\
 and print its vendor, name, ID, revision, and config port.\n"
 
@@ -123,7 +125,6 @@ static const struct {
        {probe_idregs_winbond,  {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},
 };
 
-
 /** Table of functions to print out supported Super I/O chips. */
 static const struct {
        void (*print_list) (void);