Blame SOURCES/gptfdisk-0.8.7-alignment.patch

03f2dd
commit f5dfbfa418675ca862408e4fb2240b21dd07d558
03f2dd
Author: srs5694 <srs5694@users.sourceforge.net>
03f2dd
Date:   Thu Feb 14 20:47:14 2013 -0500
03f2dd
03f2dd
    Change to alignment code in sgdisk.
03f2dd
03f2dd
diff --git a/gdisk_test.sh b/gdisk_test.sh
03f2dd
index e567d4c..8c5d800 100755
03f2dd
--- a/gdisk_test.sh
03f2dd
+++ b/gdisk_test.sh
03f2dd
@@ -147,7 +147,7 @@ EOF
03f2dd
 		;;
03f2dd
 
03f2dd
 		sgdisk)
03f2dd
-			$SGDISK_BIN $TEMP_DISK -${OPT_NEW}=1 -${OPT_CHANGE_NAME}=1:"${TEST_PART_DEFAULT_NAME}"
03f2dd
+			$SGDISK_BIN $TEMP_DISK -${OPT_NEW} 1 -${OPT_CHANGE_NAME} 1:"${TEST_PART_DEFAULT_NAME}"
03f2dd
 		;;
03f2dd
 	esac
03f2dd
 
03f2dd
@@ -171,7 +171,7 @@ EOF
03f2dd
 		;;
03f2dd
 
03f2dd
 		sgdisk)
03f2dd
-			$SGDISK_BIN $TEMP_DISK -${OPT_CHANGE_NAME}=1:${TEST_PART_NEWNAME}
03f2dd
+			$SGDISK_BIN $TEMP_DISK -${OPT_CHANGE_NAME} 1:${TEST_PART_NEWNAME}
03f2dd
 		;;
03f2dd
 	esac
03f2dd
 
03f2dd
@@ -195,7 +195,7 @@ EOF
03f2dd
 		;;
03f2dd
 
03f2dd
 		sgdisk)
03f2dd
-			$SGDISK_BIN $TEMP_DISK -${OPT_CHANGE_TYPE}=1:${TEST_PART_NEWTYPE}
03f2dd
+			$SGDISK_BIN $TEMP_DISK -${OPT_CHANGE_TYPE} 1:${TEST_PART_NEWTYPE}
03f2dd
 		;;
03f2dd
 	esac
03f2dd
 
03f2dd
@@ -219,7 +219,7 @@ echo ""
03f2dd
 		;;
03f2dd
 
03f2dd
 		sgdisk)
03f2dd
-			$SGDISK_BIN $TEMP_DISK -${OPT_BACKUP}=${GPT_BACKUP_FILENAME}
03f2dd
+			$SGDISK_BIN $TEMP_DISK -${OPT_BACKUP} ${GPT_BACKUP_FILENAME}
03f2dd
 		;;
03f2dd
 	esac
03f2dd
 
03f2dd
@@ -248,7 +248,7 @@ EOF
03f2dd
 		;;
03f2dd
 
03f2dd
 		sgdisk)
03f2dd
-			$SGDISK_BIN $TEMP_DISK -${OPT_DELETE}=1
03f2dd
+			$SGDISK_BIN $TEMP_DISK -${OPT_DELETE} 1
03f2dd
 		;;
03f2dd
 	esac
03f2dd
 
03f2dd
diff --git a/gpt.cc b/gpt.cc
03f2dd
index 40dd55e..d692561 100644
03f2dd
--- a/gpt.cc
03f2dd
+++ b/gpt.cc
03f2dd
@@ -2088,7 +2088,7 @@ uint64_t GPTData::FindFirstInLargest(void) {
03f2dd
 } // GPTData::FindFirstInLargest()
03f2dd
 
03f2dd
 // Find the last available block on the disk.
03f2dd
-// Returns 0 if there are no available partitions
03f2dd
+// Returns 0 if there are no available sectors
03f2dd
 uint64_t GPTData::FindLastAvailable(void) {
03f2dd
    uint64_t last;
03f2dd
    uint32_t i;
03f2dd
diff --git a/gptcl.cc b/gptcl.cc
03f2dd
index 31d05b5..af83eb5 100644
03f2dd
--- a/gptcl.cc
03f2dd
+++ b/gptcl.cc
03f2dd
@@ -280,6 +280,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
03f2dd
                   if (partNum < 0)
03f2dd
                      partNum = FindFirstFreePart();
03f2dd
                   low = FindFirstInLargest();
03f2dd
+                  Align(&low);
03f2dd
                   high = FindLastInFree(low);
03f2dd
                   startSector = IeeeToInt(GetString(newPartInfo, 2), sSize, low, high, low);
03f2dd
                   endSector = IeeeToInt(GetString(newPartInfo, 3), sSize, startSector, high, high);
03f2dd
@@ -295,6 +296,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
03f2dd
                case 'N':
03f2dd
                   JustLooking(0);
03f2dd
                   startSector = FindFirstInLargest();
03f2dd
+                  Align(&startSector);
03f2dd
                   endSector = FindLastInFree(startSector);
03f2dd
                   if (largestPartNum < 0)
03f2dd
                      largestPartNum = FindFirstFreePart();
03f2dd
diff --git a/gptpart.cc b/gptpart.cc
03f2dd
index bbd28ae..4b8c369 100644
03f2dd
--- a/gptpart.cc
03f2dd
+++ b/gptpart.cc
03f2dd
@@ -114,7 +114,6 @@ void GPTPart::SetName(const string & theName) {
03f2dd
 // Set the name for a partition to theName, using a Unicode string as
03f2dd
 // input.
03f2dd
 void GPTPart::SetName(const UnicodeString & theName) {
03f2dd
-   cout << "Entering GPTPart::SetName(const UnicodeString...)\n";
03f2dd
    if (theName.isBogus()) {
03f2dd
       cerr << "Bogus UTF-16 name found in GPTPart::SetName()! Name not changed!\n";
03f2dd
    } else {