mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-09 13:52:01 -04:00
Downcast all qtsizetype to UINT32 manually, apply consistent identation
This commit is contained in:
parent
10e2e60183
commit
4006954bc1
25 changed files with 3398 additions and 3398 deletions
|
@ -1,15 +1,15 @@
|
|||
/* nvram.cpp
|
||||
Copyright (c) 2016, Nikolaj Schlej. All rights reserved.
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
*/
|
||||
Copyright (c) 2016, Nikolaj Schlej. All rights reserved.
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
*/
|
||||
|
||||
#include "nvram.h"
|
||||
|
||||
|
@ -17,7 +17,7 @@ UString nvarAttributesToUString(const UINT8 attributes)
|
|||
{
|
||||
if (attributes == 0x00 || attributes == 0xFF)
|
||||
return UString();
|
||||
|
||||
|
||||
UString str;
|
||||
if (attributes & NVRAM_NVAR_ENTRY_RUNTIME) str += UString(", Runtime");
|
||||
if (attributes & NVRAM_NVAR_ENTRY_ASCII_NAME) str += UString(", AsciiName");
|
||||
|
@ -39,7 +39,7 @@ UString nvarExtendedAttributesToUString(const UINT8 attributes)
|
|||
if (attributes & NVRAM_NVAR_ENTRY_EXT_AUTH_WRITE) str += UString(", AuthWrite");
|
||||
if (attributes & NVRAM_NVAR_ENTRY_EXT_TIME_BASED) str += UString(", TimeBasedAuthWrite");
|
||||
if (attributes & NVRAM_NVAR_ENTRY_EXT_UNKNOWN_MASK) str += UString(", Unknown");
|
||||
|
||||
|
||||
str.remove(0, 2); // Remove first comma and space
|
||||
return str;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ extern UString vssAttributesToUString(const UINT32 attributes)
|
|||
if (attributes & NVRAM_VSS_VARIABLE_APPEND_WRITE) str += UString(", AppendWrite");
|
||||
if (attributes & NVRAM_VSS_VARIABLE_APPLE_DATA_CHECKSUM) str += UString(", AppleChecksum");
|
||||
if (attributes & NVRAM_VSS_VARIABLE_UNKNOWN_MASK) str += UString(", Unknown");
|
||||
|
||||
|
||||
str.remove(0, 2); // Remove first comma and space
|
||||
return str;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ UString evsaAttributesToUString(const UINT32 attributes)
|
|||
if (attributes & NVRAM_EVSA_DATA_APPEND_WRITE) str += UString(", AppendWrite");
|
||||
if (attributes & NVRAM_EVSA_DATA_EXTENDED_HEADER) str += UString(", ExtendedHeader");
|
||||
if (attributes & NVRAM_EVSA_DATA_UNKNOWN_MASK) str += UString(", Unknown");
|
||||
|
||||
|
||||
str.remove(0, 2); // Remove first comma and space
|
||||
return str;
|
||||
}
|
||||
|
@ -81,13 +81,13 @@ UString evsaAttributesToUString(const UINT32 attributes)
|
|||
UString efiTimeToUString(const EFI_TIME & time)
|
||||
{
|
||||
return usprintf("%04u-%02u-%02uT%02u:%02u:%02u.%u",
|
||||
time.Year,
|
||||
time.Month,
|
||||
time.Day,
|
||||
time.Hour,
|
||||
time.Minute,
|
||||
time.Second,
|
||||
time.Nanosecond);
|
||||
time.Year,
|
||||
time.Month,
|
||||
time.Day,
|
||||
time.Hour,
|
||||
time.Minute,
|
||||
time.Second,
|
||||
time.Nanosecond);
|
||||
}
|
||||
|
||||
UString flashMapGuidToUString(const EFI_GUID & guid)
|
||||
|
@ -96,9 +96,9 @@ UString flashMapGuidToUString(const EFI_GUID & guid)
|
|||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_VOLUME_HEADER) return UString("Volume header");
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_MICROCODES_GUID) return UString("Microcodes");
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_CMDB_GUID) return UString("CMDB");
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_PUBKEY1_GUID
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_PUBKEY1_GUID
|
||||
|| baGuid == NVRAM_PHOENIX_FLASH_MAP_PUBKEY2_GUID) return UString("SLIC pubkey");
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_MARKER1_GUID
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_MARKER1_GUID
|
||||
|| baGuid == NVRAM_PHOENIX_FLASH_MAP_MARKER2_GUID) return UString("SLIC marker");
|
||||
if (baGuid == NVRAM_PHOENIX_FLASH_MAP_EVSA1_GUID
|
||||
|| baGuid == NVRAM_PHOENIX_FLASH_MAP_EVSA2_GUID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue