Added file system recognizer driver.
[reactos.git] / reactos / drivers / fs / cdfs / close.c
index 993513e..de6ff97 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: close.c,v 1.2 2002/05/01 13:15:42 ekohl Exp $
+/* $Id: close.c,v 1.3 2002/05/15 09:39:54 ekohl Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -87,12 +87,20 @@ CdfsClose(PDEVICE_OBJECT DeviceObject,
 
   DPRINT("CdfsClose() called\n");
 
+  if (DeviceObject == CdfsGlobalData->DeviceObject)
+    {
+      DPRINT("Closing file system\n");
+      Status = STATUS_SUCCESS;
+      goto ByeBye;
+    }
+
   Stack = IoGetCurrentIrpStackLocation(Irp);
   FileObject = Stack->FileObject;
   DeviceExtension = DeviceObject->DeviceExtension;
 
   Status = CdfsCloseFile(DeviceExtension,FileObject);
 
+ByeBye:
   Irp->IoStatus.Status = Status;
   Irp->IoStatus.Information = 0;