mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +00:00
serial: Fix FileStandardInformation and FilePositionInformation classes
serial: Add FileNetworkOpenInformation class serenum: Pass all requests to next driver, even unknown ones svn path=/trunk/; revision=33430
This commit is contained in:
parent
a173ef04c2
commit
507a803c65
2 changed files with 26 additions and 3 deletions
|
@ -47,6 +47,7 @@ IrpStub(
|
||||||
case IRP_MJ_CREATE:
|
case IRP_MJ_CREATE:
|
||||||
case IRP_MJ_CLOSE:
|
case IRP_MJ_CLOSE:
|
||||||
case IRP_MJ_CLEANUP:
|
case IRP_MJ_CLEANUP:
|
||||||
|
case IRP_MJ_QUERY_INFORMATION:
|
||||||
case IRP_MJ_READ:
|
case IRP_MJ_READ:
|
||||||
case IRP_MJ_WRITE:
|
case IRP_MJ_WRITE:
|
||||||
case IRP_MJ_DEVICE_CONTROL:
|
case IRP_MJ_DEVICE_CONTROL:
|
||||||
|
@ -56,7 +57,7 @@ IrpStub(
|
||||||
WARN_(SERENUM, "FDO stub for major function 0x%lx\n",
|
WARN_(SERENUM, "FDO stub for major function 0x%lx\n",
|
||||||
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
Status = Irp->IoStatus.Status;
|
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +78,7 @@ IrpStub(
|
||||||
WARN_(SERENUM, "PDO stub for major function 0x%lx\n",
|
WARN_(SERENUM, "PDO stub for major function 0x%lx\n",
|
||||||
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
Status = Irp->IoStatus.Status;
|
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ SerialQueryInformation(
|
||||||
StandardInfo->Directory = FALSE;
|
StandardInfo->Directory = FALSE;
|
||||||
StandardInfo->NumberOfLinks = 0;
|
StandardInfo->NumberOfLinks = 0;
|
||||||
StandardInfo->DeletePending = FALSE; /* FIXME: should be TRUE sometimes */
|
StandardInfo->DeletePending = FALSE; /* FIXME: should be TRUE sometimes */
|
||||||
|
Information = sizeof(FILE_STANDARD_INFORMATION);
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -55,13 +56,34 @@ SerialQueryInformation(
|
||||||
ASSERT(PositionInfo);
|
ASSERT(PositionInfo);
|
||||||
|
|
||||||
TRACE_(SERIAL, "IRP_MJ_QUERY_INFORMATION / FilePositionInformation\n");
|
TRACE_(SERIAL, "IRP_MJ_QUERY_INFORMATION / FilePositionInformation\n");
|
||||||
if (BufferLength < sizeof(PFILE_POSITION_INFORMATION))
|
if (BufferLength < sizeof(FILE_POSITION_INFORMATION))
|
||||||
Status = STATUS_BUFFER_OVERFLOW;
|
Status = STATUS_BUFFER_OVERFLOW;
|
||||||
else if (!PositionInfo)
|
else if (!PositionInfo)
|
||||||
Status = STATUS_INVALID_PARAMETER;
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PositionInfo->CurrentByteOffset.QuadPart = 0;
|
PositionInfo->CurrentByteOffset.QuadPart = 0;
|
||||||
|
Information = sizeof(FILE_POSITION_INFORMATION);
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FileNetworkOpenInformation:
|
||||||
|
{
|
||||||
|
PFILE_NETWORK_OPEN_INFORMATION NetworkOpenInfo = (PFILE_NETWORK_OPEN_INFORMATION)SystemBuffer;
|
||||||
|
|
||||||
|
ASSERT(NetworkOpenInfo);
|
||||||
|
|
||||||
|
TRACE_(SERIAL, "IRP_MJ_QUERY_INFORMATION / FileNetworkInformation\n");
|
||||||
|
DbgBreakPoint();
|
||||||
|
if (BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION))
|
||||||
|
Status = STATUS_BUFFER_OVERFLOW;
|
||||||
|
else if (!NetworkOpenInfo)
|
||||||
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RtlZeroMemory(NetworkOpenInfo, sizeof(FILE_NETWORK_OPEN_INFORMATION));
|
||||||
|
Information = sizeof(FILE_NETWORK_OPEN_INFORMATION);
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue