[ros-diffs] [ion] 14650: Put in alphabetical order, remove IopCreateDevice, and remove incorrect implementation tag for EFi functions

ion at svn.reactos.com ion at svn.reactos.com
Sun Apr 17 18:26:45 CEST 2005


Put in alphabetical order, remove IopCreateDevice, and remove incorrect
implementation tag for EFi functions
Modified: trunk/reactos/ntoskrnl/io/device.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/io/efi.c
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
  _____  

Modified: trunk/reactos/ntoskrnl/io/device.c
--- trunk/reactos/ntoskrnl/io/device.c	2005-04-17 15:09:15 UTC (rev
14649)
+++ trunk/reactos/ntoskrnl/io/device.c	2005-04-17 16:26:44 UTC (rev
14650)
@@ -113,22 +113,6 @@

    return STATUS_SUCCESS;
 }
 
-NTSTATUS STDCALL
-IopCreateDevice(
-   PVOID ObjectBody,
-   PVOID Parent,
-   PWSTR RemainingPath,
-   POBJECT_ATTRIBUTES ObjectAttributes)
-{
-   DPRINT("IopCreateDevice(ObjectBody %x, Parent %x, RemainingPath
%S)\n",
-      ObjectBody, Parent, RemainingPath);
-   
-   if (RemainingPath != NULL && wcschr(RemainingPath + 1, '\\') !=
NULL)
-      return STATUS_OBJECT_PATH_NOT_FOUND;
-   
-   return STATUS_SUCCESS;
-}
-
 NTSTATUS
 STDCALL
 IopGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName,
@@ -238,36 +222,11 @@
 }
 
 /*
- * IoAttachDeviceToDeviceStack
- *
- * Status
- *    @implemented
- */
-PDEVICE_OBJECT 
-STDCALL
-IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice,
-                            PDEVICE_OBJECT TargetDevice)
-{
-    NTSTATUS Status;
-    PDEVICE_OBJECT LocalAttach;
-    
-    /* Attach it safely */
-    DPRINT("IoAttachDeviceToDeviceStack\n");
-    Status = IoAttachDeviceToDeviceStackSafe(SourceDevice,
-                                             TargetDevice,
-                                             &LocalAttach);
-                                             
-    /* Return it */
-    DPRINT("IoAttachDeviceToDeviceStack DONE: %x\n", LocalAttach);
-    return LocalAttach;
-}
-/*
  * IoAttachDeviceByPointer
  *
  * Status
  *    @implemented
  */
-
 NTSTATUS 
 STDCALL
 IoAttachDeviceByPointer(IN PDEVICE_OBJECT SourceDevice,
@@ -288,6 +247,31 @@
 }
 
 /*
+ * IoAttachDeviceToDeviceStack
+ *
+ * Status
+ *    @implemented
+ */
+PDEVICE_OBJECT 
+STDCALL
+IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice,
+                            PDEVICE_OBJECT TargetDevice)
+{
+    NTSTATUS Status;
+    PDEVICE_OBJECT LocalAttach;
+    
+    /* Attach it safely */
+    DPRINT("IoAttachDeviceToDeviceStack\n");
+    Status = IoAttachDeviceToDeviceStackSafe(SourceDevice,
+                                             TargetDevice,
+                                             &LocalAttach);
+                                             
+    /* Return it */
+    DPRINT("IoAttachDeviceToDeviceStack DONE: %x\n", LocalAttach);
+    return LocalAttach;
+}
+
+/*
  * @implemented
  */
 NTSTATUS
