mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-16 08:04:55 -04:00
Fix more builder issues and perform the initial UEFIReplace port
This commit is contained in:
parent
2d02eeab6d
commit
0169c8c904
17 changed files with 402 additions and 61 deletions
|
@ -12,6 +12,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
|
||||
#include "guiddatabase.h"
|
||||
#include "ubytearray.h"
|
||||
#include "ffs.h"
|
||||
|
||||
#if defined(U_ENABLE_GUID_DATABASE_SUPPORT)
|
||||
#include <map>
|
||||
|
@ -86,27 +87,9 @@ void initGuidDatabase(const UString & path, UINT32* numEntries)
|
|||
continue;
|
||||
|
||||
EFI_GUID guid;
|
||||
|
||||
unsigned long p0;
|
||||
int p1, p2, p3, p4, p5, p6, p7, p8, p9, p10;
|
||||
|
||||
int err = std::sscanf(lineParts[0].toLocal8Bit(), "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
&p0, &p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10);
|
||||
if (err == 0)
|
||||
if (!ustringToGuid(lineParts[0], guid))
|
||||
continue;
|
||||
|
||||
guid.Data1 = p0;
|
||||
guid.Data2 = p1;
|
||||
guid.Data3 = p2;
|
||||
guid.Data4[0] = p3;
|
||||
guid.Data4[1] = p4;
|
||||
guid.Data4[2] = p5;
|
||||
guid.Data4[3] = p6;
|
||||
guid.Data4[4] = p7;
|
||||
guid.Data4[5] = p8;
|
||||
guid.Data4[6] = p9;
|
||||
guid.Data4[7] = p10;
|
||||
|
||||
gGuidToUStringMap.insert(GuidToUStringMap::value_type(guid, lineParts[1]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue