REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1252
Calling the 'SetPosition' service of the EFI_FILE_PROTOCOL with 'Position' equals to 0xFFFFFFFFFFFFFFFF for a file is to set the current position to the end of the file. But the current implementation of function UdfSetPosition() is to set it to the last byte (not EOF). This commit will resolve this issue. Cc: Paulo Alcantara <pa...@paulo.ac> Cc: Ruiyu Ni <ruiyu...@intel.com> Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a...@intel.com> --- MdeModulePkg/Universal/Disk/UdfDxe/File.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c b/MdeModulePkg/Universal/Disk/UdfDxe/File.c index 80db734f86..54c2400243 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c @@ -704,7 +704,7 @@ UdfSetPosition ( // set to the EOF. // if (Position == 0xFFFFFFFFFFFFFFFF) { - PrivFileData->FilePosition = PrivFileData->FileSize - 1; + PrivFileData->FilePosition = PrivFileData->FileSize; } else { PrivFileData->FilePosition = Position; } -- 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel