summaryrefslogtreecommitdiff
path: root/gpttext.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-09-24 20:39:41 -0400
committersrs5694 <srs5694@users.sourceforge.net>2010-09-24 20:39:41 -0400
commit5a081757ea2e32a491349544fea92826ccf739f6 (patch)
tree08a33c9b6b6a1a9a8e6c492b21287b972306b185 /gpttext.cc
parent82f3f0b529ec1bb936141ae41b03f95c72ce573a (diff)
downloadsgdisk-5a081757ea2e32a491349544fea92826ccf739f6.tar.gz
Added -F option to sgdisk
Diffstat (limited to 'gpttext.cc')
-rw-r--r--gpttext.cc12
1 files changed, 10 insertions, 2 deletions
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(&sector); // Align sector to correct multiple
+ origSector = sector;
+ if (Align(&sector)) {
+ 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(&sector); // Align sector to correct multiple
firstBlock = sector;
// Get last block for new partitions...