diff mbox series

[U-Boot,v2,13/37] binman: Use a better error for missing Intel descriptor

Message ID 20190708191856.138863-14-sjg@chromium.org
State Accepted
Commit 458be45afc79444b7ed66afc01d6e121dfa30d37
Delegated to: Simon Glass
Headers show
Series binman: Add CBFS support | expand

Commit Message

Simon Glass July 8, 2019, 7:18 p.m. UTC
FD is a bit confusing so write this out in full. Also avoid splitting the
string so that people can grep for the error message more easily.

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

Changes in v2: None

 tools/binman/etype/intel_descriptor.py | 2 +-
 tools/binman/ftest.py                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass July 18, 2019, 1:59 a.m. UTC | #1
FD is a bit confusing so write this out in full. Also avoid splitting the
string so that people can grep for the error message more easily.

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

Changes in v2: None

 tools/binman/etype/intel_descriptor.py | 2 +-
 tools/binman/ftest.py                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/binman/etype/intel_descriptor.py b/tools/binman/etype/intel_descriptor.py
index 6acbbd8b7a5..9deb8dcf42c 100644
--- a/tools/binman/etype/intel_descriptor.py
+++ b/tools/binman/etype/intel_descriptor.py
@@ -51,7 +51,7 @@  class Entry_intel_descriptor(Entry_blob):
     def GetOffsets(self):
         offset = self.data.find(FD_SIGNATURE)
         if offset == -1:
-            self.Raise('Cannot find FD signature')
+            self.Raise('Cannot find Intel Flash Descriptor (FD) signature')
         flvalsig, flmap0, flmap1, flmap2 = struct.unpack('<LLLL',
                                                 self.data[offset:offset + 16])
         frba = ((flmap0 >> 16) & 0xff) << 4
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 46f669e73b4..8577adb5380 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -806,8 +806,8 @@  class TestFunctional(unittest.TestCase):
         TestFunctional._MakeInputFile('descriptor.bin', b'')
         with self.assertRaises(ValueError) as e:
             self._DoTestFile('031_x86-rom-me.dts')
-        self.assertIn("Node '/binman/intel-descriptor': Cannot find FD "
-                      "signature", str(e.exception))
+        self.assertIn("Node '/binman/intel-descriptor': Cannot find Intel Flash Descriptor (FD) signature",
+                      str(e.exception))
 
     def testPackX86RomBadDesc(self):
         """Test that the Intel requires a descriptor entry"""