* Sync up to trunk HEAD (r62285). Branch guys deserve the significant speedups too ;)
[reactos.git] / drivers / filesystems / mup / mup.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS kernel
22 * FILE: drivers/fs/mup/mup.c
23 * PURPOSE: Multi UNC Provider
24 * PROGRAMMER: Eric Kohl
25 */
26
27 /* INCLUDES *****************************************************************/
28
29 #include "mup.h"
30
31 #define NDEBUG
32 #include <debug.h>
33
34 /* FUNCTIONS ****************************************************************/
35
36 /*
37 * FUNCTION: Called by the system to initialize the driver
38 * ARGUMENTS:
39 * DriverObject = object describing this driver
40 * RegistryPath = path to our configuration entries
41 * RETURNS: Success or failure
42 */
43 NTSTATUS NTAPI
44 DriverEntry(PDRIVER_OBJECT DriverObject,
45 PUNICODE_STRING RegistryPath)
46 {
47 PDEVICE_OBJECT DeviceObject;
48 NTSTATUS Status;
49 UNICODE_STRING DeviceName;
50
51 UNREFERENCED_PARAMETER(RegistryPath);
52
53 DPRINT("MUP 0.0.1\n");
54
55 RtlInitUnicodeString(&DeviceName,
56 L"\\Device\\Mup");
57 Status = IoCreateDevice(DriverObject,
58 sizeof(DEVICE_EXTENSION),
59 &DeviceName,
60 FILE_DEVICE_MULTI_UNC_PROVIDER,
61 0,
62 FALSE,
63 &DeviceObject);
64 if (!NT_SUCCESS(Status))
65 {
66 return Status;
67 }
68
69 /* Initialize driver data */
70 DeviceObject->Flags |= DO_DIRECT_IO;
71 // DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose;
72 DriverObject->MajorFunction[IRP_MJ_CREATE] = MupCreate;
73 DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = MupCreate;
74 DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = MupCreate;
75 // DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead;
76 // DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite;
77 // DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
78 // NtfsFileSystemControl;
79 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
80 // NtfsDirectoryControl;
81 // DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
82 // NtfsQueryInformation;
83 // DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
84 // NtfsQueryVolumeInformation;
85 // DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] =
86 // NtfsSetVolumeInformation;
87
88 DriverObject->DriverUnload = NULL;
89
90
91 /* Initialize global data */
92 // DeviceExtensionNtfsGlobalData = DeviceObject->DeviceExtension;
93 // RtlZeroMemory(NtfsGlobalData,
94 // sizeof(NTFS_GLOBAL_DATA));
95 // NtfsGlobalData->DriverObject = DriverObject;
96 // NtfsGlobalData->DeviceObject = DeviceObject;
97
98 return STATUS_SUCCESS;
99 }