diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-07 13:57:19 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-07-09 15:03:14 +1000 |
commit | c72fa777e61383850436f9f9cac3b0ddae41317b (patch) | |
tree | bfa707a4097a263c2db3cbed358f8c1c02907a62 /libfdt | |
parent | 32b9c61307629ac76c6ac0bead6f926d579b3d2c (diff) | |
download | dtc-c72fa777e61383850436f9f9cac3b0ddae41317b.zip dtc-c72fa777e61383850436f9f9cac3b0ddae41317b.tar.gz dtc-c72fa777e61383850436f9f9cac3b0ddae41317b.tar.bz2 |
libfdt: Copy the struct region in fdt_resize()
At present this function appears to copy only the data before the struct
region and the data in the string region. It does not seem to copy the
struct region itself.
From the arguments of this function it seems that it should support fdt
and buf being different. This patch attempts to fix this problem.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt')
-rw-r--r-- | libfdt/fdt_sw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdt/fdt_sw.c b/libfdt/fdt_sw.c index 178b365..024f4d8 100644 --- a/libfdt/fdt_sw.c +++ b/libfdt/fdt_sw.c @@ -170,7 +170,7 @@ int fdt_resize(void *fdt, void *buf, int bufsize) FDT_SW_PROBE(fdt); - headsize = fdt_off_dt_struct(fdt); + headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); tailsize = fdt_size_dt_strings(fdt); if ((headsize + tailsize) > bufsize) |