-/* $Id: namespc.c,v 1.49 2004/11/21 06:51:18 ion Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ob/namespc.c
* PURPOSE: Manages the system namespace
- * PROGRAMMER: David Welch (welch@mcmail.com)
- * UPDATE HISTORY:
- * 22/05/98: Created
+ *
+ * PROGRAMMERS: David Welch (welch@mcmail.com)
*/
/* INCLUDES ***************************************************************/
UNICODE_STRING RemainingPath;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
+
+ PAGED_CODE();
InitializeObjectAttributes(&ObjectAttributes,
ObjectPath,
- Attributes,
+ Attributes | OBJ_OPENIF,
NULL,
NULL);
Status = ObFindObject(&ObjectAttributes,
UNICODE_STRING RemainingPath;
PVOID Object = NULL;
NTSTATUS Status;
+
+ PAGED_CODE();
DPRINT("ObOpenObjectByName(...)\n");
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);
{
KIRQL oldlvl;
- RtlCreateUnicodeString(&Header->Name, Name);
+ RtlpCreateUnicodeString(&Header->Name, Name, NonPagedPool);
Header->Parent = Parent;
KeAcquireSpinLock(&Parent->Lock, &oldlvl);
ObDirectoryType->Tag = TAG('D', 'I', 'R', 'T');
ObDirectoryType->TotalObjects = 0;
ObDirectoryType->TotalHandles = 0;
- ObDirectoryType->MaxObjects = ULONG_MAX;
- ObDirectoryType->MaxHandles = ULONG_MAX;
+ ObDirectoryType->PeakObjects = 0;
+ ObDirectoryType->PeakHandles = 0;
ObDirectoryType->PagedPoolCharge = 0;
ObDirectoryType->NonpagedPoolCharge = sizeof(DIRECTORY_OBJECT);
ObDirectoryType->Mapping = &ObpDirectoryMapping;
ObDirectoryType->Create = ObpCreateDirectory;
ObDirectoryType->DuplicationNotify = NULL;
- RtlRosInitUnicodeStringFromLiteral(&ObDirectoryType->TypeName,
+ RtlInitUnicodeString(&ObDirectoryType->TypeName,
L"Directory");
/* create 'type' object type*/
ObTypeObjectType->Tag = TAG('T', 'y', 'p', 'T');
ObTypeObjectType->TotalObjects = 0;
ObTypeObjectType->TotalHandles = 0;
- ObTypeObjectType->MaxObjects = ULONG_MAX;
- ObTypeObjectType->MaxHandles = ULONG_MAX;
+ ObTypeObjectType->PeakObjects = 0;
+ ObTypeObjectType->PeakHandles = 0;
ObTypeObjectType->PagedPoolCharge = 0;
ObTypeObjectType->NonpagedPoolCharge = sizeof(TYPE_OBJECT);
ObTypeObjectType->Mapping = &ObpTypeMapping;
ObTypeObjectType->Create = NULL;
ObTypeObjectType->DuplicationNotify = NULL;
- RtlRosInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName,
+ RtlInitUnicodeString(&ObTypeObjectType->TypeName,
L"ObjectType");
/* Create security descriptor */