[USETUP] Formatting fixes only.

svn path=/branches/setup_improvements/; revision=75697
svn path=/branches/setup_improvements/; revision=75699
This commit is contained in:
Hermès Bélusca-Maïto 2017-08-28 13:50:40 +00:00
parent e2a92634e1
commit acd933faa0
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 136 additions and 117 deletions

View file

@ -88,7 +88,12 @@ IsAcpiComputer(VOID)
while (TRUE)
{
Status = NtEnumerateKey(hDevicesKey, IndexDevice, KeyBasicInformation, pDeviceInformation, DeviceInfoLength, &RequiredSize);
Status = NtEnumerateKey(hDevicesKey,
IndexDevice,
KeyBasicInformation,
pDeviceInformation,
DeviceInfoLength,
&RequiredSize);
if (Status == STATUS_NO_MORE_ENTRIES)
break;
else if (Status == STATUS_BUFFER_OVERFLOW || Status == STATUS_BUFFER_TOO_SMALL)
@ -102,7 +107,12 @@ IsAcpiComputer(VOID)
Status = STATUS_NO_MEMORY;
goto cleanup;
}
Status = NtEnumerateKey(hDevicesKey, IndexDevice, KeyBasicInformation, pDeviceInformation, DeviceInfoLength, &RequiredSize);
Status = NtEnumerateKey(hDevicesKey,
IndexDevice,
KeyBasicInformation,
pDeviceInformation,
DeviceInfoLength,
&RequiredSize);
}
if (!NT_SUCCESS(Status))
{
@ -114,9 +124,12 @@ IsAcpiComputer(VOID)
/* Open device key */
DeviceName.Length = DeviceName.MaximumLength = pDeviceInformation->NameLength;
DeviceName.Buffer = pDeviceInformation->Name;
InitializeObjectAttributes(&ObjectAttributes, &DeviceName, OBJ_CASE_INSENSITIVE, hDevicesKey, NULL);
Status = NtOpenKey(
&hDeviceKey,
InitializeObjectAttributes(&ObjectAttributes,
&DeviceName,
OBJ_CASE_INSENSITIVE,
hDevicesKey,
NULL);
Status = NtOpenKey(&hDeviceKey,
KEY_QUERY_VALUE,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
@ -126,7 +139,12 @@ IsAcpiComputer(VOID)
}
/* Read identifier */
Status = NtQueryValueKey(hDeviceKey, &IdentifierU, KeyValuePartialInformation, pValueInformation, ValueInfoLength, &RequiredSize);
Status = NtQueryValueKey(hDeviceKey,
&IdentifierU,
KeyValuePartialInformation,
pValueInformation,
ValueInfoLength,
&RequiredSize);
if (Status == STATUS_BUFFER_OVERFLOW || Status == STATUS_BUFFER_TOO_SMALL)
{
RtlFreeHeap(RtlGetProcessHeap(), 0, pValueInformation);
@ -138,7 +156,12 @@ IsAcpiComputer(VOID)
Status = STATUS_NO_MEMORY;
goto cleanup;
}
Status = NtQueryValueKey(hDeviceKey, &IdentifierU, KeyValuePartialInformation, pValueInformation, ValueInfoLength, &RequiredSize);
Status = NtQueryValueKey(hDeviceKey,
&IdentifierU,
KeyValuePartialInformation,
pValueInformation,
ValueInfoLength,
&RequiredSize);
}
if (!NT_SUCCESS(Status))
{
@ -155,7 +178,7 @@ IsAcpiComputer(VOID)
ValueName.Buffer = (PWCHAR)pValueInformation->Data;
if (ValueName.Length >= sizeof(WCHAR) && ValueName.Buffer[ValueName.Length / sizeof(WCHAR) - 1] == UNICODE_NULL)
ValueName.Length -= sizeof(WCHAR);
if (RtlCompareUnicodeString(&ValueName, &AcpiBiosIdentifier, FALSE) == 0)
if (RtlEqualUnicodeString(&ValueName, &AcpiBiosIdentifier, FALSE))
{
DPRINT("Found ACPI BIOS\n");
ret = TRUE;
@ -423,8 +446,7 @@ GetDisplayIdentifier(
while (TRUE)
{
swprintf(Buffer, L"%lu", BusInstance);
RtlInitUnicodeString(&KeyName,
Buffer);
RtlInitUnicodeString(&KeyName, Buffer);
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@ -442,8 +464,7 @@ GetDisplayIdentifier(
}
/* Open the controller type key */
RtlInitUnicodeString(&KeyName,
L"DisplayController");
RtlInitUnicodeString(&KeyName, L"DisplayController");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@ -461,8 +482,7 @@ GetDisplayIdentifier(
{
/* Open the pointer controller instance key */
swprintf(Buffer, L"%lu", ControllerInstance);
RtlInitUnicodeString(&KeyName,
Buffer);
RtlInitUnicodeString(&KeyName, Buffer);
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@ -482,8 +502,7 @@ GetDisplayIdentifier(
}
/* Get controller identifier */
RtlInitUnicodeString(&KeyName,
L"Identifier");
RtlInitUnicodeString(&KeyName, L"Identifier");
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
256 * sizeof(WCHAR);