summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-09-30 18:16:51 -0400
committerTom Rini <trini@konsulko.com>2018-09-30 18:16:51 -0400
commitd24c1d0f4da3b081a4fedf7ae2a08790871f08d0 (patch)
tree30051c24000bbb640b6296c8a71a8e05f0cc06e4 /scripts
parent2c1e16b9d2e3a6138acf4ffd9866e47ddbe6d453 (diff)
parent31b8217e83a63d1c8c70edcdcdf5aff3b1791640 (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/pylibfdt/libfdt.i_shipped34
1 files changed, 28 insertions, 6 deletions
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index 0f17c5879e..76e61e98bd 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -628,28 +628,50 @@ class Fdt(FdtRo):
return check_err(fdt_setprop(self._fdt, nodeoffset, prop_name,
val, len(val)), quiet)
- def delprop(self, nodeoffset, prop_name):
+ def delprop(self, nodeoffset, prop_name, quiet=()):
"""Delete a property from a node
Args:
nodeoffset: Node offset containing property to delete
prop_name: Name of property to delete
+ quiet: Errors to ignore (empty to raise on all errors)
+
+ Returns:
+ Error code, or 0 if OK
Raises:
FdtError if the property does not exist, or another error occurs
"""
- return check_err(fdt_delprop(self._fdt, nodeoffset, prop_name))
+ return check_err(fdt_delprop(self._fdt, nodeoffset, prop_name), quiet)
+
+ def add_subnode(self, parentoffset, name, quiet=()):
+ """Add a new subnode to a node
- def del_node(self, nodeoffset):
+ Args:
+ parentoffset: Parent offset to add the subnode to
+ name: Name of node to add
+
+ Returns:
+ offset of the node created, or negative error code on failure
+
+ Raises:
+ FdtError if there is not enough space, or another error occurs
+ """
+ return check_err(fdt_add_subnode(self._fdt, parentoffset, name), quiet)
+
+ def del_node(self, nodeoffset, quiet=()):
"""Delete a node
Args:
- nodeoffset: Node offset containing property to delete
+ nodeoffset: Offset of node to delete
+
+ Returns:
+ Error code, or 0 if OK
Raises:
- FdtError if the node does not exist, or another error occurs
+ FdtError if an error occurs
"""
- return check_err(fdt_del_node(self._fdt, nodeoffset))
+ return check_err(fdt_del_node(self._fdt, nodeoffset), quiet)
class Property(bytearray):