| 753 | } |
| 754 | |
| 755 | NTSTATUS |
| 756 | Ext2DeviceControl (IN PEXT2_IRP_CONTEXT IrpContext) |
| 757 | { |
| 758 | PIRP Irp; |
| 759 | PIO_STACK_LOCATION irpSp; |
| 760 | ULONG code; |
| 761 | ULONG length; |
| 762 | NTSTATUS Status; |
| 763 | |
| 764 | ASSERT(IrpContext); |
| 765 | |
| 766 | ASSERT((IrpContext->Identifier.Type == EXT2ICX) && |
| 767 | (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT))); |
| 768 | |
| 769 | Irp = IrpContext->Irp; |
| 770 | |
| 771 | irpSp = IoGetCurrentIrpStackLocation(Irp); |
| 772 | |
| 773 | code = irpSp->Parameters.DeviceIoControl.IoControlCode; |
| 774 | length = irpSp->Parameters.DeviceIoControl.OutputBufferLength; |
| 775 | |
| 776 | switch (code) { |
| 777 | |
| 778 | case IOCTL_APP_VOLUME_PROPERTY: |
| 779 | Status = Ext2ProcessUserProperty( |
| 780 | IrpContext, |
| 781 | Irp->AssociatedIrp.SystemBuffer, |
| 782 | length |
| 783 | ); |
| 784 | break; |
| 785 | |
| 786 | case IOCTL_APP_QUERY_PERFSTAT: |
| 787 | Status = Ex2ProcessUserPerfStat( |
| 788 | IrpContext, |
| 789 | Irp->AssociatedIrp.SystemBuffer, |
| 790 | length |
| 791 | ); |
| 792 | break; |
| 793 | |
| 794 | case IOCTL_APP_MOUNT_POINT: |
| 795 | Status = Ex2ProcessMountPoint( |
| 796 | IrpContext, |
| 797 | Irp->AssociatedIrp.SystemBuffer, |
| 798 | length |
| 799 | ); |
| 800 | break; |
| 801 | |
| 802 | #if EXT2_UNLOAD |
| 803 | case IOCTL_PREPARE_TO_UNLOAD: |
| 804 | Status = Ext2PrepareToUnload(IrpContext); |
| 805 | break; |
| 806 | #endif |
| 807 | default: |
| 808 | Status = Ext2DeviceControlNormal(IrpContext); |
| 809 | } |
| 810 | |
| 811 | return Status; |
| 812 | } |
no test coverage detected