From 20bd5ac6e43124a7632a03cf8e47dba684fa2fc4 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 23 Dec 2020 13:55:14 +0100 Subject: 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 --- include/part.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/part.h b/include/part.h index 67b8b2a5cc..fac36364bd 100644 --- a/include/part.h +++ b/include/part.h @@ -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 -- cgit