Lines Matching refs:phdr
231 struct gpt_hdr *phdr, hdr; in ptable_gptread() local
254 phdr = gpt_checkhdr((struct gpt_hdr *)buf, 1, table->sectors - 1, in ptable_gptread()
256 if (phdr != NULL) { in ptable_gptread()
259 howmany(phdr->hdr_entries * phdr->hdr_entsz, in ptable_gptread()
261 if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && in ptable_gptread()
262 gpt_checktbl(phdr, tbl, size * table->sectorsize, in ptable_gptread()
264 memcpy(&hdr, phdr, sizeof(hdr)); in ptable_gptread()
271 phdr = NULL; in ptable_gptread()
273 phdr = gpt_checkhdr((struct gpt_hdr *)buf, offset, in ptable_gptread()
275 if (phdr != NULL) { in ptable_gptread()
283 uuid_equal(&hdr.hdr_uuid, &phdr->hdr_uuid, NULL) == 0 || in ptable_gptread()
284 hdr.hdr_revision != phdr->hdr_revision || in ptable_gptread()
285 hdr.hdr_size != phdr->hdr_size || in ptable_gptread()
286 hdr.hdr_lba_start != phdr->hdr_lba_start || in ptable_gptread()
287 hdr.hdr_lba_end != phdr->hdr_lba_end || in ptable_gptread()
288 hdr.hdr_entries != phdr->hdr_entries || in ptable_gptread()
289 hdr.hdr_entsz != phdr->hdr_entsz || in ptable_gptread()
290 hdr.hdr_crc_table != phdr->hdr_crc_table) { in ptable_gptread()
293 howmany(phdr->hdr_entries * phdr->hdr_entsz, in ptable_gptread()
295 if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && in ptable_gptread()
296 gpt_checktbl(phdr, tbl, size * table->sectorsize, in ptable_gptread()
298 memcpy(&hdr, phdr, sizeof(hdr)); in ptable_gptread()