summaryrefslogtreecommitdiff
path: root/mbr.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-03-19 14:21:59 -0400
committersrs5694 <srs5694@users.sourceforge.net>2010-03-19 14:21:59 -0400
commita8582cfe6c1aa5e5f80458ac72d881a04ae0ba44 (patch)
tree93cbbc9e8013e2404ab2fe7740eccdf28dc966cf /mbr.cc
parent55d926192adc984462509b2966e23bc0d1129bbd (diff)
downloadsgdisk-a8582cfe6c1aa5e5f80458ac72d881a04ae0ba44.tar.gz
Changes to sector alignment policies and behavior when restoring a
backup fails
Diffstat (limited to 'mbr.cc')
-rw-r--r--mbr.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbr.cc b/mbr.cc
index b142a7a..249fc27 100644
--- a/mbr.cc
+++ b/mbr.cc
@@ -85,7 +85,7 @@ int MBRData::ReadMBRData(const string & deviceFilename) {
canDeleteMyDisk = 1;
} // if
if (myDisk->OpenForRead(deviceFilename)) {
- ReadMBRData(myDisk);
+ allOK = ReadMBRData(myDisk);
} else {
allOK = 0;
} // if
@@ -101,7 +101,7 @@ int MBRData::ReadMBRData(const string & deviceFilename) {
// Note that any extended partition(s) present will be explicitly stored
// in the partitions[] array, along with their contained partitions; the
// extended container partition(s) should be ignored by other functions.
-void MBRData::ReadMBRData(DiskIO * theDisk, int checkBlockSize) {
+int MBRData::ReadMBRData(DiskIO * theDisk, int checkBlockSize) {
int allOK = 1, i, j, logicalNum;
int err = 1;
TempMBR tempMBR;
@@ -201,6 +201,7 @@ void MBRData::ReadMBRData(DiskIO * theDisk, int checkBlockSize) {
} // for
} // if (hybrid detection code)
} // no initial error
+ return allOK;
} // MBRData::ReadMBRData(DiskIO * theDisk, int checkBlockSize)
// This is a recursive function to read all the logical partitions, following the