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
# 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
* interested in.
*/
#include <linux/magic.h>
-#include <linux/ext3_fs.h>
+#include <linux/ext2_fs.h>
/* 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);
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;