3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: services/fs/np/mount.c
6 * PURPOSE: Named pipe filesystem
7 * PROGRAMMER: David Welch <welch@cwcom.net>
10 /* INCLUDES ******************************************************************/
12 #include <ddk/ntddk.h>
18 /* FUNCTIONS *****************************************************************/
21 DriverEntry(PDRIVER_OBJECT DriverObject,
22 PUNICODE_STRING RegistryPath)
24 PNPFS_DEVICE_EXTENSION DeviceExtension;
25 PDEVICE_OBJECT DeviceObject;
26 UNICODE_STRING DeviceName;
29 DbgPrint("Named Pipe FSD 0.0.2\n");
31 DriverObject->MajorFunction[IRP_MJ_CREATE] = NpfsCreate;
32 DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] =
34 DriverObject->MajorFunction[IRP_MJ_CLOSE] = NpfsClose;
35 DriverObject->MajorFunction[IRP_MJ_READ] = NpfsRead;
36 DriverObject->MajorFunction[IRP_MJ_WRITE] = NpfsWrite;
37 DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
39 DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] =
41 DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
42 NpfsQueryVolumeInformation;
43 // DriverObject->MajorFunction[IRP_MJ_CLEANUP] = NpfsCleanup;
44 // DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = NpfsFlushBuffers;
45 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
46 // NpfsDirectoryControl;
47 DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
48 NpfsFileSystemControl;
49 // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] =
51 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
54 DriverObject->DriverUnload = NULL;
56 RtlInitUnicodeString(&DeviceName, L"\\Device\\NamedPipe");
57 Status = IoCreateDevice(DriverObject,
58 sizeof(NPFS_DEVICE_EXTENSION),
60 FILE_DEVICE_NAMED_PIPE,
64 if (!NT_SUCCESS(Status))
66 DPRINT("Failed to create named pipe device! (Status %x)\n", Status);
70 /* initialize the device object */
71 DeviceObject->Flags = DO_DIRECT_IO;
73 /* initialize the device extension */
74 DeviceExtension = DeviceObject->DeviceExtension;
75 InitializeListHead(&DeviceExtension->PipeListHead);
76 KeInitializeMutex(&DeviceExtension->PipeListLock,
79 /* set the size quotas */
80 DeviceExtension->MinQuota = PAGE_SIZE;
81 DeviceExtension->DefaultQuota = 8 * PAGE_SIZE;
82 DeviceExtension->MaxQuota = 64 * PAGE_SIZE;
84 return(STATUS_SUCCESS);