Sync with trunk r63831.
[reactos.git] / 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
14 #define NDEBUG
15 #include <debug.h>
16
17 /* FUNCTIONS ****************************************************************/
18
19 NTSTATUS
20 NTAPI
21 FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
22 IN PIRP Irp)
23 {
24 PIO_STACK_LOCATION Stack;
25 NTSTATUS Status;
26 PAGED_CODE();
27
28 /* Get the I/O Stack and check the function type */
29 Stack = IoGetCurrentIrpStackLocation(Irp);
30 switch (Stack->MinorFunction)
31 {
32 case IRP_MN_MOUNT_VOLUME:
33
34 /* We don't validate */
35 Status = STATUS_FS_DRIVER_REQUIRED;
36 break;
37
38 case IRP_MN_LOAD_FILE_SYSTEM:
39
40 /* Load the file system */
41 Status = FsRecLoadFileSystem(DeviceObject,
42 L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Cdfs");
43 break;
44
45 default:
46
47 /* Invalid request */
48 Status = STATUS_INVALID_DEVICE_REQUEST;
49 }
50
51 /* Return Status */
52 return Status;
53 }
54
55 /* EOF */