mirror of
https://github.com/reactos/reactos.git
synced 2024-09-13 06:11:59 +00:00
IoGetDeviceProperty():
Fix DevicePropertyEnumeratorName Implement DevicePropertyPhysicalDeviceObjectName svn path=/trunk/; revision=15415
This commit is contained in:
parent
2e828da9a2
commit
026d788dcc
|
@ -236,6 +236,7 @@ IoGetDeviceProperty(
|
||||||
if (Ptr != NULL)
|
if (Ptr != NULL)
|
||||||
{
|
{
|
||||||
Length = (ULONG)((ULONG_PTR)Ptr - (ULONG_PTR)DeviceNode->InstancePath.Buffer) + sizeof(WCHAR);
|
Length = (ULONG)((ULONG_PTR)Ptr - (ULONG_PTR)DeviceNode->InstancePath.Buffer) + sizeof(WCHAR);
|
||||||
|
Data = DeviceNode->InstancePath.Buffer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -245,7 +246,9 @@ IoGetDeviceProperty(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DevicePropertyPhysicalDeviceObjectName:
|
case DevicePropertyPhysicalDeviceObjectName:
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
Length = DeviceNode->InstancePath.Length + sizeof(WCHAR);
|
||||||
|
Data = DeviceNode->InstancePath.Buffer;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return STATUS_INVALID_PARAMETER_2;
|
return STATUS_INVALID_PARAMETER_2;
|
||||||
|
@ -257,7 +260,8 @@ IoGetDeviceProperty(
|
||||||
RtlCopyMemory(PropertyBuffer, Data, Length);
|
RtlCopyMemory(PropertyBuffer, Data, Length);
|
||||||
|
|
||||||
/* Terminate the string */
|
/* Terminate the string */
|
||||||
if (DeviceProperty == DevicePropertyEnumeratorName)
|
if (DeviceProperty == DevicePropertyEnumeratorName
|
||||||
|
|| DeviceProperty == DevicePropertyPhysicalDeviceObjectName)
|
||||||
{
|
{
|
||||||
Ptr = (PWSTR)PropertyBuffer;
|
Ptr = (PWSTR)PropertyBuffer;
|
||||||
Ptr[(Length / sizeof(WCHAR)) - 1] = 0;
|
Ptr[(Length / sizeof(WCHAR)) - 1] = 0;
|
||||||
|
|
Loading…
Reference in a new issue