From 907c942fd12ff204a387f5cc0a7f3de079186100 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 30 Mar 2012 00:50:27 +1100 Subject: Renamed partitionType to chipIdentifier as partition type was incorrect. --- heimdall/source/main.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'heimdall/source/main.cpp') diff --git a/heimdall/source/main.cpp b/heimdall/source/main.cpp index bd4403b..b698e77 100644 --- a/heimdall/source/main.cpp +++ b/heimdall/source/main.cpp @@ -71,13 +71,13 @@ vector knownPartitionNames[kKnownPartitionCount]; struct PartitionInfo { - unsigned int partitionType; + unsigned int chipIdentifier; string partitionName; FILE *file; - PartitionInfo(unsigned int partitionType, const char *partitionName, FILE *file) + PartitionInfo(unsigned int chipIdentifier, const char *partitionName, FILE *file) { - this->partitionType = partitionType; + this->chipIdentifier = chipIdentifier; this->partitionName = partitionName; this->file = file; } @@ -218,7 +218,7 @@ bool mapFilesToPartitions(const map& argumentFileMap, const PitD if (!pitEntry && knownPartition == kKnownPartitionPit) { - // NOTE: We're assuming a PIT file always has partitionType zero. + // NOTE: We're assuming a PIT file always has chipIdentifier zero. PartitionInfo partitionInfo(0, knownPartitionNames[kKnownPartitionPit][0], it->second); partitionInfoMap.insert(pair(0xFFFFFFFF, partitionInfo)); @@ -232,7 +232,7 @@ bool mapFilesToPartitions(const map& argumentFileMap, const PitD return (false); } - PartitionInfo partitionInfo(pitEntry->GetPartitionType(), pitEntry->GetPartitionName(), it->second); + PartitionInfo partitionInfo(pitEntry->GetChipIdentifier(), pitEntry->GetPartitionName(), it->second); partitionInfoMap.insert(pair(pitEntry->GetPartitionIdentifier(), partitionInfo)); } @@ -264,7 +264,7 @@ int downloadPitFile(BridgeManager *bridgeManager, unsigned char **pitBuffer) return (devicePitFileSize); } -bool flashFile(BridgeManager *bridgeManager, unsigned int partitionType, unsigned int partitionIndex, const char *partitionName, FILE *file) +bool flashFile(BridgeManager *bridgeManager, unsigned int chipIdentifier, unsigned int partitionIndex, const char *partitionName, FILE *file) { // PIT files need to be handled differently, try determine if the partition we're flashing to is a PIT partition. bool isPit = false; @@ -313,7 +313,7 @@ bool flashFile(BridgeManager *bridgeManager, unsigned int partitionType, unsigne //if (bridgeManager->SendFile(file, EndPhoneFileTransferPacket::kDestinationPhone, // <-- Kies method. WARNING: Doesn't work on Galaxy Tab! // EndPhoneFileTransferPacket::kFileModem)) - if (bridgeManager->SendFile(file, EndModemFileTransferPacket::kDestinationModem, partitionType)) // <-- Odin method + if (bridgeManager->SendFile(file, EndModemFileTransferPacket::kDestinationModem, chipIdentifier)) // <-- Odin method { Interface::Print("%s upload successful\n", partitionName); return (true); @@ -329,7 +329,7 @@ bool flashFile(BridgeManager *bridgeManager, unsigned int partitionType, unsigne // We're uploading to a phone partition Interface::Print("Uploading %s\n", partitionName); - if (bridgeManager->SendFile(file, EndPhoneFileTransferPacket::kDestinationPhone, partitionType, partitionIndex)) + if (bridgeManager->SendFile(file, EndPhoneFileTransferPacket::kDestinationPhone, chipIdentifier, partitionIndex)) { Interface::Print("%s upload successful\n", partitionName); return (true); @@ -474,7 +474,7 @@ bool attemptFlash(BridgeManager *bridgeManager, map argumentFile { PartitionInfo *partitionInfo = &(it->second); - if (!flashFile(bridgeManager, partitionInfo->partitionType, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) + if (!flashFile(bridgeManager, partitionInfo->chipIdentifier, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) return (false); break; @@ -489,7 +489,7 @@ bool attemptFlash(BridgeManager *bridgeManager, map argumentFile { PartitionInfo *partitionInfo = &(it->second); - if (!flashFile(bridgeManager, partitionInfo->partitionType, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) + if (!flashFile(bridgeManager, partitionInfo->chipIdentifier, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) return (false); } } @@ -501,7 +501,7 @@ bool attemptFlash(BridgeManager *bridgeManager, map argumentFile { PartitionInfo *partitionInfo = &(it->second); - if (!flashFile(bridgeManager, partitionInfo->partitionType, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) + if (!flashFile(bridgeManager, partitionInfo->chipIdentifier, it->first, partitionInfo->partitionName.c_str(), partitionInfo->file)) return (false); } } -- cgit v1.2.3