ReactOS  0.4.15-dev-439-g292f67a
msfs.c
Go to the documentation of this file.
1 /*
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
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include "msfs.h"
12 
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* FUNCTIONS *****************************************************************/
17 
21 {
22  PMSFS_DEVICE_EXTENSION DeviceExtension;
26 
28 
29  DPRINT("Mailslot FSD 0.0.1\n");
30 
31  DriverObject->Flags = 0;
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] =
47 // MsfsQuerySecurity;
48 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
49 // MsfsSetSecurity;
52 
54 
56  L"\\Device\\MailSlot");
58  sizeof(MSFS_DEVICE_EXTENSION),
59  &DeviceName,
61  0,
62  FALSE,
63  &DeviceObject);
64  if (!NT_SUCCESS(Status))
65  {
66  return Status;
67  }
68 
69  /* initialize the device object */
71 
72  /* initialize device extension */
73  DeviceExtension = DeviceObject->DeviceExtension;
74  InitializeListHead(&DeviceExtension->FcbListHead);
75  KeInitializeMutex(&DeviceExtension->FcbListLock,
76  0);
77 
78  return STATUS_SUCCESS;
79 }
80 
81 /* EOF */
DRIVER_DISPATCH MsfsCreateMailslot
Definition: msfs.h:80
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
DRIVER_DISPATCH MsfsClose
Definition: msfs.h:83
#define IRP_MJ_CREATE_MAILSLOT
KMUTEX FcbListLock
Definition: msfs.h:20
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
LONG NTSTATUS
Definition: precomp.h:26
WCHAR DeviceName[]
Definition: adapter.cpp:21
DRIVER_DISPATCH MsfsRead
Definition: msfs.h:92
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
DRIVER_DISPATCH MsfsFileSystemControl
Definition: msfs.h:98
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
PVOID DeviceExtension
Definition: env_spec_w32.h:418
LIST_ENTRY FcbListHead
Definition: msfs.h:19
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
void DPRINT(...)
Definition: polytest.cpp:61
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IRP_MJ_FILE_SYSTEM_CONTROL
DRIVER_DISPATCH MsfsCreate
Definition: msfs.h:77
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
Definition: mutex.c:67
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2180
DRIVER_DISPATCH MsfsQueryInformation
Definition: msfs.h:86
#define FILE_DEVICE_MAILSLOT
Definition: winioctl.h:117
NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
Definition: msfs.c:19
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569
DRIVER_DISPATCH MsfsSetInformation
Definition: msfs.h:89
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define IRP_MJ_READ
Definition: rdpdr.c:46
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2181
DRIVER_DISPATCH MsfsWrite
Definition: msfs.h:95
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:28
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
return STATUS_SUCCESS
Definition: btrfs.c:3014