Improve firmware parser and tool robustness

closes #241
This commit is contained in:
joevt 2021-10-07 18:51:39 +03:00 committed by vit9696
parent e14547c497
commit f9c35f77a6
41 changed files with 415 additions and 324 deletions

View file

@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "ffsreport.h"
#include "ffs.h"
#include "utility.h"
#include "uinttypes.h"
std::vector<UString> FfsReport::generate()
{
@ -62,7 +63,7 @@ USTATUS FfsReport::generateRecursive(std::vector<UString> & report, const UModel
UString(" ") + itemTypeToUString(model->type(index)).leftJustified(16)
+ UString("| ") + itemSubtypeToUString(model->type(index), model->subtype(index)).leftJustified(22)
+ offset
+ usprintf("| %08X | %08X | ", data.size(), crc)
+ usprintf("| %08" PRIXQ " | %08X | ", data.size(), crc)
+ urepeated('-', level) + UString(" ") + model->name(index) + (text.isEmpty() ? UString() : UString(" | ") + text)
);