Commit b45d9224 authored by Alessandro Astone's avatar Alessandro Astone Committed by John Wu

qcdt: include padding in the table length fields

parent f87ee3fc
...@@ -261,8 +261,9 @@ static int dtb_patch(const qcdt_hdr *hdr, const char *in, const char *out) { ...@@ -261,8 +261,9 @@ static int dtb_patch(const qcdt_hdr *hdr, const char *in, const char *out) {
val.second.offset = lseek(fd, 0, SEEK_CUR); val.second.offset = lseek(fd, 0, SEEK_CUR);
auto fdt = val.second.fdt; auto fdt = val.second.fdt;
fdt_pack(fdt); fdt_pack(fdt);
val.second.len = fdt_totalsize(fdt); int size = fdt_totalsize(fdt);
xwrite(fd, fdt, val.second.len); xwrite(fd, fdt, size);
val.second.len = do_align(size, page_size);
free(fdt); free(fdt);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment