Lines Matching refs:myDisk
116 myDisk.OpenForRead(orig.myDisk.GetName()); in GPTData()
187 myDisk.OpenForRead(orig.myDisk.GetName()); in operator =()
778 if (allOK && myDisk.OpenForRead(deviceFilename)) { in SetDisk()
780 diskSize = myDisk.DiskSize(&err); in SetDisk()
781 blockSize = (uint32_t) myDisk.GetBlockSize(); in SetDisk()
782 physBlockSize = (uint32_t) myDisk.GetPhysBlockSize(); in SetDisk()
784 protectiveMBR.SetDisk(&myDisk); in SetDisk()
798 protectiveMBR.ReadMBRData(&myDisk); in PartitionScan()
799 bsdDisklabel.ReadBSDData(&myDisk, 0, diskSize - 1); in PartitionScan()
838 if (myDisk.OpenForRead(deviceFilename)) { in LoadPartitions()
839 err = myDisk.OpenForWrite(deviceFilename); in LoadPartitions()
855 myDisk.Close(); // Close and re-open read-only in case of bugs in LoadPartitions()
858 if (allOK && myDisk.OpenForRead(deviceFilename)) { in LoadPartitions()
860 diskSize = myDisk.DiskSize(&err); in LoadPartitions()
861 blockSize = (uint32_t) myDisk.GetBlockSize(); in LoadPartitions()
862 physBlockSize = (uint32_t) myDisk.GetPhysBlockSize(); in LoadPartitions()
872 bsdDisklabel.ReadBSDData(&myDisk, 0, diskSize - 1); in LoadPartitions()
903 myDisk.Close(); in LoadPartitions()
916 allOK = LoadHeader(&mainHeader, myDisk, 1, &mainCrcOk); in ForceLoadGPTData()
919 allOK = LoadHeader(&secondHeader, myDisk, mainHeader.backupLBA, &secondCrcOk) && allOK; in ForceLoadGPTData()
921 allOK = LoadHeader(&secondHeader, myDisk, diskSize - UINT64_C(1), &secondCrcOk) && allOK; in ForceLoadGPTData()
1029 return LoadPartitionTable(mainHeader, myDisk); in LoadMainTable()
1037 return LoadPartitionTable(secondHeader, myDisk); in LoadSecondTableAsMain()
1142 if (myDisk.Seek(header->partitionEntriesLBA)) { in CheckTable()
1149 if (myDisk.Read(partsToCheck, sizeOfParts) != (int) sizeOfParts) { in CheckTable()
1255 cout << "OK; writing new GUID partition table (GPT) to " << myDisk.GetName() << ".\n"; in SaveGPTData()
1263 if (myDisk.OpenForWrite()) { in SaveGPTData()
1265 allOK = SavePartitionTable(myDisk, secondHeader.partitionEntriesLBA); in SaveGPTData()
1273 allOK = allOK && SaveHeader(&secondHeader, myDisk, mainHeader.backupLBA); in SaveGPTData()
1276 allOK = allOK && SavePartitionTable(myDisk, mainHeader.partitionEntriesLBA); in SaveGPTData()
1279 allOK = allOK && SaveHeader(&mainHeader, myDisk, 1); in SaveGPTData()
1282 allOK = allOK && protectiveMBR.WriteMBRData(&myDisk); in SaveGPTData()
1293 myDisk.DiskSync(); in SaveGPTData()
1302 myDisk.Close(); in SaveGPTData()
1304 cerr << "Unable to open device '" << myDisk.GetName() << "' for writing! Errno is " in SaveGPTData()
1333 protectiveMBR.SetDisk(&myDisk); in SaveGPTBackup()
1413 protectiveMBR.SetDisk(&myDisk); in LoadGPTBackup()
1469 return protectiveMBR.WriteMBRData(&myDisk); in SaveMBR()
1483 if (myDisk.OpenForWrite()) { in DestroyGPT()
1484 if (!myDisk.Seek(mainHeader.currentLBA)) in DestroyGPT()
1486 if (myDisk.Write(blankSector, 512) != 512) { // blank it out in DestroyGPT()
1490 if (!myDisk.Seek(mainHeader.partitionEntriesLBA)) in DestroyGPT()
1500 sum = myDisk.Write(emptyTable, tableSize); in DestroyGPT()
1506 if (!myDisk.Seek(secondHeader.partitionEntriesLBA)) in DestroyGPT()
1509 sum = myDisk.Write(emptyTable, tableSize); in DestroyGPT()
1516 if (!myDisk.Seek(secondHeader.currentLBA)) in DestroyGPT()
1519 if (myDisk.Write(blankSector, 512) != 512) { // blank it out in DestroyGPT()
1524 myDisk.DiskSync(); in DestroyGPT()
1525 myDisk.Close(); in DestroyGPT()
1543 allOK = myDisk.OpenForWrite() && myDisk.Seek(0) && (myDisk.Write(blankSector, 512) == 512); in DestroyMBR()
1583 if (myDisk.GetModel() != "") in DisplayGPTData()
1584 cout << "Model: " << myDisk.GetModel() << "\n"; in DisplayGPTData()
1745 goOn = disklabel.ReadBSDData(&myDisk, partitions[partNum].GetFirstLBA(), in XFormDisklabel()