From 026d788dcc97daf862b8847bb6afdfe1d0123732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 19 May 2005 22:04:45 +0000 Subject: [PATCH] IoGetDeviceProperty(): Fix DevicePropertyEnumeratorName Implement DevicePropertyPhysicalDeviceObjectName svn path=/trunk/; revision=15415 --- reactos/ntoskrnl/io/pnpmgr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index b89b4f5bcff..1a6f3ab9801 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -236,6 +236,7 @@ IoGetDeviceProperty( if (Ptr != NULL) { Length = (ULONG)((ULONG_PTR)Ptr - (ULONG_PTR)DeviceNode->InstancePath.Buffer) + sizeof(WCHAR); + Data = DeviceNode->InstancePath.Buffer; } else { @@ -245,7 +246,9 @@ IoGetDeviceProperty( break; case DevicePropertyPhysicalDeviceObjectName: - return STATUS_NOT_IMPLEMENTED; + Length = DeviceNode->InstancePath.Length + sizeof(WCHAR); + Data = DeviceNode->InstancePath.Buffer; + break; default: return STATUS_INVALID_PARAMETER_2; @@ -257,7 +260,8 @@ IoGetDeviceProperty( RtlCopyMemory(PropertyBuffer, Data, Length); /* Terminate the string */ - if (DeviceProperty == DevicePropertyEnumeratorName) + if (DeviceProperty == DevicePropertyEnumeratorName + || DeviceProperty == DevicePropertyPhysicalDeviceObjectName) { Ptr = (PWSTR)PropertyBuffer; Ptr[(Length / sizeof(WCHAR)) - 1] = 0;