@@ -334,12 +318,210 @@
 }
 
 /*
+ * IoCreateDevice
+ *
+ * Allocates memory for and intializes a device object for use for
+ * a driver.
+ *
+ * Parameters
+ *    DriverObject
+ *       Driver object passed by IO Manager when the driver was loaded.
+ *
+ *    DeviceExtensionSize
+ *       Number of bytes for the device extension.
+ *
+ *    DeviceName
+ *       Unicode name of device.
+ *
+ *    DeviceType
+ *       Device type of the new device.
+ *
+ *    DeviceCharacteristics
+ *       Bit mask of device characteristics.
+ *
+ *    Exclusive
+ *       TRUE if only one thread can access the device at a time.
+ *
+ *    DeviceObject
+ *       On successful return this parameter is filled by pointer to
+ *       allocated device object.
+ *
+ * Status
+ *    @implemented
+ */
+NTSTATUS 
+STDCALL
+IoCreateDevice(PDRIVER_OBJECT DriverObject,
+               ULONG DeviceExtensionSize,
+               PUNICODE_STRING DeviceName,
+               DEVICE_TYPE DeviceType,
+               ULONG DeviceCharacteristics,
+               BOOLEAN Exclusive,
+               PDEVICE_OBJECT *DeviceObject)
+{
+    WCHAR AutoNameBuffer[20];
+    UNICODE_STRING AutoName;
+    PDEVICE_OBJECT CreatedDeviceObject;
+    PDEVOBJ_EXTENSION DeviceObjectExtension;
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    NTSTATUS Status;
+    ULONG AlignedDeviceExtensionSize;
+    ULONG TotalSize;
+    HANDLE TempHandle;
+   
+    ASSERT_IRQL(PASSIVE_LEVEL);
+    DPRINT("IoCreateDevice(DriverObject %x)\n",DriverObject);
+   
+    /* Generate a name if we have to */
+    if (DeviceCharacteristics & FILE_AUTOGENERATED_DEVICE_NAME)
+    {
+        swprintf(AutoNameBuffer,
+                 L"\\Device\\%08lx",
+                 InterlockedIncrementUL(&IopDeviceObjectNumber));
+        RtlInitUnicodeString(&AutoName, AutoNameBuffer);
+        DeviceName = &AutoName;
+   }
+   
+    /* Initialize the Object Attributes */
+    InitializeObjectAttributes(&ObjectAttributes, DeviceName, 0, NULL,
NULL);
+    
+    /* Honour exclusive flag */
+    ObjectAttributes.Attributes |= OBJ_EXCLUSIVE;
+    
+    /* Align the Extension Size to 8-bytes */
+    AlignedDeviceExtensionSize = (DeviceExtensionSize + 7) &~ 7;
+    DPRINT("AlignedDeviceExtensionSize %x\n",
AlignedDeviceExtensionSize);
+    
+    /* Total Size */
+    TotalSize = AlignedDeviceExtensionSize + 
+                sizeof(DEVICE_OBJECT) + sizeof(DEVOBJ_EXTENSION);
+    DPRINT("TotalSize %x\n", TotalSize);
+
+    /* Create the Device Object */
+    Status = ObCreateObject(KernelMode,
+                            IoDeviceObjectType,
+                            &ObjectAttributes,
+                            KernelMode,
+                            NULL,
+                            TotalSize,
+                            0,
+                            0,
+                            (PVOID*)&CreatedDeviceObject);
+  
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("IoCreateDevice() ObCreateObject failed, status:
0x%08X\n", Status);
+        return Status;
+    }
+    
+    /* Clear the whole Object and extension so we don't null stuff
manually */
+    RtlZeroMemory(CreatedDeviceObject, TotalSize);
+    DPRINT("CreatedDeviceObject %x\n", CreatedDeviceObject);
+  
+    /* 
+     * Setup the Type and Size. Note that we don't use the aligned
size,
+     * because that's only padding for the DevObjExt and not part of
the Object.
+     */
+    CreatedDeviceObject->Type = IO_TYPE_DEVICE;
+    CreatedDeviceObject->Size = sizeof(DEVICE_OBJECT) +
DeviceExtensionSize;
+    
+    /* The kernel extension is after the driver internal extension */
+    DeviceObjectExtension = (PDEVOBJ_EXTENSION)
+                            ((ULONG_PTR)(CreatedDeviceObject + 1) + 
+                             AlignedDeviceExtensionSize);
+                     
+    /* Set the Type and Size. Question: why is Size 0 on Windows? */
+    DPRINT("DeviceObjectExtension %x\n", DeviceObjectExtension);
+    DeviceObjectExtension->Type = IO_TYPE_DEVICE_OBJECT_EXTENSION;
+    DeviceObjectExtension->Size = 0;
+                                     
+    /* Link the Object and Extension */
+    DeviceObjectExtension->DeviceObject = CreatedDeviceObject;
+    CreatedDeviceObject->DeviceObjectExtension = DeviceObjectExtension;
+                             
+    /* Set Device Object Data */    
+    CreatedDeviceObject->DeviceType = DeviceType;
+    CreatedDeviceObject->Characteristics = DeviceCharacteristics;
+    CreatedDeviceObject->DeviceExtension = CreatedDeviceObject + 1;
+    CreatedDeviceObject->StackSize = 1;
+    CreatedDeviceObject->AlignmentRequirement = 1; /* FIXME */
+    
+    /* Set the Flags */
+    /* FIXME: After the Driver is Loaded, the flag below should be
removed */
+    CreatedDeviceObject->Flags = DO_DEVICE_INITIALIZING;
+    if (Exclusive) CreatedDeviceObject->Flags |= DO_EXCLUSIVE;
+    if (DeviceName) CreatedDeviceObject->Flags |= DO_DEVICE_HAS_NAME;
+  
+    /* Attach a Vpb for Disks and Tapes, and create the Device Lock */
+    if (CreatedDeviceObject->DeviceType == FILE_DEVICE_DISK ||
+        CreatedDeviceObject->DeviceType == FILE_DEVICE_VIRTUAL_DISK ||
+        CreatedDeviceObject->DeviceType == FILE_DEVICE_CD_ROM ||
+        CreatedDeviceObject->DeviceType == FILE_DEVICE_TAPE)
+    {
+        /* Create Vpb */
+        IopAttachVpb(CreatedDeviceObject);
+        
+        /* Initialize Lock Event */
+        KeInitializeEvent(&CreatedDeviceObject->DeviceLock,
+                          SynchronizationEvent,
+                          TRUE);
+    }
+       
+    /* Set the right Sector Size */
+    switch (DeviceType)
+    {
+        case FILE_DEVICE_DISK_FILE_SYSTEM:
+        case FILE_DEVICE_DISK:
+        case FILE_DEVICE_VIRTUAL_DISK:
+            CreatedDeviceObject->SectorSize  = 512;
+            break;
+
+        case FILE_DEVICE_CD_ROM_FILE_SYSTEM:
+            CreatedDeviceObject->SectorSize = 2048;
+            break;
+    }
+    
+    /* Create the Device Queue */
+    KeInitializeDeviceQueue(&CreatedDeviceObject->DeviceQueue);
+
+    /* Insert the Object */
+    Status = ObInsertObject(CreatedDeviceObject,
+                            NULL,
+                            FILE_READ_DATA | FILE_WRITE_DATA,
+                            0,
+                            NULL,
+                            &TempHandle);
+                            
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("Cannot insert Device Object into Handle Table\n");
+        *DeviceObject = NULL;
+        return Status;
+    }
+    
+    /* Now do the final linking */
+    ObReferenceObject(DriverObject);
+    CreatedDeviceObject->DriverObject = DriverObject;
+    CreatedDeviceObject->NextDevice = DriverObject->DeviceObject;
+    DriverObject->DeviceObject = CreatedDeviceObject;
+    
+    /* Close the temporary handle, but do an extra reference first so
it doesn't die */
+    ObReferenceObject(CreatedDeviceObject);
+    NtClose(TempHandle);
+    
+    /* Return to caller */
+    *DeviceObject = CreatedDeviceObject;
+    return STATUS_SUCCESS;
+}
+
+/*
  * IoDeleteDevice
  *
  * Status
  *    @implemented
  */
