Refine comments and two code style.

Signed-off-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12263 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2011-09-02 08:05:34 +00:00
parent 6709bbd17f
commit 4ff7e37b4f
51 changed files with 498 additions and 495 deletions

View File

@@ -82,10 +82,10 @@ FileHandleSetInfo (
are no more directory entries, the read returns a zero-length buffer.
EFI_FILE_INFO is the structure returned as the directory entry.
@param[in] FileHandle The opened file handle.
@param[in,out] BufferSize On input, the size of buffer in bytes. On return,
the number of bytes written.
@param[out] Buffer The buffer to put read data into.
@param[in] FileHandle The opened file handle.
@param[in, out] BufferSize On input, the size of buffer in bytes. On return,
the number of bytes written.
@param[out] Buffer The buffer to put read data into.
@retval EFI_SUCCESS Data was read.
@retval EFI_NO_MEDIA The device has no media.
@@ -113,10 +113,10 @@ FileHandleRead(
The file is automatically grown to hold the data if required. Direct writes to
opened directories are not supported.
@param[in] FileHandle The opened file for writing.
@param[in,out] BufferSize On input, the number of bytes in Buffer. On output,
the number of bytes written.
@param[in] Buffer The buffer containing data to write is stored.
@param[in] FileHandle The opened file for writing.
@param[in, out] BufferSize On input, the number of bytes in Buffer. On output,
the number of bytes written.
@param[in] Buffer The buffer containing data to write is stored.
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Writes to an open directory are not supported.
@@ -379,17 +379,17 @@ 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.
@param[in] Handle FileHandle to read from.
@param[in,out] Buffer The pointer to buffer to read into.
@param[in,out] Size The pointer to number of bytes in Buffer.
@param[in] Truncate If the buffer is large enough, this has no effect.
If the buffer is is too small and Truncate is TRUE,
the line will be truncated.
If the buffer is is too small and Truncate is FALSE,
then no read will occur.
@param[in] Handle FileHandle to read from.
@param[in, out] Buffer The pointer to buffer to read into.
@param[in, out] Size The pointer to number of bytes in Buffer.
@param[in] Truncate If the buffer is large enough, this has no effect.
If the buffer is is too small and Truncate is TRUE,
the line will be truncated.
If the buffer is is too small and Truncate is FALSE,
then no read will occur.
@param[in,out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@param[in, out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@retval EFI_SUCCESS The operation was successful. The line is stored in
Buffer.
@@ -416,9 +416,9 @@ FileHandleReadLine(
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.
@param[in] Handle FileHandle to read from.
@param[in,out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@param[in] Handle FileHandle to read from.
@param[in, out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@return The line of text from the file.

View File

@@ -21,7 +21,7 @@
Removes the last directory or file entry in a path by changing the last
L'\' to a CHAR_NULL.
@param[in,out] Path The pointer to the path to modify.
@param[in, out] Path The pointer to the path to modify.
@retval FALSE Nothing was found to remove.
@retval TRUE A directory or file was removed.

View File

@@ -159,12 +159,12 @@ ShellCommandRegisterCommandName (
information is returned. If Sections is NULL, then all help text information
available is returned.
@param[in] CommandString The pointer to the command name. This is the name
found on the command line in the shell.
@param[in,out] RetVal The pointer to the return value from the command handler.
@param[in] CommandString The pointer to the command name. This is the name
found on the command line in the shell.
@param[in, out] RetVal The pointer to the return value from the command handler.
@param[in,out] CanAffectLE Indicates whether this command's return value
needs to be placed into LASTERROR environment variable.
@param[in, out] CanAffectLE Indicates whether this command's return value
needs to be placed into LASTERROR environment variable.
@retval RETURN_SUCCESS The handler was run.
@retval RETURN_NOT_FOUND The CommandString did not match a registered

View File

@@ -82,12 +82,12 @@ ShellSetFileInfo (
This function opens a file with the open mode according to the file path. The
Attributes is valid only for EFI_FILE_MODE_CREATE.
@param[in,out] FilePath On input, the device path to the file. On output,
the remaining device path.
@param[out] DeviceHandle Pointer to the system device handle.
@param[out] FileHandle Pointer to the file handle.
@param[in] OpenMode The mode to open the file with.
@param[in] Attributes The file's file attributes.
@param[in, out] FilePath On input, the device path to the file. On output,
the remaining device path.
@param[out] DeviceHandle Pointer to the system device handle.
@param[out] FileHandle Pointer to the file handle.
@param[in] OpenMode The mode to open the file with.
@param[in] Attributes The file's file attributes.
@retval EFI_SUCCESS The information was set.
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
@@ -204,10 +204,10 @@ ShellCreateDirectory(
are no more directory entries, the read returns a zero-length buffer.
EFI_FILE_INFO is the structure returned as the directory entry.
@param[in] FileHandle The opened file handle.
@param[in,out] ReadSize On input the size of buffer in bytes. On return
the number of bytes written.
@param[out] Buffer The buffer to put read data into.
@param[in] FileHandle The opened file handle.
@param[in, out] ReadSize On input the size of buffer in bytes. On return
the number of bytes written.
@param[out] Buffer The buffer to put read data into.
@retval EFI_SUCCESS Data was read.
@retval EFI_NO_MEDIA The device has no media.
@@ -235,12 +235,12 @@ ShellReadFile(
The file is automatically grown to hold the data if required. Direct writes to
opened directories are not supported.
@param[in] FileHandle The opened file for writing.
@param[in] FileHandle The opened file for writing.
@param[in,out] BufferSize On input the number of bytes in Buffer. On output
the number of bytes written.
@param[in, out] BufferSize On input the number of bytes in Buffer. On output
the number of bytes written.
@param[in] Buffer The buffer containing data to write is stored.
@param[in] Buffer The buffer containing data to write is stored.
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Writes to an open directory are not supported.
@@ -402,9 +402,9 @@ ShellFindFirstFile (
call of this function has no file to get. *NoFile will be set to TRUE, and the
data in Buffer is meaningless.
@param[in] DirHandle The file handle of the directory.
@param[in,out] Buffer The pointer to buffer for file's information.
@param[in,out] NoFile The pointer to boolean when last file is found.
@param[in] DirHandle The file handle of the directory.
@param[in, out] Buffer The pointer to buffer for file's information.
@param[in, out] NoFile The pointer to boolean when last file is found.
@retval EFI_SUCCESS Found the next file.
@retval EFI_NO_MEDIA The device has no media.
@@ -583,9 +583,9 @@ ShellSetPageBreakMode (
If you are NOT appending to an existing list *ListHead must be NULL. If
*ListHead is NULL then it must be callee freed.
@param[in] Arg The pointer to path string.
@param[in] OpenMode Mode to open files with.
@param[in,out] ListHead Head of linked list of results.
@param[in] Arg The pointer to path string.
@param[in] OpenMode Mode to open files with.
@param[in, out] ListHead Head of linked list of results.
@retval EFI_SUCCESS The operation was sucessful and the list head
contains the list of opened files.
@@ -604,7 +604,7 @@ ShellOpenFileMetaArg (
/**
Free the linked list returned from ShellOpenFileMetaArg.
@param[in,out] ListHead The pointer to free.
@param[in, out] ListHead The pointer to free.
@retval EFI_SUCCESS The operation was sucessful.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@@ -1024,13 +1024,13 @@ ShellStrToUintn(
If Destination's current length (including NULL terminator) is already more than
CurrentSize, then ASSERT().
@param[in,out] Destination The String to append onto.
@param[in,out] CurrentSize On call, the number of bytes in Destination. On
return, possibly the new size (still in bytes). If NULL,
then allocate whatever is needed.
@param[in] Source The String to append from.
@param[in] Count The maximum number of characters to append. If 0, then
all are appended.
@param[in, out] Destination The String to append onto.
@param[in, out] CurrentSize On call, the number of bytes in Destination. On
return, possibly the new size (still in bytes). If NULL,
then allocate whatever is needed.
@param[in] Source The String to append from.
@param[in] Count The maximum number of characters to append. If 0, then
all are appended.
@return The Destination after appending the Source.
**/
@@ -1051,14 +1051,14 @@ StrnCatGrow (
If the string would grow bigger than NewSize it will halt and return error.
@param[in] SourceString The string with source buffer.
@param[in,out] NewString The string with resultant buffer.
@param[in] NewSize The size in bytes of NewString.
@param[in] FindTarget The string to look for.
@param[in] ReplaceWith The string to replace FindTarget with.
@param[in] SkipPreCarrot If TRUE will skip a FindTarget that has a '^'
immediately before it.
@param[in] ParameterReplacing If TRUE will add "" around items with spaces.
@param[in] SourceString The string with source buffer.
@param[in, out] NewString The string with resultant buffer.
@param[in] NewSize The size in bytes of NewString.
@param[in] FindTarget The string to look for.
@param[in] ReplaceWith The string to replace FindTarget with.
@param[in] SkipPreCarrot If TRUE will skip a FindTarget that has a '^'
immediately before it.
@param[in] ParameterReplacing If TRUE will add "" around items with spaces.
@retval EFI_INVALID_PARAMETER SourceString was NULL.
@retval EFI_INVALID_PARAMETER NewString was NULL.
@@ -1189,9 +1189,9 @@ ShellPromptForResponse (
@param[in] Type What type of question is asked. This is used to filter the input
to prevent invalid answers to question.
@param[in] HiiFormatStringId The format string Id for getting from Hii.
@param[in] HiiFormatHandle The format string Handle for getting from Hii.
@param[in,out] Response The pointer to Response, which will be populated upon return.
@param[in] HiiFormatStringId The format string Id for getting from Hii.
@param[in] HiiFormatHandle The format string Handle for getting from Hii.
@param[in, out] Response The pointer to Response, which will be populated upon return.
@retval EFI_SUCCESS The operation was sucessful.
@return other The operation failed.
@@ -1273,11 +1273,11 @@ ShellFileExists(
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.
@param[in] Handle SHELL_FILE_HANDLE to read from.
@param[in,out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@param[in] Handle SHELL_FILE_HANDLE to read from.
@param[in, out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@return The line of text from the file.
@return The line of text from the file.
@sa ShellFileHandleReadLine
**/
@@ -1294,17 +1294,17 @@ ShellFileHandleReturnLine(
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.
@param[in] Handle SHELL_FILE_HANDLE to read from.
@param[in,out] Buffer The pointer to buffer to read into.
@param[in,out] Size The pointer to number of bytes in Buffer.
@param[in] Truncate If the buffer is large enough, this has no effect.
If the buffer is is too small and Truncate is TRUE,
the line will be truncated.
If the buffer is is too small and Truncate is FALSE,
then no read will occur.
@param[in] Handle SHELL_FILE_HANDLE to read from.
@param[in, out] Buffer The pointer to buffer to read into.
@param[in, out] Size The pointer to number of bytes in Buffer.
@param[in] Truncate If the buffer is large enough, this has no effect.
If the buffer is is too small and Truncate is TRUE,
the line will be truncated.
If the buffer is is too small and Truncate is FALSE,
then no read will occur.
@param[in,out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@param[in, out] Ascii Boolean value for indicating whether the file is
Ascii (TRUE) or UCS2 (FALSE).
@retval EFI_SUCCESS The operation was successful. The line is stored in
Buffer.

View File

@@ -43,12 +43,12 @@ INTN
If Count is < 2 , then perform no action.
If Size is < 1 , then perform no action.
@param[in,out] BufferToSort On call, a Buffer of (possibly sorted) elements;
on return, a buffer of sorted elements.
@param[in] Count The number of elements in the buffer to sort.
@param[in] ElementSize The size of an element in bytes.
@param[in] CompareFunction The function to call to perform the comparison
of any two elements.
@param[in, out] BufferToSort On call, a Buffer of (possibly sorted) elements;
on return, a buffer of sorted elements.
@param[in] Count The number of elements in the buffer to sort.
@param[in] ElementSize The size of an element in bytes.
@param[in] CompareFunction The function to call to perform the comparison
of any two elements.
**/
VOID
EFIAPI

View File

@@ -531,9 +531,9 @@ EFI_STATUS
If there are multiple map names they will be semi-colon seperated in the
NULL-terminated string.
@param[in,out] DevicePath On entry, points to a device path pointer. On
exit, updates the pointer to point to the
portion of the device path after the mapping.
@param[in, out] DevicePath On entry, points to a device path pointer. On
exit, updates the pointer to point to the
portion of the device path after the mapping.
@retval NULL No mapping was found.
@retval !=NULL Pointer to NULL-terminated mapping. The buffer
@@ -640,10 +640,10 @@ EFI_STATUS
according to the rules specified in UEFI Shell 2.0 spec section 3.7.1. Each
matching file has an EFI_SHELL_FILE_INFO structure created in a linked list.
@param[in] Path A pointer to the path string.
@param[in] OpenMode Specifies the mode used to open each file, EFI_FILE_MODE_READ or
EFI_FILE_MODE_WRITE.
@param[in,out] FileList Points to the start of a list of files opened.
@param[in] Path A pointer to the path string.
@param[in] OpenMode Specifies the mode used to open each file, EFI_FILE_MODE_READ or
EFI_FILE_MODE_WRITE.
@param[in, out] FileList Points to the start of a list of files opened.
@retval EFI_SUCCESS Create the file list successfully.
@return Can't create the file list.
@@ -710,9 +710,9 @@ EFI_STATUS
current position is increased by the number of bytes returned.
If FileHandle is a directory, then an error is returned.
@param[in] FileHandle The opened file handle for read.
@param[in] ReadSize On input, the size of Buffer, in bytes. On output, the amount of data read.
@param[in,out] Buffer The buffer in which data is read.
@param[in] FileHandle The opened file handle for read.
@param[in] ReadSize On input, the size of Buffer, in bytes. On output, the amount of data read.
@param[in, out] Buffer The buffer in which data is read.
@retval EFI_SUCCESS Data was read.
@retval EFI_NO_MEDIA The device has no media.
@@ -929,9 +929,9 @@ EFI_STATUS
Direct writes to opened directories are not supported.
@param[in] FileHandle The opened file handle for writing.
@param[in,out] BufferSize On input, size of Buffer.
@param[in] Buffer The buffer in which data to write.
@param[in] FileHandle The opened file handle for writing.
@param[in, out] BufferSize On input, size of Buffer.
@param[in] Buffer The buffer in which data to write.
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Writes to open directory are not supported.

View File

@@ -61,7 +61,7 @@ EFI_STATUS
This is used when programatically adding shell commands. Upon successful return
the memory allocated is up to the caller to free.
@param[in,out] Str Pointer to pointer to string to display for help.
@param[in, out] Str Pointer to pointer to string to display for help.
@retval EFI_SUCCESS The help string is in the parameter Str.
@@ -270,9 +270,9 @@ CHAR16*
The memory allocated by the callee for this list is freed by making a call to
SHELLENV_FREE_FILE_LIST.
@param[in] Arg The pointer Path to files to open.
@param[in,out] ListHead The pointer to the allocated and initialized list head
upon which to append all opened file structures.
@param[in] Arg The pointer Path to files to open.
@param[in, out] ListHead The pointer to the allocated and initialized list head
upon which to append all opened file structures.
@retval EFI_SUCCESS One or more files was opened and a struct of each file's
information was appended to ListHead.
@@ -289,7 +289,7 @@ EFI_STATUS
/**
This frees all of the nodes under the ListHead, but not ListHead itself.
@param[in,out] ListHead Pointer to list to free all nodes of.
@param[in, out] ListHead Pointer to list to free all nodes of.
@retval EFI_SUCCESS This function always returns EFI_SUCCESS.
**/
@@ -473,12 +473,12 @@ BOOLEAN
This is an internal shell function to handle shell cascading. It restores the
original set of console protocols.
@param[in] ConInHandle The handle of ConIn.
@param[in,out] ConIn The pointer to the location to return the pointer to
the original console input.
@param[in] ConOutHandle The handle of ConOut
@param[in,out] ConOut The pointer to the location to return the pointer to
the original console output.
@param[in] ConInHandle The handle of ConIn.
@param[in, out] ConIn The pointer to the location to return the pointer to
the original console input.
@param[in] ConOutHandle The handle of ConOut
@param[in, out] ConOut The pointer to the location to return the pointer to
the original console output.
**/
typedef
VOID
@@ -512,8 +512,8 @@ VOID
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
@param[in,out] Handle The pointer to pointer to Handle. It is set
on a sucessful return.
@param[in, out] Handle The pointer to pointer to Handle. It is set
on a sucessful return.
@retval EFI_SUCCESS The next handle in the handle database is *Handle.
@retval EFI_NOT_FOUND There is not another handle.
@@ -656,7 +656,7 @@ VOID
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
called after INIT_PROTOCOL_INFO_ENUMERATOR.
@param[in,out] ProtocolInfo The pointer to pointer to protocol information structure.
@param[in, out] ProtocolInfo The pointer to pointer to protocol information structure.
@retval EFI_SUCCESS The next protocol's information was sucessfully returned.
@retval NULL There are no more protocols.
@@ -744,15 +744,15 @@ typedef struct {
Upon successful return, the memory for *BestDeviceName is up to the caller to free.
@param[in] DeviceHandle The device handle whose name is desired.
@param[in] UseComponentName Whether to use the ComponentName protocol at all.
@param[in] UseDevicePath Whether to use the DevicePath protocol at all.
@param[in] Language The pointer to the language string to use.
@param[in,out] BestDeviceName The pointer to pointer to string allocated with the name.
@param[out] ConfigurationStatus The pointer to status for opening a Configuration protocol.
@param[out] DiagnosticsStatus The pointer to status for opening a Diagnostics protocol.
@param[in] Display Whether to Print this out to default Print location.
@param[in] Indent How many characters to indent the printing.
@param[in] DeviceHandle The device handle whose name is desired.
@param[in] UseComponentName Whether to use the ComponentName protocol at all.
@param[in] UseDevicePath Whether to use the DevicePath protocol at all.
@param[in] Language The pointer to the language string to use.
@param[in, out] BestDeviceName The pointer to pointer to string allocated with the name.
@param[out] ConfigurationStatus The pointer to status for opening a Configuration protocol.
@param[out] DiagnosticsStatus The pointer to status for opening a Diagnostics protocol.
@param[in] Display Whether to Print this out to default Print location.
@param[in] Indent How many characters to indent the printing.
@retval EFI_SUCCESS This function always returns EFI_SUCCESS.
**/
@@ -849,9 +849,9 @@ EFI_STATUS
The memory allocated by the callee for this list is freed by making a call to
SHELLENV_FREE_FILE_LIST.
@param[in] Arg The pointer to the path of the files to be opened.
@param[in,out] ListHead The pointer to allocated and initialized list head
upon which to append all the opened file structures.
@param[in] Arg The pointer to the path of the files to be opened.
@param[in, out] ListHead The pointer to allocated and initialized list head
upon which to append all the opened file structures.
@retval EFI_SUCCESS One or more files was opened and a struct of each file's
information was appended to ListHead.