Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendispatch.c
Go to the documentation of this file.
00001 /* 00002 * ReactOS kernel 00003 * Copyright (C) 2008 ReactOS Team 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * COPYRIGHT: See COPYING in the top level directory 00020 * PROJECT: ReactOS kernel 00021 * FILE: drivers/filesystem/ntfs/dispatch.c 00022 * PURPOSE: NTFS filesystem driver 00023 * PROGRAMMER: Pierre Schweitzer 00024 * UPDATE HISTORY: 00025 */ 00026 00027 /* INCLUDES *****************************************************************/ 00028 00029 #include "ntfs.h" 00030 00031 #define NDEBUG 00032 #include <debug.h> 00033 00034 /* GLOBALS *****************************************************************/ 00035 00036 00037 /* FUNCTIONS ****************************************************************/ 00038 00039 /* 00040 * FUNCTION: This function manages IRP for various major functions 00041 * ARGUMENTS: 00042 * DriverObject = object describing this driver 00043 * Irp = IRP to be passed to internal functions 00044 * RETURNS: Status of I/O Request 00045 */ 00046 NTSTATUS NTAPI 00047 NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject, 00048 PIRP Irp) 00049 { 00050 PNTFS_IRP_CONTEXT IrpContext = NULL; 00051 NTSTATUS Status = STATUS_UNSUCCESSFUL; 00052 00053 TRACE_(NTFS, "NtfsFsdDispatch()\n"); 00054 00055 FsRtlEnterFileSystem(); 00056 ASSERT(DeviceObject); 00057 ASSERT(Irp); 00058 00059 NtfsIsIrpTopLevel(Irp); 00060 00061 IrpContext = NtfsAllocateIrpContext(DeviceObject, Irp); 00062 if (IrpContext) 00063 { 00064 switch (IrpContext->MajorFunction) 00065 { 00066 case IRP_MJ_QUERY_VOLUME_INFORMATION: 00067 { 00068 Status = NtfsQueryVolumeInformation(IrpContext); 00069 break; 00070 } 00071 case IRP_MJ_SET_VOLUME_INFORMATION: 00072 { 00073 Status = NtfsSetVolumeInformation(IrpContext); 00074 break; 00075 } 00076 } 00077 } 00078 else 00079 Status = STATUS_INSUFFICIENT_RESOURCES; 00080 00081 Irp->IoStatus.Status = Status; 00082 IoCompleteRequest(Irp, IO_NO_INCREMENT); 00083 00084 if (IrpContext) 00085 ExFreePoolWithTag(IrpContext, 'PRIN'); 00086 00087 IoSetTopLevelIrp(NULL); 00088 FsRtlExitFileSystem(); 00089 return Status; 00090 } Generated on Mon May 28 2012 04:19:59 for ReactOS by
1.7.6.1
|