binman: Add a test to catch use of the old 'pos' property

This property has been changed to 'offset'. To help downstream users who
might still be using 'pos', add a check that this is not used by mistake.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-07-17 13:25:51 -06:00
parent 7e7c587760
commit 15a587c9ce
3 changed files with 19 additions and 0 deletions

View File

@@ -143,6 +143,8 @@ class Entry(object):
This reads all the fields we recognise from the node, ready for use.
"""
if 'pos' in self._node.props:
self.Raise("Please use 'offset' instead of 'pos'")
self.offset = fdt_util.GetInt(self._node, 'offset')
self.size = fdt_util.GetInt(self._node, 'size')
self.align = fdt_util.GetInt(self._node, 'align')