Added stubs for missing partition functions

svn path=/trunk/; revision=1951
This commit is contained in:
Eric Kohl 2001-06-08 15:11:04 +00:00
parent 624e3335e1
commit 18b431ed17
6 changed files with 292 additions and 256 deletions

View file

@ -1,6 +1,6 @@
#ifndef _INCLUDE_DDK_IOFUNCS_H
#define _INCLUDE_DDK_IOFUNCS_H
/* $Id: iofuncs.h,v 1.23 2001/05/01 23:08:17 chorns Exp $ */
/* $Id: iofuncs.h,v 1.24 2001/06/08 15:06:51 ekohl Exp $ */
/* --- EXPORTED BY NTOSKRNL --- */
@ -1181,7 +1181,7 @@ IoWritePartitionTable (
ULONG SectorSize,
ULONG SectorsPerTrack,
ULONG NumberOfHeads,
PDRIVE_LAYOUT_INFORMATION * PartitionBuffer
PDRIVE_LAYOUT_INFORMATION PartitionBuffer
);

View file

@ -1,9 +1,9 @@
/* $Id: drive.c,v 1.2 2000/06/30 22:51:34 ekohl Exp $
/* $Id: drive.c,v 1.3 2001/06/08 15:08:36 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/x86/drive.c
* PURPOSE: Drive letters
* PURPOSE: Drive letter assignment
* PROGRAMMER:
* UPDATE HISTORY:
* 2000-03-25
@ -17,14 +17,11 @@
/* FUNCTIONS *****************************************************************/
VOID
STDCALL
IoAssignDriveLetters (
IN PLOADER_PARAMETER_BLOCK LoaderBlock,
VOID STDCALL
IoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN PSTRING NtDeviceName,
OUT PUCHAR NtSystemPath,
OUT PSTRING NtSystemPathString
)
OUT PSTRING NtSystemPathString)
{
#ifdef __NTOSKRNL__
HalDispatchTable.HalIoAssignDriveLetters(LoaderBlock,

View file

@ -1,4 +1,4 @@
/* $Id: parttab.c,v 1.3 2000/08/21 00:12:20 ekohl Exp $
/* $Id: parttab.c,v 1.4 2001/06/08 15:08:36 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -19,14 +19,11 @@
/* FUNCTIONS *****************************************************************/
NTSTATUS
STDCALL
IoReadPartitionTable (
PDEVICE_OBJECT DeviceObject,
NTSTATUS STDCALL
IoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
BOOLEAN ReturnRecognizedPartitions,
PDRIVE_LAYOUT_INFORMATION * PartitionBuffer
)
PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
{
#ifdef __NTOSKRNL__
return HalDispatchTable.HalIoReadPartitionTable(DeviceObject,
@ -41,29 +38,47 @@ IoReadPartitionTable (
#endif
}
NTSTATUS
STDCALL
IoSetPartitionInformation (
PDEVICE_OBJECT DeviceObject,
NTSTATUS STDCALL
IoSetPartitionInformation(PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
ULONG PartitionNumber,
ULONG PartitionType)
{
UNIMPLEMENTED;
#ifdef __NTOSKRNL__
return HalDispatchTable.HalIoSetPartitionInformation(DeviceObject,
SectorSize,
PartitionNumber,
PartitionType);
#else
return HalDispatchTable->HalIoSetPartitionInformation(DeviceObject,
SectorSize,
PartitionNumber,
PartitionType);
#endif
}
NTSTATUS
STDCALL
IoWritePartitionTable (
PDEVICE_OBJECT DeviceObject,
NTSTATUS STDCALL
IoWritePartitionTable(PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
ULONG SectorsPerTrack,
ULONG NumberOfHeads,
PDRIVE_LAYOUT_INFORMATION * PBuffer
)
PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
{
UNIMPLEMENTED;
#ifdef __NTOSKRNL__
return HalDispatchTable.HalIoWritePartitionTable(DeviceObject,
SectorSize,
SectorsPerTrack,
NumberOfHeads,
PartitionBuffer);
#else
return HalDispatchTable->HalIoWritePartitionTable(DeviceObject,
SectorSize,
SectorsPerTrack,
NumberOfHeads,
PartitionBuffer);
#endif
}
/* EOF */

View file

@ -1,32 +1,35 @@
#ifndef __INCLUDE_INTERNAL_XHAL_H
#define __INCLUDE_INTERNAL_XHAL_H
VOID
FASTCALL
xHalExamineMBR (
IN PDEVICE_OBJECT DeviceObject,
VOID FASTCALL
xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
IN ULONG MBRTypeIdentifier,
OUT PVOID * Buffer
);
OUT PVOID *Buffer);
VOID
FASTCALL
xHalIoAssignDriveLetters (
IN PLOADER_PARAMETER_BLOCK LoaderBlock,
VOID FASTCALL
xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN PSTRING NtDeviceName,
OUT PUCHAR NtSystemPath,
OUT PSTRING NtSystemPathString
);
OUT PSTRING NtSystemPathString);
NTSTATUS
FASTCALL
xHalIoReadPartitionTable (
PDEVICE_OBJECT DeviceObject,
NTSTATUS FASTCALL
xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
BOOLEAN ReturnRecognizedPartitions,
PDRIVE_LAYOUT_INFORMATION * PartitionBuffer
);
PDRIVE_LAYOUT_INFORMATION *PartitionBuffer);
NTSTATUS FASTCALL
xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
IN ULONG PartitionNumber,
IN ULONG PartitionType);
NTSTATUS STDCALL
xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
IN ULONG SectorsPerTrack,
IN ULONG NumberOfHeads,
IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer);
#endif

View file

@ -1,4 +1,4 @@
/* $Id: xhaldisp.c,v 1.3 2001/02/10 22:51:09 dwelch Exp $
/* $Id: xhaldisp.c,v 1.4 2001/06/08 15:11:04 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -27,8 +27,8 @@ HAL_DISPATCH EXPORTED HalDispatchTable =
xHalExamineMBR,
xHalIoAssignDriveLetters,
xHalIoReadPartitionTable,
NULL, // xHalIoSetPartitionInformation,
NULL, // xHalIoWritePartitionTable,
xHalIoSetPartitionInformation,
xHalIoWritePartitionTable,
NULL, // HalReferenceHandlerForBus
NULL, // HalReferenceBusHandler
NULL // HalDereferenceBusHandler

View file

@ -1,4 +1,4 @@
/* $Id: xhaldrv.c,v 1.9 2001/06/07 21:16:41 ekohl Exp $
/* $Id: xhaldrv.c,v 1.10 2001/06/08 15:11:04 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -66,10 +66,8 @@ typedef struct _PARTITION_TABLE
/* FUNCTIONS *****************************************************************/
static NTSTATUS
xHalpQueryDriveLayout (
IN PUNICODE_STRING DeviceName,
OUT PDRIVE_LAYOUT_INFORMATION *LayoutInfo
)
xHalpQueryDriveLayout(IN PUNICODE_STRING DeviceName,
OUT PDRIVE_LAYOUT_INFORMATION *LayoutInfo)
{
IO_STATUS_BLOCK StatusBlock;
DISK_GEOMETRY DiskGeometry;
@ -83,9 +81,7 @@ xHalpQueryDriveLayout (
DeviceName,
LayoutInfo);
/*
* Get the drives sector size
*/
/* Get the drives sector size */
Status = IoGetDeviceObjectPointer(DeviceName,
FILE_READ_DATA,
&FileObject,
@ -115,10 +111,15 @@ xHalpQueryDriveLayout (
return STATUS_INSUFFICIENT_RESOURCES;
}
Status = IoCallDriver(DeviceObject, Irp);
Status = IoCallDriver(DeviceObject,
Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
KeWaitForSingleObject(&Event,
Executive,
KernelMode,
FALSE,
NULL);
Status = StatusBlock.Status;
}
if (!NT_SUCCESS(Status))
@ -219,12 +220,11 @@ xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject,
*Buffer = (PVOID)LocalBuffer;
}
static VOID
HalpAssignDrive (
IN PUNICODE_STRING PartitionName,
HalpAssignDrive(IN PUNICODE_STRING PartitionName,
IN OUT PULONG DriveMap,
IN ULONG DriveNumber
)
IN ULONG DriveNumber)
{
WCHAR DriveNameBuffer[8];
UNICODE_STRING DriveName;
@ -732,7 +732,7 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
IsRecognizedPartition (PartitionTable->Partition[i].PartitionType);
LayoutBuffer->PartitionEntry[Count].RewritePartition = FALSE;
DPRINT1(" %ld: nr: %d boot: %1x type: %x start: 0x%I64x count: 0x%I64x\n",
DPRINT(" %ld: nr: %d boot: %1x type: %x start: 0x%I64x count: 0x%I64x\n",
Count,
LayoutBuffer->PartitionEntry[Count].PartitionNumber,
LayoutBuffer->PartitionEntry[Count].BootIndicator,
@ -764,4 +764,25 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
return STATUS_SUCCESS;
}
NTSTATUS FASTCALL
xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
IN ULONG PartitionNumber,
IN ULONG PartitionType)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS FASTCALL
xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
IN ULONG SectorsPerTrack,
IN ULONG NumberOfHeads,
IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
{
return STATUS_NOT_IMPLEMENTED;
}
/* EOF */