svn commit: r327299 - head/stand/fdt
Kyle Evans
kevans at FreeBSD.org
Thu Dec 28 21:12:28 UTC 2017
Author: kevans
Date: Thu Dec 28 21:12:27 2017
New Revision: 327299
URL: https://svnweb.freebsd.org/changeset/base/327299
Log:
stand/fdt: Avoid bailout when dtbo has no fixups
In the case of a simple dtbo where fragment uses target-path and the overlay
contains no references, /__fixups__ will not be included by either our dtc
or dtc from ports, but the file still has valid fragments to be applied.
Additional testing found that /__symbols__ might also be omitted if it's
empty, which is not necessarily an error.
Reviewed by: gonzo, imp
Differential Revision: https://reviews.freebsd.org/D13663
Modified:
head/stand/fdt/fdt_overlay.c
Modified: head/stand/fdt/fdt_overlay.c
==============================================================================
--- head/stand/fdt/fdt_overlay.c Thu Dec 28 21:09:36 2017 (r327298)
+++ head/stand/fdt/fdt_overlay.c Thu Dec 28 21:12:27 2017 (r327299)
@@ -324,10 +324,16 @@ fdt_overlay_do_fixups(void *main_fdtp, void *overlay_f
main_symbols_o = fdt_path_offset(main_fdtp, "/__symbols__");
overlay_fixups_o = fdt_path_offset(overlay_fdtp, "/__fixups__");
- if (main_symbols_o < 0)
+ if (main_symbols_o < 0) {
+ if (main_symbols_o == -FDT_ERR_NOTFOUND)
+ return (0);
return (-1);
- if (overlay_fixups_o < 0)
+ }
+ if (overlay_fixups_o < 0) {
+ if (overlay_fixups_o == -FDT_ERR_NOTFOUND)
+ return (0);
return (-1);
+ }
for (fixup_prop_o = fdt_first_property_offset(overlay_fdtp, overlay_fixups_o);
fixup_prop_o >= 0;
More information about the svn-src-all
mailing list