Lines Matching refs:disk
917 int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector, int *crcOk) { in LoadHeader() argument
921 disk.Seek(sector); in LoadHeader()
922 if (disk.Read(&tempHeader, 512) != 512) { in LoadHeader()
946 int GPTData::LoadPartitionTable(const struct GPTHeader & header, DiskIO & disk, uint64_t sector) { in LoadPartitionTable() argument
950 if (disk.OpenForRead()) { in LoadPartitionTable()
952 retval = disk.Seek(header.partitionEntriesLBA); in LoadPartitionTable()
954 retval = disk.Seek(sector); in LoadPartitionTable()
960 if (disk.Read(partitions, sizeOfParts) != (int) sizeOfParts) { in LoadPartitionTable()
1219 int GPTData::SaveHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector) { in SaveHeader() argument
1225 if (disk.Seek(sector)) { in SaveHeader()
1226 if (disk.Write(header, 512) == -1) in SaveHeader()
1239 int GPTData::SavePartitionTable(DiskIO & disk, uint64_t sector) { in SavePartitionTable() argument
1243 if (disk.Seek(sector)) { in SavePartitionTable()
1246 if (disk.Write(partitions, mainHeader.sizeOfPartitionEntries * numParts) == -1) in SavePartitionTable()