Return the VBT structure size in bytes */
| 1005 | |
| 1006 | /* Return the VBT structure size in bytes */ |
| 1007 | static size_t vbt_size(const struct fileobject *fo) |
| 1008 | { |
| 1009 | if (!fo || fo->size < sizeof(struct vbt_header)) |
| 1010 | return 0; |
| 1011 | const struct vbt_header *head = (const struct vbt_header *)fo->data; |
| 1012 | |
| 1013 | return head->vbt_size; |
| 1014 | } |
| 1015 | |
| 1016 | /* |
| 1017 | * Patch an Intel Option ROM with new VBT. |