2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/filesystems/msfs/msfs.c
5 * PURPOSE: Mailslot filesystem
6 * PROGRAMMER: Eric Kohl
9 /* INCLUDES ******************************************************************/
16 /* FUNCTIONS *****************************************************************/
19 DriverEntry(PDRIVER_OBJECT DriverObject
,
20 PUNICODE_STRING RegistryPath
)
22 PMSFS_DEVICE_EXTENSION DeviceExtension
;
23 PDEVICE_OBJECT DeviceObject
;
24 UNICODE_STRING DeviceName
;
27 UNREFERENCED_PARAMETER(RegistryPath
);
29 DPRINT("Mailslot FSD 0.0.1\n");
31 DriverObject
->Flags
= 0;
32 DriverObject
->MajorFunction
[IRP_MJ_CREATE
] = MsfsCreate
;
33 DriverObject
->MajorFunction
[IRP_MJ_CREATE_MAILSLOT
] =
35 DriverObject
->MajorFunction
[IRP_MJ_CLOSE
] = MsfsClose
;
36 DriverObject
->MajorFunction
[IRP_MJ_READ
] = MsfsRead
;
37 DriverObject
->MajorFunction
[IRP_MJ_WRITE
] = MsfsWrite
;
38 DriverObject
->MajorFunction
[IRP_MJ_QUERY_INFORMATION
] =
40 DriverObject
->MajorFunction
[IRP_MJ_SET_INFORMATION
] =
42 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
43 // MsfsDirectoryControl;
44 // DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = MsfsFlushBuffers;
45 // DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = MsfsShutdown;
46 // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] =
48 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
50 DriverObject
->MajorFunction
[IRP_MJ_FILE_SYSTEM_CONTROL
] =
51 MsfsFileSystemControl
;
53 DriverObject
->DriverUnload
= NULL
;
55 RtlInitUnicodeString(&DeviceName
,
56 L
"\\Device\\MailSlot");
57 Status
= IoCreateDevice(DriverObject
,
58 sizeof(MSFS_DEVICE_EXTENSION
),
64 if (!NT_SUCCESS(Status
))
69 /* initialize the device object */
70 DeviceObject
->Flags
|= DO_DIRECT_IO
;
72 /* initialize device extension */
73 DeviceExtension
= DeviceObject
->DeviceExtension
;
74 InitializeListHead(&DeviceExtension
->FcbListHead
);
75 KeInitializeMutex(&DeviceExtension
->FcbListLock
,
78 return STATUS_SUCCESS
;