3 IDL=../../lustre/include/lustre/lustre_idl.h
5 idl_types=$(mktemp -t idl_types-XXXX)
6 idl_types2=$(mktemp -t idl_types2-XXXX)
7 idl_struct_types=$(mktemp -t idl_struct_types-XXXX)
8 idl_struct_types2=$(mktemp -t idl_struct_types2-XXXX)
11 trap 'rm -f "$idl_types" "$idl_types2" "$idl_struct_types" "$idl_struct_types2"' EXIT
14 egrep '^(struct|union|enum|typedef|#define)' $IDL |
15 grep -v '} __attribute__((packed));' |
16 grep -v '}__attribute__((packed));' > $idl_types
17 sed -e '/^#define/s/^#define.\([^ ]*\).*$/\1/' \
18 -e '/^typedef/s/typedef.[^ ]*[ ]*\<\(.*\);/\1/' \
19 -e '/^struct/s/^struct[ ]*\([^ ]*\).*$/\1/' \
20 -e '/^enum/s/^enum[ ]*\([^ ]*\).*$/\1/' \
21 -e '/^typedef enum/s/^typedef enum[ ]*\([^ ]*\)[ ].*/\1/' \
22 -e '/^typedef union/s/^typedef union[ ]*\([^ ]*\)[ ].*/\1/' \
23 "$idl_types" | grep -v '[()]' > "$idl_types2"
25 # Ignore the #define for the header guard
26 [[ "$sym" = _LUSTRE_IDL_H_ ]] && continue
27 grep -q "$sym" wirecheck.c || echo "Missing wirecheck for $sym"
30 # Just struct types (the grep -v ';' part ignores incomplete structs; we can't
32 grep '^struct' $IDL | grep -v ';' > "$idl_struct_types"
33 sed -e '/^struct/s/^struct[ ]*\([^ ]*\).*$/\1/' \
34 "$idl_struct_types" | grep -v '[()]' > "$idl_struct_types2"
36 grep -q "$sym" wirecheck.c && continue
38 echo "Missing wirecheck for struct $sym"
39 done < "$idl_struct_types2"
41 # Reflect only missing structs, for now.