libpit: MMC4096 is really UFS

Change name to better describe the hardware.
master
Henrik Grimler 2022-05-04 12:48:57 +02:00
parent c3516307d2
commit 0cf817a591
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
3 changed files with 5 additions and 5 deletions

View File

@ -303,11 +303,11 @@ static bool flashPartitions(BridgeManager *bridgeManager, const vector<Partition
{ {
const PitEntry *part = pitData->FindEntry(it->argumentName); const PitEntry *part = pitData->FindEntry(it->argumentName);
if (part->GetDeviceType() != PitEntry::kDeviceTypeMMC && if (part->GetDeviceType() != PitEntry::kDeviceTypeMMC &&
part->GetDeviceType() != PitEntry::kDeviceTypeMMC4096) part->GetDeviceType() != PitEntry::kDeviceTypeUFS)
continue; continue;
unsigned long partitionSize = part->GetBlockCount(); unsigned long partitionSize = part->GetBlockCount();
unsigned int blockSize = 512; unsigned int blockSize = 512;
if (part->GetDeviceType() == PitEntry::kDeviceTypeMMC4096) if (part->GetDeviceType() == PitEntry::kDeviceTypeUFS)
blockSize = 4096; blockSize = 4096;
if (partitionSize > 0 && it->fileSize > partitionSize*blockSize) if (partitionSize > 0 && it->fileSize > partitionSize*blockSize)
{ {

View File

@ -257,8 +257,8 @@ void Interface::PrintPit(const PitData *pitData)
Interface::Print("All (?)"); Interface::Print("All (?)");
break; break;
case PitEntry::kDeviceTypeMMC4096: case PitEntry::kDeviceTypeUFS:
Interface::Print("MMC 4096"); Interface::Print("UFS");
break; break;
default: default:

View File

@ -62,7 +62,7 @@ namespace libpit
kDeviceTypeFile, // FAT kDeviceTypeFile, // FAT
kDeviceTypeMMC, kDeviceTypeMMC,
kDeviceTypeAll, // ? kDeviceTypeAll, // ?
kDeviceTypeMMC4096 = 8 // block size 4096 kDeviceTypeUFS = 8
}; };
enum enum