From ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 8 Mar 2013 00:00:52 +1100 Subject: - Removed legacy command line hard-coded partition name parameters. - As a result of the above two points, there are no "known boot partitions", and hence boot partitions are not automatically flashed last. - Made partitions flash in the order in order in which partition arguments are specified. Hence, it's recommended that you specify boot partitions last. - Added --usb-level argument that can be used for debugging libusbx, or flashing issues in general. - Removed generally non-functional firmware dumping behaviour. - Removed auto-resume functionality - Although this feature was definitely nice to have; I believe it may be responsible for flashing compatibility issues for a variety of devices. - As a result of the above. In order perform another action after a --no-reboot action, you must provide the --resume flag. - Heimdall Frontend also has support for specifying the --resume flag via a GUI. Heimdall Frontend also tries to keep track of your actions and enable "Resume" automatically after a "No Reboot" action. - Refactored quite a few of the actions, and code responsible for flashing (particularly PIT file flashing). - Bumped version to 1.4RC3 *however* this commit is not yet an official release candidate. It's still a WIP. In particular build files still have not been updated for Linux and OS X. --- libpit/Source/libpit.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libpit') diff --git a/libpit/Source/libpit.h b/libpit/Source/libpit.h index 9e6c452..eb37647 100644 --- a/libpit/Source/libpit.h +++ b/libpit/Source/libpit.h @@ -250,7 +250,8 @@ namespace libpit enum { kFileIdentifier = 0x12349876, - kHeaderDataSize = 28 + kHeaderDataSize = 28, + kPaddedSizeMultiplicand = 4096 }; private: @@ -349,6 +350,22 @@ namespace libpit return entryCount; } + unsigned int GetDataSize(void) const + { + return PitData::kHeaderDataSize + entryCount * PitEntry::kDataSize; + } + + unsigned int GetPaddedSize(void) const + { + unsigned int dataSize = GetDataSize(); + unsigned int paddedSize = (dataSize / kPaddedSizeMultiplicand) * kPaddedSizeMultiplicand; + + if (dataSize % kPaddedSizeMultiplicand != 0) + paddedSize += kPaddedSizeMultiplicand; + + return paddedSize; + } + unsigned int GetUnknown1(void) const { return unknown1; -- cgit v1.2.3