Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/filesystems/udfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ list(APPEND SOURCE
unload.cpp
verfysup.cpp
volinfo.cpp
wcache.cpp
write.cpp
strucsup.cpp
filobsup.cpp
udfdata.cpp
udffs.h)

add_library(udfs MODULE ${SOURCE} udffs.rc)
Expand Down
8 changes: 4 additions & 4 deletions drivers/filesystems/udfs/Include/Sys_spec_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ UDFFileDirInfoToNT(
LONG_AD feloc;

UDFPrint((" !SYS_ATTR\n"));
FileEntry = (PFILE_ENTRY)MyAllocatePool__(NonPagedPool, Vcb->LBlockSize);
FileEntry = (PFILE_ENTRY)MyAllocatePool__(NonPagedPool, Vcb->SectorSize);
if (!FileEntry) return STATUS_INSUFFICIENT_RESOURCES;

feloc.extLength = Vcb->LBlockSize;
feloc.extLength = Vcb->SectorSize;
feloc.extLocation = FileDirNdx->FileEntryLoc;

if (!NT_SUCCESS(status = UDFReadFileEntry(IrpContext, Vcb, &feloc, FileEntry, &Ident))) {
Expand Down Expand Up @@ -346,7 +346,7 @@ UDFFileDirInfoToNT(
// AllocSize
FileDirNdx->AllocationSize =
NTFileInfo->AllocationSize.QuadPart =
(FileEntry->informationLength + Vcb->LBlockSize - 1) & ~((LONGLONG)(Vcb->LBlockSize) - 1);
(FileEntry->informationLength + Vcb->SectorSize - 1) & ~((LONGLONG)(Vcb->SectorSize) - 1);
}
// NTFileInfo->EaSize = 0;//FileEntry->lengthExtendedAttr;
} else if (FileEntry->descTag.tagIdent == TID_EXTENDED_FILE_ENTRY) {
Expand All @@ -370,7 +370,7 @@ UDFFileDirInfoToNT(
// AllocSize
FileDirNdx->AllocationSize =
NTFileInfo->AllocationSize.QuadPart =
(ExFileEntry->informationLength + Vcb->LBlockSize - 1) & ~((LONGLONG)(Vcb->LBlockSize) - 1);
(ExFileEntry->informationLength + Vcb->SectorSize - 1) & ~((LONGLONG)(Vcb->SectorSize) - 1);
}
// NTFileInfo->EaSize = 0;//ExFileEntry->lengthExtendedAttr;
} else {
Expand Down
17 changes: 1 addition & 16 deletions drivers/filesystems/udfs/Include/Sys_spec_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ typedef struct _UDF_PH_CALL_CONTEXT {
IO_STATUS_BLOCK IosbToUse;
} UDF_PH_CALL_CONTEXT, *PUDF_PH_CALL_CONTEXT;

#ifdef _BROWSE_UDF_

// convert UDF timestamp to NT time
LONGLONG UDFTimeToNT(IN PUDF_TIME_STAMP UdfTime);
// translate UDF file attributes to NT ones
Expand Down Expand Up @@ -159,7 +157,7 @@ __inline LARGE_INTEGER UDFMakeLargeInteger(LONGLONG value) {

#define UnicodeIsPrint(a) RtlIsValidOemCharacter(&(a))

#define UDFSysGetAllocSize(Vcb, Size) ((Size + Vcb->LBlockSize - 1) & ~((LONGLONG)(Vcb->LBlockSize - 1)))
#define UDFSysGetAllocSize(Vcb, Size) ((Size + Vcb->SectorSize - 1) & ~((LONGLONG)(Vcb->SectorSize - 1)))

NTSTATUS UDFDoesOSAllowFileToBeTargetForRename__(IN PUDF_FILE_INFO FileInfo);
#define UDFDoesOSAllowFileToBeTargetForHLink__ UDFDoesOSAllowFileToBeTargetForRename__
Expand All @@ -168,17 +166,4 @@ NTSTATUS UDFDoesOSAllowFileToBeUnlinked__(IN PUDF_FILE_INFO FileInfo);
NTSTATUS UDFDoesOSAllowFilePretendDeleted__(IN PUDF_FILE_INFO FileInfo);
BOOLEAN UDFRemoveOSReferences__(IN PUDF_FILE_INFO FileInfo);

/*
extern ULONG MajorVersion;
extern ULONG MinorVersion;
extern ULONG BuildNumber;

#define WinVer_Is351 (MajorVersion==0x03 && MinorVersion==51)
#define WinVer_IsNT (MajorVersion==0x04)
#define WinVer_Is2k (MajorVersion==0x05 && MinorVersion==0x00)
#define WinVer_IsXP (MajorVersion==0x05 && MinorVersion==0x01)
#define WinVer_IsdNET (MajorVersion==0x05 && MinorVersion==0x02)
*/
#endif //_BROWSE_UDF_

#endif // _UDF_SYS_SPEC_LIB__H_
Loading