2007-05-04 10:15:00 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Drivers
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* FILE: drivers/filesystems/npfs/rw.c
|
|
|
|
* PURPOSE: Named pipe filesystem
|
2007-10-19 23:21:45 +00:00
|
|
|
* PROGRAMMERS:
|
2007-05-04 10:15:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
|
|
|
#include "npfs.h"
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
2008-02-11 16:54:05 +00:00
|
|
|
VOID HexDump(IN PUCHAR Buffer,
|
|
|
|
IN SIZE_T Length)
|
2007-05-04 10:15:00 +00:00
|
|
|
{
|
|
|
|
CHAR Line[65];
|
|
|
|
UCHAR ch;
|
|
|
|
const char Hex[] = "0123456789ABCDEF";
|
2008-02-11 16:54:05 +00:00
|
|
|
ULONG i, j;
|
2007-05-04 10:15:00 +00:00
|
|
|
|
|
|
|
DbgPrint("---------------\n");
|
|
|
|
|
|
|
|
for (i = 0; i < Length; i+= 16)
|
|
|
|
{
|
|
|
|
memset(Line, ' ', 64);
|
|
|
|
Line[64] = 0;
|
|
|
|
|
|
|
|
for (j = 0; j < 16 && j + i < Length; j++)
|
|
|
|
{
|
|
|
|
ch = Buffer[i + j];
|
|
|
|
Line[3*j + 0] = Hex[ch >> 4];
|
|
|
|
Line[3*j + 1] = Hex[ch & 0x0f];
|
|
|
|
Line[48 + j] = isprint(ch) ? ch : '.';
|
|
|
|
}
|
|
|
|
DbgPrint("%s\n", Line);
|
|
|
|
}
|
|
|
|
DbgPrint("---------------\n");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
NTSTATUS NTAPI
|
2008-02-11 16:54:05 +00:00
|
|
|
NpfsRead(IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
2007-05-04 10:15:00 +00:00
|
|
|
{
|
2008-02-11 16:54:05 +00:00
|
|
|
TRACE_(NPFS, "NpfsRead()\n");
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
FsRtlEnterFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
UNIMPLEMENTED;
|
2007-05-04 11:50:41 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
FsRtlExitFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
return STATUS_SUCCESS;
|
2007-05-04 10:15:00 +00:00
|
|
|
}
|
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
NTSTATUS NTAPI
|
2008-02-11 16:54:05 +00:00
|
|
|
NpfsWrite(IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
2007-05-04 10:15:00 +00:00
|
|
|
{
|
2008-02-11 16:54:05 +00:00
|
|
|
TRACE_(NPFS, "NpfsWrite()\n");
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
FsRtlEnterFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
UNIMPLEMENTED;
|
2007-05-04 11:50:41 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
FsRtlExitFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
return STATUS_SUCCESS;
|
2007-05-04 10:15:00 +00:00
|
|
|
}
|
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
NTSTATUS NTAPI
|
2008-02-11 16:54:05 +00:00
|
|
|
NpfsFlushBuffers(IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
2007-05-04 10:15:00 +00:00
|
|
|
{
|
2008-02-11 16:54:05 +00:00
|
|
|
TRACE_(NPFS, "NpfsFlushBuffers()\n");
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
FsRtlEnterFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2008-02-11 16:54:05 +00:00
|
|
|
UNIMPLEMENTED;
|
2007-05-04 10:15:00 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
FsRtlExitFileSystem();
|
2007-05-04 10:15:00 +00:00
|
|
|
|
2007-05-04 11:50:41 +00:00
|
|
|
return STATUS_SUCCESS;
|
2007-05-04 10:15:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|