5b2fbb46167515c1df442202c8e74a30d12c3a6c
[reactos.git] / reactos / drivers / filesystems / fs_rec / cdfs.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS File System Recognizer
4 * FILE: drivers/filesystems/fs_rec/cdfs.c
5 * PURPOSE: CDFS Recognizer
6 * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
7 * Eric Kohl
8 */
9
10 /* INCLUDES *****************************************************************/
11
12 #include "fs_rec.h"
13 #define NDEBUG
14 #include <debug.h>
15
16 /* FUNCTIONS ****************************************************************/
17
18 NTSTATUS
19 NTAPI
20 FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
21 IN PIRP Irp)
22 {
23 PIO_STACK_LOCATION Stack;
24 NTSTATUS Status;
25 PAGED_CODE();
26
27 /* Get the I/O Stack and check the function type */
28 Stack = IoGetCurrentIrpStackLocation(Irp);
29 switch (Stack->MinorFunction)
30 {
31 case IRP_MN_MOUNT_VOLUME:
32
33 /* We don't validate */
34 Status = STATUS_FS_DRIVER_REQUIRED;
35 break;
36
37 case IRP_MN_LOAD_FILE_SYSTEM:
38
39 /* Load the file system */
40 Status = FsRecLoadFileSystem(DeviceObject,
41 L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Cdfs");
42 break;
43
44 default:
45
46 /* Invalid request */
47 Status = STATUS_INVALID_DEVICE_REQUEST;
48 }
49
50 /* Return Status */
51 return Status;
52 }
53
54 /* EOF */