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