Commit 354d3dc5 authored by Simon Glass's avatar Simon Glass Committed by David Gibson
Browse files

pylibfdt: Update the bytearray size with pack()



At present pack() calls fdt_pack() which may well reduce the size of the
device-tree data. However this does not currently update the size of the
bytearray to take account of any reduction. This means that there may be
unused data at the end of the bytearray and any users of as_bytearray()
will see this extra data.

Fix this by resizing the bytearray after packing.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 3c374d46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment