Revision: 17650
          http://sourceforge.net/p/edk2/code/17650
Author:   shenshushi
Date:     2015-06-17 04:49:47 +0000 (Wed, 17 Jun 2015)
Log Message:
-----------
MdePkg: Refine the comments for FileHandleLib.

Make the function comments of FileHandleLib consistent with instance 
implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdePkg/Include/Library/FileHandleLib.h
    trunk/edk2/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c

Modified: trunk/edk2/MdePkg/Include/Library/FileHandleLib.h
===================================================================
--- trunk/edk2/MdePkg/Include/Library/FileHandleLib.h   2015-06-17 02:51:47 UTC 
(rev 17649)
+++ trunk/edk2/MdePkg/Include/Library/FileHandleLib.h   2015-06-17 04:49:47 UTC 
(rev 17650)
@@ -316,17 +316,16 @@
 /**
   Retrieve the size of a file.
 
-  If FileHandle is NULL then ASSERT().
-  If Size is NULL then ASSERT().
-
   This function extracts the file size info from the FileHandle's EFI_FILE_INFO
   data.
 
   @param[in] FileHandle         The file handle from which size is retrieved.
   @param[out] Size              The pointer to size.
 
-  @retval EFI_SUCCESS           The operation completed successfully.
+  @retval EFI_SUCCESS           Operation was completed sucessfully.
   @retval EFI_DEVICE_ERROR      Cannot access the file.
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.
+                                Size is NULL.
 **/
 EFI_STATUS
 EFIAPI
@@ -338,8 +337,6 @@
 /**
   Set the size of a file.
 
-  If FileHandle is NULL then ASSERT().
-
   This function changes the file size info from the FileHandle's EFI_FILE_INFO
   data.
 
@@ -348,6 +345,7 @@
 
   @retval EFI_SUCCESS           The operation completed successfully.
   @retval EFI_DEVICE_ERROR      Cannot access the file.
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.
 **/
 EFI_STATUS
 EFIAPI
@@ -437,14 +435,13 @@
 /**
   Function to write a line of unicode text to a file.
 
-  If Handle is NULL, ASSERT.
-
   @param[in]     Handle         FileHandle to write to.
   @param[in]     Buffer         Buffer to write, if NULL the function will
                                 take no action and return EFI_SUCCESS.
 
-  @retval  EFI_SUCCESS          The data was written.
-  @retval  other                Failure.
+  @retval  EFI_SUCCESS            The data was written.
+                                  Buffer is NULL.
+  @retval  EFI_INVALID_PARAMETER  Handle is NULL.
 
   @sa FileHandleWrite
 **/

Modified: trunk/edk2/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
===================================================================
--- trunk/edk2/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c     
2015-06-17 02:51:47 UTC (rev 17649)
+++ trunk/edk2/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c     
2015-06-17 04:49:47 UTC (rev 17650)
@@ -575,17 +575,16 @@
 /**
   Retrieve the size of a file.
 
-  if FileHandle is NULL then return error
-  if Size is NULL then return error
-
   This function extracts the file size info from the FileHandle's EFI_FILE_INFO
   data.
 
-  @param FileHandle             file handle from which size is retrieved
-  @param Size                   pointer to size
+  @param[in] FileHandle         The file handle from which size is retrieved.
+  @param[out] Size              The pointer to size.
 
-  @retval EFI_SUCCESS           operation was completed sucessfully
-  @retval EFI_DEVICE_ERROR      cannot access the file
+  @retval EFI_SUCCESS           Operation was completed sucessfully.
+  @retval EFI_DEVICE_ERROR      Cannot access the file.
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.
+                                Size is NULL.
 **/
 EFI_STATUS
 EFIAPI
@@ -624,16 +623,15 @@
 /**
   Set the size of a file.
 
-  If FileHandle is NULL then return error.
-
   This function changes the file size info from the FileHandle's EFI_FILE_INFO
   data.
 
-  @param FileHandle             File handle whose size is to be changed.
-  @param Size                   New size.
+  @param[in] FileHandle         The file handle whose size is to be changed.
+  @param[in] Size               The new size.
 
-  @retval EFI_SUCCESS           operation was completed sucessfully.
-  @retval EFI_DEVICE_ERROR      cannot access the file.
+  @retval EFI_SUCCESS           The operation completed successfully.
+  @retval EFI_DEVICE_ERROR      Cannot access the file.
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.
 **/
 EFI_STATUS
 EFIAPI
@@ -1016,17 +1014,16 @@
 }
 
 /**
-  function to write a line of unicode text to a file.
+  Function to write a line of unicode text to a file.
 
-  if Handle is NULL, return error.
-  if Buffer is NULL, do nothing.  (return SUCCESS)
+  @param[in]     Handle         FileHandle to write to.
+  @param[in]     Buffer         Buffer to write, if NULL the function will
+                                take no action and return EFI_SUCCESS.
 
-  @param[in]     Handle         FileHandle to write to
-  @param[in]     Buffer         Buffer to write
+  @retval  EFI_SUCCESS            The data was written.
+                                  Buffer is NULL.
+  @retval  EFI_INVALID_PARAMETER  Handle is NULL.
 
-  @retval  EFI_SUCCESS          the data was written.
-  @retval  other                failure.
-
   @sa FileHandleWrite
 **/
 EFI_STATUS


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to