void mbr_parse(blkdev_t *blk, char letter)
{
boot_record_t *br;
- uint8_t i, maxbr = 50;
+ uint8_t i, seen = 0;
uint32_t lba = 0, ep_offset = 0, br_offset = 0;
uint8_t next = 0;
break;
/* avoid an infinite loop where extended boot records form a loop */
- if(--maxbr == 0)
+ if(seen >= 50)
break;
- if(next < 4 && lba != 0){
+ if(seen == 1){
/* we just loaded the first extended boot record */
ep_offset = lba;
next = 4;
kprintf("hd%c%d ", letter, next);
}
}
+ seen++;
}while(lba);
if(next >= 4)