-VOID STDCALL
+VOID 
+STDCALL
 IoDeleteDevice(PDEVICE_OBJECT DeviceObject)
 {
    PDEVICE_OBJECT Previous;
@@ -373,6 +555,23 @@
 }
 
 /*
+ * IoDetachDevice
+ *
+ * Status
+ *    @implemented
+ */
+VOID
+STDCALL
+IoDetachDevice(PDEVICE_OBJECT TargetDevice)
+{   
+    DPRINT("IoDetachDevice(TargetDevice %x)\n", TargetDevice);   
+    
+    /* Remove the attachment */
+    TargetDevice->AttachedDevice->DeviceObjectExtension->AttachedTo =
NULL;
+    TargetDevice->AttachedDevice = NULL;
+}
+
+/*
  * @implemented
  */
 NTSTATUS
@@ -430,6 +629,45 @@
 }
 
 /*
+ * IoGetAttachedDevice
+ *
+ * Status
+ *    @implemented
+ */
+PDEVICE_OBJECT 
+STDCALL
+IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject)
+{
+    PDEVICE_OBJECT Current = DeviceObject;
+   
+    /* Get the last attached device */
+    while (Current->AttachedDevice) 
+    {
+        Current = Current->AttachedDevice;
+    }
+    
+    /* Return it */
+    return Current;
+}
+
+/*
+ * IoGetAttachedDeviceReference
+ *
+ * Status
+ *    @implemented
+ */
+PDEVICE_OBJECT 
+STDCALL
+IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
+{
+    PDEVICE_OBJECT Current = IoGetAttachedDevice(DeviceObject);
+   
+    /* Reference the ATtached Device */
+    ObReferenceObject(Current);
+    return Current;
+}
+
+/*
  * @implemented
  */
 PDEVICE_OBJECT
