NTFS driver improvments :

- Implemented NtfsFsdDispatch to dispatch some IO requests (use it with implemented functions that need it)
- Implemented NtfsIsIrpTopLevel (From Rajeev Nagar), NtfsAllocateIrpContext
- Added more checks
- Renamed functions that are called by IO to NtfsFsd* (similar to Windows NTFS driver)
- Use NTAPI instead of STDCALL to have MSVC compatibility, thanks to Hervé
- Reorganized functions order with increasing index
- Updated files headers

svn path=/trunk/; revision=32253
This commit is contained in:
Pierre Schweitzer 2008-02-10 11:20:29 +00:00
parent b78400c9f4
commit 47b892354b
16 changed files with 291 additions and 102 deletions

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/fs/ntfs/attrib.c
* FILE: drivers/filesystem/ntfs/attrib.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
* Updated by Valentin Verkhovsky 2003/09/12

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/blockdev.c
* FILE: drivers/filesystem/ntfs/blockdev.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/close.c
* FILE: drivers/filesystem/ntfs/close.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Art Yerkes
* UPDATE HISTORY:
@ -79,8 +77,8 @@ NtfsCloseFile(PDEVICE_EXTENSION DeviceExt,
}
NTSTATUS STDCALL
NtfsClose(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension;

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/create.c
* FILE: drivers/filesystem/ntfs/create.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/
@ -205,8 +203,8 @@ NtfsCreateFile(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
NtfsCreate(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PDEVICE_EXTENSION DeviceExt;

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/fs/ntfs/dirctl.c
* FILE: drivers/filesystem/ntfs/dirctl.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/
@ -670,8 +668,8 @@ NtfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
NTSTATUS STDCALL
NtfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PIO_STACK_LOCATION Stack;

View file

@ -0,0 +1,90 @@
/*
* ReactOS kernel
* Copyright (C) 2008 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/filesystem/ntfs/dispatch.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Pierre Schweitzer
* UPDATE HISTORY:
*/
/* INCLUDES *****************************************************************/
#include "ntfs.h"
#define NDEBUG
#include <debug.h>
/* GLOBALS *****************************************************************/
/* FUNCTIONS ****************************************************************/
/*
* FUNCTION: This function manages IRP for various major functions
* ARGUMENTS:
* DriverObject = object describing this driver
* Irp = IRP to be passed to internal functions
* RETURNS: Status of I/O Request
*/
NTSTATUS NTAPI
NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PNTFS_IRP_CONTEXT IrpContext = NULL;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
TRACE_(NTFS, "NtfsFsdDispatch()\n");
FsRtlEnterFileSystem();
ASSERT(DeviceObject);
ASSERT(Irp);
NtfsIsIrpTopLevel(Irp);
IrpContext = NtfsAllocateIrpContext(DeviceObject, Irp);
if (IrpContext)
{
switch (IrpContext->MajorFunction)
{
case IRP_MJ_QUERY_VOLUME_INFORMATION:
{
Status = NtfsQueryVolumeInformation(IrpContext);
break;
}
case IRP_MJ_SET_VOLUME_INFORMATION:
{
Status = NtfsSetVolumeInformation(IrpContext);
break;
}
}
}
else
Status = STATUS_INSUFFICIENT_RESOURCES;
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
if (IrpContext)
ExFreePoolWithTag(IrpContext, TAG('N', 'I', 'R', 'P'));
IoSetTopLevelIrp(NULL);
FsRtlExitFileSystem();
return Status;
}

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/fcb.c
* FILE: drivers/filesystem/ntfs/fcb.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/dirctl.c
* FILE: drivers/filesystem/ntfs/dirctl.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/
@ -180,8 +178,8 @@ NtfsGetInternalInformation(PFCB Fcb,
}
NTSTATUS STDCALL
NtfsQueryInformation(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
/*
* FUNCTION: Retrieve the specified file information

View file

@ -15,8 +15,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -448,8 +446,8 @@ NtfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
NtfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PIO_STACK_LOCATION Stack;

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/mft.c
* FILE: drivers/filesystem/ntfs/mft.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
* Updated by Valentin Verkhovsky 2003/09/12

View file

@ -0,0 +1,93 @@
/*
* ReactOS kernel
* Copyright (C) 2008 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/filesystem/ntfs/misc.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Pierre Schweitzer
* UPDATE HISTORY:
*/
/* INCLUDES *****************************************************************/
#include "ntfs.h"
#define NDEBUG
#include <debug.h>
/* GLOBALS *****************************************************************/
/* FUNCTIONS ****************************************************************/
/*
* FUNCTION: Used with IRP to set them to TopLevelIrp field
* ARGUMENTS:
* Irp = The IRP to set
* RETURNS: TRUE if top level was null, else FALSE
*/
BOOLEAN
NtfsIsIrpTopLevel(PIRP Irp)
{
BOOLEAN ReturnCode = FALSE;
TRACE_(NTFS, "NtfsIsIrpTopLevel()\n");
if (IoGetTopLevelIrp() == NULL)
{
IoSetTopLevelIrp(Irp);
ReturnCode = TRUE;
}
return ReturnCode;
}
/*
* FUNCTION: Allocate and fill an NTFS_IRP_CONTEXT struct in order to use it for IRP
* ARGUMENTS:
* DeviceObject = Used to fill in struct
* Irp = The IRP that need IRP_CONTEXT struct
* RETURNS: NULL or PNTFS_IRP_CONTEXT
*/
PNTFS_IRP_CONTEXT
NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PNTFS_IRP_CONTEXT IrpContext;
PIO_STACK_LOCATION IoStackLocation;
TRACE_(NTFS, "NtfsAllocateIrpContext()\n");
IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
IrpContext = (PNTFS_IRP_CONTEXT)ExAllocatePoolWithTag(NonPagedPool, sizeof(NTFS_IRP_CONTEXT), TAG('N', 'I', 'R', 'P'));
if (IrpContext == NULL)
return NULL;
RtlZeroMemory(IrpContext, sizeof(NTFS_IRP_CONTEXT));
IrpContext->Identifier.Type = NTFS_TYPE_IRP_CONTEST;
IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT);
IrpContext->Irp = Irp;
IrpContext->MajorFunction = IoStackLocation->MajorFunction;
IrpContext->MinorFunction = IoStackLocation->MinorFunction;
IrpContext->DeviceObject = DeviceObject;
IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
return IrpContext;
}

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/ntfs.c
* FILE: drivers/filesystem/ntfs/ntfs.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
* Pierre Schweitzer
@ -120,15 +118,15 @@ NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
* RETURNS: Nothing
*/
{
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose;
DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsCreate;
DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead;
DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = NtfsFileSystemControl;
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsDirectoryControl;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsQueryInformation;
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsQueryVolumeInformation;
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = NtfsSetVolumeInformation;
DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdClose;
DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdRead;
DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsFsdWrite;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdQueryInformation;
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsFsdDirectoryControl;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = NtfsFsdFileSystemControl;
return;
}

View file

@ -153,6 +153,7 @@ typedef struct _CCB
#define TAG_CCB TAG('I', 'C', 'C', 'B')
#define NTFS_TYPE_IRP_CONTEST TAG('F','S',0,6)
#define NTFS_TYPE_GLOBAL_DATA TAG('F','S',0,7)
typedef struct
@ -317,6 +318,19 @@ typedef struct
ULONG Unknown2;
} VOLINFO_ATTRIBUTE, *PVOLINFO_ATTRIBUTE;
typedef struct
{
NTFSIDENTIFIER Identifier;
ULONG Flags;
UCHAR MajorFunction;
UCHAR MinorFunction;
WORK_QUEUE_ITEM WorkQueueItem;
PIRP Irp;
BOOLEAN IsTopLevel;
PDEVICE_OBJECT DeviceObject;
NTSTATUS SavedExceptionCode;
} NTFS_IRP_CONTEXT, *PNTFS_IRP_CONTEXT;
extern PNTFS_GLOBAL_DATA NtfsGlobalData;
@ -363,24 +377,30 @@ NtfsDeviceIoControl(IN PDEVICE_OBJECT DeviceObject,
/* close.c */
DRIVER_DISPATCH NtfsClose;
NTSTATUS STDCALL
NtfsClose(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdClose;
NTSTATUS NTAPI
NtfsFsdClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* create.c */
DRIVER_DISPATCH NtfsCreate;
NTSTATUS STDCALL
NtfsCreate(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdCreate;
NTSTATUS NTAPI
NtfsFsdCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* dirctl.c */
DRIVER_DISPATCH NtfsDirectoryControl;
NTSTATUS STDCALL
NtfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdDirectoryControl;
NTSTATUS NTAPI
NtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* dispatch.c */
DRIVER_DISPATCH NtfsFsdDispatch;
NTSTATUS NTAPI
NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* fcb.c */
@ -437,17 +457,17 @@ NtfsGetFCBForFile(PDEVICE_EXTENSION Vcb,
/* finfo.c */
DRIVER_DISPATCH NtfsQueryInformation;
NTSTATUS STDCALL
NtfsQueryInformation(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdQueryInformation;
NTSTATUS NTAPI
NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* fsctl.c */
DRIVER_DISPATCH NtfsFileSystemControl;
NTSTATUS STDCALL
NtfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdFileSystemControl;
NTSTATUS NTAPI
NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
@ -510,9 +530,15 @@ EnumerAttribute(PFILE_RECORD_HEADER file,
PDEVICE_EXTENSION Vcb,
PDEVICE_OBJECT DeviceObject);
#if 0
/* misc.c */
BOOLEAN
NtfsIsIrpTopLevel(PIRP Irp);
PNTFS_IRP_CONTEXT
NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
#if 0
BOOLEAN
wstrcmpjoki(PWSTR s1, PWSTR s2);
@ -532,28 +558,24 @@ CdfsFileFlagsToAttributes(PFCB Fcb,
/* rw.c */
DRIVER_DISPATCH NtfsRead;
NTSTATUS STDCALL
NtfsRead(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdRead;
NTSTATUS NTAPI
NtfsFsdRead(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
DRIVER_DISPATCH NtfsWrite;
NTSTATUS STDCALL
NtfsWrite(PDEVICE_OBJECT DeviceObject,
DRIVER_DISPATCH NtfsFsdWrite;
NTSTATUS NTAPI
NtfsFsdWrite(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* volinfo.c */
DRIVER_DISPATCH NtfsQueryVolumeInformation;
NTSTATUS STDCALL
NtfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
NTSTATUS
NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
DRIVER_DISPATCH NtfsSetVolumeInformation;
NTSTATUS STDCALL
NtfsSetVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
NTSTATUS
NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
/* ntfs.c */

View file

@ -10,10 +10,12 @@
<file>close.c</file>
<file>create.c</file>
<file>dirctl.c</file>
<file>dispatch.c</file>
<file>fcb.c</file>
<file>finfo.c</file>
<file>fsctl.c</file>
<file>mft.c</file>
<file>misc.c</file>
<file>ntfs.c</file>
<file>rw.c</file>
<file>volinfo.c</file>

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/cdfs/rw.c
* FILE: drivers/filesystem/ntfs/rw.c
* PURPOSE: CDROM (ISO 9660) filesystem driver
* PROGRAMMER: Art Yerkes
* UPDATE HISTORY:
@ -131,8 +129,8 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
}
NTSTATUS STDCALL
NtfsRead(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdRead(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PDEVICE_EXTENSION DeviceExt;
@ -183,8 +181,8 @@ NtfsRead(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
NtfsWrite(PDEVICE_OBJECT DeviceObject,
NTSTATUS NTAPI
NtfsFsdWrite(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
DPRINT("NtfwWrite(DeviceObject %x Irp %x)\n",DeviceObject,Irp);

View file

@ -15,12 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/fs/ntfs/volume.c
* FILE: drivers/filesystem/ntfs/volume.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/
@ -165,10 +163,11 @@ NtfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
NTSTATUS STDCALL
NtfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
NTSTATUS
NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
{
PIRP Irp;
PDEVICE_OBJECT DeviceObject;
FS_INFORMATION_CLASS FsInformationClass;
PIO_STACK_LOCATION Stack;
NTSTATUS Status = STATUS_SUCCESS;
@ -177,6 +176,10 @@ NtfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject,
DPRINT("NtfsQueryVolumeInformation() called\n");
ASSERT(IrpContext);
Irp = IrpContext->Irp;
DeviceObject = IrpContext->DeviceObject;
Stack = IoGetCurrentIrpStackLocation(Irp);
FsInformationClass = Stack->Parameters.QueryVolume.FsInformationClass;
BufferLength = Stack->Parameters.QueryVolume.Length;
@ -215,29 +218,30 @@ NtfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject,
Status = STATUS_NOT_SUPPORTED;
}
Irp->IoStatus.Status = Status;
if (NT_SUCCESS(Status))
Irp->IoStatus.Information =
Stack->Parameters.QueryVolume.Length - BufferLength;
else
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return(Status);
return Status;
}
NTSTATUS STDCALL
NtfsSetVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
NTSTATUS
NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
{
PIRP Irp;
DPRINT("NtfsSetVolumeInformation() called\n");
ASSERT(IrpContext);
Irp = IrpContext->Irp;
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return(STATUS_NOT_SUPPORTED);
return STATUS_NOT_SUPPORTED;
}
/* EOF */