FreeCalypso > hg > fc-am-toolkit
view bootutil/do_match.c @ 21:9d7d2fdc733b
new shell scripts c155-gen-fc-{ffs-img,script}
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 11 Jun 2023 00:28:10 +0000 |
parents | fe5f7ba7f154 |
children |
line wrap: on
line source
/* * The function implemented in this module performs a single match-check * between the boot image being analyzed and one of the reference versions * from ../bootmatch directory. */ #include <sys/types.h> #include <string.h> #include <strings.h> #include "../bootmatch/bootmatch.h" check_for_match(image, bm) u_char *image; struct bootmatch *bm; { for (; bm->nbytes; bm++) { if (bcmp(image + bm->offset, bm->refbytes, bm->nbytes)) return(0); } return(1); }