Sync with trunk for console graphics palettes.
[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 /* GLOBALS *****************************************************************/
35
36
37 /* FUNCTIONS ****************************************************************/
38
39 /*
40 * FUNCTION: Called by the system to initialize the driver
41 * ARGUMENTS:
42 * DriverObject = object describing this driver
43 * RegistryPath = path to our configuration entries
44 * RETURNS: Success or failure
45 */
46 NTSTATUS NTAPI
47 DriverEntry(PDRIVER_OBJECT DriverObject,
48 PUNICODE_STRING RegistryPath)
49 {
50 PDEVICE_OBJECT DeviceObject;
51 NTSTATUS Status;
52 UNICODE_STRING DeviceName;
53
54 UNREFERENCED_PARAMETER(RegistryPath);
55
56 DPRINT("MUP 0.0.1\n");
57
58 RtlInitUnicodeString(&DeviceName,
59 L"\\Device\\Mup");
60 Status = IoCreateDevice(DriverObject,
61 sizeof(DEVICE_EXTENSION),
62 &DeviceName,
63 FILE_DEVICE_MULTI_UNC_PROVIDER,
64 0,
65 FALSE,
66 &DeviceObject);
67 if (!NT_SUCCESS(Status))
68 {
69 return Status;
70 }
71
72 /* Initialize driver data */
73 DeviceObject->Flags |= DO_DIRECT_IO;
74 // DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose;
75 DriverObject->MajorFunction[IRP_MJ_CREATE] = MupCreate;
76 DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = MupCreate;
77 DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = MupCreate;
78 // DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead;
79 // DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite;
80 // DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
81 // NtfsFileSystemControl;
82 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
83 // NtfsDirectoryControl;
84 // DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
85 // NtfsQueryInformation;
86 // DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
87 // NtfsQueryVolumeInformation;
88 // DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] =
89 // NtfsSetVolumeInformation;
90
91 DriverObject->DriverUnload = NULL;
92
93
94 /* Initialize global data */
95 // DeviceExtensionNtfsGlobalData = DeviceObject->DeviceExtension;
96 // RtlZeroMemory(NtfsGlobalData,
97 // sizeof(NTFS_GLOBAL_DATA));
98 // NtfsGlobalData->DriverObject = DriverObject;
99 // NtfsGlobalData->DeviceObject = DeviceObject;
100
101 return STATUS_SUCCESS;
102 }
103