comparison bootutil/do_match.c @ 12:fe5f7ba7f154

c139-analyze-boot utility put together, compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 10 Jun 2023 04:58:26 +0000
parents
children
comparison
equal deleted inserted replaced
11:2a62a7decd9f 12:fe5f7ba7f154
1 /*
2 * The function implemented in this module performs a single match-check
3 * between the boot image being analyzed and one of the reference versions
4 * from ../bootmatch directory.
5 */
6
7 #include <sys/types.h>
8 #include <string.h>
9 #include <strings.h>
10 #include "../bootmatch/bootmatch.h"
11
12 check_for_match(image, bm)
13 u_char *image;
14 struct bootmatch *bm;
15 {
16 for (; bm->nbytes; bm++) {
17 if (bcmp(image + bm->offset, bm->refbytes, bm->nbytes))
18 return(0);
19 }
20 return(1);
21 }