- Divert NtfsLookupFile() as NtfsLookupFileAt() to allow opening relatives to a current MFT record.
- Reimplement NtfsLookupFile() using NtfsLookupFileAt()

svn path=/trunk/; revision=64316
This commit is contained in:
Pierre Schweitzer 2014-09-26 18:12:24 +00:00
parent 1dfcfeb0f7
commit 85b85921b8
2 changed files with 22 additions and 7 deletions

View file

@ -645,18 +645,17 @@ NtfsFindMftRecord(PDEVICE_EXTENSION Vcb, ULONGLONG MFTIndex, PUNICODE_STRING Fil
}
NTSTATUS
NtfsLookupFile(PDEVICE_EXTENSION Vcb,
PUNICODE_STRING PathName,
PFILE_RECORD_HEADER *FileRecord,
PNTFS_ATTR_CONTEXT *DataContext)
NtfsLookupFileAt(PDEVICE_EXTENSION Vcb,
PUNICODE_STRING PathName,
PFILE_RECORD_HEADER *FileRecord,
PNTFS_ATTR_CONTEXT *DataContext,
ULONGLONG CurrentMFTIndex)
{
ULONGLONG CurrentMFTIndex;
UNICODE_STRING Current, Remaining;
NTSTATUS Status;
DPRINT1("NtfsLookupFile(%p, %wZ, %p)\n", Vcb, PathName, FileRecord);
DPRINT1("NtfsLookupFileAt(%p, %wZ, %p, %p, %I64x)\n", Vcb, PathName, FileRecord, DataContext, CurrentMFTIndex);
CurrentMFTIndex = NTFS_FILE_ROOT;
FsRtlDissectName(*PathName, &Current, &Remaining);
while (Current.Length != 0)
@ -695,4 +694,13 @@ NtfsLookupFile(PDEVICE_EXTENSION Vcb,
return STATUS_SUCCESS;
}
NTSTATUS
NtfsLookupFile(PDEVICE_EXTENSION Vcb,
PUNICODE_STRING PathName,
PFILE_RECORD_HEADER *FileRecord,
PNTFS_ATTR_CONTEXT *DataContext)
{
return NtfsLookupFileAt(Vcb, PathName, FileRecord, DataContext, NTFS_FILE_ROOT);
}
/* EOF */

View file

@ -634,6 +634,13 @@ NtfsLookupFile(PDEVICE_EXTENSION Vcb,
PFILE_RECORD_HEADER *FileRecord,
PNTFS_ATTR_CONTEXT *DataContext);
NTSTATUS
NtfsLookupFileAt(PDEVICE_EXTENSION Vcb,
PUNICODE_STRING PathName,
PFILE_RECORD_HEADER *FileRecord,
PNTFS_ATTR_CONTEXT *DataContext,
ULONGLONG CurrentMFTIndex);
/* misc.c */
BOOLEAN