summaryrefslogtreecommitdiff
path: root/gptpart.cc
diff options
context:
space:
mode:
authorRoderick W. Smith <rodsmith@rodsbooks.com>2014-02-20 11:13:36 -0500
committerRoderick W. Smith <rodsmith@rodsbooks.com>2014-02-20 11:13:36 -0500
commit9b338c50f298d04f47205f7fad082d8c21797ed7 (patch)
tree9a2728cfc491cff9c1f1e42ae3e868a5c7619eb8 /gptpart.cc
parent84aaff6b9cf3b802c621781cf9acd006aa5a3e66 (diff)
downloadsgdisk-9b338c50f298d04f47205f7fad082d8c21797ed7.tar.gz
Fixed new bug with hybrid MBR creation in gdisk; couldn't do more than
one partition because of sscanf weirdness.
Diffstat (limited to 'gptpart.cc')
-rw-r--r--gptpart.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gptpart.cc b/gptpart.cc
index 7c61569..d06145c 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -138,6 +138,11 @@ int GPTPart::IsUsed(void) {
return (partitionType != GUIDData("0x00"));
} // GPTPart::IsUsed()
+// Returns 1 if the partition's end point is under (2^32 - 1) sectors, 0 if it's over that value.
+int GPTPart::IsSizedForMBR(void) {
+ return (lastLBA < UINT32_MAX);
+} // GPTPart::IsSizedForMBR()
+
// Set the type code to the specified one. Also changes the partition
// name *IF* the current name is the generic one for the current partition
// type.