]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand/fdt: Make fdt_overlay_apply signature-compatible with libfdt
authorKyle Evans <kevans@FreeBSD.org>
Sun, 31 Dec 2017 05:22:26 +0000 (05:22 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 31 Dec 2017 05:22:26 +0000 (05:22 +0000)
commit24888292cddb474a52f945d6ed263f44ec1222b6
tree4b52b2ea795353b39049741db83ed4175421f553
parent4abca9bb05a31a9b5ab830d5ce46e248b810b31f
stand/fdt: Make fdt_overlay_apply signature-compatible with libfdt

libfdt will assume a writable fdt overlay blob has been passed in, so make
ours compatible to allow easier review when we try to drop libfdt into
place. overlay from the calling context is writable, making it safe to
simply rip out everything related to copying the overlay blob in
fdt_overlay_apply.

I note here that we still have problems: fdt_overlay_apply, both our version
and libfdt's, may fail and have already clobbered the base fdt to some
extent. Future work will make sure we don't apply a potentially bogus fdt,
instead discarding the base fdt if we had an error.

Reviewed by: gonzo
Differential Revision: https://reviews.freebsd.org/D13695
stand/fdt/fdt_loader_cmd.c
stand/fdt/fdt_overlay.c
stand/fdt/fdt_overlay.h