platform_external_dtc/libfdt
David Gibson 7d8ef6e1db tests: Correct fdt handling of overlays without fixups and base trees without symbols
The fdt_overlay_apply() function purports to support the edge cases where
an overlay has no fixups to be applied, or a base tree which has no
symbols (the latter can only work if the former is also true).  However it
gets it wrong in a couple of small ways:

  * In the no fixups case, it doesn't fail immediately, but will attempt
    fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node
    offset, which will fail.  Instead it should succeed immediately, since
    there's nothing to do.
  * In the case of no symbols, it again doesn't fail immediately.  However
    if there is an actual fixup it will fail with an unexpected error,
    because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to
    look up the symbols.  We should instead return -FDT_ERR_NOTFOUND
    directly.

Both of these errors lead to the code returning misleading error codes in
failing cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:29 +11:00
..
fdt.c libfdt: Fix undefined behaviour in fdt_offset_ptr() 2015-12-17 17:19:11 +11:00
fdt.h Added license header to dtc/libfdt/fdt.h and libfdt_env.h 2013-02-18 08:03:50 -06:00
fdt_addresses.c libfdt: Add helpers to read #address-cells and #size-cells 2014-05-12 16:01:09 +10:00
fdt_empty_tree.c libfdt: Add helper function to create a trivial, empty tree 2012-06-03 09:16:17 -05:00
fdt_overlay.c tests: Correct fdt handling of overlays without fixups and base trees without symbols 2016-12-09 16:13:29 +11:00
fdt_ro.c libfdt: fix fdt_stringlist_search() 2016-10-17 20:56:58 +11:00
fdt_rw.c libfdt: simplify fdt_del_mem_rsv() 2016-08-22 06:53:54 -04:00
fdt_strerror.c libfdt: add missing errors to fdt_strerror() 2016-11-04 07:17:20 +11:00
fdt_sw.c libfdt: Add function to resize the buffer for a sequential write tree 2013-10-26 00:17:37 +11:00
fdt_wip.c libfdt: Add fdt_setprop_inplace_namelen_partial 2016-08-01 13:34:39 +10:00
libfdt.h libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
libfdt_env.h libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
libfdt_internal.h libfdt: avoid shadowing "err" in FDT_CHECK_HEADER 2014-01-25 15:11:20 +11:00
Makefile.libfdt libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
version.lds libfdt: Add fdt_overlay_apply to the exported symbols 2016-10-11 20:08:38 +11:00