mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[RAMDISK]
Implement RamdiskQueryDeviceRelations() when the device is a drive According to Hervé, this allows booting ReactOS livecd using PXE (with one of his patch). svn path=/trunk/; revision=65902
This commit is contained in:
parent
9532ddd779
commit
b9f5240173
1 changed files with 37 additions and 2 deletions
|
@ -1731,10 +1731,45 @@ RamdiskQueryDeviceRelations(IN DEVICE_RELATION_TYPE Type,
|
|||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
if (DeviceExtension->Type == RamdiskDrive)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PDEVICE_RELATIONS DeviceRelations;
|
||||
|
||||
//
|
||||
// FIXME: TODO
|
||||
// We're a child device, only handle target device relations
|
||||
//
|
||||
UNIMPLEMENTED_DBGBREAK();
|
||||
if (Type != TargetDeviceRelation)
|
||||
{
|
||||
Status = Irp->IoStatus.Status;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Allocate a buffer big enough to contain only one DO
|
||||
//
|
||||
DeviceRelations = ExAllocatePoolWithTag(PagedPool, sizeof(DeviceRelations), 'dmaR');
|
||||
if (DeviceRelations != NULL)
|
||||
{
|
||||
//
|
||||
// Reference the DO and add it to the buffer
|
||||
//
|
||||
ObReferenceObject(DeviceObject);
|
||||
DeviceRelations->Objects[0] = DeviceObject;
|
||||
DeviceRelations->Count = 1;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
//
|
||||
// Return our processing & complete
|
||||
//
|
||||
Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations;
|
||||
Irp->IoStatus.Status = Status;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue