summaryrefslogtreecommitdiff
path: root/tools/binman/etype
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2022-08-13 11:40:44 -0600
committerSimon Glass <[email protected]>2022-08-20 18:07:32 -0600
commitcdadadab7df4a938c54131b40828e7b4dfd5ef2f (patch)
treecfa795e113b67a7ceaba82948214878d6c21dc5a /tools/binman/etype
parent24474dc20a0626ebba2e9c95449dfdc1d9933eee (diff)
binman: Add a way to check for missing properties
Some new entries are likely to have required properties. Support this in a standard way, with a list of required properties which can be set up by base classes. Check for missing properties when the entry is read. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools/binman/etype')
-rw-r--r--tools/binman/etype/fill.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/binman/etype/fill.py b/tools/binman/etype/fill.py
index cd382799199..c91d0152a8a 100644
--- a/tools/binman/etype/fill.py
+++ b/tools/binman/etype/fill.py
@@ -23,11 +23,10 @@ class Entry_fill(Entry):
"""
def __init__(self, section, etype, node):
super().__init__(section, etype, node)
+ self.required_props = ['size']
def ReadNode(self):
super().ReadNode()
- if self.size is None:
- self.Raise("'fill' entry must have a size property")
self.fill_value = fdt_util.GetByte(self._node, 'fill-byte', 0)
def ObtainContents(self):