| 377 | #endif |
| 378 | |
| 379 | static void lb_strings(struct lb_header *header) |
| 380 | { |
| 381 | static const struct { |
| 382 | uint32_t tag; |
| 383 | const char *string; |
| 384 | } strings[] = { |
| 385 | { LB_TAG_VERSION, coreboot_version, }, |
| 386 | { LB_TAG_EXTRA_VERSION, coreboot_extra_version, }, |
| 387 | { LB_TAG_BUILD, coreboot_build, }, |
| 388 | { LB_TAG_COMPILE_TIME, coreboot_compile_time, }, |
| 389 | }; |
| 390 | unsigned int i; |
| 391 | for (i = 0; i < ARRAY_SIZE(strings); i++) { |
| 392 | struct lb_string *rec; |
| 393 | size_t len; |
| 394 | rec = (struct lb_string *)lb_new_record(header); |
| 395 | len = strlen(strings[i].string); |
| 396 | rec->tag = strings[i].tag; |
| 397 | rec->size = ALIGN_UP(sizeof(*rec) + len + 1, LB_ENTRY_ALIGN); |
| 398 | memcpy(rec->string, strings[i].string, len+1); |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | static void lb_record_version_timestamp(struct lb_header *header) |
| 403 | { |
no test coverage detected