From eb94f096bfcd8631c402b48059fa409c10149cf5 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Thu, 28 Dec 2006 17:13:42 +0200 Subject: [PATCH] Add mstdump tool, make it compile with mtcr.h --- Makefile | 5 ++++- mstdump.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9ac502a..35479a8 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ EXTRA_LOADLIBES=-lz LOADLIBES+=${EXTRA_LOADLIBES} all: default -bin: mstflint mread mwrite +bin: mstflint mread mwrite mstdump default: bin static: bin @@ -34,5 +34,8 @@ mwrite: mwrite.c mtcr.h mread: mread.c mtcr.h $(CC) ${CFLAGS} mread.c -o mread +mstdump: mstdump.c mtcr.h + $(CC) ${CFLAGS} mstdump.c -o mstdump + clean: rm -f mstflint mread mwrite mstflint.o diff --git a/mstdump.c b/mstdump.c index 5e23241..c156c7c 100644 --- a/mstdump.c +++ b/mstdump.c @@ -37,9 +37,9 @@ */ +#include #include #include -#include static unsigned tavor_address_list[]= { @@ -60760,11 +60760,19 @@ int main(int argc, char** argv) int list_size; unsigned* list; + if (argc != 2) + { + fprintf(stderr,"Usage: %s .\n", argv[0]); + return 2; + } + +#if 0 if (argc != 2 && argc != 3) { fprintf(stderr,"Usage: %s [i2c-slave].\n", argv[0]); return 2; } +#endif f=mopen(argv[1]); @@ -60774,9 +60782,10 @@ int main(int argc, char** argv) return 1; } +#if 0 if (argc == 3) mset_i2c_slave(f, strtoul(argv[2],0,0)); - +#endif myread4(f,0xF0014,&hca_id); myread4(f,0x60014,&is3_id); -- 2.46.0