summaryrefslogtreecommitdiff
path: root/mbr.h
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2009-08-20 21:35:25 -0400
committersrs5694 <srs5694@users.sourceforge.net>2009-08-20 21:35:25 -0400
commitc0ca8f877e775a54008b27d92deefdb41bfaea5d (patch)
tree99efc1510662b612904f10733ba89ab4aafb0a9e /mbr.h
parent7f244babbe6c792379fa8d812701637e1541e8b7 (diff)
downloadsgdisk-c0ca8f877e775a54008b27d92deefdb41bfaea5d.tar.gz
Added hybrid MBR and destroy-GPT options
Diffstat (limited to 'mbr.h')
-rw-r--r--mbr.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mbr.h b/mbr.h
index 86f792b..c178d19 100644
--- a/mbr.h
+++ b/mbr.h
@@ -71,7 +71,9 @@ public:
MBRData(void);
MBRData(char* deviceFilename);
~MBRData(void);
- void EmptyMBR(void);
+ // Pass EmptyMBR 1 to clear the boot loader code, 0 to leave it intact
+ void EmptyMBR(int clearBootloader = 1);
+ void SetDiskSize(uint64_t ds) {diskSize = ds;}
int ReadMBRData(char* deviceFilename);
void ReadMBRData(int fd);
int WriteMBRData(void);
@@ -84,6 +86,11 @@ public:
void ShowState(void);
void MakePart(int num, uint32_t startLBA, uint32_t lengthLBA, int type = 0x07,
int bootable = 0);
+ int MakeBiggestPart(int i, int type); // Make partition filling most space
+
+ // Functions to find information on free space....
+ uint32_t FindFirstAvailable(uint32_t start = 1);
+ uint32_t FindLastInFree(uint32_t start);
// Functions to extract data on specific partitions....
uint8_t GetStatus(int i);