mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Added CdfsSetPosition/CdfsSetInformation.
svn path=/trunk/; revision=3507
This commit is contained in:
parent
9083e6bddd
commit
3c54f08801
2 changed files with 63 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: cdfs.c,v 1.7 2002/09/09 17:27:14 hbirr Exp $
|
/* $Id: cdfs.c,v 1.8 2002/09/15 22:23:22 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -92,6 +92,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
CdfsDirectoryControl;
|
CdfsDirectoryControl;
|
||||||
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
|
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
|
||||||
CdfsQueryInformation;
|
CdfsQueryInformation;
|
||||||
|
DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] =
|
||||||
|
CdfsSetInformation;
|
||||||
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
|
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
|
||||||
CdfsQueryVolumeInformation;
|
CdfsQueryVolumeInformation;
|
||||||
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] =
|
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] =
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: finfo.c,v 1.4 2002/07/20 11:44:24 ekohl Exp $
|
/* $Id: finfo.c,v 1.5 2002/09/15 22:23:23 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -277,6 +277,19 @@ CdfsGetAllInformation(PFILE_OBJECT FileObject,
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NTSTATUS
|
||||||
|
CdfsSetPositionInformation(PFILE_OBJECT FileObject,
|
||||||
|
PFILE_POSITION_INFORMATION PositionInfo)
|
||||||
|
{
|
||||||
|
DPRINT ("CdfsSetPositionInformation()\n");
|
||||||
|
|
||||||
|
DPRINT ("PositionInfo %x\n", PositionInfo);
|
||||||
|
DPRINT ("Setting position %d\n", PositionInfo->CurrentByteOffset.u.LowPart);
|
||||||
|
memcpy (&FileObject->CurrentByteOffset, &PositionInfo->CurrentByteOffset,
|
||||||
|
sizeof (LARGE_INTEGER));
|
||||||
|
|
||||||
|
return (STATUS_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
CdfsQueryInformation(PDEVICE_OBJECT DeviceObject,
|
CdfsQueryInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
@ -375,4 +388,50 @@ CdfsQueryInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
CdfsSetInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
PIRP Irp)
|
||||||
|
/*
|
||||||
|
* FUNCTION: Retrieve the specified file information
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
FILE_INFORMATION_CLASS FileInformationClass;
|
||||||
|
PIO_STACK_LOCATION Stack;
|
||||||
|
PFILE_OBJECT FileObject;
|
||||||
|
PFCB Fcb;
|
||||||
|
PVOID SystemBuffer;
|
||||||
|
|
||||||
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
DPRINT1("CdfsSetInformation() called\n");
|
||||||
|
|
||||||
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
FileInformationClass = Stack->Parameters.SetFile.FileInformationClass;
|
||||||
|
FileObject = Stack->FileObject;
|
||||||
|
Fcb = FileObject->FsContext;
|
||||||
|
|
||||||
|
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
|
||||||
|
switch (FileInformationClass)
|
||||||
|
{
|
||||||
|
case FilePositionInformation:
|
||||||
|
Status = CdfsSetPositionInformation(FileObject,
|
||||||
|
SystemBuffer);
|
||||||
|
break;
|
||||||
|
case FileBasicInformation:
|
||||||
|
case FileRenameInformation:
|
||||||
|
Status = STATUS_NOT_IMPLEMENTED;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Status = STATUS_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
Irp->IoStatus.Status = Status;
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
|
return(Status);
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
Loading…
Reference in a new issue