mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
properly copy the device map - it's still not initialized properly
svn path=/trunk/; revision=11736
This commit is contained in:
parent
dcdb5fefb0
commit
f290137ce4
2 changed files with 12 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue