Lines Matching defs:size
119 static void *xmalloc(size_t size, const char *msg)
123 d = malloc(size);
129 static void *xzalloc(size_t size, const char *msg)
131 return memset(xmalloc(size, msg), 0, size);
134 static void xfwrite(void *buf, size_t size, FILE *fp, const char *filename)
136 if (fwrite(buf, 1, size, fp) != size)
358 image->buffer = xmalloc(toc_entry->size,
361 if (toc_entry->size > (uint64_t)-1 - toc_entry->offset_address)
362 log_errx("FIP %s is corrupted: entry size exceeds 64 bit address space",
364 if (toc_entry->size + toc_entry->offset_address > st_size)
365 log_errx("FIP %s is corrupted: entry size exceeds FIP file size",
369 toc_entry->size);
420 image->toc_e.size = st.st_size;
433 xfwrite(image->buffer, image->toc_e.size, fp, filename);
498 printf("%s: offset=0x%llX, size=0x%llX, cmdline=\"--%s\"",
501 (unsigned long long)image->toc_e.size,
513 SHA256(image->buffer, image->toc_e.size, md);
562 if (image == NULL || (image->toc_e.size == 0ULL))
564 payload_size += image->toc_e.size;
568 entry_offset += image->toc_e.size;
574 * size.
585 log_dbgx("Metadata size: %zu bytes", buf_size);
590 log_dbgx("Payload size: %zu bytes", payload_size);
600 xfwrite(image->buffer, image->toc_e.size, fp, filename);