mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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
|
||||
cleanup.c
|
||||
close.c
|
||||
create.c
|
||||
datasup.c
|
||||
fileinfo.c
|
||||
fileobsup.c
|
||||
flushbuf.c
|
||||
fsctrl.c
|
||||
main.c
|
||||
prefxsup.c
|
||||
read.c
|
||||
readsup.c
|
||||
secursup.c
|
||||
seinfo.c
|
||||
statesup.c
|
||||
strucsup.c
|
||||
volinfo.c
|
||||
waitsup.c
|
||||
write.c
|
||||
writesup.c)
|
||||
cleanup.c
|
||||
close.c
|
||||
create.c
|
||||
datasup.c
|
||||
fileinfo.c
|
||||
fileobsup.c
|
||||
flushbuf.c
|
||||
fsctrl.c
|
||||
main.c
|
||||
prefxsup.c
|
||||
read.c
|
||||
readsup.c
|
||||
secursup.c
|
||||
seinfo.c
|
||||
statesup.c
|
||||
strucsup.c
|
||||
volinfo.c
|
||||
waitsup.c
|
||||
write.c
|
||||
writesup.c)
|
||||
|
||||
add_library(npfs SHARED ${SOURCE})
|
||||
set_module_type(npfs kernelmodedriver)
|
||||
|
|
|
@ -75,25 +75,25 @@ NpOpenNamedPipeRootDirectory(IN PNP_DCB Dcb,
|
|||
IN ACCESS_MASK DesiredAccess,
|
||||
IN PLIST_ENTRY List)
|
||||
{
|
||||
IO_STATUS_BLOCK Status;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
PNP_ROOT_DCB_FCB Ccb;
|
||||
PAGED_CODE();
|
||||
|
||||
Status.Status = NpCreateRootDcbCcb(&Ccb);
|
||||
if (NT_SUCCESS(Status.Status))
|
||||
IoStatus.Status = NpCreateRootDcbCcb(&Ccb);
|
||||
if (NT_SUCCESS(IoStatus.Status))
|
||||
{
|
||||
NpSetFileObject(FileObject, Dcb, Ccb, FALSE);
|
||||
++Dcb->CurrentInstances;
|
||||
|
||||
Status.Information = FILE_OPENED;
|
||||
Status.Status = STATUS_SUCCESS;
|
||||
IoStatus.Information = FILE_OPENED;
|
||||
IoStatus.Status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status.Information = 0;
|
||||
IoStatus.Information = 0;
|
||||
}
|
||||
|
||||
return Status;
|
||||
return IoStatus;
|
||||
}
|
||||
|
||||
IO_STATUS_BLOCK
|
||||
|
|
|
@ -211,7 +211,7 @@ NpPeek(IN PDEVICE_OBJECT DeviceObject,
|
|||
PNP_CCB Ccb;
|
||||
PFILE_PIPE_PEEK_BUFFER PeekBuffer;
|
||||
PNP_DATA_QUEUE DataQueue;
|
||||
ULONG BytesPeeked;
|
||||
ULONG_PTR BytesPeeked;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
NTSTATUS Status;
|
||||
PNP_DATA_QUEUE_ENTRY DataEntry;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
//
|
||||
// Npf* -npfs.sys - Npfs Allocations
|
||||
// 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
|
||||
// NpFD - npfs.sys - DCB, directory block
|
||||
// NpFg - npfs.sys - Global storage
|
||||
|
@ -239,7 +239,9 @@ typedef struct _NP_DCB
|
|||
LIST_ENTRY NotifyList;
|
||||
LIST_ENTRY NotifyList2;
|
||||
LIST_ENTRY FcbList;
|
||||
#ifndef _WIN64
|
||||
ULONG Pad;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Common Footer
|
||||
|
@ -265,6 +267,9 @@ typedef struct _NP_FCB
|
|||
USHORT NamedPipeType;
|
||||
LARGE_INTEGER Timeout;
|
||||
LIST_ENTRY CcbList;
|
||||
#ifdef _WIN64
|
||||
PVOID Pad[2];
|
||||
#endif
|
||||
|
||||
//
|
||||
// Common Footer
|
||||
|
@ -436,7 +441,7 @@ NpCreateCcb(IN PNP_FCB Fcb,
|
|||
IN UCHAR CompletionMode,
|
||||
IN ULONG InQuota,
|
||||
IN ULONG OutQuota,
|
||||
OUT PNP_CCB* NewCcb);
|
||||
OUT PNP_CCB *NewCcb);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -454,7 +459,7 @@ NpCreateRootDcb(VOID);
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB* NewRootCcb);
|
||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -561,8 +566,8 @@ NpSetFileObject(IN PFILE_OBJECT FileObject,
|
|||
NODE_TYPE_CODE
|
||||
NTAPI
|
||||
NpDecodeFileObject(IN PFILE_OBJECT FileObject,
|
||||
OUT PVOID* PrimaryContext OPTIONAL,
|
||||
OUT PNP_CCB* Ccb,
|
||||
OUT PVOID *PrimaryContext OPTIONAL,
|
||||
OUT PNP_CCB *Ccb,
|
||||
OUT PULONG NamedPipeEnd OPTIONAL);
|
||||
|
||||
PNP_FCB
|
||||
|
|
|
@ -148,7 +148,7 @@ NpInitializeVcb(VOID)
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB* NewRootCcb)
|
||||
NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb)
|
||||
{
|
||||
PNP_ROOT_DCB_FCB RootCcb;
|
||||
PAGED_CODE();
|
||||
|
@ -304,7 +304,7 @@ NpCreateCcb(IN PNP_FCB Fcb,
|
|||
IN UCHAR CompletionMode,
|
||||
IN ULONG InQuota,
|
||||
IN ULONG OutQuota,
|
||||
OUT PNP_CCB* NewCcb)
|
||||
OUT PNP_CCB *NewCcb)
|
||||
{
|
||||
PNP_CCB Ccb;
|
||||
PNP_NONPAGED_CCB CcbNonPaged;
|
||||
|
|
|
@ -61,7 +61,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
|||
|
||||
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
|
||||
IoStack->Parameters.FileSystemControl.FsControlCode == FSCTL_PIPE_INTERNAL_READ_OVFLOW &&
|
||||
(DataSize < OutBufferSize || MoreProcessing))
|
||||
(DataSize < OutBufferSize || MoreProcessing))
|
||||
{
|
||||
WriteIrp = NpRemoveDataQueueEntry(WriteQueue, TRUE, List);
|
||||
if (WriteIrp)
|
||||
|
@ -74,7 +74,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
|||
|
||||
if (DataEntry->DataEntryType == Unbuffered)
|
||||
{
|
||||
DataEntry->Irp->Overlay.AllocationSize.QuadPart = 0;
|
||||
DataEntry->Irp->Overlay.AllocationSize.QuadPart = 0;
|
||||
}
|
||||
|
||||
BufferSize = *BytesNotWritten;
|
||||
|
@ -94,9 +94,9 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
|||
|
||||
_SEH2_TRY
|
||||
{
|
||||
RtlCopyMemory(Buffer,
|
||||
(PVOID)((ULONG_PTR)OutBuffer + OutBufferSize - *BytesNotWritten),
|
||||
BufferSize);
|
||||
RtlCopyMemory(Buffer,
|
||||
(PVOID)((ULONG_PTR)OutBuffer + OutBufferSize - *BytesNotWritten),
|
||||
BufferSize);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue