aboutsummaryrefslogtreecommitdiffstats
path: root/libpit
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+github@glassechidna.com.au>2012-03-30 00:50:27 +1100
committerBenjamin Dobell <benjamin.dobell+github@glassechidna.com.au>2012-03-30 00:50:27 +1100
commit907c942fd12ff204a387f5cc0a7f3de079186100 (patch)
tree5dfad7a827b3ceff16f775a5d10f72207d0b8007 /libpit
parent713af23d0a8a65926e03ad2e50406aae2463e6e1 (diff)
downloadexternal_heimdall-907c942fd12ff204a387f5cc0a7f3de079186100.zip
external_heimdall-907c942fd12ff204a387f5cc0a7f3de079186100.tar.gz
external_heimdall-907c942fd12ff204a387f5cc0a7f3de079186100.tar.bz2
Renamed partitionType to chipIdentifier as partition type was incorrect.
Diffstat (limited to 'libpit')
-rw-r--r--libpit/Source/libpit.cpp8
-rw-r--r--libpit/Source/libpit.h17
2 files changed, 9 insertions, 16 deletions
diff --git a/libpit/Source/libpit.cpp b/libpit/Source/libpit.cpp
index 205ba38..3104f24 100644
--- a/libpit/Source/libpit.cpp
+++ b/libpit/Source/libpit.cpp
@@ -26,7 +26,7 @@ using namespace libpit;
PitEntry::PitEntry()
{
unused = false;
- partitionType = 0;
+ chipIdentifier = 0;
partitionIdentifier = 0;
partitionFlags = 0;
unknown1 = 0;
@@ -45,7 +45,7 @@ PitEntry::~PitEntry()
bool PitEntry::Matches(const PitEntry *otherPitEntry) const
{
- if (unused == otherPitEntry->unused && partitionType == otherPitEntry->partitionType && partitionIdentifier == otherPitEntry->partitionIdentifier
+ if (unused == otherPitEntry->unused && chipIdentifier == otherPitEntry->chipIdentifier && partitionIdentifier == otherPitEntry->partitionIdentifier
&& partitionFlags == otherPitEntry->partitionFlags && unknown1 == otherPitEntry->unknown1 && partitionBlockSize == otherPitEntry->partitionBlockSize
&& partitionBlockCount == otherPitEntry->partitionBlockCount && unknown2 == otherPitEntry->unknown2 && unknown3 == otherPitEntry->unknown3
&& strcmp(partitionName, otherPitEntry->partitionName) == 0 && strcmp(filename, otherPitEntry->filename) == 0)
@@ -121,7 +121,7 @@ bool PitData::Unpack(const unsigned char *data)
entries[i]->SetUnused((integerValue != 0) ? true : false);
integerValue = PitData::UnpackInteger(data, entryOffset + 4);
- entries[i]->SetPartitionType(integerValue);
+ entries[i]->SetChipIdentifier(integerValue);
integerValue = PitData::UnpackInteger(data, entryOffset + 8);
entries[i]->SetPartitionIdentifier(integerValue);
@@ -177,7 +177,7 @@ void PitData::Pack(unsigned char *data) const
PitData::PackInteger(data, entryOffset, (entries[i]->GetUnused()) ? 1 : 0);
- PitData::PackInteger(data, entryOffset + 4, entries[i]->GetPartitionType());
+ PitData::PackInteger(data, entryOffset + 4, entries[i]->GetChipIdentifier());
PitData::PackInteger(data, entryOffset + 8, entries[i]->GetPartitionIdentifier());
PitData::PackInteger(data, entryOffset + 12, entries[i]->GetPartitionFlags());
diff --git a/libpit/Source/libpit.h b/libpit/Source/libpit.h
index 1231cf0..a7bf5c9 100644
--- a/libpit/Source/libpit.h
+++ b/libpit/Source/libpit.h
@@ -48,13 +48,6 @@ namespace libpit
enum
{
- kPartitionTypeRfs = 0,
- kPartitionTypeBlank = 1, // ?
- kPartitionTypeExt4 = 2
- };
-
- enum
- {
kPartitionFlagWrite = 1 << 1
};
@@ -62,7 +55,7 @@ namespace libpit
bool unused;
- unsigned int partitionType;
+ unsigned int chipIdentifier;
unsigned int partitionIdentifier;
unsigned int partitionFlags;
@@ -94,14 +87,14 @@ namespace libpit
this->unused = unused;
}
- unsigned int GetPartitionType(void) const
+ unsigned int GetChipIdentifier(void) const
{
- return partitionType;
+ return chipIdentifier;
}
- void SetPartitionType(unsigned int partitionType)
+ void SetChipIdentifier(unsigned int chipIdentifier)
{
- this->partitionType = partitionType;
+ this->chipIdentifier = chipIdentifier;
}
unsigned int GetPartitionIdentifier(void) const