@@ -441,6 +679,27 @@
 }
 
 /*
+ * IoGetDeviceObjectPointer
+ *
+ * Status
+ *    @implemented
+ */
+NTSTATUS 
+STDCALL
+IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName,
+                         IN ACCESS_MASK DesiredAccess,
+                         OUT PFILE_OBJECT *FileObject,
+                         OUT PDEVICE_OBJECT *DeviceObject)
+{
+    /* Call the helper routine for a normal operation */
+    return IopGetDeviceObjectPointer(ObjectName, 
+                                     DesiredAccess, 
+                                     FileObject, 
+                                     DeviceObject, 
+                                     0);
+}
+
+/*
  * @implemented
  */
 NTSTATUS
@@ -539,280 +798,6 @@
 }
 
 /*
- * IoGetDeviceObjectPointer
- *
- * Status
- *    @implemented
- */
-NTSTATUS 
-STDCALL
-IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName,
-                         IN ACCESS_MASK DesiredAccess,
-                         OUT PFILE_OBJECT *FileObject,
-                         OUT PDEVICE_OBJECT *DeviceObject)
-{
-    /* Call the helper routine for a normal operation */
-    return IopGetDeviceObjectPointer(ObjectName, 
-                                     DesiredAccess, 
-                                     FileObject, 
-                                     DeviceObject, 
-                                     0);
-}
-
-/*
- * IoDetachDevice
- *
- * Status
- *    @implemented
- */
-VOID
-STDCALL
-IoDetachDevice(PDEVICE_OBJECT TargetDevice)
-{   
-    DPRINT("IoDetachDevice(TargetDevice %x)\n", TargetDevice);   
-    
-    /* Remove the attachment */
-    TargetDevice->AttachedDevice->DeviceObjectExtension->AttachedTo =
NULL;
-    TargetDevice->AttachedDevice = NULL;
-}
-
-/*
- * IoGetAttachedDevice
- *
- * Status
- *    @implemented
- */
-PDEVICE_OBJECT 
-STDCALL
-IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject)
-{
-    PDEVICE_OBJECT Current = DeviceObject;
-   
-    /* Get the last attached device */
-    while (Current->AttachedDevice) 
-    {
-        Current = Current->AttachedDevice;
-    }
-    
-    /* Return it */
-    return Current;
-}
-
-/*
- * IoGetAttachedDeviceReference
- *
- * Status
- *    @implemented
- */
-PDEVICE_OBJECT 
-STDCALL
-IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
-{
-    PDEVICE_OBJECT Current = IoGetAttachedDevice(DeviceObject);
-   
-    /* Reference the ATtached Device */
-    ObReferenceObject(Current);
-    return Current;
-}
-
-/*
- * IoCreateDevice
- *
- * Allocates memory for and intializes a device object for use for
- * a driver.
- *
- * Parameters
- *    DriverObject
- *       Driver object passed by IO Manager when the driver was loaded.
- *
- *    DeviceExtensionSize
- *       Number of bytes for the device extension.
- *
- *    DeviceName
- *       Unicode name of device.
- *
- *    DeviceType
- *       Device type of the new device.
- *
- *    DeviceCharacteristics
- *       Bit mask of device characteristics.
- *
- *    Exclusive
- *       TRUE if only one thread can access the device at a time.
- *
- *    DeviceObject
- *       On successful return this parameter is filled by pointer to
- *       allocated device object.
- *
- * Status
- *    @implemented
- */
-NTSTATUS 
-STDCALL
-IoCreateDevice(PDRIVER_OBJECT DriverObject,
-               ULONG DeviceExtensionSize,
-               PUNICODE_STRING DeviceName,
-               DEVICE_TYPE DeviceType,
-               ULONG DeviceCharacteristics,
-               BOOLEAN Exclusive,
-               PDEVICE_OBJECT *DeviceObject)
-{
-    WCHAR AutoNameBuffer[20];
-    UNICODE_STRING AutoName;
-    PDEVICE_OBJECT CreatedDeviceObject;
-    PDEVOBJ_EXTENSION DeviceObjectExtension;
-    OBJECT_ATTRIBUTES ObjectAttributes;
-    NTSTATUS Status;
-    ULONG AlignedDeviceExtensionSize;
-    ULONG TotalSize;
-    HANDLE TempHandle;
-   
-    ASSERT_IRQL(PASSIVE_LEVEL);
-    DPRINT("IoCreateDevice(DriverObject %x)\n",DriverObject);
-   
-    /* Generate a name if we have to */
-    if (DeviceCharacteristics & FILE_AUTOGENERATED_DEVICE_NAME)
-    {
-        swprintf(AutoNameBuffer,
-                 L"\\Device\\%08lx",
-                 InterlockedIncrementUL(&IopDeviceObjectNumber));
-        RtlInitUnicodeString(&AutoName, AutoNameBuffer);
-        DeviceName = &AutoName;
-   }
-   
-    /* Initialize the Object Attributes */
-    InitializeObjectAttributes(&ObjectAttributes, DeviceName, 0, NULL,
NULL);
-    
-    /* Honour exclusive flag */
-    ObjectAttributes.Attributes |= OBJ_EXCLUSIVE;
-    
-    /* Align the Extension Size to 8-bytes */
-    AlignedDeviceExtensionSize = (DeviceExtensionSize + 7) &~ 7;
-    DPRINT("AlignedDeviceExtensionSize %x\n",
AlignedDeviceExtensionSize);
-    
-    /* Total Size */
-    TotalSize = AlignedDeviceExtensionSize + 
-                sizeof(DEVICE_OBJECT) + sizeof(DEVOBJ_EXTENSION);
-    DPRINT("TotalSize %x\n", TotalSize);
-
-    /* Create the Device Object */
-    Status = ObCreateObject(KernelMode,
-                            IoDeviceObjectType,
-                            &ObjectAttributes,
-                            KernelMode,
-                            NULL,
-                            TotalSize,
-                            0,
-                            0,
-                            (PVOID*)&CreatedDeviceObject);
-  
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("IoCreateDevice() ObCreateObject failed, status:
0x%08X\n", Status);
-        return Status;
-    }
-    
-    /* Clear the whole Object and extension so we don't null stuff
manually */
-    RtlZeroMemory(CreatedDeviceObject, TotalSize);
-    DPRINT("CreatedDeviceObject %x\n", CreatedDeviceObject);
-  
-    /* 
-     * Setup the Type and Size. Note that we don't use the aligned
size,
-     * because that's only padding for the DevObjExt and not part of
the Object.
-     */
-    CreatedDeviceObject->Type = IO_TYPE_DEVICE;
-    CreatedDeviceObject->Size = sizeof(DEVICE_OBJECT) +
DeviceExtensionSize;
-    
-    /* The kernel extension is after the driver internal extension */
-    DeviceObjectExtension = (PDEVOBJ_EXTENSION)
-                            ((ULONG_PTR)(CreatedDeviceObject + 1) + 
-                             AlignedDeviceExtensionSize);
-                     
-    /* Set the Type and Size. Question: why is Size 0 on Windows? */
-    DPRINT("DeviceObjectExtension %x\n", DeviceObjectExtension);
-    DeviceObjectExtension->Type = IO_TYPE_DEVICE_OBJECT_EXTENSION;
-    DeviceObjectExtension->Size = 0;
-                                     
-    /* Link the Object and Extension */
-    DeviceObjectExtension->DeviceObject = CreatedDeviceObject;
-    CreatedDeviceObject->DeviceObjectExtension = DeviceObjectExtension;
-                             
-    /* Set Device Object Data */    
-    CreatedDeviceObject->DeviceType = DeviceType;
-    CreatedDeviceObject->Characteristics = DeviceCharacteristics;
-    CreatedDeviceObject->DeviceExtension = CreatedDeviceObject + 1;
-    CreatedDeviceObject->StackSize = 1;
-    CreatedDeviceObject->AlignmentRequirement = 1; /* FIXME */
-    
-    /* Set the Flags */
-    /* FIXME: After the Driver is Loaded, the flag below should be
removed */
-    CreatedDeviceObject->Flags = DO_DEVICE_INITIALIZING;
-    if (Exclusive) CreatedDeviceObject->Flags |= DO_EXCLUSIVE;
-    if (DeviceName) CreatedDeviceObject->Flags |= DO_DEVICE_HAS_NAME;
-  
-    /* Attach a Vpb for Disks and Tapes, and create the Device Lock */
-    if (CreatedDeviceObject->DeviceType == FILE_DEVICE_DISK ||
-        CreatedDeviceObject->DeviceType == FILE_DEVICE_VIRTUAL_DISK ||
-        CreatedDeviceObject->DeviceType == FILE_DEVICE_CD_ROM ||
-        CreatedDeviceObject->DeviceType == FILE_DEVICE_TAPE)
-    {
-        /* Create Vpb */
-        IopAttachVpb(CreatedDeviceObject);
-        
-        /* Initialize Lock Event */
-        KeInitializeEvent(&CreatedDeviceObject->DeviceLock,
-                          SynchronizationEvent,
-                          TRUE);
-    }
-       
-    /* Set the right Sector Size */
-    switch (DeviceType)
-    {
-        case FILE_DEVICE_DISK_FILE_SYSTEM:
-        case FILE_DEVICE_DISK:
-        case FILE_DEVICE_VIRTUAL_DISK:
-            CreatedDeviceObject->SectorSize  = 512;
-            break;
-
-        case FILE_DEVICE_CD_ROM_FILE_SYSTEM:
-            CreatedDeviceObject->SectorSize = 2048;
-            break;
-    }
-    
-    /* Create the Device Queue */
-    KeInitializeDeviceQueue(&CreatedDeviceObject->DeviceQueue);
-
-    /* Insert the Object */
-    Status = ObInsertObject(CreatedDeviceObject,
-                            NULL,
-                            FILE_READ_DATA | FILE_WRITE_DATA,
-                            0,
-                            NULL,
-                            &TempHandle);
-                            
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("Cannot insert Device Object into Handle Table\n");
-        *DeviceObject = NULL;
-        return Status;
-    }
-    
-    /* Now do the final linking */
-    ObReferenceObject(DriverObject);
-    CreatedDeviceObject->DriverObject = DriverObject;
-    CreatedDeviceObject->NextDevice = DriverObject->DeviceObject;
-    DriverObject->DeviceObject = CreatedDeviceObject;
-    
-    /* Close the temporary handle, but do an extra reference first so
it doesn't die */
-    ObReferenceObject(CreatedDeviceObject);
-    NtClose(TempHandle);
-    
-    /* Return to caller */
-    *DeviceObject = CreatedDeviceObject;
-    return STATUS_SUCCESS;
-}
-
-/*
  * @unimplemented
  */
 NTSTATUS
