From 8c408b88eec1b9b2fdd07a88756874fcf7d2a3f1 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 21 Dec 2015 15:37:58 -0800 Subject: [PATCH] sys: remove unused file (idevctl.c) --- src0/sys/idevctl.c | 102 --------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 src0/sys/idevctl.c diff --git a/src0/sys/idevctl.c b/src0/sys/idevctl.c deleted file mode 100644 index 71c3fc1e..00000000 --- a/src0/sys/idevctl.c +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file sys/idevctl.c - * - * @copyright 2015 Bill Zissimopoulos - */ - -#include - -static NTSTATUS FspFsvolInternalDeviceControl( - PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); -FSP_IOCMPL_DISPATCH FspFsvolInternalDeviceControlComplete; -FSP_DRIVER_DISPATCH FspInternalDeviceControl; - -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, FspFsvolInternalDeviceControl) -#pragma alloc_text(PAGE, FspFsvolInternalDeviceControlComplete) -#pragma alloc_text(PAGE, FspInternalDeviceControl) -#endif - -static NTSTATUS FspFsvolInternalDeviceControl( - PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ - PAGED_CODE(); - - NTSTATUS Result = STATUS_INVALID_DEVICE_REQUEST; - switch (IrpSp->Parameters.DeviceIoControl.IoControlCode) - { - case FSP_FSCTL_WORK: - { - FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(DeviceObject); - PDEVICE_OBJECT FsvrtDeviceObject = FsvolDeviceExtension->FsvrtDeviceObject; - - if (!FspDeviceRetain(FsvrtDeviceObject)) - return STATUS_CANCELLED; - try - { - FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension = - FspFsvrtDeviceExtension(FsvrtDeviceObject); - FSP_FSCTL_TRANSACT_REQ *Request = IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; - - ASSERT(0 == Request->Hint); - - /* associate the passed Request with our Irp; acquire ownership of the Request */ - Request->Hint = (UINT_PTR)Irp; - FspIrpRequest(Irp) = Request; - - /* - * Post the IRP to our Ioq; we do this here instead of at IRP_LEAVE_MJ time, - * so that we can disassociate the Request on failure and release ownership - * back to the caller. - */ - if (!FspIoqPostIrp(&FsvrtDeviceExtension->Ioq, Irp)) - { - /* this can only happen if the Ioq was stopped */ - ASSERT(FspIoqStopped(&FsvrtDeviceExtension->Ioq)); - - Request->Hint = 0; - FspIrpRequest(Irp) = 0; - - Result = STATUS_CANCELLED; - goto exit; - } - - Result = STATUS_PENDING; - - exit:; - } - finally - { - FspDeviceRelease(FsvrtDeviceObject); - } - } - break; - } - return Result; -} - -VOID FspFsvolInternalDeviceControlComplete( - PIRP Irp, const FSP_FSCTL_TRANSACT_RSP *Response) -{ - FSP_ENTER_IOC(PAGED_CODE()); - - FSP_LEAVE_IOC("%s", IoctlCodeSym(IrpSp->Parameters.DeviceIoControl.IoControlCode)); -} - -NTSTATUS FspInternalDeviceControl( - PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - FSP_ENTER_MJ(PAGED_CODE()); - - ASSERT(IRP_MJ_INTERNAL_DEVICE_CONTROL == IrpSp->MajorFunction); - - switch (FspDeviceExtension(DeviceObject)->Kind) - { - case FspFsvolDeviceExtensionKind: - FSP_RETURN(Result = FspFsvolInternalDeviceControl(DeviceObject, Irp, IrpSp)); - default: - FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST); - } - - FSP_LEAVE_MJ("%s", IoctlCodeSym(IrpSp->Parameters.DeviceIoControl.IoControlCode)); -}