Various entry implementations provide a way to obtain the default filename
for an entry. But at present there is no base-class implementation for
this function. Add one so that the API is defined.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 tools/binman/entry.py      | 3 +++
 tools/binman/entry_test.py | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index e671a2ea094..ec3b22e9b31 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -160,6 +160,9 @@ class Entry(object):
         self.align_end = fdt_util.GetInt(self._node, 'align-end')
         self.offset_unset = fdt_util.GetBool(self._node, 'offset-unset')
 
+    def GetDefaultFilename(self):
+        return None
+
     def AddMissingProperties(self):
         """Add new properties to the device tree as needed for this entry"""
         for prop in ['offset', 'size', 'image-pos']:
diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
index 4100bcc3d32..69d85b4cedb 100644
--- a/tools/binman/entry_test.py
+++ b/tools/binman/entry_test.py
@@ -65,6 +65,11 @@ class TestEntry(unittest.TestCase):
         sub_entry = entry.Entry(None, None, sub_node, read_node=False)
         self.assertEqual('root.subnode', sub_entry.GetUniqueName())
 
+    def testGetDefaultFilename(self):
+        """Trivial test for this base class function"""
+        import entry
+        base_entry = entry.Entry(None, None, None, read_node=False)
+        self.assertIsNone(base_entry.GetDefaultFilename())
 
 if __name__ == "__main__":
     unittest.main()
-- 
2.19.0.397.gdd90340f6a-goog

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to