| 281 | } |
| 282 | |
| 283 | static bool mediatek_probe(struct buffer *buffer) |
| 284 | { |
| 285 | struct vb2_hash real_hash; |
| 286 | void *hash = mediatek_find_hash(buffer, &real_hash); |
| 287 | if (!hash) |
| 288 | return false; |
| 289 | |
| 290 | if (memcmp(real_hash.raw, hash, VB2_SHA256_DIGEST_SIZE)) { |
| 291 | ERROR("fixups: Found MediaTek bootblock, but existing hash doesn't match!\n"); |
| 292 | return false; |
| 293 | } |
| 294 | |
| 295 | return true; |
| 296 | } |
| 297 | |
| 298 | static int mediatek_fixup(struct buffer *buffer, unused size_t offset) |
| 299 | { |
no test coverage detected