mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 17:32:32 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
80
drivers/filesystems/msfs/msfs.c
Normal file
80
drivers/filesystems/msfs/msfs.c
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: drivers/filesystems/msfs/msfs.c
|
||||
* PURPOSE: Mailslot filesystem
|
||||
* PROGRAMMER: Eric Kohl
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include "msfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS NTAPI
|
||||
DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||
PUNICODE_STRING RegistryPath)
|
||||
{
|
||||
PMSFS_DEVICE_EXTENSION DeviceExtension;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
UNICODE_STRING DeviceName;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("Mailslot FSD 0.0.1\n");
|
||||
|
||||
DriverObject->Flags = 0;
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = MsfsCreate;
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] =
|
||||
MsfsCreateMailslot;
|
||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = MsfsClose;
|
||||
DriverObject->MajorFunction[IRP_MJ_READ] = MsfsRead;
|
||||
DriverObject->MajorFunction[IRP_MJ_WRITE] = MsfsWrite;
|
||||
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
|
||||
MsfsQueryInformation;
|
||||
DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] =
|
||||
MsfsSetInformation;
|
||||
// DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
|
||||
// MsfsDirectoryControl;
|
||||
// DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = MsfsFlushBuffers;
|
||||
// DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = MsfsShutdown;
|
||||
// DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] =
|
||||
// MsfsQuerySecurity;
|
||||
// DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
|
||||
// MsfsSetSecurity;
|
||||
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
|
||||
MsfsFileSystemControl;
|
||||
|
||||
DriverObject->DriverUnload = NULL;
|
||||
|
||||
RtlInitUnicodeString(&DeviceName,
|
||||
L"\\Device\\MailSlot");
|
||||
Status = IoCreateDevice(DriverObject,
|
||||
sizeof(MSFS_DEVICE_EXTENSION),
|
||||
&DeviceName,
|
||||
FILE_DEVICE_MAILSLOT,
|
||||
0,
|
||||
FALSE,
|
||||
&DeviceObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* initialize the device object */
|
||||
DeviceObject->Flags |= DO_DIRECT_IO;
|
||||
|
||||
/* initialize device extension */
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
InitializeListHead(&DeviceExtension->FcbListHead);
|
||||
KeInitializeMutex(&DeviceExtension->FcbListLock,
|
||||
0);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue