mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:45:41 +00:00
[NTOSKRNL]
NtQueryInformationFile: Implement FileAccessInformation and FileAlignmentInformation cases according to 'File System Internals' page 485. svn path=/trunk/; revision=66307
This commit is contained in:
parent
9d4dbeb5c9
commit
6a71e26135
1 changed files with 30 additions and 1 deletions
|
@ -1863,6 +1863,9 @@ NtQueryInformationFile(IN HANDLE FileHandle,
|
||||||
PVOID NormalContext;
|
PVOID NormalContext;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
IO_STATUS_BLOCK KernelIosb;
|
IO_STATUS_BLOCK KernelIosb;
|
||||||
|
BOOLEAN CallDriver = TRUE;
|
||||||
|
PFILE_ACCESS_INFORMATION AccessBuffer;
|
||||||
|
PFILE_ALIGNMENT_INFORMATION AlignmentBuffer;
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
IOTRACE(IO_API_DEBUG, "FileHandle: %p\n", FileHandle);
|
IOTRACE(IO_API_DEBUG, "FileHandle: %p\n", FileHandle);
|
||||||
|
|
||||||
|
@ -2043,8 +2046,34 @@ NtQueryInformationFile(IN HANDLE FileHandle,
|
||||||
/* Update operation counts */
|
/* Update operation counts */
|
||||||
IopUpdateOperationCount(IopOtherTransfer);
|
IopUpdateOperationCount(IopOtherTransfer);
|
||||||
|
|
||||||
|
/* Fill in file information before calling the driver.
|
||||||
|
See 'File System Internals' page 485.*/
|
||||||
|
if (FileInformationClass == FileAccessInformation)
|
||||||
|
{
|
||||||
|
AccessBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
AccessBuffer->AccessFlags = HandleInformation.GrantedAccess;
|
||||||
|
Irp->IoStatus.Information = sizeof(FILE_ACCESS_INFORMATION);
|
||||||
|
CallDriver = FALSE;
|
||||||
|
}
|
||||||
|
else if (FileInformationClass == FileAlignmentInformation)
|
||||||
|
{
|
||||||
|
AlignmentBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
AlignmentBuffer->AlignmentRequirement = DeviceObject->AlignmentRequirement;
|
||||||
|
Irp->IoStatus.Information = sizeof(FILE_ALIGNMENT_INFORMATION);
|
||||||
|
CallDriver = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Call the Driver */
|
/* Call the Driver */
|
||||||
Status = IoCallDriver(DeviceObject, Irp);
|
if (CallDriver)
|
||||||
|
{
|
||||||
|
Status = IoCallDriver(DeviceObject, Irp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (Status == STATUS_PENDING)
|
if (Status == STATUS_PENDING)
|
||||||
{
|
{
|
||||||
/* Check if this was async I/O */
|
/* Check if this was async I/O */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue