Windows: FILE_FS_DEVICE_INFORMATION Device Type
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSInit.cpp
index 658a892..6bd8756 100644 (file)
@@ -60,7 +60,6 @@ DriverEntry( PDRIVER_OBJECT DriverObject,
 
     NTSTATUS ntStatus = STATUS_SUCCESS;
     AFSDeviceExt    *pDeviceExt;
-    ULONG ulTimeIncrement = 0;
     UNICODE_STRING uniDeviceName;
     ULONG ulIndex = 0;
     UNICODE_STRING uniRoutine;
@@ -147,7 +146,14 @@ DriverEntry( PDRIVER_OBJECT DriverObject,
 
             AFSRtlSetSaclSecurityDescriptor = (PAFSRtlSetSaclSecurityDescriptor)MmGetSystemRoutineAddress( &uniRoutine);
         }
+
 #endif
+
+        RtlInitUnicodeString( &uniRoutine,
+                              L"RtlSetGroupSecurityDescriptor");
+
+        AFSRtlSetGroupSecurityDescriptor = (PAFSRtlSetGroupSecurityDescriptor)MmGetSystemRoutineAddress( &uniRoutine);
+
         ntStatus = AFSCreateDefaultSecurityDescriptor();
 
         if( !NT_SUCCESS( ntStatus))
@@ -159,7 +165,7 @@ DriverEntry( PDRIVER_OBJECT DriverObject,
         }
 
         //
-        // Initilize the control device
+        // Initialize the control device
         //
 
         RtlInitUnicodeString( &uniDeviceName,
@@ -168,7 +174,7 @@ DriverEntry( PDRIVER_OBJECT DriverObject,
         ntStatus = IoCreateDevice( DriverObject,
                                    sizeof( AFSDeviceExt),
                                    &uniDeviceName,
-                                   FILE_DEVICE_DISK_FILE_SYSTEM,
+                                   FILE_DEVICE_NETWORK_FILE_SYSTEM,
                                    0,
                                    FALSE,
                                    &AFSLibraryDeviceObject);
@@ -279,10 +285,12 @@ try_exit:
             }
         }
     }
-    __except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
+    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
     {
 
         AFSPrint( "EXCEPTION - AFS DriverEntry\n");
+
+        AFSDumpTraceFilesFnc();
     }
 
     return ntStatus;
@@ -292,6 +300,7 @@ void
 AFSUnload( IN PDRIVER_OBJECT DriverObject)
 {
 
+    UNREFERENCED_PARAMETER(DriverObject);
     if( AFSGlobalRoot != NULL)
     {