| 296 | } |
| 297 | |
| 298 | static int mediatek_fixup(struct buffer *buffer, unused size_t offset) |
| 299 | { |
| 300 | struct vb2_hash real_hash; |
| 301 | void *hash = mediatek_find_hash(buffer, &real_hash); |
| 302 | if (!hash) { |
| 303 | ERROR("fixups: Cannot find MediaTek header anymore!\n"); |
| 304 | return -1; |
| 305 | } |
| 306 | |
| 307 | memcpy(hash, real_hash.raw, VB2_SHA256_DIGEST_SIZE); |
| 308 | INFO("fixups: Updated MediaTek bootblock hash.\n"); |
| 309 | return 0; |
| 310 | } |
| 311 | |
| 312 | platform_fixup_func platform_fixups_probe(struct buffer *buffer, size_t offset, |
| 313 | const char *region_name) |
nothing calls this directly
no test coverage detected