mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[UMPNPMGR] PNP_Get(First/Next)LogConf: return proper tags for the resource list case
This commit is contained in:
parent
209439a5ae
commit
e1eb9e3620
|
@ -4237,7 +4237,7 @@ PNP_GetFirstLogConf(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Data size %lu\n", ulDataSize);
|
DPRINT1("Data size %lu\n", ulDataSize);
|
||||||
if (ulDataSize == 0 || lpData == NULL)
|
if (ulDataSize == 0 || lpData == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("No config data available!\n");
|
DPRINT1("No config data available!\n");
|
||||||
|
@ -4248,21 +4248,15 @@ PNP_GetFirstLogConf(
|
||||||
/* Get the first tag */
|
/* Get the first tag */
|
||||||
if (RegDataType == REG_RESOURCE_LIST)
|
if (RegDataType == REG_RESOURCE_LIST)
|
||||||
{
|
{
|
||||||
DPRINT("REG_RESOURCE_LIST\n");
|
DPRINT("REG_RESOURCE_LIST->Count %lu\n", ((PCM_RESOURCE_LIST)lpData)->Count);
|
||||||
|
|
||||||
DPRINT("ResourceList->Count %lu\n", ((PCM_RESOURCE_LIST)lpData)->Count);
|
/* Indicate that we reached the end of the list */
|
||||||
if (((PCM_RESOURCE_LIST)lpData)->Count == 0)
|
if (((PCM_RESOURCE_LIST)lpData)->Count == 0)
|
||||||
{
|
{
|
||||||
DPRINT1("No resource descriptors!\n");
|
DPRINT1("No resource descriptors!\n");
|
||||||
ret = CR_NO_MORE_LOG_CONF;
|
ret = CR_NO_MORE_LOG_CONF;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("lpData %p\n", lpData);
|
|
||||||
DPRINT("&List[0] %p\n", &(((PCM_RESOURCE_LIST)lpData)->List[0]));
|
|
||||||
|
|
||||||
*pulLogConfTag = (DWORD)((DWORD_PTR)&(((PCM_RESOURCE_LIST)lpData)->List[0]) - (DWORD_PTR)lpData);
|
|
||||||
DPRINT("Offset (Tag): 0x%08lx\n", *pulLogConfTag);
|
|
||||||
}
|
}
|
||||||
else if (RegDataType == REG_RESOURCE_REQUIREMENTS_LIST)
|
else if (RegDataType == REG_RESOURCE_REQUIREMENTS_LIST)
|
||||||
{
|
{
|
||||||
|
@ -4347,13 +4341,24 @@ PNP_GetNextLogConf(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Get the next tag */
|
/* Check if the next entry is available */
|
||||||
if (RegDataType == REG_RESOURCE_LIST)
|
if (RegDataType == REG_RESOURCE_LIST)
|
||||||
{
|
{
|
||||||
DPRINT1("FIXME: REG_RESOURCE_LIST\n");
|
DPRINT("REG_RESOURCE_LIST->Count %lu\n", ((PCM_RESOURCE_LIST)lpData)->Count);
|
||||||
/* FIXME */
|
|
||||||
ret = CR_NO_MORE_LOG_CONF;
|
/* Fail, if we are beyond the end of the list */
|
||||||
goto done;
|
if (ulCurrentTag >= ((PCM_RESOURCE_LIST)lpData)->Count)
|
||||||
|
{
|
||||||
|
ret = CR_INVALID_LOG_CONF;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Indicate that we reached the end of the list */
|
||||||
|
if (ulCurrentTag == ((PCM_RESOURCE_LIST)lpData)->Count - 1)
|
||||||
|
{
|
||||||
|
ret = CR_NO_MORE_LOG_CONF;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (RegDataType == REG_RESOURCE_REQUIREMENTS_LIST)
|
else if (RegDataType == REG_RESOURCE_REQUIREMENTS_LIST)
|
||||||
{
|
{
|
||||||
|
@ -4363,6 +4368,9 @@ PNP_GetNextLogConf(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the next tag value */
|
||||||
|
*pulNextTag = ulCurrentTag + 1;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (lpData != NULL)
|
if (lpData != NULL)
|
||||||
HeapFree(GetProcessHeap(), 0, lpData);
|
HeapFree(GetProcessHeap(), 0, lpData);
|
||||||
|
|
Loading…
Reference in a new issue