mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
dm: core: Allow copying ofnode property data when writing
At present ofnode_write_prop() is inconsistent between livetree and flattree, in that livetree requires the caller to ensure the property value is stable (e.g. in rodata or allocated) but flattree does not, since it makes a copy. This makes the API call a bit painful to use, since the caller must do different things depending on OF_LIVE. Add a new 'copy' argument which tells the function to make a copy if needed. Add some tests to cover this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -325,3 +325,5 @@ Live tree support was introduced in U-Boot 2017.07. Some possible enhancements
|
||||
are:
|
||||
|
||||
- support for livetree in SPL and before relocation (if desired)
|
||||
- freeing leaked memory caused by writing new nodes / property values to the
|
||||
livetree (ofnode_write_prop())
|
||||
|
Reference in New Issue
Block a user