From 9b338c50f298d04f47205f7fad082d8c21797ed7 Mon Sep 17 00:00:00 2001 From: "Roderick W. Smith" Date: Thu, 20 Feb 2014 11:13:36 -0500 Subject: Fixed new bug with hybrid MBR creation in gdisk; couldn't do more than one partition because of sscanf weirdness. --- gptpart.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gptpart.cc') 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. -- cgit v1.2.1