mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
[NPFS]
- Fix x64 build - Some typo and style fixes svn path=/trunk/; revision=60400
This commit is contained in:
parent
d7afb702a8
commit
a86e82a7d4
6 changed files with 45 additions and 40 deletions
|
@ -1,25 +1,25 @@
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
cleanup.c
|
cleanup.c
|
||||||
close.c
|
close.c
|
||||||
create.c
|
create.c
|
||||||
datasup.c
|
datasup.c
|
||||||
fileinfo.c
|
fileinfo.c
|
||||||
fileobsup.c
|
fileobsup.c
|
||||||
flushbuf.c
|
flushbuf.c
|
||||||
fsctrl.c
|
fsctrl.c
|
||||||
main.c
|
main.c
|
||||||
prefxsup.c
|
prefxsup.c
|
||||||
read.c
|
read.c
|
||||||
readsup.c
|
readsup.c
|
||||||
secursup.c
|
secursup.c
|
||||||
seinfo.c
|
seinfo.c
|
||||||
statesup.c
|
statesup.c
|
||||||
strucsup.c
|
strucsup.c
|
||||||
volinfo.c
|
volinfo.c
|
||||||
waitsup.c
|
waitsup.c
|
||||||
write.c
|
write.c
|
||||||
writesup.c)
|
writesup.c)
|
||||||
|
|
||||||
add_library(npfs SHARED ${SOURCE})
|
add_library(npfs SHARED ${SOURCE})
|
||||||
set_module_type(npfs kernelmodedriver)
|
set_module_type(npfs kernelmodedriver)
|
||||||
|
|
|
@ -75,25 +75,25 @@ NpOpenNamedPipeRootDirectory(IN PNP_DCB Dcb,
|
||||||
IN ACCESS_MASK DesiredAccess,
|
IN ACCESS_MASK DesiredAccess,
|
||||||
IN PLIST_ENTRY List)
|
IN PLIST_ENTRY List)
|
||||||
{
|
{
|
||||||
IO_STATUS_BLOCK Status;
|
IO_STATUS_BLOCK IoStatus;
|
||||||
PNP_ROOT_DCB_FCB Ccb;
|
PNP_ROOT_DCB_FCB Ccb;
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
Status.Status = NpCreateRootDcbCcb(&Ccb);
|
IoStatus.Status = NpCreateRootDcbCcb(&Ccb);
|
||||||
if (NT_SUCCESS(Status.Status))
|
if (NT_SUCCESS(IoStatus.Status))
|
||||||
{
|
{
|
||||||
NpSetFileObject(FileObject, Dcb, Ccb, FALSE);
|
NpSetFileObject(FileObject, Dcb, Ccb, FALSE);
|
||||||
++Dcb->CurrentInstances;
|
++Dcb->CurrentInstances;
|
||||||
|
|
||||||
Status.Information = FILE_OPENED;
|
IoStatus.Information = FILE_OPENED;
|
||||||
Status.Status = STATUS_SUCCESS;
|
IoStatus.Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status.Information = 0;
|
IoStatus.Information = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return IoStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
IO_STATUS_BLOCK
|
IO_STATUS_BLOCK
|
||||||
|
|
|
@ -211,7 +211,7 @@ NpPeek(IN PDEVICE_OBJECT DeviceObject,
|
||||||
PNP_CCB Ccb;
|
PNP_CCB Ccb;
|
||||||
PFILE_PIPE_PEEK_BUFFER PeekBuffer;
|
PFILE_PIPE_PEEK_BUFFER PeekBuffer;
|
||||||
PNP_DATA_QUEUE DataQueue;
|
PNP_DATA_QUEUE DataQueue;
|
||||||
ULONG BytesPeeked;
|
ULONG_PTR BytesPeeked;
|
||||||
IO_STATUS_BLOCK IoStatus;
|
IO_STATUS_BLOCK IoStatus;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PNP_DATA_QUEUE_ENTRY DataEntry;
|
PNP_DATA_QUEUE_ENTRY DataEntry;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
//
|
//
|
||||||
// Npf* -npfs.sys - Npfs Allocations
|
// Npf* -npfs.sys - Npfs Allocations
|
||||||
// NpFc - npfs.sys - CCB, client control block
|
// NpFc - npfs.sys - CCB, client control block
|
||||||
// NpFf - npts.sys - FCB, file control block
|
// NpFf - npfs.sys - FCB, file control block
|
||||||
// NpFC - npfs.sys - ROOT_DCB CCB
|
// NpFC - npfs.sys - ROOT_DCB CCB
|
||||||
// NpFD - npfs.sys - DCB, directory block
|
// NpFD - npfs.sys - DCB, directory block
|
||||||
// NpFg - npfs.sys - Global storage
|
// NpFg - npfs.sys - Global storage
|
||||||
|
@ -239,7 +239,9 @@ typedef struct _NP_DCB
|
||||||
LIST_ENTRY NotifyList;
|
LIST_ENTRY NotifyList;
|
||||||
LIST_ENTRY NotifyList2;
|
LIST_ENTRY NotifyList2;
|
||||||
LIST_ENTRY FcbList;
|
LIST_ENTRY FcbList;
|
||||||
|
#ifndef _WIN64
|
||||||
ULONG Pad;
|
ULONG Pad;
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Common Footer
|
// Common Footer
|
||||||
|
@ -265,6 +267,9 @@ typedef struct _NP_FCB
|
||||||
USHORT NamedPipeType;
|
USHORT NamedPipeType;
|
||||||
LARGE_INTEGER Timeout;
|
LARGE_INTEGER Timeout;
|
||||||
LIST_ENTRY CcbList;
|
LIST_ENTRY CcbList;
|
||||||
|
#ifdef _WIN64
|
||||||
|
PVOID Pad[2];
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Common Footer
|
// Common Footer
|
||||||
|
@ -436,7 +441,7 @@ NpCreateCcb(IN PNP_FCB Fcb,
|
||||||
IN UCHAR CompletionMode,
|
IN UCHAR CompletionMode,
|
||||||
IN ULONG InQuota,
|
IN ULONG InQuota,
|
||||||
IN ULONG OutQuota,
|
IN ULONG OutQuota,
|
||||||
OUT PNP_CCB* NewCcb);
|
OUT PNP_CCB *NewCcb);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -454,7 +459,7 @@ NpCreateRootDcb(VOID);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB* NewRootCcb);
|
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -561,8 +566,8 @@ NpSetFileObject(IN PFILE_OBJECT FileObject,
|
||||||
NODE_TYPE_CODE
|
NODE_TYPE_CODE
|
||||||
NTAPI
|
NTAPI
|
||||||
NpDecodeFileObject(IN PFILE_OBJECT FileObject,
|
NpDecodeFileObject(IN PFILE_OBJECT FileObject,
|
||||||
OUT PVOID* PrimaryContext OPTIONAL,
|
OUT PVOID *PrimaryContext OPTIONAL,
|
||||||
OUT PNP_CCB* Ccb,
|
OUT PNP_CCB *Ccb,
|
||||||
OUT PULONG NamedPipeEnd OPTIONAL);
|
OUT PULONG NamedPipeEnd OPTIONAL);
|
||||||
|
|
||||||
PNP_FCB
|
PNP_FCB
|
||||||
|
|
|
@ -148,7 +148,7 @@ NpInitializeVcb(VOID)
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB* NewRootCcb)
|
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb)
|
||||||
{
|
{
|
||||||
PNP_ROOT_DCB_FCB RootCcb;
|
PNP_ROOT_DCB_FCB RootCcb;
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
@ -304,7 +304,7 @@ NpCreateCcb(IN PNP_FCB Fcb,
|
||||||
IN UCHAR CompletionMode,
|
IN UCHAR CompletionMode,
|
||||||
IN ULONG InQuota,
|
IN ULONG InQuota,
|
||||||
IN ULONG OutQuota,
|
IN ULONG OutQuota,
|
||||||
OUT PNP_CCB* NewCcb)
|
OUT PNP_CCB *NewCcb)
|
||||||
{
|
{
|
||||||
PNP_CCB Ccb;
|
PNP_CCB Ccb;
|
||||||
PNP_NONPAGED_CCB CcbNonPaged;
|
PNP_NONPAGED_CCB CcbNonPaged;
|
||||||
|
|
|
@ -61,7 +61,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
||||||
|
|
||||||
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
|
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
|
||||||
IoStack->Parameters.FileSystemControl.FsControlCode == FSCTL_PIPE_INTERNAL_READ_OVFLOW &&
|
IoStack->Parameters.FileSystemControl.FsControlCode == FSCTL_PIPE_INTERNAL_READ_OVFLOW &&
|
||||||
(DataSize < OutBufferSize || MoreProcessing))
|
(DataSize < OutBufferSize || MoreProcessing))
|
||||||
{
|
{
|
||||||
WriteIrp = NpRemoveDataQueueEntry(WriteQueue, TRUE, List);
|
WriteIrp = NpRemoveDataQueueEntry(WriteQueue, TRUE, List);
|
||||||
if (WriteIrp)
|
if (WriteIrp)
|
||||||
|
@ -74,7 +74,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
||||||
|
|
||||||
if (DataEntry->DataEntryType == Unbuffered)
|
if (DataEntry->DataEntryType == Unbuffered)
|
||||||
{
|
{
|
||||||
DataEntry->Irp->Overlay.AllocationSize.QuadPart = 0;
|
DataEntry->Irp->Overlay.AllocationSize.QuadPart = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferSize = *BytesNotWritten;
|
BufferSize = *BytesNotWritten;
|
||||||
|
@ -94,9 +94,9 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
RtlCopyMemory(Buffer,
|
RtlCopyMemory(Buffer,
|
||||||
(PVOID)((ULONG_PTR)OutBuffer + OutBufferSize - *BytesNotWritten),
|
(PVOID)((ULONG_PTR)OutBuffer + OutBufferSize - *BytesNotWritten),
|
||||||
BufferSize);
|
BufferSize);
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue