Commit in reactos/ntoskrnl/io on MAIN
xhaldrv.c+14-141.43 -> 1.44
- Don't read the disk informations at boot time from removable medias like zip drives. 
  This prevents from merging removable disks into the order of partitions from hard disks.

reactos/ntoskrnl/io
xhaldrv.c 1.43 -> 1.44
diff -u -r1.43 -r1.44
--- xhaldrv.c	5 Jan 2004 14:28:20 -0000	1.43
+++ xhaldrv.c	2 May 2004 22:54:45 -0000	1.44
@@ -1,4 +1,4 @@
-/* $Id: xhaldrv.c,v 1.43 2004/01/05 14:28:20 weiden Exp $
+/* $Id: xhaldrv.c,v 1.44 2004/05/02 22:54:45 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -138,22 +138,10 @@
   DPRINT("DiskGeometry.BytesPerSector: %d\n",
 	 DiskGeometry.BytesPerSector);
 
-  /* Read the partition table */
-  Status = IoReadPartitionTable(DeviceObject,
-				DiskGeometry.BytesPerSector,
-				FALSE,
-				LayoutInfo);
-
-  if ((!NT_SUCCESS(Status) || (*LayoutInfo)->PartitionCount == 0) &&
-      DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
+  if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
     {
       PDRIVE_LAYOUT_INFORMATION Buffer;
 
-      if (NT_SUCCESS(Status))
-	{
-	  ExFreePool(*LayoutInfo);
-	}
-
       /* Allocate a partition list for a single entry. */
       Buffer = ExAllocatePool(NonPagedPool,
 			      sizeof(DRIVE_LAYOUT_INFORMATION));
@@ -166,6 +154,18 @@
 
 	  Status = STATUS_SUCCESS;
 	}
+      else
+        {
+	  Status = STATUS_UNSUCCESSFUL;
+	}
+    }
+  else
+    {
+      /* Read the partition table */
+      Status = IoReadPartitionTable(DeviceObject,
+				    DiskGeometry.BytesPerSector,
+				    FALSE,
+				    LayoutInfo);
     }
 
   ObDereferenceObject(FileObject);
CVSspam 0.2.8