diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-07 13:57:19 -0600 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-19 07:01:12 +0200 |
commit | 4fd05d33272265c01f1864b7d3eb046d9d7ccf27 (patch) | |
tree | 0a3447bbd26816c458a38a7e7694fa80fb1b3b11 /cpukit/dtc | |
parent | libfdt: Add helpers for accessing unaligned words (diff) | |
download | rtems-4fd05d33272265c01f1864b7d3eb046d9d7ccf27.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 'cpukit/dtc')
-rw-r--r-- | cpukit/dtc/libfdt/fdt_sw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/dtc/libfdt/fdt_sw.c b/cpukit/dtc/libfdt/fdt_sw.c index 178b3657b0..024f4d85de 100644 --- a/cpukit/dtc/libfdt/fdt_sw.c +++ b/cpukit/dtc/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) |