[Crosstoolchain-logs] [device-tree-compiler] 06/22: libfdt: Add new errors for the overlay code

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:07:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/latest
in repository device-tree-compiler.

commit 4aa3a6f5e6d92179099d466422c450ebc12e5b1a
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Fri Sep 30 15:57:14 2016 +0200

    libfdt: Add new errors for the overlay code
    
    Add a few new error codes to report the failure conditions we might
    encounter in the overlay application code:
       - FDT_ERR_BADOVERLAY, when an overlay cannot be parsed, even though its
         structure is correct
       - FDT_ERR_NOPHANDLES, when we ran out of available phandles and we
         cannot use a new phandle without either using an invalid one (-1 or
         0), or one already used.
    
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 libfdt/fdt_strerror.c |  3 +++
 libfdt/libfdt.h       | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/libfdt/fdt_strerror.c b/libfdt/fdt_strerror.c
index e6c3cee..3cb357f 100644
--- a/libfdt/fdt_strerror.c
+++ b/libfdt/fdt_strerror.c
@@ -76,6 +76,9 @@ static struct fdt_errtabent fdt_errtable[] = {
 	FDT_ERRTABENT(FDT_ERR_BADVERSION),
 	FDT_ERRTABENT(FDT_ERR_BADSTRUCTURE),
 	FDT_ERRTABENT(FDT_ERR_BADLAYOUT),
+	FDT_ERRTABENT(FDT_ERR_BADOVERLAY),
+	FDT_ERRTABENT(FDT_ERR_BADOVERLAY),
+	FDT_ERRTABENT(FDT_ERR_NOPHANDLES),
 };
 #define FDT_ERRTABSIZE	(sizeof(fdt_errtable) / sizeof(fdt_errtable[0]))
 
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index ecb11fc..361cc6c 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -126,7 +126,16 @@
 	 * value. For example: a property expected to contain a string list
 	 * is not NUL-terminated within the length of its value. */
 
-#define FDT_ERR_MAX		15
+#define FDT_ERR_BADOVERLAY	16
+	/* FDT_ERR_BADOVERLAY: The device tree overlay, while
+	 * correctly structured, cannot be applied due to some
+	 * unexpected or missing value, property or node. */
+
+#define FDT_ERR_NOPHANDLES	17
+	/* FDT_ERR_NOPHANDLES: The device tree doesn't have any
+	 * phandle available anymore without causing an overflow */
+
+#define FDT_ERR_MAX		17
 
 /**********************************************************************/
 /* Low-level functions (you probably don't need these)                */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list