summaryrefslogtreecommitdiff
path: root/gpt.h
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
committersrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
commitcb76c673eeb84344887715d36d44b799042be5a5 (patch)
treec727bc4a638968b1be3812b567c34bd4c4f76132 /gpt.h
parent6699b01eda84d24bfaf80ad725304fef2b0e1b2a (diff)
downloadsgdisk-cb76c673eeb84344887715d36d44b799042be5a5.tar.gz
A few minor bug fixes; backup function now accepts dd output of MBR,
main header, and main partition table, as well as gdisk-generated backups.
Diffstat (limited to 'gpt.h')
-rw-r--r--gpt.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gpt.h b/gpt.h
index f122570..2478648 100644
--- a/gpt.h
+++ b/gpt.h
@@ -8,7 +8,6 @@
#include <sys/types.h>
#include "gptpart.h"
#include "support.h"
-#include "parttypes.h"
#include "mbr.h"
#include "bsd.h"
#include "gptpart.h"
@@ -16,7 +15,7 @@
#ifndef __GPTSTRUCTS
#define __GPTSTRUCTS
-#define GPTFDISK_VERSION "0.6.3"
+#define GPTFDISK_VERSION "0.6.4-pre1"
using namespace std;
@@ -74,6 +73,12 @@ protected:
int sectorAlignment; // Start & end partitions at multiples of sectorAlignment
int beQuiet;
WhichToUse whichWasUsed;
+
+ int LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector, int *crcOk);
+ int LoadPartitionTable(const struct GPTHeader & header, DiskIO & disk, uint64_t sector = 0);
+ int CheckTable(struct GPTHeader *header);
+ int SaveHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector);
+ int SavePartitionTable(DiskIO & disk, uint64_t sector);
public:
// Basic necessary functions....
GPTData(void);
@@ -155,7 +160,7 @@ public:
// Find information about free space
uint64_t FindFirstAvailable(uint64_t start = 0);
uint64_t FindFirstInLargest(void);
- uint64_t FindLastAvailable(uint64_t start);
+ uint64_t FindLastAvailable();
uint64_t FindLastInFree(uint64_t start);
uint64_t FindFreeBlocks(uint32_t *numSegments, uint64_t *largestSegment);
int IsFree(uint64_t sector);