X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDisk%2FUdfDxe%2FFile.c;h=6f07bf2066dced6e3836ecfa659b3e984c71f063;hp=625f2c5637d4b2c974f947fb42b1e4b07feb2dde;hb=baaa3cee1eafc044606ee9dc60ec091713f81b8b;hpb=264d16fcbf7b51c8d03d56e21cbeb5933eeb29e1 diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c b/MdeModulePkg/Universal/Disk/UdfDxe/File.c index 625f2c5637..6f07bf2066 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c @@ -131,7 +131,6 @@ Error_Alloc_Priv_File_Data: CleanupFileInformation (&PrivFsData->Root); Error_Find_Root_Dir: - CleanupVolumeInformation (&PrivFsData->Volume); Error_Read_Udf_Volume: Error_Invalid_Params: @@ -429,7 +428,7 @@ UdfRead ( } ASSERT (NewFileEntryData != NULL); - if (IS_FE_SYMLINK (NewFileEntryData)) { + if (FE_ICB_FILE_TYPE (NewFileEntryData) == UdfFileEntrySymlink) { Status = ResolveSymlink ( BlockIo, DiskIo, @@ -529,7 +528,6 @@ UdfClose ( EFI_TPL OldTpl; EFI_STATUS Status; PRIVATE_UDF_FILE_DATA *PrivFileData; - PRIVATE_UDF_SIMPLE_FS_DATA *PrivFsData; OldTpl = gBS->RaiseTPL (TPL_CALLBACK); @@ -542,8 +540,6 @@ UdfClose ( PrivFileData = PRIVATE_UDF_FILE_DATA_FROM_THIS (This); - PrivFsData = PRIVATE_UDF_SIMPLE_FS_DATA_FROM_THIS (PrivFileData->SimpleFs); - if (!PrivFileData->IsRootDirectory) { CleanupFileInformation (&PrivFileData->File); @@ -552,10 +548,6 @@ UdfClose ( } } - if (--PrivFsData->OpenFiles == 0) { - CleanupVolumeInformation (&PrivFsData->Volume); - } - FreePool ((VOID *)PrivFileData); Exit: @@ -652,7 +644,7 @@ UdfGetPosition ( // As per UEFI spec, if the file handle is a directory, then the current file // position has no meaning and the operation is not supported. // - if (IS_FID_DIRECTORY_FILE (&PrivFileData->File.FileIdentifierDesc)) { + if (IS_FID_DIRECTORY_FILE (PrivFileData->File.FileIdentifierDesc)) { return EFI_UNSUPPORTED; } @@ -788,7 +780,7 @@ UdfGetInfo ( } else if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid)) { String = VolumeLabel; - FileSetDesc = PrivFsData->Volume.FileSetDescs[0]; + FileSetDesc = &PrivFsData->Volume.FileSetDesc; OstaCompressed = &FileSetDesc->LogicalVolumeIdentifier[0]; @@ -847,7 +839,7 @@ UdfGetInfo ( FileSystemInfo->Size = FileSystemInfoLength; FileSystemInfo->ReadOnly = TRUE; FileSystemInfo->BlockSize = - LV_BLOCK_SIZE (&PrivFsData->Volume, UDF_DEFAULT_LV_NUM); + PrivFsData->Volume.LogicalVolDesc.LogicalBlockSize; FileSystemInfo->VolumeSize = VolumeSize; FileSystemInfo->FreeSpace = FreeSpaceSize;