static void DumpHeader(DumpState *D) { u8 h[KTAPC_HEADERSIZE]; kp_header(h); DumpBlock(h, KTAPC_HEADERSIZE, D); }
static int load_header(struct load_state *S) { u8 h[KTAPC_HEADERSIZE]; u8 s[KTAPC_HEADERSIZE]; kp_header(h); READ_VECTOR(S, s, KTAPC_HEADERSIZE); if (memcmp(h, s, N0) == 0) return 0; if (memcmp(h, s, N1) != 0) error(S, "not a"); else if (memcmp(h, s, N2) != 0) error(S, "version mismatch in"); else if (memcmp(h, s, N3) != 0) error(S, "incompatible"); else error(S,"corrupted"); return -1; }