Skip to content

Commit

Permalink
part_block: fix handling of chained EBR's
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuke committed Mar 10, 2019
1 parent df7a0bc commit e95e0d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion repos/os/src/server/part_block/mbr.h
Expand Up @@ -84,6 +84,7 @@ struct Mbr_partition_table : public Block::Partition_table
{
Partition_record *r = record;
unsigned lba = r->_lba;
unsigned last_lba = 0;

/* first logical partition number */
int nr = 5;
Expand All @@ -106,7 +107,9 @@ struct Mbr_partition_table : public Block::Partition_table
* (relative form this EBR)
*/
r = &(ebr->_records[1]);
lba += ebr->_records[1]._lba;
lba += ebr->_records[1]._lba - last_lba;

last_lba = ebr->_records[1]._lba;

} while (r->valid());
}
Expand Down

0 comments on commit e95e0d1

Please sign in to comment.