Lines Matching defs:lba
247 gpt_read(gpt_t gpt, off_t lba, size_t count)
257 ofs = lba * gpt->secsz;
282 gpt_mbr(gpt_t gpt, off_t lba, unsigned int *next_index, off_t ext_offset)
289 mbr = gpt_read(gpt, lba, 1);
298 "MBR not found at sector %ju", (uintmax_t)lba);
317 if (pmbr && i == 4 && lba == 0) {
320 (uintmax_t)lba);
322 gpt_msg(gpt, "PMBR at sector %ju", (uintmax_t)lba);
323 p = map_add(gpt, lba, 1LL, MAP_TYPE_PMBR, mbr, 1);
327 gpt_warnx(gpt, "Suspicious MBR at sector %ju", (uintmax_t)lba);
329 gpt_msg(gpt, "MBR at sector %ju", (uintmax_t)lba);
331 p = map_add(gpt, lba, 1LL, MAP_TYPE_MBR, mbr, 1);
345 (uintmax_t)lba);
354 start += lba;
377 gpt_gpt(gpt_t gpt, off_t lba, int found)
388 hdr = gpt_read(gpt, lba, 1);
402 (uintmax_t)lba);
431 (lba == 1) ? "Pri" : "Sec", (uintmax_t)lba);
433 m = map_add(gpt, lba, 1, (lba == 1)
440 lba == 1 ? MAP_TYPE_PRI_GPT_TBL : MAP_TYPE_SEC_GPT_TBL, p, 1);
444 if (lba != 1)
585 uint64_t lba;
593 lba = le64toh(hdr->hdr_lba_alt);
594 if (hdr && lba > 0 && lba < (uint64_t)devsz) {
595 if (gpt_gpt(gpt, (off_t)lba, found) == -1)