summaryrefslogtreecommitdiff
path: root/gpt.h
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2011-03-12 01:23:12 -0500
committersrs5694 <srs5694@users.sourceforge.net>2011-03-12 01:23:12 -0500
commitbf8950cad0285ee6ab8a896e8d0a30c5fb62c7af (patch)
treeca6eaedd03128249d84544d6ad077f1498d66e41 /gpt.h
parent96312236d7f0c857efc95871a31857e24ecdc81b (diff)
downloadsgdisk-bf8950cad0285ee6ab8a896e8d0a30c5fb62c7af.tar.gz
Version 0.7.0
Diffstat (limited to 'gpt.h')
-rw-r--r--gpt.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/gpt.h b/gpt.h
index 3e0e206..69c06d3 100644
--- a/gpt.h
+++ b/gpt.h
@@ -11,19 +11,10 @@
#include "mbr.h"
#include "bsd.h"
#include "gptpart.h"
-#include "gptpartnotes.h"
#ifndef __GPTSTRUCTS
#define __GPTSTRUCTS
-#define GPTFDISK_VERSION "0.6.15-pre1"
-
-// Constants used by GPTData::PartsToMBR(). MBR_EMPTY must be the lowest-
-// numbered value to refer to partition numbers. (Most will be 0 or positive,
-// of course.)
-#define MBR_EFI_GPT -1
-#define MBR_EMPTY -2
-
// Default values for sector alignment
#define DEFAULT_ALIGNMENT 2048
#define MAX_ALIGNMENT 65536
@@ -113,13 +104,14 @@ public:
void RecomputeCRCs(void);
void RebuildMainHeader(void);
void RebuildSecondHeader(void);
- int VerifyMBR(void) {return protectiveMBR.Verify();}
+ int VerifyMBR(void) {return protectiveMBR.FindOverlaps();}
int FindHybridMismatches(void);
int FindOverlaps(void);
int FindInsanePartitions(void);
// Load or save data from/to disk
- int SetFile(const string & deviceFilename);
+ int SetDisk(const string & deviceFilename);
+ DiskIO* GetDisk(void) {return &myDisk;}
int LoadMBR(const string & f) {return protectiveMBR.ReadMBRData(f);}
int WriteProtectiveMBR(void) {return protectiveMBR.WriteMBRData(&myDisk);}
void PartitionScan(void);
@@ -169,6 +161,7 @@ public:
int Align(uint64_t* sector);
// Return data about the GPT structures....
+ void SetProtectiveMBR(BasicMBRData & newMBR) {protectiveMBR = newMBR;}
int GetPartRange(uint32_t* low, uint32_t* high);
int FindFirstFreePart(void);
uint32_t GetNumParts(void) {return mainHeader.numParts;}