diff --git a/tst/ntptfs/lfs.c b/tst/ntptfs/lfs.c index 6f9d2678..19544a7c 100644 --- a/tst/ntptfs/lfs.c +++ b/tst/ntptfs/lfs.c @@ -150,7 +150,7 @@ NTSTATUS LfsGetFileInfo( FileInfo->ChangeTime = FileAllInfo.V.BasicInformation.ChangeTime.QuadPart; FileInfo->IndexNumber = FileAllInfo.V.InternalInformation.IndexNumber.QuadPart; FileInfo->HardLinks = 0; - FileInfo->EaSize = FileAllInfo.V.EaInformation.EaSize; + FileInfo->EaSize = LfsGetEaSize(FileAllInfo.V.EaInformation.EaSize); if (0 != OpenFileInfo && OpenFileInfo->NormalizedNameSize > sizeof(WCHAR) + FileAllInfo.V.NameInformation.FileNameLength && diff --git a/tst/ntptfs/ptfs.c b/tst/ntptfs/ptfs.c index fc942920..85acc388 100644 --- a/tst/ntptfs/ptfs.c +++ b/tst/ntptfs/ptfs.c @@ -736,7 +736,7 @@ static inline VOID CopyQueryInfoToDirInfo( DirInfo->FileInfo.IndexNumber = QueryInfo->FileId.QuadPart; DirInfo->FileInfo.HardLinks = 0; DirInfo->FileInfo.EaSize = 0 != (FILE_ATTRIBUTE_REPARSE_POINT & QueryInfo->FileAttributes) ? - 0 : QueryInfo->EaSize; + 0 : LfsGetEaSize(QueryInfo->EaSize); } static NTSTATUS BufferedReadDirectory(FSP_FILE_SYSTEM *FileSystem, diff --git a/tst/ntptfs/ptfs.h b/tst/ntptfs/ptfs.h index 9c8f2f8c..84232d7b 100644 --- a/tst/ntptfs/ptfs.h +++ b/tst/ntptfs/ptfs.h @@ -127,6 +127,11 @@ NTSTATUS LfsFsControlFile( PVOID OutputBuffer, ULONG OutputBufferLength, PULONG PBytesTransferred); +static inline +ULONG LfsGetEaSize(ULONG EaSize) +{ + return 0 != EaSize ? EaSize - 4 : 0; +} /*