Author: hpoussin
Date: Sun May 11 04:51:46 2008
New Revision: 33430
URL:
http://svn.reactos.org/svn/reactos?rev=33430&view=rev
Log:
serial: Fix FileStandardInformation and FilePositionInformation classes
serial: Add FileNetworkOpenInformation class
serenum: Pass all requests to next driver, even unknown ones
Modified:
trunk/reactos/drivers/serial/serenum/serenum.c
trunk/reactos/drivers/serial/serial/info.c
Modified: trunk/reactos/drivers/serial/serenum/serenum.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/serial/serenum/ser…
==============================================================================
--- trunk/reactos/drivers/serial/serenum/serenum.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/serial/serenum/serenum.c [iso-8859-1] Sun May 11 04:51:46 2008
@@ -47,6 +47,7 @@
case IRP_MJ_CREATE:
case IRP_MJ_CLOSE:
case IRP_MJ_CLEANUP:
+ case IRP_MJ_QUERY_INFORMATION:
case IRP_MJ_READ:
case IRP_MJ_WRITE:
case IRP_MJ_DEVICE_CONTROL:
@@ -56,7 +57,7 @@
WARN_(SERENUM, "FDO stub for major function 0x%lx\n",
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
ASSERT(FALSE);
- Status = Irp->IoStatus.Status;
+ return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
}
}
}
@@ -77,7 +78,7 @@
WARN_(SERENUM, "PDO stub for major function 0x%lx\n",
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
ASSERT(FALSE);
- Status = Irp->IoStatus.Status;
+ return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
}
}
}
Modified: trunk/reactos/drivers/serial/serial/info.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/serial/serial/info…
==============================================================================
--- trunk/reactos/drivers/serial/serial/info.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/serial/serial/info.c [iso-8859-1] Sun May 11 04:51:46 2008
@@ -44,6 +44,7 @@
StandardInfo->Directory = FALSE;
StandardInfo->NumberOfLinks = 0;
StandardInfo->DeletePending = FALSE; /* FIXME: should be TRUE sometimes */
+ Information = sizeof(FILE_STANDARD_INFORMATION);
Status = STATUS_SUCCESS;
}
break;
@@ -55,13 +56,34 @@
ASSERT(PositionInfo);
TRACE_(SERIAL, "IRP_MJ_QUERY_INFORMATION / FilePositionInformation\n");
- if (BufferLength < sizeof(PFILE_POSITION_INFORMATION))
+ if (BufferLength < sizeof(FILE_POSITION_INFORMATION))
Status = STATUS_BUFFER_OVERFLOW;
else if (!PositionInfo)
Status = STATUS_INVALID_PARAMETER;
else
{
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;
}
break;