mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-27 13:34:33 -04:00
Merge recent updates but without broken builder and with minor refactoring and bugfixes
This commit is contained in:
parent
b064495db8
commit
0a634ebcbd
37 changed files with 712 additions and 8665 deletions
|
@ -36,17 +36,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (argc > 1) {
|
||||
// Check that input file exists
|
||||
USTATUS result;
|
||||
UByteArray buffer;
|
||||
UString path = argv[1];
|
||||
if (!isExistOnFs(path))
|
||||
return U_FILE_OPEN;
|
||||
|
||||
// Open the input file
|
||||
std::ifstream inputFile(argv[1], std::ios::in | std::ios::binary);
|
||||
if (!inputFile)
|
||||
return U_FILE_OPEN;
|
||||
std::vector<char> buffer(std::istreambuf_iterator<char>(inputFile),
|
||||
(std::istreambuf_iterator<char>()));
|
||||
inputFile.close();
|
||||
result = readFileIntoBuffer(path, buffer);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
// Hack to support legacy UEFIDump mode.
|
||||
if (argc == 3 && !std::strcmp(argv[2], "unpack")) {
|
||||
|
@ -58,7 +53,7 @@ int main(int argc, char *argv[])
|
|||
TreeModel model;
|
||||
FfsParser ffsParser(&model);
|
||||
// Parse input buffer
|
||||
USTATUS result = ffsParser.parse(buffer);
|
||||
result = ffsParser.parse(buffer);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue