mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- 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
This commit is contained in:
parent
2440a90d73
commit
560afee25c
1 changed files with 14 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue