mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Stop dumping PnP nodes at an empty node.
svn path=/trunk/; revision=9795
This commit is contained in:
parent
a10440fe8a
commit
62e0fe6b5e
1 changed files with 33 additions and 26 deletions
|
@ -671,16 +671,16 @@ int main (int argc, char *argv[])
|
||||||
HKEY hPnpKey;
|
HKEY hPnpKey;
|
||||||
DWORD dwType;
|
DWORD dwType;
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
BOOL Ask = TRUE;
|
BOOL Ask;
|
||||||
PCM_FULL_RESOURCE_DESCRIPTOR lpBuffer;
|
PCM_FULL_RESOURCE_DESCRIPTOR lpBuffer;
|
||||||
PCM_PNP_BIOS_INSTALLATION_CHECK lpPnpInst;
|
PCM_PNP_BIOS_INSTALLATION_CHECK lpPnpInst;
|
||||||
PCM_PNP_BIOS_DEVICE_NODE lpDevNode;
|
PCM_PNP_BIOS_DEVICE_NODE lpDevNode;
|
||||||
|
DWORD dwDataSize;
|
||||||
DWORD dwDataSize, dwResourceSize;
|
DWORD dwResourceSize;
|
||||||
|
|
||||||
hPnpKey = 0;
|
hPnpKey = 0;
|
||||||
|
|
||||||
|
Ask = TRUE;
|
||||||
if (argc >1 && (!strcmp(argv[1],"/S") || !strcmp(argv[1],"/s")))
|
if (argc >1 && (!strcmp(argv[1],"/S") || !strcmp(argv[1],"/s")))
|
||||||
{
|
{
|
||||||
Ask = FALSE;
|
Ask = FALSE;
|
||||||
|
@ -693,7 +693,6 @@ int main (int argc, char *argv[])
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lError = GetPnpKey(&hPnpKey);
|
lError = GetPnpKey(&hPnpKey);
|
||||||
if (lError != ERROR_SUCCESS)
|
if (lError != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -709,6 +708,12 @@ int main (int argc, char *argv[])
|
||||||
/* Allocate buffer */
|
/* Allocate buffer */
|
||||||
dwSize = 1024;
|
dwSize = 1024;
|
||||||
lpBuffer = malloc(dwSize);
|
lpBuffer = malloc(dwSize);
|
||||||
|
if (lpBuffer == NULL)
|
||||||
|
{
|
||||||
|
printf("Error: malloc() failed\n");
|
||||||
|
RegCloseKey(hPnpKey);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
lError = RegQueryValueEx(hPnpKey,
|
lError = RegQueryValueEx(hPnpKey,
|
||||||
"Configuration Data",
|
"Configuration Data",
|
||||||
|
@ -721,7 +726,6 @@ int main (int argc, char *argv[])
|
||||||
if (lError == ERROR_MORE_DATA)
|
if (lError == ERROR_MORE_DATA)
|
||||||
{
|
{
|
||||||
printf("Need to resize buffer to %lu\n", dwSize);
|
printf("Need to resize buffer to %lu\n", dwSize);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Failed to read 'Configuration Data' value\n");
|
printf("Failed to read 'Configuration Data' value\n");
|
||||||
|
@ -813,6 +817,9 @@ return 0;
|
||||||
|
|
||||||
while (dwDataSize < dwResourceSize)
|
while (dwDataSize < dwResourceSize)
|
||||||
{
|
{
|
||||||
|
if (lpDevNode->Size == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
PrintDeviceData(lpDevNode);
|
PrintDeviceData(lpDevNode);
|
||||||
|
|
||||||
if (Ask)
|
if (Ask)
|
||||||
|
|
Loading…
Reference in a new issue