Lines Matching refs:partitions
68 partitions = NULL; in GPTData()
92 partitions = NULL; in GPTData()
115 delete[] partitions; in ~GPTData()
143 delete[] partitions; in operator =()
144 partitions = new GPTPart [numParts]; in operator =()
145 if (partitions == NULL) { in operator =()
151 partitions[i] = orig.partitions[i]; in operator =()
320 if ((partitions[i].IsUsed()) && (partitions[i].GetFirstLBA() % sectorAlignment) != 0) { in Verify()
359 if (partitions[i].IsUsed()) { in CheckGPTSize()
360 if (partitions[i].GetFirstLBA() < firstUsedBlock) in CheckGPTSize()
361 firstUsedBlock = partitions[i].GetFirstLBA(); in CheckGPTSize()
362 if (partitions[i].GetLastLBA() > lastUsedBlock) { in CheckGPTSize()
363 lastUsedBlock = partitions[i].GetLastLBA(); in CheckGPTSize()
514 crc = chksum_crc32((unsigned char*) partitions, numParts * GPT_SIZE); in RecomputeCRCs()
599 if ((j < numParts) && (partitions[j].GetFirstLBA() == mbrFirst) && in FindHybridMismatches()
600 (partitions[j].GetLastLBA() == mbrLast) && (partitions[j].IsUsed())) in FindHybridMismatches()
630 if ((partitions[i].IsUsed()) && (partitions[j].IsUsed()) && in FindOverlaps()
631 (partitions[i].DoTheyOverlap(partitions[j]))) { in FindOverlaps()
634 cout << " Partition " << i + 1 << ": " << partitions[i].GetFirstLBA() in FindOverlaps()
635 << " to " << partitions[i].GetLastLBA() << "\n"; in FindOverlaps()
636 cout << " Partition " << j + 1 << ": " << partitions[j].GetFirstLBA() in FindOverlaps()
637 << " to " << partitions[j].GetLastLBA() << "\n"; in FindOverlaps()
654 if (partitions[i].IsUsed()) { in FindInsanePartitions()
655 if (partitions[i].GetFirstLBA() > partitions[i].GetLastLBA()) { in FindInsanePartitions()
659 if (partitions[i].GetLastLBA() >= diskSize) { in FindInsanePartitions()
960 if (disk.Read(partitions, sizeOfParts) != (int) sizeOfParts) { in LoadPartitionTable()
964 newCRC = chksum_crc32((unsigned char*) partitions, sizeOfParts); in LoadPartitionTable()
1246 if (disk.Write(partitions, mainHeader.sizeOfPartitionEntries * numParts) == -1) in SavePartitionTable()
1447 partitions[i].ShowSummary(i, blockSize); in DisplayGPTData()
1454 partitions[partNum].ShowDetails(blockSize); in ShowPartDetails()
1561 partitions[i] = protectiveMBR.AsGPT(i); in XFormPartitions()
1591 goOn = disklabel.ReadBSDData(&myDisk, partitions[partNum].GetFirstLBA(), in XFormDisklabel()
1592 partitions[partNum].GetLastLBA()); in XFormDisklabel()
1604 partitions[partNum].BlankPartition(); in XFormDisklabel()
1617 partitions[partNum] = disklabel->AsGPT(i); in XFormDisklabel()
1618 if (partitions[partNum].IsUsed()) in XFormDisklabel()
1649 if (allOK && (partitions[gptPart].GetLastLBA() == UINT64_C(0))) { in OnePartToMBR()
1653 if (allOK && (partitions[gptPart].GetFirstLBA() <= UINT32_MAX) && in OnePartToMBR()
1654 (partitions[gptPart].GetLengthLBA() <= UINT32_MAX)) { in OnePartToMBR()
1655 if (partitions[gptPart].GetLastLBA() > UINT32_MAX) { in OnePartToMBR()
1659 protectiveMBR.MakePart(mbrPart, (uint32_t) partitions[gptPart].GetFirstLBA(), in OnePartToMBR()
1660 (uint32_t) partitions[gptPart].GetLengthLBA(), in OnePartToMBR()
1661 partitions[gptPart].GetHexType() / 256, 0); in OnePartToMBR()
1703 if (((numEntries != numParts) || (partitions == NULL)) && (numEntries > 0)) { in SetGPTSize()
1706 if (partitions != NULL) { // existing partitions; copy them over in SetGPTSize()
1721 newParts[i] = partitions[i]; in SetGPTSize()
1723 delete[] partitions; in SetGPTSize()
1724 partitions = newParts; in SetGPTSize()
1727 partitions = newParts; in SetGPTSize()
1750 partitions[i].BlankPartition(); in BlankPartitions()
1765 startSector = partitions[partNum].GetFirstLBA(); in DeletePartition()
1766 length = partitions[partNum].GetLengthLBA(); in DeletePartition()
1770 partitions[partNum].BlankPartition(); in DeletePartition()
1792 partitions[partNum].SetFirstLBA(startSector); in CreatePartition()
1793 partitions[partNum].SetLastLBA(endSector); in CreatePartition()
1794 partitions[partNum].SetType(DEFAULT_GPT_TYPE); in CreatePartition()
1795 partitions[partNum].RandomizeUniqueGUID(); in CreatePartition()
1806 sort(partitions, partitions + numParts); in SortGPT()
1820 temp = partitions[partNum1]; in SwapPartitions()
1821 partitions[partNum1] = partitions[partNum2]; in SwapPartitions()
1822 partitions[partNum2] = temp; in SwapPartitions()
1838 delete[] partitions; in ClearGPTData()
1839 partitions = NULL; in ClearGPTData()
1908 partitions[partNum].SetName(theName); in SetName()
1929 if (partitions[pn].IsUsed()) { in SetPartitionGUID()
1930 partitions[pn].SetUniqueGUID(theGUID); in SetPartitionGUID()
1945 if (partitions[i].IsUsed()) in RandomizeGUIDs()
1946 partitions[i].RandomizeUniqueGUID(); in RandomizeGUIDs()
1955 partitions[partNum].SetType(theGUID); in ChangePartType()
2039 if (partitions[i].IsUsed()) { // it exists in GetPartRange()
2059 if (partitions != NULL) { in FindFirstFreePart()
2060 while ((i < (int) numParts) && (partitions[i].IsUsed())) in FindFirstFreePart()
2073 if (partitions[i].IsUsed()) in CountParts()
2107 if ((partitions[i].IsUsed()) && (first >= partitions[i].GetFirstLBA()) && in FindFirstAvailable()
2108 (first <= partitions[i].GetLastLBA())) { // in existing part. in FindFirstAvailable()
2109 first = partitions[i].GetLastLBA() + 1; in FindFirstAvailable()
2157 if ((last >= partitions[i].GetFirstLBA()) && in FindLastAvailable()
2158 (last <= partitions[i].GetLastLBA())) { // in existing part. in FindLastAvailable()
2159 last = partitions[i].GetFirstLBA() - 1; in FindLastAvailable()
2176 if ((nearestStart > partitions[i].GetFirstLBA()) && in FindLastInFree()
2177 (partitions[i].GetFirstLBA() > start)) { in FindLastInFree()
2178 nearestStart = partitions[i].GetFirstLBA() - 1; in FindLastInFree()
2223 if ((sector >= partitions[i].GetFirstLBA()) && in IsFree()
2224 (sector <= partitions[i].GetLastLBA())) { in IsFree()
2241 return ((partNum < numParts) && (partitions != NULL) && in IsFreePartNum()
2242 (!partitions[partNum].IsUsed())); in IsFreePartNum()
2247 return ((partNum < numParts) && (partitions != NULL) && in IsUsedPartNum()
2248 (partitions[partNum].IsUsed())); in IsUsedPartNum()
2287 if (partitions[i].IsUsed()) { in ComputeAlignment()
2291 if ((partitions[i].GetFirstLBA() % align) == 0) { in ComputeAlignment()
2333 partitions[i].ReversePartBytes(); in ReversePartitionBytes()
2354 if (partitions == NULL) { in operator []()
2358 return partitions[partNum]; in operator []()
2383 theAttr = partitions[partNum].GetAttributes(); in ManageAttributes()
2385 partitions[partNum].SetAttributes(theAttr.GetAttributes()); in ManageAttributes()
2398 if ((partNum < numParts) && partitions[partNum].IsUsed()) in ShowAttributes()
2399 partitions[partNum].ShowAttributes(partNum); in ShowAttributes()
2405 partitions[partNum].GetAttributes().OperateOnAttributes(partNum, "get", attributeBits); in GetAttribute()