disk: dos: add code for creating MBR partition layout

Add a code for creating and writing MBR partition layout. The code generates
similar layout of EBRs (Exteneded Block Records) and logical volumes as
Linux's fdisk utility.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This commit is contained in:
Marek Szyprowski
2020-12-23 13:55:14 +01:00
committed by Tom Rini
parent cb571f91c6
commit 20bd5ac6e4
3 changed files with 174 additions and 0 deletions

View File

@@ -474,6 +474,11 @@ int is_valid_dos_buf(void *buf);
*/
int write_mbr_sector(struct blk_desc *dev_desc, void *buf);
int write_mbr_partitions(struct blk_desc *dev,
struct disk_partition *p, int count, unsigned int disksig);
int layout_mbr_partitions(struct disk_partition *p, int count,
lbaint_t total_sectors);
#endif