Fcb = (PNTFS_FCB)FileObject->FsContext;
+ if (NtfsFCBIsCompressed(Fcb))
+ {
+ DPRINT1("Compressed file!\n");
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+ }
+
FileRecord = ExAllocatePoolWithTag(NonPagedPool, DeviceExt->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
if (FileRecord == NULL)
{
DPRINT1("Not enough memory!\n");
- if (AllocatedBuffer)
- {
- ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
- }
return STATUS_INSUFFICIENT_RESOURCES;
}
{
DPRINT1("Can't find record!\n");
ExFreePoolWithTag(FileRecord, TAG_NTFS);
- if (AllocatedBuffer)
- {
- ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
- }
return Status;
}
Status = FindAttribute(DeviceExt, FileRecord, AttributeData, Fcb->Stream, wcslen(Fcb->Stream), &DataContext);
if (!NT_SUCCESS(Status))
{
+ NTSTATUS BrowseStatus;
+ FIND_ATTR_CONTXT Context;
PNTFS_ATTR_RECORD Attribute;
DPRINT1("No '%S' data stream associated with file!\n", Fcb->Stream);
- Attribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord + FileRecord->AttributeOffset);
- while (Attribute < (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord + FileRecord->BytesInUse) &&
- Attribute->Type != AttributeEnd)
+ BrowseStatus = FindFirstAttribute(&Context, DeviceExt, FileRecord, FALSE, &Attribute);
+ while (NT_SUCCESS(BrowseStatus))
{
if (Attribute->Type == AttributeData)
{
DPRINT1("Data stream: '%wZ' available\n", &Name);
}
- Attribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)Attribute + Attribute->Length);
+ BrowseStatus = FindNextAttribute(&Context, &Attribute);
}
+ FindCloseAttribute(&Context);
ReleaseAttributeContext(DataContext);
ExFreePoolWithTag(FileRecord, TAG_NTFS);