From 7005213600b46c113e831e76709c15518b35ed88 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Jul 2008 14:01:47 +0000 Subject: [PATCH] Some fixes for building bmpp file. --- cil-tools/Makefile.in | 12 ++++++------ cil-tools/ext3.c | 4 ++-- cil-tools/ext3.ml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cil-tools/Makefile.in b/cil-tools/Makefile.in index 7a0d9db..c596b0e 100644 --- a/cil-tools/Makefile.in +++ b/cil-tools/Makefile.in @@ -61,21 +61,21 @@ EXAMPLES = ext3 examples: $(EXAMPLES) -ext3: ext3.cmo ext3.bmpp +ext3: ext3.cmo $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@ -ext3.cmo: ext3.ml +ext3.cmo: ext3.ml ext3.bmpp $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@ ext3.bmpp: ext3.c bitmatch-import-c rm -f $@.new - ./bitmatch-import-c $(DEBUG) $(LINUX_INCLUDES) $< > $@.new + ./bitmatch-import-c $(DEBUG) $< > $@.new mv $@.new $@ -task_struct: task_struct.cmo task_struct.bmpp +task_struct: task_struct.cmo $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@ -task_struct.cmo: task_struct.ml +task_struct.cmo: task_struct.ml task_struct.bmpp $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@ task_struct.bmpp: task_struct.c bitmatch-import-c @@ -87,7 +87,7 @@ task_struct.bmpp: task_struct.c bitmatch-import-c # Clean. clean: - rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o + rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o *.bmpp rm -f bitmatch-import-c bitmatch-import-c.opt distclean: clean diff --git a/cil-tools/ext3.c b/cil-tools/ext3.c index cf4f695..1d8672f 100644 --- a/cil-tools/ext3.c +++ b/cil-tools/ext3.c @@ -18,9 +18,9 @@ * interested in. */ #include -#include +#include /* This tells the importer program what structures and constants to import. */ //typedef struct ext3_super_block BITMATCH_IMPORT(ext3_super_block); -typedef struct ext3_super_block BITMATCH_IMPORT(ext3_super_block); +typedef struct ext2_super_block BITMATCH_IMPORT(ext3_super_block); BITMATCH_CONSTANT_INT32 (ext3_super_magic, EXT3_SUPER_MAGIC); diff --git a/cil-tools/ext3.ml b/cil-tools/ext3.ml index dbbe210..15ebd24 100644 --- a/cil-tools/ext3.ml +++ b/cil-tools/ext3.ml @@ -15,7 +15,7 @@ let () = let bits = Bitmatch.bitstring_of_file "examples/ext3_sb" in bitmatch bits with - | { :ext3_super_block } -> + | { :ext2_super_block } -> printf "ext3 superblock:\n"; printf " s_inodes_count = %ld\n" s_inodes_count; printf " s_blocks_count = %ld\n" s_blocks_count; -- 1.8.3.1