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 ******************************************************************/
17 /* FUNCTIONS *****************************************************************/
20 DriverEntry(PDRIVER_OBJECT DriverObject
,
21 PUNICODE_STRING RegistryPath
)
23 PMSFS_DEVICE_EXTENSION DeviceExtension
;
24 PDEVICE_OBJECT DeviceObject
;
25 UNICODE_STRING DeviceName
;
28 DPRINT("Mailslot FSD 0.0.1\n");
30 DriverObject
->Flags
= 0;
31 DriverObject
->MajorFunction
[IRP_MJ_CREATE
] = MsfsCreate
;
32 DriverObject
->MajorFunction
[IRP_MJ_CREATE_MAILSLOT
] =
34 DriverObject
->MajorFunction
[IRP_MJ_CLOSE
] = MsfsClose
;
35 DriverObject
->MajorFunction
[IRP_MJ_READ
] = MsfsRead
;
36 DriverObject
->MajorFunction
[IRP_MJ_WRITE
] = MsfsWrite
;
37 DriverObject
->MajorFunction
[IRP_MJ_QUERY_INFORMATION
] =
39 DriverObject
->MajorFunction
[IRP_MJ_SET_INFORMATION
] =
41 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
42 // MsfsDirectoryControl;
43 // DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = MsfsFlushBuffers;
44 // DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = MsfsShutdown;
45 // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] =
47 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
49 DriverObject
->MajorFunction
[IRP_MJ_FILE_SYSTEM_CONTROL
] =
50 MsfsFileSystemControl
;
52 DriverObject
->DriverUnload
= NULL
;
54 RtlInitUnicodeString(&DeviceName
,
55 L
"\\Device\\MailSlot");
56 Status
= IoCreateDevice(DriverObject
,
57 sizeof(MSFS_DEVICE_EXTENSION
),
63 if (!NT_SUCCESS(Status
))
68 /* initialize the device object */
69 DeviceObject
->Flags
|= DO_DIRECT_IO
;
71 /* initialize device extension */
72 DeviceExtension
= DeviceObject
->DeviceExtension
;
73 InitializeListHead(&DeviceExtension
->FcbListHead
);
74 KeInitializeMutex(&DeviceExtension
->FcbListLock
,
77 return STATUS_SUCCESS
;