Lines Matching refs:gptHeaderInfo
309 bool Ptable::GetPartitionGptHeaderInfo(const uint8_t *buffer, const uint32_t bufferLen, GPTHeaderInfo& gptHeaderInfo)
321 gptHeaderInfo.headerSize = GET_LWORD_FROM_BYTE(buffer + HEADER_SIZE_OFFSET);
322 gptHeaderInfo.firstUsableLba = GET_LLWORD_FROM_BYTE(buffer + FIRST_USABLE_LBA_OFFSET);
323 gptHeaderInfo.maxPartitionCount = GET_LWORD_FROM_BYTE(buffer + PARTITION_COUNT_OFFSET);
324 gptHeaderInfo.partitionEntrySize = GET_LWORD_FROM_BYTE(buffer + PENTRY_SIZE_OFFSET);
325 if (gptHeaderInfo.maxPartitionCount == 0 || gptHeaderInfo.partitionEntrySize == 0) {
352 const GPTHeaderInfo& gptHeaderInfo)
359 if (gptHeaderInfo.headerSize < GPT_HEADER_SIZE || gptHeaderInfo.headerSize > bufferLen) {
366 uint32_t crcVal = CalculateCrc32(buffer, gptHeaderInfo.headerSize);
379 if (gptHeaderInfo.firstUsableLba > lbaNum || lastUsableLba > lbaNum) {
380 LOG(ERROR) << "invalid usable lba " << gptHeaderInfo.firstUsableLba << ", last is " << lastUsableLba <<
385 if (gptHeaderInfo.partitionEntrySize != PARTITION_ENTRY_SIZE ||
386 gptHeaderInfo.maxPartitionCount > (MIN_PARTITION_ARRAY_SIZE / PARTITION_ENTRY_SIZE)) {
400 const uint32_t blockSize, GPTHeaderInfo& gptHeaderInfo)
419 if (!CheckGptHeader(buffer, blockSize, lbaNum, gptHeaderInfo)) {
430 gptHeaderInfo.maxPartitionCount * gptHeaderInfo.partitionEntrySize);