From c0a3c3da98cef6286a509eb685a4ff5375f8347b Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Tue, 20 Aug 2013 07:13:28 +0000 Subject: Refine the comments and code to follow spec. Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14573 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c') diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 40d0230b4d..d6705d0247 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -3767,9 +3767,9 @@ Done: instance. @param Results Null-terminated Unicode string in format which has all values - filled in for the names in the Request string. - String to be allocated by the called function. - De-allocation is up to the caller. + filled in for the entirety of the current HII + database. String to be allocated by the called + function. De-allocation is up to the caller. @retval EFI_SUCCESS The Results string is filled with the values corresponding to all requested names. @@ -4482,8 +4482,9 @@ Exit: (see below) is returned. @param BlockSize The length of the Block in units of UINT8. On input, this is the size of the Block. On output, - if successful, contains the index of the last - modified byte in the Block. + if successful, contains the largest index of the + modified byte in the Block, or the required buffer + size if the Block is not large enough. @param Progress On return, points to an element of the ConfigResp string filled in with the offset of the most recent '&' before the first failing name / value @@ -4503,7 +4504,8 @@ Exit: value pair. Block is left updated and Progress points at the '&' preceding the first non-. - @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined. + @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined. + BlockSize is updated with the required buffer size. @retval EFI_NOT_FOUND Target for the specified routing data was not found. Progress points to the "G" in "GUID" of the errant routing data. @@ -4680,7 +4682,7 @@ HiiConfigToBlock ( if (MaxBlockSize > BufferSize) { *BlockSize = MaxBlockSize; if (Block != NULL) { - return EFI_DEVICE_ERROR; + return EFI_BUFFER_TOO_SMALL; } } -- cgit v1.2.3