Started to copy the import tool from libunbin.
[ocaml-bitstring.git] / cil-tools / ext3.c
1 /* This is an example import file, showing how to import the ext3
2  * superblock automatically from Linux header files.
3  *
4  * Use: bitmatch-import-c ext3.c
5  *
6  * Tip: Add the --debug flag to that command line to see what's going on.
7  */
8
9 /* These are required by Linux in order to get the little/big-endian
10  * notations present in the Linux kernel header files.  Any other
11  * defines needed can go here.
12  */
13 #define __CHECKER__      1
14 #define __CHECK_ENDIAN__ 1
15
16 /* Include files necessary to get the structure(s) and constant(s) we're
17  * interested in.
18  */
19 #include <linux/magic.h>
20 #include <linux/ext3_fs.h>
21
22 /* This tells the importer program what structures and constants to import. */
23 typedef struct ext3_super_block BITMATCH_IMPORT(ext3_super_block);
24 BITMATCH_CONSTANT_INT32 (ext3_super_magic, EXT3_SUPER_MAGIC);