forked from xt-sys/exectos
Switch GUID specifier to %v and %V, thus allowing to write string with both lower and uppercase
This commit is contained in:
parent
430557e08f
commit
2dd4048416
@ -138,7 +138,7 @@ BlEnumerateBlockDevices()
|
|||||||
|
|
||||||
/* Print debug message */
|
/* Print debug message */
|
||||||
BlDebugPrint(L"Found Hard Disk partition (DiskNumber: %lu, PartNumber: %lu, "
|
BlDebugPrint(L"Found Hard Disk partition (DiskNumber: %lu, PartNumber: %lu, "
|
||||||
L"MBRType: %u, GUID: {%U}, PartSize: %uB)\n",
|
L"MBRType: %u, GUID: {%V}, PartSize: %uB)\n",
|
||||||
DriveNumber, PartitionNumber, HDPath->MBRType,
|
DriveNumber, PartitionNumber, HDPath->MBRType,
|
||||||
PartitionGuid, HDPath->PartitionSize * Media->BlockSize);
|
PartitionGuid, HDPath->PartitionSize * Media->BlockSize);
|
||||||
}
|
}
|
||||||
|
@ -884,10 +884,15 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
FormatProperties.VariableType = Integer;
|
FormatProperties.VariableType = Integer;
|
||||||
FormatProperties.Radix = 10;
|
FormatProperties.Radix = 10;
|
||||||
break;
|
break;
|
||||||
case L'U':
|
case L'v':
|
||||||
/* XTOS extension: UUID/GUID argument */
|
/* XTOS extension: UUID/GUID argument (lowercase) */
|
||||||
FormatProperties.VariableType = Guid;
|
FormatProperties.VariableType = Guid;
|
||||||
break;
|
break;
|
||||||
|
case L'V':
|
||||||
|
/* XTOS extension: UUID/GUID argument (uppercase) */
|
||||||
|
FormatProperties.VariableType = Guid;
|
||||||
|
FormatProperties.PrintUpperCase = TRUE;
|
||||||
|
break;
|
||||||
case L'x':
|
case L'x':
|
||||||
/* Unsigned integer argument as hexadecimal number (lowercase) */
|
/* Unsigned integer argument as hexadecimal number (lowercase) */
|
||||||
FormatProperties.VariableType = Integer;
|
FormatProperties.VariableType = Integer;
|
||||||
@ -968,9 +973,19 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
/* Make sure a pointer to GUID is not NULL */
|
/* Make sure a pointer to GUID is not NULL */
|
||||||
if(GuidArg != NULL)
|
if(GuidArg != NULL)
|
||||||
{
|
{
|
||||||
|
/* Check if using uppercase format */
|
||||||
|
if(FormatProperties.PrintUpperCase)
|
||||||
|
{
|
||||||
|
/* Use uppercase GUID format string */
|
||||||
|
WideStrArg = L"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Use lowercase GUID format string */
|
||||||
|
WideStrArg = L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
|
||||||
|
}
|
||||||
/* Write formatted GUID string */
|
/* Write formatted GUID string */
|
||||||
Status = RtlpWriteWideStringCustomValue(Context, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
Status = RtlpWriteWideStringCustomValue(Context, WideStrArg, GuidArg->Data1, GuidArg->Data2, GuidArg->Data3,
|
||||||
GuidArg->Data1, GuidArg->Data2, GuidArg->Data3,
|
|
||||||
GuidArg->Data4[0], GuidArg->Data4[1], GuidArg->Data4[2],
|
GuidArg->Data4[0], GuidArg->Data4[1], GuidArg->Data4[2],
|
||||||
GuidArg->Data4[3], GuidArg->Data4[4], GuidArg->Data4[5],
|
GuidArg->Data4[3], GuidArg->Data4[4], GuidArg->Data4[5],
|
||||||
GuidArg->Data4[6], GuidArg->Data4[7]);
|
GuidArg->Data4[6], GuidArg->Data4[7]);
|
||||||
|
Loading…
Reference in New Issue
Block a user