MCPcopy Create free account
hub / github.com/coreboot/coreboot / lb_strings

Function lb_strings

src/lib/coreboot_table.c:379–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377#endif
378
379static 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
402static void lb_record_version_timestamp(struct lb_header *header)
403{

Callers 1

write_coreboot_tableFunction · 0.85

Calls 3

lb_new_recordFunction · 0.85
strlenFunction · 0.85
memcpyFunction · 0.70

Tested by

no test coverage detected