Author: ion
Date: Wed Sep 11 07:05:15 2013
New Revision: 60028
URL:
http://svn.reactos.org/svn/reactos?rev=60028&view=rev
Log:
[NPFS-NEW]:
NpfsCreate: 339 tests executed (0 marked as todo, 0 failures), 0 skipped.
NpfsConnect: 679 tests executed (0 marked as todo, 0 failures), 0 skipped.
NpfsReadWrite: 7154 tests executed (0 marked as todo, 0 failures), 0 skipped.
NpfsReadWriteAsync: 1176 tests executed (0 marked as todo, 0 failures), 0 skipped.
'Nuff said.
Modified:
trunk/reactos/drivers/filesystems/npfs_new/cleanup.c
trunk/reactos/drivers/filesystems/npfs_new/close.c
trunk/reactos/drivers/filesystems/npfs_new/create.c
trunk/reactos/drivers/filesystems/npfs_new/datasup.c
trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c
trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c
trunk/reactos/drivers/filesystems/npfs_new/main.c
trunk/reactos/drivers/filesystems/npfs_new/read.c
trunk/reactos/drivers/filesystems/npfs_new/statesup.c
trunk/reactos/drivers/filesystems/npfs_new/write.c
trunk/reactos/drivers/filesystems/npfs_new/writesup.c
Modified: trunk/reactos/drivers/filesystems/npfs_new/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/cleanup.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -12,6 +12,7 @@
PNP_CCB Ccb;
ULONG NamedPipeEnd;
PLIST_ENTRY ThisEntry, NextEntry;
+ PIRP LocalIrp;
PAGED_CODE();
IoStack = IoGetCurrentIrpStackLocation(Irp);
@@ -41,8 +42,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
return STATUS_SUCCESS;
Modified: trunk/reactos/drivers/filesystems/npfs_new/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/close.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -12,6 +12,7 @@
PNP_CCB Ccb;
ULONG NamedPipeEnd;
PLIST_ENTRY ThisEntry, NextEntry;
+ PIRP LocalIrp;
PAGED_CODE();
IoStack = IoGetCurrentIrpStackLocation(Irp);
@@ -40,8 +41,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
Irp->IoStatus.Status = STATUS_SUCCESS;
Modified: trunk/reactos/drivers/filesystems/npfs_new/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/create.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -217,11 +217,6 @@
FileName = FileObject->FileName;
DesiredAccess = IoStack->Parameters.CreatePipe.SecurityContext->DesiredAccess;
- DPRINT1("NpfsCreate(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
- DPRINT1("FileObject %p\n", FileObject);
- DPRINT1("FileName %wZ\n", &FileObject->FileName);
- DPRINT1("FileName->Length: %hu RelatedFileObject: %p\n",
FileName.Length, RelatedFileObject);
-
FsRtlEnterFileSystem();
ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
@@ -346,7 +341,7 @@
NextEntry = NextEntry->Flink;
ListIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(ListIrp, IO_DISK_INCREMENT);
+ IoCompleteRequest(ListIrp, IO_NAMED_PIPE_INCREMENT);
}
FsRtlExitFileSystem();
@@ -636,8 +631,6 @@
IO_STATUS_BLOCK IoStatus;
PIRP ListIrp;
- DPRINT1("NpFsdCreateNamedPipe(DeviceObject %p Irp %p)\n", DeviceObject,
Irp);
-
InitializeListHead(&LocalList);
Process = IoGetRequestorProcess(Irp);
@@ -658,10 +651,6 @@
FsRtlEnterFileSystem();
ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
-
- DPRINT1("FileObject %p\n", FileObject);
- DPRINT1("FileName %wZ\n", &FileObject->FileName);
- DPRINT1("FileName->Length: %hu RelatedFileObject: %p\n",
FileName.Length, RelatedFileObject);
if (RelatedFileObject)
{
@@ -754,13 +743,13 @@
NextEntry = NextEntry->Flink;
ListIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(ListIrp, IO_DISK_INCREMENT);
+ IoCompleteRequest(ListIrp, IO_NAMED_PIPE_INCREMENT);
}
FsRtlExitFileSystem();
Irp->IoStatus = IoStatus;
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);
return IoStatus.Status;
}
Modified: trunk/reactos/drivers/filesystems/npfs_new/datasup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/datasup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/datasup.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -192,6 +192,7 @@
PSECURITY_CLIENT_CONTEXT ClientSecurityContext;
BOOLEAN CompleteWrites, FirstEntry;
PLIST_ENTRY NextEntry, ThisEntry;
+ PIRP LocalIrp;
if (DeviceObject) IoReleaseCancelSpinLock(Irp->CancelIrql);
@@ -263,7 +264,7 @@
NpFreeClientSecurityContext(ClientSecurityContext);
Irp->IoStatus.Status = STATUS_CANCELLED;
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);
NextEntry = List.Flink;
while (NextEntry != &List)
@@ -271,8 +272,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
}
@@ -307,7 +308,10 @@
Irp ? Irp->Tail.Overlay.Thread :
PsGetCurrentThread(),
&ClientContext);
- if (!NT_SUCCESS(Status)) return Status;
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
}
switch (Type)
@@ -317,29 +321,31 @@
case 3:
ASSERT(Irp != NULL);
- DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool, sizeof(*DataEntry),
NPFS_DATA_ENTRY_TAG);
- if (DataEntry)
- {
- DataEntry->DataEntryType = Type;
- DataEntry->QuotaInEntry = 0;
- DataEntry->Irp = Irp;
- DataEntry->DataSize = DataSize;
- DataEntry->ClientSecurityContext = ClientContext;
- ASSERT((DataQueue->QueueState == Empty) || (DataQueue->QueueState
== Who));
- Status = STATUS_PENDING;
- break;
- }
-
- NpFreeClientSecurityContext(ClientContext);
- return STATUS_INSUFFICIENT_RESOURCES;
-
+ DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool,
+ sizeof(*DataEntry),
+ NPFS_DATA_ENTRY_TAG);
+ if (!DataEntry)
+ {
+ NpFreeClientSecurityContext(ClientContext);
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ DataEntry->DataEntryType = Type;
+ DataEntry->QuotaInEntry = 0;
+ DataEntry->Irp = Irp;
+ DataEntry->DataSize = DataSize;
+ DataEntry->ClientSecurityContext = ClientContext;
+ ASSERT((DataQueue->QueueState == Empty) || (DataQueue->QueueState ==
Who));
+ Status = STATUS_PENDING;
+ break;
+
case Buffered:
EntrySize = sizeof(*DataEntry);
- if (Who != Empty)
- {
- EntrySize = DataSize + sizeof(*DataEntry);
- if ((DataSize + sizeof(*DataEntry)) < DataSize)
+ if (Who != ReadEntries)
+ {
+ EntrySize += DataSize;
+ if (EntrySize < DataSize)
{
NpFreeClientSecurityContext(ClientContext);
return STATUS_INVALID_PARAMETER;
@@ -350,14 +356,16 @@
if (DataQueue->Quota - DataQueue->QuotaUsed < QuotaInEntry)
{
QuotaInEntry = DataQueue->Quota - DataQueue->QuotaUsed;
- HasSpace = 1;
+ HasSpace = TRUE;
}
else
{
- HasSpace = 0;
- }
-
- DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool, EntrySize,
NPFS_DATA_ENTRY_TAG);
+ HasSpace = FALSE;
+ }
+
+ DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool,
+ EntrySize,
+ NPFS_DATA_ENTRY_TAG);
if (!DataEntry)
{
NpFreeClientSecurityContext(ClientContext);
@@ -382,9 +390,9 @@
{
_SEH2_TRY
{
- RtlCopyMemory(DataEntry + 1,
- Irp ? Irp->UserBuffer: Buffer,
- DataSize);
+ RtlCopyMemory(DataEntry + 1,
+ Irp ? Irp->UserBuffer: Buffer,
+ DataSize);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
@@ -399,12 +407,14 @@
}
else
{
- DataEntry->Irp = 0;
+ DataEntry->Irp = NULL;
Status = STATUS_SUCCESS;
}
-
- ASSERT((DataQueue->QueueState == Empty) || (DataQueue->QueueState
== Who));
- }
+
+ ASSERT((DataQueue->QueueState == Empty) ||
+ (DataQueue->QueueState == Who));
+ }
+ break;
default:
ASSERT(FALSE);
@@ -429,7 +439,8 @@
DataQueue->QuotaUsed += DataEntry->QuotaInEntry;
DataQueue->QueueState = Who;
DataQueue->BytesInQueue += DataEntry->DataSize;
- ++DataQueue->EntriesInQueue;
+ DataQueue->EntriesInQueue++;
+
if (ByteOffset)
{
DataQueue->ByteOffset = ByteOffset;
@@ -448,9 +459,8 @@
IoSetCancelRoutine(Irp, NpCancelDataQueueIrp);
- if (Irp->Cancel)
- {
- IoSetCancelRoutine(Irp, NULL);
+ if ((Irp->Cancel) && (IoSetCancelRoutine(Irp, NULL)))
+ {
NpCancelDataQueueIrp(NULL, Irp);
}
}
Modified: trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -102,6 +102,7 @@
NTSTATUS Status;
LIST_ENTRY List;
PLIST_ENTRY NextEntry, ThisEntry;
+ PIRP LocalIrp;
PAGED_CODE();
InitializeListHead(&List);
@@ -119,8 +120,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
FsRtlExitFileSystem();
Modified: trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -572,6 +572,7 @@
LIST_ENTRY List;
PLIST_ENTRY NextEntry, ThisEntry;
NTSTATUS Status;
+ PIRP LocalIrp;
PAGED_CODE();
InitializeListHead(&List);
@@ -667,8 +668,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
return Status;
Modified: trunk/reactos/drivers/filesystems/npfs_new/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/main.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -61,8 +61,7 @@
/* Initialize the device object */
NpfsDeviceObject = DeviceObject;
- DeviceObject->Flags |= DO_DIRECT_IO;
- DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
+ DeviceObject->Flags |= DO_LONG_TERM_REQUESTS;
/* Initialize the Volume Control Block (VCB) */
NpVcb = DeviceObject->DeviceExtension;
Modified: trunk/reactos/drivers/filesystems/npfs_new/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/read.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -144,6 +144,7 @@
IO_STATUS_BLOCK IoStatus;
LIST_ENTRY List;
PLIST_ENTRY NextEntry, ThisEntry;
+ PIRP LocalIrp;
PAGED_CODE();
NpSlowReadCalls++;
@@ -168,8 +169,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ LocalIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(LocalIrp, IO_NAMED_PIPE_INCREMENT);
}
FsRtlExitFileSystem();
Modified: trunk/reactos/drivers/filesystems/npfs_new/statesup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/statesup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/statesup.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -235,6 +235,7 @@
PLIST_ENTRY NextEntry;
PNP_DATA_QUEUE ReadQueue, WriteQueue, DataQueue;
PNP_EVENT_BUFFER EventBuffer;
+ PIRP ListIrp;
NonPagedCcb = Ccb->NonPagedCcb;
Fcb = Ccb->Fcb;
@@ -249,11 +250,11 @@
{
NextEntry = RemoveHeadList(&Ccb->IrpList);
- Irp = CONTAINING_RECORD(NextEntry, IRP, Tail.Overlay.ListEntry);
-
- if (IoSetCancelRoutine(Irp, NULL))
- {
- Irp->IoStatus.Status = STATUS_PIPE_BROKEN;
+ ListIrp = CONTAINING_RECORD(NextEntry, IRP, Tail.Overlay.ListEntry);
+
+ if (IoSetCancelRoutine(ListIrp, NULL))
+ {
+ ListIrp->IoStatus.Status = STATUS_PIPE_BROKEN;
InsertTailList(List, NextEntry);
}
else
@@ -297,11 +298,11 @@
while (DataQueue->QueueState != Empty)
{
- Irp = NpRemoveDataQueueEntry(DataQueue, FALSE, List);
- if (Irp)
- {
- Irp->IoStatus.Status = STATUS_PIPE_BROKEN;
- InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
+ ListIrp = NpRemoveDataQueueEntry(DataQueue, FALSE, List);
+ if (ListIrp)
+ {
+ ListIrp->IoStatus.Status = STATUS_PIPE_BROKEN;
+ InsertTailList(List, &ListIrp->Tail.Overlay.ListEntry);
}
}
@@ -342,21 +343,21 @@
while (ReadQueue->QueueState != Empty)
{
- Irp = NpRemoveDataQueueEntry(ReadQueue, FALSE, List);
- if (Irp)
- {
- Irp->IoStatus.Status = STATUS_PIPE_BROKEN;
- InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
- }
- }
-
- while (WriteQueue->QueueState == WriteEntries)
- {
- Irp = NpRemoveDataQueueEntry(WriteQueue, FALSE, List);
- if (Irp)
- {
- Irp->IoStatus.Status = STATUS_PIPE_BROKEN;
- InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
+ ListIrp = NpRemoveDataQueueEntry(ReadQueue, FALSE, List);
+ if (ListIrp)
+ {
+ ListIrp->IoStatus.Status = STATUS_PIPE_BROKEN;
+ InsertTailList(List, &ListIrp->Tail.Overlay.ListEntry);
+ }
+ }
+
+ while (WriteQueue->QueueState == ReadEntries)
+ {
+ ListIrp = NpRemoveDataQueueEntry(WriteQueue, FALSE, List);
+ if (ListIrp)
+ {
+ ListIrp->IoStatus.Status = STATUS_PIPE_BROKEN;
+ InsertTailList(List, &ListIrp->Tail.Overlay.ListEntry);
}
}
Modified: trunk/reactos/drivers/filesystems/npfs_new/write.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/write.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/write.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -40,21 +40,25 @@
NonPagedCcb = Ccb->NonPagedCcb;
ExAcquireResourceExclusiveLite(&NonPagedCcb->Lock, TRUE);
- if (Ccb->NamedPipeState == FILE_PIPE_DISCONNECTED_STATE)
- {
- IoStatus->Status = STATUS_PIPE_DISCONNECTED;
+ if (Ccb->NamedPipeState != FILE_PIPE_CONNECTED_STATE)
+ {
+ if (Ccb->NamedPipeState == FILE_PIPE_DISCONNECTED_STATE)
+ {
+ IoStatus->Status = STATUS_PIPE_DISCONNECTED;
+ }
+ else if (Ccb->NamedPipeState == FILE_PIPE_LISTENING_STATE)
+ {
+ IoStatus->Status = STATUS_PIPE_LISTENING;
+ }
+ else
+ {
+ ASSERT(Ccb->NamedPipeState == FILE_PIPE_CLOSING_STATE);
+ IoStatus->Status = STATUS_PIPE_CLOSING;
+ }
+
WriteOk = TRUE;
goto Quickie;
}
-
- if (Ccb->NamedPipeState == FILE_PIPE_LISTENING_STATE || Ccb->NamedPipeState ==
FILE_PIPE_CLOSING_STATE)
- {
- IoStatus->Status = Ccb->NamedPipeState != FILE_PIPE_LISTENING_STATE ?
STATUS_PIPE_LISTENING : STATUS_PIPE_CLOSING;
- WriteOk = TRUE;
- goto Quickie;
- }
-
- ASSERT(Ccb->NamedPipeState == FILE_PIPE_CONNECTED_STATE);
if ((NamedPipeEnd == FILE_PIPE_SERVER_END &&
Ccb->Fcb->NamedPipeConfiguration == FILE_PIPE_INBOUND) ||
(NamedPipeEnd == FILE_PIPE_CLIENT_END &&
Ccb->Fcb->NamedPipeConfiguration == FILE_PIPE_OUTBOUND))
@@ -111,6 +115,7 @@
Thread,
List);
IoStatus->Status = Status;
+
if (Status == STATUS_MORE_PROCESSING_REQUIRED)
{
ASSERT(WriteQueue->QueueState != ReadEntries);
@@ -153,6 +158,7 @@
IO_STATUS_BLOCK IoStatus;
LIST_ENTRY List;
PLIST_ENTRY NextEntry, ThisEntry;
+ PIRP ListIrp;
PAGED_CODE();
NpSlowWriteCalls++;
@@ -178,8 +184,8 @@
ThisEntry = NextEntry;
NextEntry = NextEntry->Flink;
- Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
- IoCompleteRequest(Irp, IO_DISK_INCREMENT);
+ ListIrp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
+ IoCompleteRequest(ListIrp, IO_NAMED_PIPE_INCREMENT);
}
FsRtlExitFileSystem();
Modified: trunk/reactos/drivers/filesystems/npfs_new/writesup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/writesup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/writesup.c [iso-8859-1] Wed Sep 11 07:05:15
2013
@@ -3,14 +3,14 @@
NTSTATUS
NTAPI
NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
- IN ULONG Mode,
- IN PVOID OutBuffer,
- IN ULONG OutBufferSize,
- IN ULONG PipeType,
- OUT PULONG BytesWritten,
- IN PNP_CCB Ccb,
- IN ULONG NamedPipeEnd,
- IN PETHREAD Thread,
+ IN ULONG Mode,
+ IN PVOID OutBuffer,
+ IN ULONG OutBufferSize,
+ IN ULONG PipeType,
+ OUT PULONG BytesNotWritten,
+ IN PNP_CCB Ccb,
+ IN ULONG NamedPipeEnd,
+ IN PETHREAD Thread,
IN PLIST_ENTRY List)
{
BOOLEAN HaveContext = FALSE, MoreProcessing, AllocatedBuffer;
@@ -23,7 +23,7 @@
PSECURITY_CLIENT_CONTEXT ClientContext;
PAGED_CODE();
- *BytesWritten = OutBufferSize;
+ *BytesNotWritten = OutBufferSize;
MoreProcessing = TRUE;
if ((PipeType != FILE_PIPE_MESSAGE_MODE) || (OutBufferSize))
@@ -33,7 +33,7 @@
for (DataEntry = NpGetNextRealDataQueueEntry(WriteQueue, List);
((WriteQueue->QueueState == ReadEntries) &&
- ((*BytesWritten > 0) || (MoreProcessing)));
+ ((*BytesNotWritten > 0) || (MoreProcessing)));
DataEntry = NpGetNextRealDataQueueEntry(WriteQueue, List))
{
DataSize = DataEntry->DataSize;
@@ -58,7 +58,7 @@
DataEntry->Irp->Overlay.AllocationSize.QuadPart = 0;
}
- BufferSize = *BytesWritten;
+ BufferSize = *BytesNotWritten;
if (BufferSize >= DataSize) BufferSize = DataSize;
if (DataEntry->DataEntryType != Unbuffered && BufferSize)
@@ -76,7 +76,7 @@
_SEH2_TRY
{
RtlCopyMemory(Buffer,
- (PVOID)((ULONG_PTR)OutBuffer + OutBufferSize -
*BytesWritten),
+ (PVOID)((ULONG_PTR)OutBuffer + OutBufferSize -
*BytesNotWritten),
BufferSize);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
@@ -106,7 +106,7 @@
WriteIrp = NpRemoveDataQueueEntry(WriteQueue, TRUE, List);
if (WriteIrp)
{
- *BytesWritten -= BufferSize;
+ *BytesNotWritten -= BufferSize;
WriteIrp->IoStatus.Information = BufferSize;
if (AllocatedBuffer)
@@ -115,7 +115,7 @@
WriteIrp->Flags |= IRP_DEALLOCATE_BUFFER | IRP_BUFFERED_IO |
IRP_INPUT_OPERATION;
}
- if (!*BytesWritten)
+ if (!*BytesNotWritten)
{
MoreProcessing = FALSE;
WriteIrp->IoStatus.Status = STATUS_SUCCESS;
@@ -140,7 +140,7 @@
}
}
- if (*BytesWritten > 0 || MoreProcessing)
+ if (*BytesNotWritten > 0 || MoreProcessing)
{
ASSERT(WriteQueue->QueueState != ReadEntries);
Status = STATUS_MORE_PROCESSING_REQUIRED;