From 560afee25cfd5a350f0cf4423baf66dbe13acf75 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 2 May 2004 22:54:45 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=9289 --- reactos/ntoskrnl/io/xhaldrv.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/reactos/ntoskrnl/io/xhaldrv.c b/reactos/ntoskrnl/io/xhaldrv.c index 3d097eeab65..2c5291f68a1 100644 --- a/reactos/ntoskrnl/io/xhaldrv.c +++ b/reactos/ntoskrnl/io/xhaldrv.c @@ -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 @@ xHalQueryDriveLayout(IN PUNICODE_STRING DeviceName, 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 @@ xHalQueryDriveLayout(IN PUNICODE_STRING DeviceName, Status = STATUS_SUCCESS; } + else + { + Status = STATUS_UNSUCCESSFUL; + } + } + else + { + /* Read the partition table */ + Status = IoReadPartitionTable(DeviceObject, + DiskGeometry.BytesPerSector, + FALSE, + LayoutInfo); } ObDereferenceObject(FileObject);