mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Added code to handle 'Ontrack Disk Manager' harddisks. (Untested!)
svn path=/trunk/; revision=4241
This commit is contained in:
parent
481eddb6df
commit
088b5e86e8
1 changed files with 24 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: xhaldrv.c,v 1.27 2003/03/01 00:00:32 ekohl Exp $
|
||||
/* $Id: xhaldrv.c,v 1.28 2003/03/04 21:58:05 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -55,6 +55,12 @@ typedef struct _MBR
|
|||
USHORT Magic; /* 0x1FE */
|
||||
} PACKED MBR, *PMBR;
|
||||
|
||||
typedef enum _DISK_MANAGER
|
||||
{
|
||||
NoDiskManager,
|
||||
OntrackDiskManager
|
||||
} DISK_MANAGER;
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
@ -620,6 +626,8 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
|||
ULONG Count = 0;
|
||||
ULONG Number = 1;
|
||||
BOOLEAN ExtendedFound = FALSE;
|
||||
PVOID MbrBuffer;
|
||||
DISK_MANAGER DiskManager = NoDiskManager;
|
||||
|
||||
DPRINT("xHalIoReadPartitionTable(%p %lu %x %p)\n",
|
||||
DeviceObject,
|
||||
|
@ -629,6 +637,18 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
*PartitionBuffer = NULL;
|
||||
|
||||
/* Check for 'Ontrack Disk Manager' */
|
||||
xHalExamineMBR(DeviceObject,
|
||||
SectorSize,
|
||||
0x55,
|
||||
&MbrBuffer);
|
||||
if (MbrBuffer != NULL)
|
||||
{
|
||||
DPRINT1("Found 'Ontrack Disk Manager'\n");
|
||||
DiskManager = OntrackDiskManager;
|
||||
ExFreePool(MbrBuffer);
|
||||
}
|
||||
|
||||
SectorBuffer = (PUCHAR)ExAllocatePool(PagedPool,
|
||||
SectorSize);
|
||||
if (SectorBuffer == NULL)
|
||||
|
@ -652,6 +672,9 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
do
|
||||
{
|
||||
if (DiskManager == OntrackDiskManager)
|
||||
PartitionOffset.QuadPart += (63 * 512);
|
||||
|
||||
KeInitializeEvent(&Event,
|
||||
NotificationEvent,
|
||||
FALSE);
|
||||
|
|
Loading…
Reference in a new issue