- Nt->Zw
- Assign an instance path to the root device node and reports its
arrival.
Modified: trunk/reactos/ntoskrnl/io/arcname.c
Modified: trunk/reactos/ntoskrnl/io/bootlog.c
Modified: trunk/reactos/ntoskrnl/io/device.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/io/errlog.c
Modified: trunk/reactos/ntoskrnl/io/iocomp.c
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnproot.c
Modified: trunk/reactos/ntoskrnl/io/resource.c
Modified: trunk/reactos/ntoskrnl/io/symlink.c
Modified: trunk/reactos/ntoskrnl/io/xhaldrv.c
_____
Modified: trunk/reactos/ntoskrnl/io/arcname.c
--- trunk/reactos/ntoskrnl/io/arcname.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/arcname.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -207,32 +207,32 @@
NULL,
NULL);
- Status = NtOpenFile(&Handle,
+ Status = ZwOpenFile(&Handle,
FILE_ALL_ACCESS,
&ObjectAttributes,
&IoStatusBlock,
0,
0);
- DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
+ DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
if (NT_SUCCESS(Status))
{
- Status = NtQueryVolumeInformationFile(Handle,
+ Status = ZwQueryVolumeInformationFile(Handle,
&IoStatusBlock,
FileFsVolume,
FS_VOLUME_BUFFER_SIZE,
FileFsVolumeInformation);
- DPRINT("NtQueryVolumeInformationFile() Status %lx\n",
Status);
+ DPRINT("ZwQueryVolumeInformationFile() Status %lx\n",
Status);
if (NT_SUCCESS(Status))
{
DPRINT("VolumeLabel: '%S'\n", FileFsVolume->VolumeLabel);
if (_wcsicmp(FileFsVolume->VolumeLabel, L"REACTOS") == 0)
{
- NtClose(Handle);
+ ZwClose(Handle);
*DeviceNumber = i;
return(STATUS_SUCCESS);
}
}
- NtClose(Handle);
+ ZwClose(Handle);
}
#endif
@@ -252,17 +252,17 @@
NULL,
NULL);
- Status = NtOpenFile(&Handle,
+ Status = ZwOpenFile(&Handle,
FILE_ALL_ACCESS,
&ObjectAttributes,
&IoStatusBlock,
0,
0);
- DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
+ DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
if (NT_SUCCESS(Status))
{
DPRINT("Found ntoskrnl.exe on Cdrom%lu\n", i);
- NtClose(Handle);
+ ZwClose(Handle);
*DeviceNumber = i;
return(STATUS_SUCCESS);
}
@@ -283,17 +283,17 @@
NULL,
NULL);
- Status = NtOpenFile(&Handle,
+ Status = ZwOpenFile(&Handle,
FILE_ALL_ACCESS,
&ObjectAttributes,
&IoStatusBlock,
0,
0);
- DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
+ DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i,
Status);
if (NT_SUCCESS(Status))
{
DPRINT("Found ntoskrnl.exe on Cdrom%lu\n", i);
- NtClose(Handle);
+ ZwClose(Handle);
*DeviceNumber = i;
return(STATUS_SUCCESS);
}
@@ -407,14 +407,14 @@
NULL,
NULL);
- Status = NtOpenSymbolicLinkObject(&Handle,
+ Status = ZwOpenSymbolicLinkObject(&Handle,
SYMBOLIC_LINK_ALL_ACCESS,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
RtlFreeUnicodeString(&BootPath);
RtlFreeUnicodeString(&DeviceName);
- CPRINT("NtOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n",
+ CPRINT("ZwOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n",
&ArcName,
Status);
RtlFreeUnicodeString(&ArcName);
@@ -423,15 +423,15 @@
}
RtlFreeUnicodeString(&ArcName);
- Status = NtQuerySymbolicLinkObject(Handle,
+ Status = ZwQuerySymbolicLinkObject(Handle,
&DeviceName,
&Length);
- NtClose (Handle);
+ ZwClose (Handle);
if (!NT_SUCCESS(Status))
{
RtlFreeUnicodeString(&BootPath);
RtlFreeUnicodeString(&DeviceName);
- CPRINT("NtQuerySymbolicObject() failed (Status %x)\n",
+ CPRINT("ZwQuerySymbolicObject() failed (Status %x)\n",
Status);
return(Status);
@@ -466,7 +466,7 @@
NULL,
NULL);
- Status = NtOpenFile(&Handle,
+ Status = ZwOpenFile(&Handle,
FILE_ALL_ACCESS,
&ObjectAttributes,
&IoStatusBlock,
@@ -474,12 +474,12 @@
0);
if (!NT_SUCCESS(Status))
{
- CPRINT("NtOpenFile() failed to open '\\SystemRoot' (Status
%x)\n",
+ CPRINT("ZwOpenFile() failed to open '\\SystemRoot' (Status
%x)\n",
Status);
return(Status);
}
- NtClose(Handle);
+ ZwClose(Handle);
return(STATUS_SUCCESS);
}
_____
Modified: trunk/reactos/ntoskrnl/io/bootlog.c
--- trunk/reactos/ntoskrnl/io/bootlog.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/bootlog.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -86,12 +86,12 @@
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtOpenKey(&ControlSetKey,
+ Status = ZwOpenKey(&ControlSetKey,
KEY_ALL_ACCESS,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwOpenKey() failed (Status %lx)\n", Status);
ExReleaseResourceLite(&IopBootLogResource);
return;
}
@@ -102,7 +102,7 @@
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
ControlSetKey,
NULL);
- Status = NtCreateKey(&BootLogKey,
+ Status = ZwCreateKey(&BootLogKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
@@ -111,21 +111,21 @@
NULL);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
- NtClose(ControlSetKey);
+ DPRINT1("ZwCreateKey() failed (Status %lx)\n", Status);
+ ZwClose(ControlSetKey);
ExReleaseResourceLite(&IopBootLogResource);
return;
}
RtlInitUnicodeString(&ValueName, ValueNameBuffer);
- Status = NtSetValueKey(BootLogKey,
+ Status = ZwSetValueKey(BootLogKey,
&ValueName,
0,
REG_SZ,
(PVOID)Buffer,
(wcslen(Buffer) + 1) * sizeof(WCHAR));
- NtClose(BootLogKey);
- NtClose(ControlSetKey);
+ ZwClose(BootLogKey);
+ ZwClose(ControlSetKey);
if (!NT_SUCCESS(Status))
{
@@ -160,7 +160,7 @@
NULL,
NULL);
- Status = NtCreateFile(&FileHandle,
+ Status = ZwCreateFile(&FileHandle,
FILE_APPEND_DATA,
&ObjectAttributes,
&IoStatusBlock,
@@ -173,13 +173,13 @@
0);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtCreateFile() failed (Status %lx)\n", Status);
+ DPRINT1("ZwCreateFile() failed (Status %lx)\n", Status);
return Status;
}
if (LogText != NULL)
{
- Status = NtWriteFile(FileHandle,
+ Status = ZwWriteFile(FileHandle,
NULL,
NULL,
NULL,
@@ -190,14 +190,14 @@
NULL);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtWriteFile() failed (Status %lx)\n", Status);
- NtClose(FileHandle);
+ DPRINT1("ZwWriteFile() failed (Status %lx)\n", Status);
+ ZwClose(FileHandle);
return Status;
}
}
/* L"\r\n" */
- Status = NtWriteFile(FileHandle,
+ Status = ZwWriteFile(FileHandle,
NULL,
NULL,
NULL,
@@ -207,11 +207,11 @@
NULL,
NULL);
- NtClose(FileHandle);
+ ZwClose(FileHandle);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtWriteFile() failed (Status %lx)\n", Status);
+ DPRINT1("ZwWriteFile() failed (Status %lx)\n", Status);
}
return Status;
@@ -241,7 +241,7 @@
NULL,
NULL);
- Status = NtCreateFile(&FileHandle,
+ Status = ZwCreateFile(&FileHandle,
FILE_ALL_ACCESS,
&ObjectAttributes,
&IoStatusBlock,
@@ -254,14 +254,14 @@
0);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtCreateFile() failed (Status %lx)\n", Status);
+ DPRINT1("ZwCreateFile() failed (Status %lx)\n", Status);
return Status;
}
ByteOffset.QuadPart = (LONGLONG)0;
Signature = 0xFEFF;
- Status = NtWriteFile(FileHandle,
+ Status = ZwWriteFile(FileHandle,
NULL,
NULL,
NULL,
@@ -272,10 +272,10 @@
NULL);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtWriteKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwWriteKey() failed (Status %lx)\n", Status);
}
- NtClose(FileHandle);
+ ZwClose(FileHandle);
return Status;
}
@@ -344,7 +344,7 @@
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtOpenKey(&KeyHandle,
+ Status = ZwOpenKey(&KeyHandle,
KEY_ALL_ACCESS,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
@@ -363,7 +363,7 @@
RtlInitUnicodeString(&ValueName,
ValueNameBuffer);
- Status = NtQueryValueKey(KeyHandle,
+ Status = ZwQueryValueKey(KeyHandle,
&ValueName,
KeyValuePartialInformation,
KeyInfo,
@@ -377,7 +377,7 @@
if (!NT_SUCCESS(Status))
{
CHECKPOINT1;
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
ExFreePool(KeyInfo);
ExReleaseResourceLite(&IopBootLogResource);
return;
@@ -387,18 +387,18 @@
if (!NT_SUCCESS(Status))
{
CHECKPOINT1;
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
ExFreePool(KeyInfo);
ExReleaseResourceLite(&IopBootLogResource);
return;
}
/* Delete keys */
- NtDeleteValueKey(KeyHandle,
+ ZwDeleteValueKey(KeyHandle,
&ValueName);
}
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
ExFreePool(KeyInfo);
_____
Modified: trunk/reactos/ntoskrnl/io/device.c
--- trunk/reactos/ntoskrnl/io/device.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/device.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -339,7 +339,7 @@
NULL,
NULL);
- Status = NtOpenFile(
+ Status = ZwOpenFile(
&FileHandle,
DesiredAccess,
&ObjectAttributes,
@@ -364,7 +364,7 @@
*FileObject = LocalFileObject;
}
- NtClose(FileHandle);
+ ZwClose(FileHandle);
return Status;
}
_____
Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/driver.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -959,7 +959,7 @@
NULL,
NULL);
- Status = NtOpenKey(&KeyHandle,
+ Status = ZwOpenKey(&KeyHandle,
0x10001,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
@@ -971,14 +971,14 @@
KeyInfo = ExAllocatePool(NonPagedPool, KeyInfoLength);
if (KeyInfo == NULL)
{
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
return(STATUS_INSUFFICIENT_RESOURCES);
}
Index = 0;
while (TRUE)
{
- Status = NtEnumerateKey(KeyHandle,
+ Status = ZwEnumerateKey(KeyHandle,
Index,
KeyBasicInformation,
KeyInfo,
@@ -1006,7 +1006,7 @@
}
ExFreePool(KeyInfo);
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
DPRINT("IoCreateDriverList() done\n");
@@ -1270,7 +1270,7 @@
NTSTATUS Status = STATUS_UNSUCCESSFUL;
IopDisplayLoadingMessage(Service->ServiceName.Buffer);
- Status = NtLoadDriver(&Service->RegistryPath);
+ Status = ZwLoadDriver(&Service->RegistryPath);
IopBootLog(&Service->ImagePath, NT_SUCCESS(Status) ? TRUE : FALSE);
if (!NT_SUCCESS(Status))
{
_____
Modified: trunk/reactos/ntoskrnl/io/errlog.c
--- trunk/reactos/ntoskrnl/io/errlog.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/errlog.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -135,7 +135,7 @@
RtlInitUnicodeString (&PortName,
L"\\ErrorLogPort");
- Status = NtConnectPort (&IopLogPort,
+ Status = ZwConnectPort (&IopLogPort,
&PortName,
NULL,
NULL,
@@ -145,7 +145,7 @@
NULL);
if (!NT_SUCCESS(Status))
{
- DPRINT ("NtConnectPort() failed (Status %lx)\n", Status);
+ DPRINT ("ZwConnectPort() failed (Status %lx)\n", Status);
return FALSE;
}
@@ -290,7 +290,7 @@
Request->Header.DataSize + sizeof(LPC_MESSAGE);
/* Send the error message to the log port */
- Status = NtRequestPort (IopLogPort,
+ Status = ZwRequestPort (IopLogPort,
&Request->Header);
/* Release request buffer */
@@ -298,7 +298,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT ("NtRequestPort() failed (Status %lx)\n", Status);
+ DPRINT ("ZwRequestPort() failed (Status %lx)\n", Status);
/* Requeue log message and restart the worker */
ExInterlockedInsertTailList (&IopLogListHead,
_____
Modified: trunk/reactos/ntoskrnl/io/iocomp.c
--- trunk/reactos/ntoskrnl/io/iocomp.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/iocomp.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -32,14 +32,14 @@
NTSTATUS
STDCALL
-NtpCreateIoCompletion(
+IopCreateIoCompletion(
PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes
)
{
- DPRINT("NtpCreateIoCompletion(ObjectBody %x, Parent %x,
RemainingPath %S)\n",
+ DPRINT("IopCreateIoCompletion(ObjectBody %x, Parent %x,
RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
@@ -51,11 +51,11 @@
}
VOID STDCALL
-NtpDeleteIoCompletion(PVOID ObjectBody)
+IopDeleteIoCompletion(PVOID ObjectBody)
{
PKQUEUE Queue = ObjectBody;
- DPRINT("NtpDeleteIoCompletion()\n");
+ DPRINT("IopDeleteIoCompletion()\n");
KeRundownQueue(Queue);
}
@@ -132,12 +132,12 @@
ExIoCompletionType->Dump = NULL;
ExIoCompletionType->Open = NULL;
ExIoCompletionType->Close = NULL;
- ExIoCompletionType->Delete = NtpDeleteIoCompletion;
+ ExIoCompletionType->Delete = IopDeleteIoCompletion;
ExIoCompletionType->Parse = NULL;
ExIoCompletionType->Security = NULL;
ExIoCompletionType->QueryName = NULL;
ExIoCompletionType->OkayToClose = NULL;
- ExIoCompletionType->Create = NtpCreateIoCompletion;
+ ExIoCompletionType->Create = IopCreateIoCompletion;
ExIoCompletionType->DuplicationNotify = NULL;
ExInitializeNPagedLookasideList(&IoCompletionPacketLookaside,
_____
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
--- trunk/reactos/ntoskrnl/io/iomgr.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/iomgr.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -465,7 +465,7 @@
0,
NULL,
NULL);
- NtCreateDirectoryObject(&Handle,
+ ZwCreateDirectoryObject(&Handle,
0,
&ObjectAttributes);
@@ -479,7 +479,7 @@
0,
NULL,
NULL);
- NtCreateDirectoryObject(&Handle,
+ ZwCreateDirectoryObject(&Handle,
0,
&ObjectAttributes);
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -791,7 +791,7 @@
DPRINT("Create '%S'\n", KeyName.Buffer);
- Status = NtCreateKey (&KeyHandle,
+ Status = ZwCreateKey (&KeyHandle,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
@@ -800,7 +800,7 @@
NULL);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtCreateKey() failed with status %x\n", Status);
+ DPRINT ("ZwCreateKey() failed with status %x\n", Status);
return Status;
}
@@ -811,7 +811,7 @@
}
else
{
- NtClose (KeyHandle);
+ ZwClose (KeyHandle);
*Next = L'\\';
}
@@ -843,7 +843,7 @@
OBJ_CASE_INSENSITIVE,
InstanceKey,
NULL);
- Status = NtCreateKey(&LogConfKey,
+ Status = ZwCreateKey(&LogConfKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
@@ -862,7 +862,7 @@
RtlInitUnicodeString(&KeyName,
L"BootConfig");
- Status = NtSetValueKey(LogConfKey,
+ Status = ZwSetValueKey(LogConfKey,
&KeyName,
0,
REG_RESOURCE_LIST,
@@ -877,7 +877,7 @@
{
RtlInitUnicodeString(&KeyName,
L"BasicConfigVector");
- Status = NtSetValueKey(LogConfKey,
+ Status = ZwSetValueKey(LogConfKey,
&KeyName,
0,
REG_RESOURCE_REQUIREMENTS_LIST,
@@ -885,7 +885,7 @@
DeviceNode->ResourceRequirements->ListSize);
}
- NtClose(LogConfKey);
+ ZwClose(LogConfKey);
}
DPRINT("IopSetDeviceInstanceData() done\n");
@@ -1069,7 +1069,7 @@
/* Set 'Capabilities' value */
RtlInitUnicodeString(&ValueName,
L"Capabilities");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_DWORD,
@@ -1081,7 +1081,7 @@
{
RtlInitUnicodeString(&ValueName,
L"UINumber");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_DWORD,
@@ -1120,7 +1120,7 @@
RtlInitUnicodeString(&ValueName,
L"HardwareID");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_MULTI_SZ,
@@ -1128,7 +1128,7 @@
(TotalLength + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status);
}
}
else
@@ -1166,7 +1166,7 @@
RtlInitUnicodeString(&ValueName,
L"CompatibleIDs");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_MULTI_SZ,
@@ -1174,7 +1174,7 @@
(TotalLength + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status);
}
}
else
@@ -1196,7 +1196,7 @@
{
RtlInitUnicodeString(&ValueName,
L"DeviceDesc");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_SZ,
@@ -1204,7 +1204,7 @@
(wcslen((PWSTR)IoStatusBlock.Information) +
1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status);
}
}
else
@@ -1226,7 +1226,7 @@
DPRINT("LocationInformation: %S\n",
(PWSTR)IoStatusBlock.Information);
RtlInitUnicodeString(&ValueName,
L"LocationInformation");
- Status = NtSetValueKey(InstanceKey,
+ Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
REG_SZ,
@@ -1234,7 +1234,7 @@
(wcslen((PWSTR)IoStatusBlock.Information) +
1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status);
}
}
else
@@ -1315,7 +1315,7 @@
IopSetDeviceInstanceData(InstanceKey, DeviceNode);
}
- NtClose(InstanceKey);
+ ZwClose(InstanceKey);
DeviceNode->Flags |= DNF_PROCESSED;
@@ -1733,7 +1733,7 @@
NULL,
NULL);
- Status = NtOpenFile(
+ Status = ZwOpenFile(
&Handle,
FILE_ALL_ACCESS,
&ObjectAttributes,
@@ -1743,7 +1743,7 @@
BootDrivers = NT_SUCCESS(Status) ? FALSE : TRUE;
- NtClose(Handle);
+ ZwClose(Handle);
/*
* Initialize services for discovered children. Only boot drivers
will
@@ -1805,6 +1805,18 @@
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
+ if (!IopCreateUnicodeString(&IopRootDeviceNode->InstancePath,
+ L"HTREE\\Root\\0",
+ PagedPool))
+ {
+ CPRINT("Failed to create the instance path!\n");
+ KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, STATUS_UNSUCCESSFUL, 0,
0, 0);
+ }
+
+ /* Report the device to the user-mode pnp manager */
+ IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL,
+ &IopRootDeviceNode->InstancePath);
+
IopRootDeviceNode->PhysicalDeviceObject->Flags |=
DO_BUS_ENUMERATED_DEVICE;
PnpRootDriverEntry(IopRootDriverObject, NULL);
IopRootDriverObject->DriverExtension->AddDevice(
_____
Modified: trunk/reactos/ntoskrnl/io/pnproot.c
--- trunk/reactos/ntoskrnl/io/pnproot.c 2005-02-07 10:30:14 UTC (rev
13455)
+++ trunk/reactos/ntoskrnl/io/pnproot.c 2005-02-07 10:33:44 UTC (rev
13456)
@@ -20,7 +20,8 @@
/* DATA
**********************************************************************/
-typedef struct _PNPROOT_DEVICE {
+typedef struct _PNPROOT_DEVICE
+{
// Entry on device list
LIST_ENTRY ListEntry;
// Physical Device Object of device
@@ -35,7 +36,8 @@
UNICODE_STRING DeviceDescription;
} PNPROOT_DEVICE, *PPNPROOT_DEVICE;
-typedef enum {
+typedef enum
+{
dsStopped,
dsStarted,
dsPaused,
@@ -285,10 +287,6 @@
}
-NTSTATUS
-PnpRootPdoPnpControl(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
/*
* FUNCTION: Handle Plug and Play IRPs for the child device
* ARGUMENTS:
@@ -297,6 +295,10 @@
* RETURNS:
* Status
*/
+NTSTATUS
+PnpRootPdoPnpControl(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
{
PIO_STACK_LOCATION IrpSp;
NTSTATUS Status;
@@ -353,10 +355,7 @@
return Status;
}
-NTSTATUS
-PnpRootPdoPowerControl(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
+
/*
* FUNCTION: Handle power management IRPs for the child device
* ARGUMENTS:
@@ -365,6 +364,10 @@
* RETURNS:
* Status
*/
+NTSTATUS
+PnpRootPdoPowerControl(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
{
PIO_STACK_LOCATION IrpSp;
NTSTATUS Status;
@@ -484,10 +487,10 @@
NULL,
NULL);
- Status = NtOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes);
+ Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes);
if (!NT_SUCCESS(Status))
{
- DPRINT("NtOpenKey() failed (Status %x)\n", Status);
+ DPRINT("ZwOpenKey() failed (Status %x)\n", Status);
ExFreePool(KeyInfo);
return Status;
}
@@ -570,7 +573,7 @@
DPRINT("Entries found: %d\n", Index);
- NtClose(KeyHandle);
+ ZwClose(KeyHandle);
ExFreePool(KeyInfo);
@@ -668,8 +671,8 @@
/* FIXME: */
}
- DPRINT("DeviceID: %S PDO %x\n",
- PdoDeviceExtension->DeviceID.Buffer,
+ DPRINT1("DeviceID: %wZ PDO %p\n",
+ &PdoDeviceExtension->DeviceID,
Device->Pdo);
if (!IopCreateUnicodeString(
@@ -681,6 +684,9 @@
/* FIXME: */
}
+ DPRINT1("InstanceID: %wZ PDO %p\n",
+ &PdoDeviceExtension->InstanceID,
+ Device->Pdo);
}
/* Reference the physical device object. The PnP manager
@@ -730,11 +736,6 @@
}
-NTSTATUS
-STDCALL
-PnpRootFdoPnpControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp)
/*
* FUNCTION: Handle Plug and Play IRPs for the root bus device object
* ARGUMENTS:
@@ -743,6 +744,11 @@
* RETURNS:
* Status
*/
+NTSTATUS
+STDCALL
+PnpRootFdoPnpControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
{
PPNPROOT_FDO_DEVICE_EXTENSION DeviceExtension;
PIO_STACK_LOCATION IrpSp;
@@ -788,11 +794,6 @@
}
-NTSTATUS
-STDCALL
-PnpRootFdoPowerControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp)
/*
* FUNCTION: Handle power management IRPs for the root bus device
object
* ARGUMENTS:
@@ -801,6 +802,11 @@
* RETURNS:
* Status
*/
+NTSTATUS
+STDCALL
+PnpRootFdoPowerControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
{
PIO_STACK_LOCATION IrpSp;
NTSTATUS Status;
@@ -827,11 +833,6 @@
}
-NTSTATUS
-STDCALL
-PnpRootPnpControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp)
/*
* FUNCTION: Handle Plug and Play IRPs
* ARGUMENTS:
@@ -840,6 +841,11 @@
* RETURNS:
* Status
*/
+NTSTATUS
+STDCALL
+PnpRootPnpControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
{
PPNPROOT_COMMON_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
@@ -861,11 +867,6 @@
}
-NTSTATUS
-STDCALL
-PnpRootPowerControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp)
/*
* FUNCTION: Handle power management IRPs
* ARGUMENTS:
@@ -874,6 +875,11 @@
* RETURNS:
* Status
*/
+NTSTATUS
+STDCALL
+PnpRootPowerControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
{
PPNPROOT_COMMON_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
_____
Modified: trunk/reactos/ntoskrnl/io/resource.c
--- trunk/reactos/ntoskrnl/io/resource.c 2005-02-07 10:30:14 UTC
(rev 13455)
+++ trunk/reactos/ntoskrnl/io/resource.c 2005-02-07 10:33:44 UTC
(rev 13456)
@@ -836,7 +836,7 @@
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
0,
NULL);
- Status = NtCreateKey(&ResourcemapKey,
+ Status = ZwCreateKey(&ResourcemapKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
@@ -854,14 +854,14 @@
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
ResourcemapKey,
NULL);
- Status = NtCreateKey(&HalKey,
+ Status = ZwCreateKey(&HalKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
NULL,
REG_OPTION_VOLATILE,
&Disposition);
- NtClose(ResourcemapKey);
+ ZwClose(ResourcemapKey);
if (!NT_SUCCESS(Status))
return(Status);
@@ -871,21 +871,21 @@
OBJ_CASE_INSENSITIVE,
HalKey,
NULL);
- Status = NtCreateKey(&DescriptionKey,
+ Status = ZwCreateKey(&DescriptionKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
NULL,
REG_OPTION_VOLATILE,
&Disposition);
- NtClose(HalKey);
+ ZwClose(HalKey);
if (!NT_SUCCESS(Status))
return(Status);
/* Add '.Raw' value. */
RtlRosInitUnicodeStringFromLiteral(&Name,
L".Raw");
- Status = NtSetValueKey(DescriptionKey,
+ Status = ZwSetValueKey(DescriptionKey,
&Name,
0,
REG_RESOURCE_LIST,
@@ -893,20 +893,20 @@
ListSize);
if (!NT_SUCCESS(Status))
{
- NtClose(DescriptionKey);
+ ZwClose(DescriptionKey);
return(Status);
[truncated at 1000 lines; 103 more skipped]