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

Function init_manifest_header

util/cbfstool/ifwitool.c:1317–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1315}
1316
1317static void init_manifest_header(struct manifest_header *hdr, size_t size)
1318{
1319 memset(hdr, 0, sizeof(*hdr));
1320
1321 hdr->header_type = 0x4;
1322 assert((MANIFEST_HDR_SIZE % DWORD_SIZE) == 0);
1323 hdr->header_length = MANIFEST_HDR_SIZE / DWORD_SIZE;
1324 hdr->header_version = 0x10000;
1325 hdr->vendor = 0x8086;
1326
1327 struct tm *local_time;
1328 time_t curr_time;
1329 char buffer[11];
1330
1331 curr_time = time(NULL);
1332 local_time = localtime(&curr_time);
1333 strftime(buffer, sizeof(buffer), "0x%Y%m%d", local_time);
1334 hdr->date = strtoul(buffer, NULL, 16);
1335
1336 assert((size % DWORD_SIZE) == 0);
1337 hdr->size = size / DWORD_SIZE;
1338 hdr->id = MANIFEST_ID_MAGIC;
1339}
1340
1341static void init_signed_pkg_info_ext(struct signed_pkg_info_ext *ext,
1342 size_t count, const char *name)

Callers 1

ibbp_dir_addFunction · 0.85

Calls 3

timeFunction · 0.85
memsetFunction · 0.50
strtoulFunction · 0.50

Tested by

no test coverage detected