From ba1806251ff8ff695175b92ab5732eadbcd2f72e Mon Sep 17 00:00:00 2001 From: Qiu Shumin Date: Mon, 24 Aug 2015 07:42:27 +0000 Subject: MdePkg/Library/UefiFileHandleLib: Make FileHandleReadLine return the right buffer size. 1. '\r' char will not return in buffer so buffer size should exclude the number of '\r' char. 2. When 'Truncate' is TRUE return the truncated string with 'EFI_SUCCESS' status. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18276 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Library/FileHandleLib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MdePkg/Include') diff --git a/MdePkg/Include/Library/FileHandleLib.h b/MdePkg/Include/Library/FileHandleLib.h index b5ac19ac85..fdbdc3ade4 100644 --- a/MdePkg/Include/Library/FileHandleLib.h +++ b/MdePkg/Include/Library/FileHandleLib.h @@ -379,6 +379,8 @@ FileHandleGetFileName ( If the position upon start is 0, then the Ascii Boolean will be set. This should be maintained and not changed for all operations with the same file. + The function will not return the \r and \n character in buffer. When an empty line is + read a CHAR_NULL character will be returned in buffer. @param[in] Handle FileHandle to read from. @param[in, out] Buffer The pointer to buffer to read into. -- cgit v1.2.3