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>
This commit is contained in:
parent
32b9c61307
commit
c72fa777e6
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue