From 5a081757ea2e32a491349544fea92826ccf739f6 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Fri, 24 Sep 2010 20:39:41 -0400 Subject: Added -F option to sgdisk --- gpttext.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gpttext.cc') diff --git a/gpttext.cc b/gpttext.cc index c37e01e..b9039d3 100644 --- a/gpttext.cc +++ b/gpttext.cc @@ -180,7 +180,7 @@ void GPTDataTextUI::ResizePartitionTable(void) { // Interactively create a partition void GPTDataTextUI::CreatePartition(void) { - uint64_t firstBlock, firstInLargest, lastBlock, sector; + uint64_t firstBlock, firstInLargest, lastBlock, sector, origSector; uint32_t firstFreePart = 0; ostringstream prompt1, prompt2, prompt3; int partNum; @@ -211,7 +211,15 @@ void GPTDataTextUI::CreatePartition(void) { do { sector = GetSectorNum(firstBlock, lastBlock, firstInLargest, prompt2.str()); } while (IsFree(sector) == 0); - Align(§or); // Align sector to correct multiple + origSector = sector; + if (Align(§or)) { + cout << "Information: Moved requested sector from " << origSector << " to " + << sector << " in\norder to align on " << sectorAlignment + << "-sector boundaries.\n"; + if (!beQuiet) + cout << "Use 'l' on the experts' menu to adjust alignment\n"; + } // if + // Align(§or); // Align sector to correct multiple firstBlock = sector; // Get last block for new partitions... -- cgit v1.2.1