Commit in reactos/drivers/fs/vfat on MAIN
create.c+18-241.69 -> 1.70
fsctl.c+5-231.32 -> 1.33
vfat.h+1-41.64 -> 1.65
+24-51
3 modified files
- Removed the using of the media change count to recognize a median change.

reactos/drivers/fs/vfat
create.c 1.69 -> 1.70
diff -u -r1.69 -r1.70
--- create.c	3 Jul 2004 17:31:30 -0000	1.69
+++ create.c	5 Jul 2004 21:39:02 -0000	1.70
@@ -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: create.c,v 1.69 2004/07/03 17:31:30 hbirr Exp $
+/* $Id: create.c,v 1.70 2004/07/05 21:39:02 hbirr Exp $
  *
  * PROJECT:          ReactOS kernel
  * FILE:             drivers/fs/vfat/create.c
@@ -178,7 +178,7 @@
   PVOID Page;
   PVFATFCB rcFcb;
   BOOLEAN FoundLong;
-  BOOLEAN FoundShort;
+  BOOLEAN FoundShort = FALSE;
   UNICODE_STRING PathNameU;
   BOOLEAN WildCard;
   PWCHAR curr, last;
@@ -339,8 +339,7 @@
   PVFATFCB ParentFcb;
   PVFATFCB Fcb;
   NTSTATUS Status;
-  ULONG Size;
-  ULONG MediaChangeCount;
+
 
 //  PDEVICE_OBJECT DeviceObject = DeviceExt->StorageDevice->Vpb->DeviceObject;
   
@@ -373,39 +372,34 @@
 
   if (!DeviceExt->FatInfo.FixedMedia)
     {
-      Size = sizeof(ULONG);
       Status = VfatBlockDeviceIoControl (DeviceExt->StorageDevice,
 					 IOCTL_DISK_CHECK_VERIFY,
 					 NULL,
 					 0,
-					 &MediaChangeCount,
-					 &Size,
+					 NULL,
+					 0,
 					 FALSE);
 
-      if (Status == STATUS_VERIFY_REQUIRED || MediaChangeCount != DeviceExt->MediaChangeCount)
+      if (Status == STATUS_VERIFY_REQUIRED) 
+
         {
           PDEVICE_OBJECT DeviceToVerify;
 
           DPRINT ("Media change detected!\n");
           DPRINT ("Device %p\n", DeviceExt->StorageDevice);
 
-          DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ());
-          IoSetDeviceToVerify (PsGetCurrentThread (),
+	  DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ());
+	  
+	  IoSetDeviceToVerify (PsGetCurrentThread (),
 			       NULL);
-
-          Status = IoVerifyVolume (DeviceToVerify,
-			          FALSE);
-          if (!NT_SUCCESS(Status))
-	    {
-	      DPRINT ("Status %lx\n", Status);
-	      return Status;
-	    }
-        }
-      else if (!NT_SUCCESS(Status))
-        {
-          DPRINT ("Status %lx\n", Status);
-          return Status;
-        }
+          Status = IoVerifyVolume (DeviceExt->StorageDevice,
+			           FALSE);
+	}
+      if (!NT_SUCCESS(Status))
+	{
+	  DPRINT ("Status %lx\n", Status);
+	  return Status;
+	}
     }
 
 

reactos/drivers/fs/vfat
fsctl.c 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- fsctl.c	23 Jun 2004 20:23:59 -0000	1.32
+++ fsctl.c	5 Jul 2004 21:39:02 -0000	1.33
@@ -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: fsctl.c,v 1.32 2004/06/23 20:23:59 hbirr Exp $
+/* $Id: fsctl.c,v 1.33 2004/07/05 21:39:02 hbirr Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -275,7 +275,6 @@
 {
    NTSTATUS Status;
    BOOLEAN RecognizedFS;
-   ULONG Size;
 
    DPRINT("Mounting VFAT device...\n");
 
@@ -286,21 +285,6 @@
    }
    DPRINT("MountVfatdev %d, PAGE_SIZE = %d\n", DeviceExt->FatInfo.BytesPerCluster, PAGE_SIZE);
 
-   if (!DeviceExt->FatInfo.FixedMedia)
-     {
-       Size = sizeof(ULONG);
-       Status = VfatBlockDeviceIoControl (DeviceToMount,
-					  IOCTL_DISK_CHECK_VERIFY,
-					  NULL,
-					  0,
-					  &DeviceExt->MediaChangeCount,
-					  &Size,
-					  FALSE);
-       if (!NT_SUCCESS(Status))
-         {
-	   return Status;
-	 }
-     }
 
    return(STATUS_SUCCESS);
 }
@@ -498,20 +482,19 @@
   NTSTATUS Status = STATUS_SUCCESS;
   FATINFO FatInfo;
   BOOLEAN RecognizedFS;
-  ULONG Size;
   PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
 
   DPRINT("VfatVerify(IrpContext %x)\n", IrpContext);
 
   DeviceToVerify = IrpContext->Stack->Parameters.VerifyVolume.DeviceObject;
-  Size = sizeof(ULONG);
   Status = VfatBlockDeviceIoControl(DeviceToVerify,
 				    IOCTL_DISK_CHECK_VERIFY,
 				    NULL,
 				    0,
-				    &DeviceExt->MediaChangeCount,
-				    &Size,
-				    FALSE);
+				    NULL,
+				    0,
+				    TRUE);
+  DeviceToVerify->Flags &= ~DO_VERIFY_VOLUME;
   if (!NT_SUCCESS(Status) && Status != STATUS_VERIFY_REQUIRED)
     {
       DPRINT("VfatBlockDeviceIoControl() failed (Status %lx)\n", Status);
@@ -533,7 +516,6 @@
 	   *   Each write to the root directory must update this crc sum.
            */
   
-          DeviceToVerify->Flags &= ~DO_VERIFY_VOLUME;
         }
       else
       	{

reactos/drivers/fs/vfat
vfat.h 1.64 -> 1.65
diff -u -r1.64 -r1.65
--- vfat.h	23 Jun 2004 20:23:59 -0000	1.64
+++ vfat.h	5 Jul 2004 21:39:02 -0000	1.65
@@ -1,4 +1,4 @@
-/* $Id: vfat.h,v 1.64 2004/06/23 20:23:59 hbirr Exp $ */
+/* $Id: vfat.h,v 1.65 2004/07/05 21:39:02 hbirr Exp $ */
 
 #include <ddk/ntifs.h>
 
@@ -163,9 +163,6 @@
   struct _VFATFCB * VolumeFcb;
 
   LIST_ENTRY VolumeListEntry;
-
-  ULONG MediaChangeCount;
-
 } DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
 
 typedef struct
CVSspam 0.2.8