xref: /reactos/drivers/filesystems/vfatfs/pnp.c (revision 5efb6e3d)
1 /*
2  * PROJECT:     VFAT Filesystem
3  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE:     Plug & Play handlers
5  * COPYRIGHT:   Copyright 2010-2015 Pierre Schweitzer <pierre@reactos.org>
6  */
7 
8 /* INCLUDES *****************************************************************/
9 
10 #include "vfat.h"
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 /* FUNCTIONS ****************************************************************/
16 
17 NTSTATUS
18 VfatPnp(
19     PVFAT_IRP_CONTEXT IrpContext)
20 {
21     PVCB Vcb = NULL;
22     NTSTATUS Status;
23 
24     /* PRECONDITION */
25     ASSERT(IrpContext);
26 
27     switch (IrpContext->Stack->MinorFunction)
28     {
29         case IRP_MN_QUERY_REMOVE_DEVICE:
30         case IRP_MN_SURPRISE_REMOVAL:
31         case IRP_MN_REMOVE_DEVICE:
32         case IRP_MN_CANCEL_REMOVE_DEVICE:
33             Status = STATUS_NOT_IMPLEMENTED;
34             break;
35 
36         default:
37             IoSkipCurrentIrpStackLocation(IrpContext->Irp);
38             Vcb = (PVCB)IrpContext->Stack->DeviceObject->DeviceExtension;
39             IrpContext->Flags &= ~IRPCONTEXT_COMPLETE;
40             Status = IoCallDriver(Vcb->StorageDevice, IrpContext->Irp);
41     }
42 
43     return Status;
44 }
45