diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 8ccb9aa6281..0b273031430 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -1,4 +1,4 @@ -/* $Id: namespc.c,v 1.49 2004/11/21 06:51:18 ion Exp $ +/* $Id: namespc.c,v 1.50 2004/11/21 10:59:10 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -164,20 +164,19 @@ STDCALL ObQueryDeviceMapInformation(PEPROCESS Process, PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo) { - PDEVICE_MAP DeviceMap; //KIRQL OldIrql ; /* * FIXME: This is an ugly hack for now, to always return the System Device Map * instead of returning the Process Device Map. Not important yet since we don't use it */ - DeviceMap = ObSystemDeviceMap; /* FIXME: Acquire the DeviceMap Spinlock */ // KeAcquireSpinLock(DeviceMap->Lock, &OldIrql); /* Make a copy */ - RtlMoveMemory(DeviceMapInfo, &DeviceMap->DriveMap, sizeof(DeviceMapInfo->Query)); + DeviceMapInfo->Query.DriveMap = ObSystemDeviceMap->DriveMap; + RtlMoveMemory(DeviceMapInfo->Query.DriveType, ObSystemDeviceMap->DriveType, sizeof(ObSystemDeviceMap->DriveType)); /* FIXME: Release the DeviceMap Spinlock */ // KeReleasepinLock(DeviceMap->Lock, OldIrql); diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index d4ac3075bd3..1690c634bcf 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.153 2004/11/21 06:51:18 ion Exp $ +/* $Id: process.c,v 1.154 2004/11/21 10:59:11 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1224,13 +1224,15 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, break; case ProcessDeviceMap: - if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION)) { + if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION)) + { Status = STATUS_INFO_LENGTH_MISMATCH; - } else { - PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo; - DeviceMapInfo = (PPROCESS_DEVICEMAP_INFORMATION)ProcessInformation; - ObQueryDeviceMapInformation(Process, DeviceMapInfo); - if (ReturnLength) { + } + else + { + ObQueryDeviceMapInformation(Process, (PPROCESS_DEVICEMAP_INFORMATION)ProcessInformation); + if (ReturnLength) + { *ReturnLength = sizeof(PROCESS_DEVICEMAP_INFORMATION); } }