[NTFS] - Fix increasing the mft size, to keep chkdsk happy.
[reactos.git] / drivers / serial / serial / serial.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: Serial driver
4 * FILE: drivers/dd/serial/serial.c
5 * PURPOSE: Serial driver loading/unloading
6 *
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
8 */
9
10 #include "serial.h"
11
12 static DRIVER_UNLOAD DriverUnload;
13 DRIVER_INITIALIZE DriverEntry;
14
15 static VOID NTAPI
16 DriverUnload(IN PDRIVER_OBJECT DriverObject)
17 {
18 // nothing to do here yet
19 }
20
21 /*
22 * Standard DriverEntry method.
23 */
24 NTSTATUS NTAPI
25 DriverEntry(
26 IN PDRIVER_OBJECT DriverObject,
27 IN PUNICODE_STRING RegPath)
28 {
29 ULONG i;
30
31 DriverObject->DriverUnload = DriverUnload;
32 DriverObject->DriverExtension->AddDevice = SerialAddDevice;
33
34 for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
35 DriverObject->MajorFunction[i] = ForwardIrpAndForget;
36 DriverObject->MajorFunction[IRP_MJ_CREATE] = SerialCreate;
37 DriverObject->MajorFunction[IRP_MJ_CLOSE] = SerialClose;
38 DriverObject->MajorFunction[IRP_MJ_CLEANUP] = SerialCleanup;
39 DriverObject->MajorFunction[IRP_MJ_READ] = SerialRead;
40 DriverObject->MajorFunction[IRP_MJ_WRITE] = SerialWrite;
41 DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = SerialDeviceControl;
42 DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = SerialQueryInformation;
43 DriverObject->MajorFunction[IRP_MJ_PNP] = SerialPnp;
44 DriverObject->MajorFunction[IRP_MJ_POWER] = SerialPower;
45
46 return STATUS_SUCCESS;
47 }