@@ -852,7 +837,6 @@
 	UNIMPLEMENTED;
 }
 
-
 /*
  * @unimplemented
  */
  _____  

Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c	2005-04-17 15:09:15 UTC (rev
14649)
+++ trunk/reactos/ntoskrnl/io/driver.c	2005-04-17 16:26:44 UTC (rev
14650)
@@ -1649,6 +1649,7 @@

     PDRIVER_OBJECT DriverObject;
     UNICODE_STRING ServiceKeyName;
     HANDLE hDriver;
+    ULONG i;
     
     /* First, create a unique name for the driver if we don't have one
*/
     if (!DriverName) {
@@ -1695,7 +1696,12 @@
     DriverObject->DriverExtension = (PDRIVER_EXTENSION)(DriverObject +
1);
     DriverObject->DriverExtension->DriverObject = DriverObject;
     DriverObject->DriverInit = InitializationFunction;
-    /* FIXME: Invalidate all Major Functions b/c now they are NULL and
might crash */
+    
+    /* Invalidate all Major Functions */
+    for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
+    {
+        DriverObject->MajorFunction[i] = IopInvalidDeviceRequest;
+    }
                
     /* Set up the Service Key Name */
     ServiceKeyName.Buffer = ExAllocatePool(PagedPool,
LocalDriverName.Length + sizeof(WCHAR));
  _____  

Modified: trunk/reactos/ntoskrnl/io/efi.c
--- trunk/reactos/ntoskrnl/io/efi.c	2005-04-17 15:09:15 UTC (rev
14649)
+++ trunk/reactos/ntoskrnl/io/efi.c	2005-04-17 16:26:44 UTC (rev
14650)
@@ -1,5 +1,4 @@

-/* $Id:$
- * 
+/* 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/io/efi.c
@@ -15,9 +14,6 @@
 
 /* FUNCTIONS
*****************************************************************/
 
-/*
- * @unimplemented
- */
 NTSTATUS
 STDCALL
 NtAddBootEntry(
@@ -28,9 +24,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-/*
- * @unimplemented
- */
+                                 
 NTSTATUS
 STDCALL
 NtDeleteBootEntry(
@@ -41,9 +35,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-/*
- * @unimplemented
- */
+                                 
 NTSTATUS
 STDCALL
 NtEnumerateBootEntries(
@@ -54,9 +46,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-/*
- * @unimplemented
- */
+                                   
 NTSTATUS
 STDCALL
 NtQueryBootEntryOrder(
@@ -67,9 +57,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-/*
- * @unimplemented
- */
+              
 NTSTATUS
 STDCALL
 NtQueryBootOptions(
@@ -80,9 +68,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-/*
- * @unimplemented
- */
+              
 NTSTATUS
 STDCALL
 NtSetBootEntryOrder(
@@ -93,10 +79,7 @@
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
 }
-
-/*
- * @unimplemented
- */
+            
 NTSTATUS 
 STDCALL 
 NtSetBootOptions(
@@ -106,12 +89,8 @@
 {
 	UNIMPLEMENTED;
 	return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/*
- * @unimplemented
- */
+}              
+                  
 NTSTATUS 
 STDCALL 
 NtTranslateFilePath(
@@ -124,5 +103,4 @@
 	return STATUS_NOT_IMPLEMENTED;
 }
 
-
 /* EOF */
  _____  

Modified: trunk/reactos/ntoskrnl/io/iomgr.c
--- trunk/reactos/ntoskrnl/io/iomgr.c	2005-04-17 15:09:15 UTC (rev
14649)
+++ trunk/reactos/ntoskrnl/io/iomgr.c	2005-04-17 16:26:44 UTC (rev
14650)
@@ -417,7 +417,7 @@

   IoDeviceObjectType->Security = NULL;
   IoDeviceObjectType->QueryName = NULL;
   IoDeviceObjectType->OkayToClose = NULL;
-  IoDeviceObjectType->Create = IopCreateDevice;
+  IoDeviceObjectType->Create = NULL;
   IoDeviceObjectType->DuplicationNotify = NULL;
   
   RtlInitUnicodeString(&IoDeviceObjectType->TypeName, L"Device");



More information about the Ros-diffs mailing list