Author: ekohl
Date: Sun May 7 11:33:40 2006
New Revision: 21816
URL:
http://svn.reactos.ru/svn/reactos?rev=21816&view=rev
Log:
Simplified the access to FCBs and CCBs.
Modified:
trunk/reactos/drivers/filesystems/ms/create.c
trunk/reactos/drivers/filesystems/ms/finfo.c
trunk/reactos/drivers/filesystems/ms/fsctrl.c
Modified: trunk/reactos/drivers/filesystems/ms/create.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/crea…
==============================================================================
--- trunk/reactos/drivers/filesystems/ms/create.c (original)
+++ trunk/reactos/drivers/filesystems/ms/create.c Sun May 7 11:33:40 2006
@@ -79,7 +79,6 @@
}
Fcb = current;
- DPRINT1("Fcb: %p\n", Fcb);
KeAcquireSpinLock(&Fcb->CcbListLock, &oldIrql);
InsertTailList(&Fcb->CcbListHead, &Ccb->CcbListEntry);
Modified: trunk/reactos/drivers/filesystems/ms/finfo.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/finf…
==============================================================================
--- trunk/reactos/drivers/filesystems/ms/finfo.c (original)
+++ trunk/reactos/drivers/filesystems/ms/finfo.c Sun May 7 11:33:40 2006
@@ -18,17 +18,14 @@
/* FUNCTIONS *****************************************************************/
static NTSTATUS
-MsfsQueryMailslotInformation(PMSFS_CCB Ccb,
+MsfsQueryMailslotInformation(PMSFS_FCB Fcb,
PFILE_MAILSLOT_QUERY_INFORMATION Buffer,
PULONG BufferLength)
{
- PMSFS_FCB Fcb;
KIRQL oldIrql;
if (*BufferLength < sizeof(FILE_MAILSLOT_QUERY_INFORMATION))
return(STATUS_BUFFER_OVERFLOW);
-
- Fcb = Ccb->Fcb;
Buffer->MaximumMessageSize = Fcb->MaxMessageSize;
Buffer->ReadTimeout = Fcb->TimeOut;
@@ -53,14 +50,14 @@
static NTSTATUS
-MsfsSetMailslotInformation(PMSFS_CCB Ccb,
+MsfsSetMailslotInformation(PMSFS_FCB Fcb,
PFILE_MAILSLOT_SET_INFORMATION Buffer,
PULONG BufferLength)
{
if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION))
return(STATUS_BUFFER_OVERFLOW);
- Ccb->Fcb->TimeOut = *Buffer->ReadTimeout;
+ Fcb->TimeOut = *Buffer->ReadTimeout;
return(STATUS_SUCCESS);
}
@@ -86,13 +83,13 @@
FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass;
DeviceExtension = DeviceObject->DeviceExtension;
FileObject = IoStack->FileObject;
+ Fcb = (PMSFS_FCB)FileObject->FsContext;
Ccb = (PMSFS_CCB)FileObject->FsContext2;
- Fcb = Ccb->Fcb;
DPRINT("Mailslot name: %wZ\n", &Fcb->Name);
/* querying information is not permitted on client side */
- if (Ccb->Fcb->ServerCcb != Ccb)
+ if (Fcb->ServerCcb != Ccb)
{
Status = STATUS_ACCESS_DENIED;
@@ -111,7 +108,7 @@
switch (FileInformationClass)
{
case FileMailslotQueryInformation:
- Status = MsfsQueryMailslotInformation(Ccb,
+ Status = MsfsQueryMailslotInformation(Fcb,
SystemBuffer,
&BufferLength);
break;
@@ -150,13 +147,13 @@
IoStack = IoGetCurrentIrpStackLocation (Irp);
FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass;
FileObject = IoStack->FileObject;
+ Fcb = (PMSFS_FCB)FileObject->FsContext;
Ccb = (PMSFS_CCB)FileObject->FsContext2;
- Fcb = Ccb->Fcb;
DPRINT("Mailslot name: %wZ\n", &Fcb->Name);
/* setting information is not permitted on client side */
- if (Ccb->Fcb->ServerCcb != Ccb)
+ if (Fcb->ServerCcb != Ccb)
{
Status = STATUS_ACCESS_DENIED;
@@ -178,7 +175,7 @@
switch (FileInformationClass)
{
case FileMailslotSetInformation:
- Status = MsfsSetMailslotInformation(Ccb,
+ Status = MsfsSetMailslotInformation(Fcb,
SystemBuffer,
&BufferLength);
break;
Modified: trunk/reactos/drivers/filesystems/ms/fsctrl.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/fsct…
==============================================================================
--- trunk/reactos/drivers/filesystems/ms/fsctrl.c (original)
+++ trunk/reactos/drivers/filesystems/ms/fsctrl.c Sun May 7 11:33:40 2006
@@ -31,8 +31,8 @@
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
+ Fcb = FileObject->FsContext;
Ccb = FileObject->FsContext2;
- Fcb = Ccb->Fcb;
DPRINT1("Mailslot name: %wZ\n", &Fcb->Name);