properly copy the device map - it's still not initialized properly

svn path=/trunk/; revision=11736
This commit is contained in:
Thomas Bluemel 2004-11-21 10:59:11 +00:00
parent dcdb5fefb0
commit f290137ce4
2 changed files with 12 additions and 11 deletions

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -164,20 +164,19 @@ STDCALL
ObQueryDeviceMapInformation(PEPROCESS Process, ObQueryDeviceMapInformation(PEPROCESS Process,
PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo) PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo)
{ {
PDEVICE_MAP DeviceMap;
//KIRQL OldIrql ; //KIRQL OldIrql ;
/* /*
* FIXME: This is an ugly hack for now, to always return the System Device Map * 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 * instead of returning the Process Device Map. Not important yet since we don't use it
*/ */
DeviceMap = ObSystemDeviceMap;
/* FIXME: Acquire the DeviceMap Spinlock */ /* FIXME: Acquire the DeviceMap Spinlock */
// KeAcquireSpinLock(DeviceMap->Lock, &OldIrql); // KeAcquireSpinLock(DeviceMap->Lock, &OldIrql);
/* Make a copy */ /* 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 */ /* FIXME: Release the DeviceMap Spinlock */
// KeReleasepinLock(DeviceMap->Lock, OldIrql); // KeReleasepinLock(DeviceMap->Lock, OldIrql);

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1224,13 +1224,15 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
break; break;
case ProcessDeviceMap: case ProcessDeviceMap:
if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION)) { if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION))
{
Status = STATUS_INFO_LENGTH_MISMATCH; Status = STATUS_INFO_LENGTH_MISMATCH;
} else { }
PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo; else
DeviceMapInfo = (PPROCESS_DEVICEMAP_INFORMATION)ProcessInformation; {
ObQueryDeviceMapInformation(Process, DeviceMapInfo); ObQueryDeviceMapInformation(Process, (PPROCESS_DEVICEMAP_INFORMATION)ProcessInformation);
if (ReturnLength) { if (ReturnLength)
{
*ReturnLength = sizeof(PROCESS_DEVICEMAP_INFORMATION); *ReturnLength = sizeof(PROCESS_DEVICEMAP_INFORMATION);
} }
} }