projects
/
GitHub
/
LineageOS
/
G12
/
android_hardware_amlogic_tools_dtbtool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3527bd9
)
Add structure packing directives.
author
Wilhansen Li
<wil@byimplication.com>
Mon, 26 Dec 2016 12:46:48 +0000
(20:46 +0800)
committer
Wilhansen Li
<wil@byimplication.com>
Mon, 26 Dec 2016 12:46:48 +0000
(20:46 +0800)
dtbSplit.cpp
patch
|
blob
|
blame
|
history
diff --git
a/dtbSplit.cpp
b/dtbSplit.cpp
index ae4afe4dfd988003e8f8d2d31d6523db8ae93fd7..1acd5d6eb81ccb2cd0b9dea28217ad7ffa7e6550 100644
(file)
--- a/
dtbSplit.cpp
+++ b/
dtbSplit.cpp
@@
-40,6
+40,7
@@
using namespace std;
#define DT_HEADER_MAGIC 0xedfe0dd0
#define AML_DT_ID_VARI_TOTAL 3
+#pragma pack(push, 1)
struct DTHeader {
uint32_t magic; /* magic word of OF_DT_HEADER */
uint32_t totalsize; /* total size of DT block */
@@
-58,6
+59,7
@@
struct HeaderEntry {
uint32_t offset;
char padding[4];
};
+#pragma pack(pop)
typedef HeaderEntry<4> HeaderEntryV1;
typedef HeaderEntry<16> HeaderEntryV2;