Lines Matching refs:header

237 	struct vhdx_header header;  in vhdx_write_headers()  local
241 memset(&header, 0, sizeof(header)); in vhdx_write_headers()
242 le32enc(&header.signature, VHDX_HEADER_SIGNATURE); in vhdx_write_headers()
243 le32enc(&header.sequence_number, 0); in vhdx_write_headers()
244 le16enc(&header.log_version, 0); in vhdx_write_headers()
245 le16enc(&header.version, 1); in vhdx_write_headers()
246 le32enc(&header.log_length, SIZE_1MB); in vhdx_write_headers()
247 le64enc(&header.log_offset, SIZE_1MB); in vhdx_write_headers()
248 checksum = crc32c(&header, sizeof(header)); in vhdx_write_headers()
249 le32enc(&header.checksum, checksum); in vhdx_write_headers()
250 error = vhdx_write_and_pad(fd, &header, sizeof(header), SIZE_64KB); in vhdx_write_headers()
255 le32enc(&header.sequence_number, 1); in vhdx_write_headers()
256 header.checksum = 0; in vhdx_write_headers()
257 checksum = crc32c(&header, sizeof(header)); in vhdx_write_headers()
258 le32enc(&header.checksum, checksum); in vhdx_write_headers()
259 return vhdx_write_and_pad(fd, &header, sizeof(header), SIZE_64KB); in vhdx_write_headers()
267 struct vhdx_region_table_header header; in vhdx_write_region_tables() local
276 memset(&header, 0, sizeof(header)); in vhdx_write_region_tables()
277 le32enc(&header.signature, VHDX_REGION_TABLE_HEADER_SIGNATURE); in vhdx_write_region_tables()
278 le32enc(&header.entry_count, 2); in vhdx_write_region_tables()
279 memcpy(region_table, &header, sizeof(header)); in vhdx_write_region_tables()
285 memcpy(region_table + sizeof(header), in vhdx_write_region_tables()
292 memcpy(region_table + sizeof(header) + sizeof(entry), in vhdx_write_region_tables()
321 struct vhdx_metadata_table_header header; in vhdx_write_metadata() local
331 memset(&header, 0, sizeof(header)); in vhdx_write_metadata()
334 le64enc(&header.signature, VHDX_METADATA_TABLE_HEADER_SIGNATURE); in vhdx_write_metadata()
335 le16enc(&header.entry_count, 5); in vhdx_write_metadata()
336 memcpy(metadata, &header, sizeof(header)); in vhdx_write_metadata()
337 header_ptr = sizeof(header); in vhdx_write_metadata()