summaryrefslogtreecommitdiff
path: root/gpt.h
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2011-03-01 22:03:54 -0500
committersrs5694 <srs5694@users.sourceforge.net>2011-03-01 22:03:54 -0500
commit64cbd171067eb34054741bfcd73f0b91d727a371 (patch)
treeb5964f8b2476429a45a683937d434c2278ca63b2 /gpt.h
parentf2efa7defc5db19ede49ac4a7dc298eaf47c8ac0 (diff)
downloadsgdisk-64cbd171067eb34054741bfcd73f0b91d727a371.tar.gz
Misc. bug fixes & restructuring.
Diffstat (limited to 'gpt.h')
-rw-r--r--gpt.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gpt.h b/gpt.h
index 9d13750..3e0e206 100644
--- a/gpt.h
+++ b/gpt.h
@@ -1,7 +1,7 @@
/* gpt.h -- GPT and data structure definitions, types, and
functions */
-/* This program is copyright (c) 2009, 2010 by Roderick W. Smith. It is distributed
+/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
#include <stdint.h>
@@ -11,12 +11,12 @@
#include "mbr.h"
#include "bsd.h"
#include "gptpart.h"
-#include "partnotes.h"
+#include "gptpartnotes.h"
#ifndef __GPTSTRUCTS
#define __GPTSTRUCTS
-#define GPTFDISK_VERSION "0.6.14"
+#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,
@@ -29,9 +29,9 @@
#define MAX_ALIGNMENT 65536
#define MIN_AF_ALIGNMENT 8
-// Below constant corresponds to a ~596GiB (640MB) disk, since WD has
-// introduced a smaller Advanced Format drive
-#define SMALLEST_ADVANCED_FORMAT UINT64_C(1250263728)
+// Below constant corresponds to a ~279GiB (300GB) disk, since the
+// smallest Advanced Format drive I know of is 320GB in size
+#define SMALLEST_ADVANCED_FORMAT UINT64_C(585937500)
using namespace std;
@@ -103,6 +103,7 @@ public:
GPTData(void);
GPTData(string deviceFilename);
virtual ~GPTData(void);
+ GPTData & operator=(const GPTData & orig);
// Verify (or update) data integrity
int Verify(void);
@@ -118,6 +119,7 @@ public:
int FindInsanePartitions(void);
// Load or save data from/to disk
+ int SetFile(const string & deviceFilename);
int LoadMBR(const string & f) {return protectiveMBR.ReadMBRData(f);}
int WriteProtectiveMBR(void) {return protectiveMBR.WriteMBRData(&myDisk);}
void PartitionScan(void);
@@ -125,7 +127,7 @@ public:
int ForceLoadGPTData(void);
int LoadMainTable(void);
int LoadSecondTableAsMain(void);
- int SaveGPTData(int quiet = 0, string filename = "");
+ int SaveGPTData(int quiet = 0);
int SaveGPTBackup(const string & filename);
int LoadGPTBackup(const string & filename);
int SaveMBR(void);