Lines Matching refs:dinfo
71 mk_pri_pentry(struct disk_info *dinfo, struct part_info *pinfo, int pnum, in mk_pri_pentry() argument
104 len_lba += ((uint64_t)dinfo->sect_size - 1); in mk_pri_pentry()
105 len_lba &= ~((uint64_t)dinfo->sect_size - 1); in mk_pri_pentry()
106 len_lba /= (uint64_t)dinfo->sect_size; in mk_pri_pentry()
109 len_lba = dinfo->num_lba - *lba; in mk_pri_pentry()
122 *lba, dinfo->num_lba - *lba); in mk_pri_pentry()
141 mk_ext_pentry(struct disk_info *dinfo, struct part_info *pinfo, uint32_t *lba, in mk_ext_pentry() argument
155 item->offset = ((loff_t)(*lba)) * dinfo->sect_size; in mk_ext_pentry()
163 len = kb_to_lba(pinfo->len_kb, dinfo->sect_size); in mk_ext_pentry()
170 len = dinfo->num_lba - *lba; in mk_ext_pentry()
174 (uint32_t)(((uint64_t)len * (uint64_t)dinfo->sect_size) / in mk_ext_pentry()
196 next_len_lba = 1 + kb_to_lba(pnext->len_kb, dinfo->sect_size); in mk_ext_pentry()
198 next_len_lba = dinfo->num_lba - *lba; in mk_ext_pentry()
212 config_mbr(struct disk_info *dinfo) in config_mbr() argument
215 uint32_t cur_lba = dinfo->skip_lba; in config_mbr()
222 if (!dinfo->part_lst) in config_mbr()
225 for (cnt = 0; cnt < dinfo->num_parts; ++cnt) { in config_mbr()
226 pinfo = &dinfo->part_lst[cnt]; in config_mbr()
230 if (cnt + 1 < dinfo->num_parts) { in config_mbr()
233 if ((temp_wr = mk_pri_pentry(dinfo, NULL, cnt, &cur_lba))) in config_mbr()
243 if ((cur_lba + extended) >= dinfo->num_lba) in config_mbr()
246 uint32_t sz_lba = (pinfo->len_kb / dinfo->sect_size) * 1024; in config_mbr()
247 if ((cur_lba + sz_lba + extended) > dinfo->num_lba) in config_mbr()
252 temp_wr = mk_pri_pentry(dinfo, pinfo, cnt, &cur_lba); in config_mbr()
255 pnext = cnt + 1 < dinfo->num_parts ? &dinfo->part_lst[cnt+1] : NULL; in config_mbr()
256 temp_wr = mk_ext_pentry(dinfo, pinfo, &cur_lba, ext_lba, pnext); in config_mbr()
272 if (!(temp_wr = mk_pri_pentry(dinfo, &blank, cnt, &cur_lba))) { in config_mbr()
294 find_mbr_part(struct disk_info *dinfo, const char *name) in find_mbr_part() argument
296 struct part_info *plist = dinfo->part_lst; in find_mbr_part()
299 int has_extended = (dinfo->num_parts > PC_NUM_BOOT_RECORD_PARTS); in find_mbr_part()
301 for(num = 1; num <= dinfo->num_parts; ++num) { in find_mbr_part()
306 if (num > dinfo->num_parts) in find_mbr_part()
317 num = snprintf(dev_name, MAX_NAME_LEN, "%s%d", dinfo->device, num); in find_mbr_part()