Commit Diff


commit - 73bef7a69e0affc86cc8b037638fb158cbb8be2e
commit + 621f0e86e870df27570c60b2d36a870213fa06e3
blob - de9bdea2b2d439f107d9dbd5d3221bd14b83a84b
blob + fa81d1fc96717d9898057354443c6ea1450fcc7b
--- tools/img_eGON.BT0/img_eGON.BT0.cc
+++ tools/img_eGON.BT0/img_eGON.BT0.cc
@@ -98,6 +98,8 @@ namespace header
 constexpr auto MAGIC_LENGTH{8};
 const std::array<uint8_t, MAGIC_LENGTH> MAGIC{'e', 'G', 'O', 'N', '.', 'B', 'T', '0'};
 
+const uint32_t CHECKSUM_INITIAL{0x5f0a6c39};
+
 constexpr auto SPL_SIGNATURE_LENGTH{3};
 const std::array<uint8_t, SPL_SIGNATURE_LENGTH> SPL_SIGNATURE{'S', 'P', 'L'};
 
@@ -184,7 +186,7 @@ bool validate_and_dump(const char *image_file_path)
         ret_value = false;
     }
 
-    std::cout << "+0x0C Checksum         : 0x" 
+    std::cout << "+0x0c Checksum         : 0x" 
               << std::hex << std::setw(8) << std::setfill('0') 
               << header.m_checksum << std::endl;
 
@@ -193,7 +195,7 @@ bool validate_and_dump(const char *image_file_path)
     if (ret_value && length_expected)
     {
         const auto saved_checksum{header.m_checksum};
-        header.m_checksum = 0x5f0a6c39;
+        header.m_checksum = CHECKSUM_INITIAL;
 
         uint32_t checksum = 0;
         for (uint32_t i = 0; i < sizeof(header) / sizeof(uint32_t); ++i)
@@ -275,7 +277,7 @@ bool validate_and_dump(const char *image_file_path)
               << std::hex << std::setw(8) << std::setfill('0') 
               << header.m_zero18 << std::endl;
 
-    std::cout << "+0x1C                  : 0x" 
+    std::cout << "+0x1c                  : 0x" 
               << std::hex << std::setw(8) << std::setfill('0') 
               << header.m_zero1C << std::endl;
 
@@ -292,7 +294,7 @@ bool validate_and_dump(const char *image_file_path)
               << std::hex << std::setw(8) << std::setfill('0') 
               << header.m_zero28 << std::endl;
 
-    std::cout << "+0x2C Strings          :";
+    std::cout << "+0x2c Strings          :";
     auto printed = 0;
     for (const auto ch : header.m_strings)
     {