summaryrefslogtreecommitdiff
path: root/basicmbr.cc
diff options
context:
space:
mode:
authorRoderick W. Smith <rodsmith@rodsbooks.com>2013-08-31 17:40:15 -0400
committerRoderick W. Smith <rodsmith@rodsbooks.com>2013-08-31 17:40:15 -0400
commit042f38a2f716fd4a3b9b03c35951e69f1d1bc942 (patch)
tree2628e199bacf8e8a52bac80c7df075c837d05cf8 /basicmbr.cc
parentaf39cb48d06f5776855b213b1ef292ddff42821b (diff)
downloadsgdisk-042f38a2f716fd4a3b9b03c35951e69f1d1bc942.tar.gz
Check for boot/active flag on 0xEE protective partition in verify
function.
Diffstat (limited to 'basicmbr.cc')
-rw-r--r--basicmbr.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/basicmbr.cc b/basicmbr.cc
index 7483734..080de76 100644
--- a/basicmbr.cc
+++ b/basicmbr.cc
@@ -921,6 +921,18 @@ int BasicMBRData::IsLegal(void) {
return allOK;
} // BasicMBRData::IsLegal()
+// Returns 1 if the 0xEE partition in the protective/hybrid MBR is marked as
+// active/bootable.
+int BasicMBRData::IsEEActive(void) {
+ int i, IsActive = FALSE;
+
+ for (i = 0; i < MAX_MBR_PARTS; i++) {
+ if (partitions[i].GetStatus() & 0x80)
+ IsActive = TRUE;
+ }
+ return IsActive;
+} // BasicMBRData::IsEEActive()
+
// Finds the next in-use partition, starting with start (will return start
// if it's in use). Returns -1 if no subsequent partition is in use.
int BasicMBRData::FindNextInUse(int start) {