for (size_t i = 0; i < header->ents_len; i++) {
if (!(i % ENT_PER_BLK)) {
- errno = master->read(
+ errno = master->ops.read(
master, ents_parial, LBA2OFF(ent_lba++), GPT_BLKSIZE);
if (errno < 0) {
goto done;
}
// Convert UEFI's 512B LB representation into local LBA range.
- u64_t slba_local = (ent->start_lba * GPT_BLKSIZE) / bdev->blk_size;
+ u64_t slba_local =
+ (ent->start_lba * GPT_BLKSIZE) / (u64_t)bdev->blk_size;
u64_t elba_local = (ent->end_lba * GPT_BLKSIZE) / (u64_t)bdev->blk_size;
kprintf("%s: guid part#%d: %d..%d\n",
int errno;
struct gpt_header* gpt_hdr = (struct gpt_header*)valloc(GPT_BLKSIZE);
- if ((errno = master->read(master, gpt_hdr, LBA2OFF(1), LBA2OFF(1))) < 0) {
+ if ((errno = master->ops.read(master, gpt_hdr, LBA2OFF(1), LBA2OFF(1))) <
+ 0) {
goto done;
}