]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Protocol/EfiShellEnvironment2.h
updating comments mostly. also added some new lib functions.
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShellEnvironment2.h
index a0161b8accea00e6a09d5a2803132b2ea5be14de..ea06f8de96c6b1f8573e55128d9ad9d44d73c7ac 100644 (file)
@@ -1,36 +1,31 @@
 /** @file\r
   Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+  Copyright (c) 2005 - 2010, Intel Corporation<BR>\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
   \r
-#ifndef _SHELLENV2_H_\r
-#define _SHELLENV2_H_\r
-\r
-#include <Protocol/SimpleTextIn.h>\r
-#include <Protocol/SimpleTextOut.h>\r
-#include <Protocol/EfiShellInterface.h>\r
+#if !defined (_SHELL_ENVIRONMENT_2_PROTOCOL_H_)\r
+#define _SHELL_ENVIRONMENT_2_PROTOCOL_H_\r
 \r
 #define DEFAULT_INIT_ROW    1\r
 #define DEFAULT_AUTO_LF     FALSE\r
 \r
-\r
 /**\r
   This function is a prototype for a function that dumps information on a protocol \r
   to a given location.  The location is dependant on the implementation.  This is \r
   used when programatically adding shell commands.\r
 \r
-  @param Handle                 the handle the protocol is on\r
-  @param Interface              the interface to the protocol\r
+  @param Handle                 The handle the protocol is on.\r
+  @param Interface              The interface to the protocol.\r
 \r
 **/\r
 typedef\r
@@ -68,7 +63,7 @@ EFI_STATUS
 \r
   @param Str                      Pointer to pointer to string to display for help.\r
 \r
-  @retval EFI_SUCCESS             Phe help string is in the parameter Str.\r
+  @retval EFI_SUCCESS             The help string is in the parameter Str.\r
 \r
 **/\r
 typedef\r
@@ -101,7 +96,7 @@ typedef struct {
 #define SHELL_FILE_ARG_SIGNATURE  SIGNATURE_32 ('g', 'r', 'a', 'f') \r
 \r
 /**\r
-*  GUID for the shell environment2 and shell environment\r
+GUID for the shell environment2 and shell environment.\r
 **/\r
 #define SHELL_ENVIRONMENT_PROTOCOL_GUID \\r
   { \\r
@@ -109,7 +104,7 @@ typedef struct {
   }\r
 \r
 /**\r
-*  GUID for the shell environment2 extension (main GUID same as shell environment).\r
+GUID for the shell environment2 extension (main GUID above).\r
 **/\r
 #define EFI_SE_EXT_SIGNATURE_GUID \\r
   { \\r
@@ -127,7 +122,7 @@ typedef struct {
   encountered directly to the screen.\r
   \r
   @param ParentImageHandle      Handle of image executing this operation.\r
-  @param CommandLine            string command line to execute.\r
+  @param CommandLine            The string command line to execute.\r
   @param DebugOutput            TRUE indicates that errors should be printed directly.\r
                                 FALSE supresses error messages.\r
 \r
@@ -147,13 +142,13 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function returns a shell environment variable value.\r
+  This function returns a shell environment variable value.\r
 \r
-  @param Name                   pointer to the string with the shell environment \r
-                                variables name\r
+  @param Name                   Pointer to the string with the shell environment \r
+                                variable name.\r
 \r
-  @retval NULL                  the shell environment variable's value could not be found\r
-  @retval !NULL                 the value of the shell environment variable Name\r
+  @retval NULL                  The shell environment variable's value could not be found.\r
+  @retval !NULL                 The value of the shell environment variable Name.\r
 \r
 **/\r
 typedef \r
@@ -163,13 +158,13 @@ CHAR16 *
   );\r
 \r
 /**\r
-  this function returns a shell environment map value.\r
+  This function returns a shell environment map value.\r
 \r
-  @param Name                   pointer to the string with the shell environment \r
-                                map name\r
+  @param Name                   Pointer to the string with the shell environment \r
+                                map name.\r
 \r
-  @retval NULL                  the shell environment map's value could not be found\r
-  @retval !NULL                 the value of the shell environment map Name\r
+  @retval NULL                  The shell environment map's value could not be found.\r
+  @retval !NULL                 The value of the shell environment map Name.\r
 \r
 **/\r
 typedef \r
@@ -184,12 +179,12 @@ CHAR16 *
   This will allocate all required memory, put the new command on the command\r
   list in the correct location.\r
 \r
-  @param Handler                the handler function to call when the command gets called\r
-  @param CmdStr                 The command name\r
-  @param GetLineHelp            function to call of get help for this command\r
+  @param Handler                The handler function to call when the command gets called.\r
+  @param CmdStr                 The command name.\r
+  @param GetLineHelp            Function to call of get help for this command.\r
 \r
-  @retval EFI_SUCCESS           the command is now part of the command list\r
-  @retval EFI_OUT_OF_RESOURCES  a memory allocation failed.\r
+  @retval EFI_SUCCESS           The command is now part of the command list.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
   @sa SHELLENV_INTERNAL_COMMAND\r
   @sa SHELLCMD_GET_LINE_HELP\r
 **/\r
@@ -208,13 +203,13 @@ EFI_STATUS
   This will get the current protocol info and add the new info or update existing info\r
   and then resave the info.\r
 \r
-  @param SaveId                 save this change as an EFI variable\r
-  @param Protocol               the protocol's GUID\r
+  @param SaveId                 Save this change as an EFI variable.\r
+  @param Protocol               The protocol's GUID.\r
   @param DumpToken              The function pointer to dump token function or \r
-                                NULL\r
+                                NULL.\r
   @param DumpInfo               The function pointer to dump infomation function \r
-                                or NULL\r
-  @param IdString               The english name of the protocol\r
+                                or NULL.\r
+  @param IdString               The english name of the protocol.\r
 **/\r
 typedef\r
 VOID\r
@@ -226,17 +221,17 @@ VOID
   );\r
 \r
 /**\r
-  this function finds a protocol handle by a GUID.  \r
+  This function finds a protocol handle by a GUID.  \r
 \r
   This function will check for already known protocols by GUID and if one is \r
-  found it will return the name of that protocol.  if no name is found and \r
+  found it will return the name of that protocol.  If no name is found and \r
   GenId is TRUE it will generate ths string.\r
 \r
-  @param Protocol               the GUID of the protocol to look for.\r
-  @param GenId                  whether to generate a name string if its not found.\r
+  @param Protocol               The GUID of the protocol to look for.\r
+  @param GenId                  Whether to generate a name string if its not found.\r
 \r
-  @return !NULL                 the Name of the protocol.\r
-  @retval NULL                  the Name was not found and GenId was not TRUE.\r
+  @return !NULL                 The Name of the protocol.\r
+  @retval NULL                  The Name was not found and GenId was not TRUE.\r
 **/\r
 typedef \r
 CHAR16*\r
@@ -246,15 +241,15 @@ CHAR16*
   );\r
 \r
 /**\r
-  this function returns the current directory on a given device\r
+  This function returns the current directory on a given device.\r
 \r
   If DeviceName is specified, then return the current shell directory on that \r
   device.  If DeviceName is NULL, then return the current directory on the \r
   current device.  The caller us responsible to free the returned string when\r
   no londer required.\r
 \r
-  @param DeviceName             the name of the device to get the current \r
-                                directory on or NULL for current device\r
+  @param DeviceName             The name of the device to get the current \r
+                                directory on or NULL for current device.\r
 \r
   @return The current directory on the current or specified device.\r
 \r
@@ -266,23 +261,23 @@ CHAR16*
   );\r
 \r
 /**\r
-  this function will open a group of files that match the Arg path, including \r
-  support for wildcard characters ('?' and '*') in the Arg path.  if there are \r
+  This function will open a group of files that match the Arg path, including \r
+  support for wildcard characters ('?' and '*') in the Arg path.  If there are \r
   any wildcard characters in the path this function will find any and all files\r
-  that match the wildcards.  the return is a double linked list based on the \r
-  LIST_ENTRY linked list structure.  use this in conjunction with the \r
+  that match the wildcards.  The return is a double linked list based on the \r
+  LIST_ENTRY linked list structure.  Use this in conjunction with the \r
   SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.\r
   The memory allocated by the callee for this list is freed by making a call to \r
   SHELLENV_FREE_FILE_LIST.\r
 \r
-  @param Arg                    pointer Path to files to open\r
-  @param ListHead               pointer to allocated and initialized list head \r
+  @param Arg                    Pointer Path to files to open.\r
+  @param ListHead               Pointer to allocated and initialized list head \r
                                 upon which to append all the opened file structures.\r
 \r
   @retval EFI_SUCCESS           1 or more files was opened and a struct of each file's\r
                                 information was appended to ListHead.\r
-  @retval EFI_OUT_OF_RESOURCES  a memory allocation failed.\r
-  @retval EFI_NOT_FOUND         no matching files could be found.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_NOT_FOUND         No matching files could be found.\r
   @sa SHELLENV_FREE_FILE_LIST\r
 **/typedef\r
 EFI_STATUS\r
@@ -292,7 +287,7 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this frees all of the nodes under the ListHead, but not ListHead itself.\r
+  This frees all of the nodes under the ListHead, but not ListHead itself.\r
 \r
   @param ListHead               Pointer to list to free all nodes of.\r
 \r
@@ -305,14 +300,14 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function creates a new instance of the ShellInterface protocol for use on \r
+  This function creates a new instance of the ShellInterface protocol for use on \r
   the ImageHandle.\r
 \r
-  This function is for internal shell usage.  this will allocate and then populate \r
-  EFI_SHELL_INTERFACE protocol.  it is the caller's responsibility to free the \r
+  This function is for internal shell usage.  This will allocate and then populate \r
+  EFI_SHELL_INTERFACE protocol.  It is the caller's responsibility to free the \r
   memory.\r
 \r
-  @param ImageHandle            the handle which will use the new ShellInterface \r
+  @param ImageHandle            The handle which will use the new ShellInterface \r
                                 protocol.\r
 \r
   @return the newly allocated shell interface protocol.\r
@@ -325,14 +320,14 @@ EFI_SHELL_INTERFACE*
   );\r
 \r
 /**\r
-  this function determins whether a script file is currently being processed.\r
+  This function determins whether a script file is currently being processed.\r
 \r
-  a script file (.nsh file) can contain a series of commands and this is useful to \r
+  A script file (.nsh file) can contain a series of commands and this is useful to \r
   know for some shell commands whether they are being run manually or as part of a \r
   script.\r
 \r
-  @retval TRUE                  A script file is being processed\r
-  @return FALSE                 A script file is not being processed\r
+  @retval TRUE                  A script file is being processed.\r
+  @retval FALSE                 A script file is not being processed.\r
 **/\r
 typedef\r
 BOOLEAN\r
@@ -354,12 +349,12 @@ VOID
   This function enables the page break mode.\r
 \r
   This mode causes the output to pause after each complete screen to enable a \r
-  user to more easily read it.  if AutoWrap is TRUE then rows with too many \r
-  characters will be chopped and divided into 2 rows.  if FALSE then rows with \r
+  user to more easily read it.  If AutoWrap is TRUE then rows with too many \r
+  characters will be chopped and divided into 2 rows.  If FALSE then rows with \r
   too many characters may not be fully visible to the user on the screen.\r
 \r
-  @param StartRow               the row number to start this on.\r
-  @param AutoWrap               whether to auto wrap rows that are \r
+  @param StartRow               The row number to start this on.\r
+  @param AutoWrap               Whether to auto wrap rows that are too long.\r
 **/\r
 typedef\r
 VOID\r
@@ -371,7 +366,7 @@ VOID
 /**\r
   This function disables the page break mode.\r
 \r
-  disabling this causes the output to print out exactly as coded with no breaks \r
+  Tisabling this causes the output to print out exactly as coded with no breaks \r
   for readability.\r
 **/\r
 typedef\r
@@ -383,8 +378,8 @@ VOID
 /**\r
   Get the status of the page break output mode.\r
 \r
-  @retval FALSE                 page break output mode is not enabled\r
-  @retval TRUE                  page break output mode is enabled\r
+  @retval FALSE                 Page break output mode is not enabled.\r
+  @retval TRUE                  Page break output mode is enabled.\r
 **/\r
 typedef\r
 BOOLEAN\r
@@ -393,7 +388,7 @@ BOOLEAN
   );\r
 \r
 /**\r
-  this function sets the keys to filter for for the console in.  the valid \r
+  This function sets the keys to filter for for the console in.  The valid \r
   values to set are:\r
 \r
   #define EFI_OUTPUT_SCROLL   0x00000001\r
@@ -409,9 +404,9 @@ VOID
   );\r
 \r
 /**\r
-  this function gets the keys to filter for for the console in.  the valid \r
-  values to get are:\r
+  This function gets the keys to filter for for the console in.  \r
 \r
+  The valid values to get are:\r
   #define EFI_OUTPUT_SCROLL   0x00000001\r
   #define EFI_OUTPUT_PAUSE    0x00000002\r
   #define EFI_EXECUTION_BREAK 0x00000004\r
@@ -425,14 +420,14 @@ UINT32
   );\r
 \r
 /**\r
-  this function determins if the shell application should break.\r
+  This function determins if the shell application should break.\r
 \r
   This is used to inform a shell application that a break condition has been \r
-  initiated.  long loops should check this to prevent delays to the break.\r
+  initiated.  Long loops should check this to prevent delays to the break.\r
 \r
-  @retval TRUE                  a break has been signaled.  the application   \r
+  @retval TRUE                  A break has been signaled.  the application   \r
                                 should exit with EFI_ABORTED as soon as possible.\r
-  @retval FALSE                 continue as normal.\r
+  @retval FALSE                 Continue as normal.\r
 **/\r
 typedef\r
 BOOLEAN\r
@@ -460,10 +455,10 @@ VOID
   );\r
 \r
 /**\r
-  this function determins if the caller is running under the root shell.\r
+  This function determins if the caller is running under the root shell.\r
 \r
-  @retval TRUE                  The caller is running under the root shell\r
-  @retval FALSE                 The caller is not running under the root shell\r
+  @retval TRUE                  The caller is running under the root shell.\r
+  @retval FALSE                 The caller is not running under the root shell.\r
 \r
 **/\r
 typedef\r
@@ -475,14 +470,14 @@ BOOLEAN
 /**\r
   Close the console proxy to restore the original console.\r
 \r
-  This is an internal shell function to handle shell cascading.  it restores the \r
+  This is an internal shell function to handle shell cascading.  It restores the \r
   original set of console protocols.\r
   \r
   @param ConInHandle            The handle of ConIn.\r
-  @param ConIn                  pointer to the location to return the pointer to \r
+  @param ConIn                  Pointer to the location to return the pointer to \r
                                 the original console input.\r
   @param ConOutHandle           The handle of ConOut\r
-  @param ConOut                 pointer to the location to return the pointer to \r
+  @param ConOut                 Pointer to the location to return the pointer to \r
                                 the original console output.\r
 **/\r
 typedef\r
@@ -509,19 +504,19 @@ VOID
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
+  This is an internal shell function to enumerate the handle database.\r
 \r
-  this function gets the next handle in the handle database.  if no handles are \r
-  found EFI_NOT_FOUND is returned.  if the previous Handle was the last handle \r
+  This function gets the next handle in the handle database.  If no handles are \r
+  found EFI_NOT_FOUND is returned.  If the previous Handle was the last handle \r
   it is set to NULL before returning.\r
 \r
-  this must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
+  This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
 \r
-  @param Handle                 pointer to pointer to Handle.  will be set\r
+  @param Handle                 Pointer to pointer to Handle.  Will be set\r
                                 on a sucessful return.\r
 \r
-  @retval EFI_SUCCESS           the next handle in the handle database is *Handle\r
-  @retval EFI_NOT_FOUND         there is not another handle.\r
+  @retval EFI_SUCCESS           The next handle in the handle database is *Handle.\r
+  @retval EFI_NOT_FOUND         There is not another handle.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -530,13 +525,13 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
+  This is an internal shell function to enumerate the handle database.\r
 \r
-  this function skips the next SkipNum handles in the handle database.  If there \r
+  This function skips the next SkipNum handles in the handle database.  If there \r
   are not enough handles left to skip that many EFI_ACCESS_DENIED is returned and \r
   no skip is performed.\r
 \r
-  this must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
+  This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
 \r
   @param SkipNum                how many handles to skip\r
 \r
@@ -550,16 +545,16 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
+  This is an internal shell function to enumerate the handle database.\r
 \r
-  this function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE \r
+  This function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE \r
   will start from EnumIndex on the next call. \r
   \r
-  this must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
+  This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
 \r
-  @param EnumIndex              where to start.\r
+  @param EnumIndex              Where to start.\r
 \r
-  @retval the number of handles either read out or skipped before this reset.\r
+  @return the number of handles either read out or skipped before this reset.\r
 **/\r
 typedef\r
 UINTN\r
@@ -568,12 +563,12 @@ UINTN
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
+  This is an internal shell function to enumerate the handle database.\r
   \r
-  this must be called after INIT_HANDLE_ENUMERATOR.\r
+  This must be called after INIT_HANDLE_ENUMERATOR.\r
 \r
-  this function releases all memory and resources associated with the handle database.\r
-  after this no other handle enumerator functions except INIT_HANDLE_ENUMERATOR will \r
+  This function releases all memory and resources associated with the handle database.\r
+  Tfter this no other handle enumerator functions except INIT_HANDLE_ENUMERATOR will \r
   function properly.\r
 **/\r
 typedef\r
@@ -583,13 +578,13 @@ VOID
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
+  This is an internal shell function to enumerate the handle database.\r
 \r
-  this function returns the number of handles in the handle database.\r
+  This function returns the number of handles in the handle database.\r
   \r
-  this must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
+  This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.\r
 \r
-  @retval the number of handles in the handle database.\r
+  @return the number of handles in the handle database.\r
 **/\r
 typedef\r
 UINTN\r
@@ -598,49 +593,50 @@ UINTN
   );\r
 \r
 /**\r
-Handle Enumerator structure\r
+Handle Enumerator structure.\r
 **/\r
 typedef struct {\r
-  INIT_HANDLE_ENUMERATOR  Init;   ///< pointer to INIT_HANDLE_ENUMERATOR function\r
-  NEXT_HANDLE             Next;   ///< pointer to NEXT_HANDLE function\r
-  SKIP_HANDLE             Skip;   ///< pointer to SKIP_HANDLE function\r
-  RESET_HANDLE_ENUMERATOR Reset;  ///< pointer to RESET_HANDLE_ENUMERATOR function\r
-  CLOSE_HANDLE_ENUMERATOR Close;  ///< pointer to CLOSE_HANDLE_ENUMERATOR function\r
-  GET_NUM                 GetNum; ///< pointer to GET_NUM function\r
+  INIT_HANDLE_ENUMERATOR  Init;   ///< Pointer to INIT_HANDLE_ENUMERATOR function.\r
+  NEXT_HANDLE             Next;   ///< Pointer to NEXT_HANDLE function.\r
+  SKIP_HANDLE             Skip;   ///< Pointer to SKIP_HANDLE function.\r
+  RESET_HANDLE_ENUMERATOR Reset;  ///< Pointer to RESET_HANDLE_ENUMERATOR function.\r
+  CLOSE_HANDLE_ENUMERATOR Close;  ///< Pointer to CLOSE_HANDLE_ENUMERATOR function.\r
+  GET_NUM                 GetNum; ///< Pointer to GET_NUM function.\r
 } HANDLE_ENUMERATOR;\r
+\r
 /**\r
-  signature for the PROTOCOL_INFO structure \r
+  Signature for the PROTOCOL_INFO structure.\r
 **/\r
 #define PROTOCOL_INFO_SIGNATURE SIGNATURE_32 ('s', 'p', 'i', 'n')\r
+\r
 /**\r
   PROTOCOL_INFO structure for protocol enumerator functions.\r
-\r
 **/\r
 typedef struct {\r
-  UINTN                       Signature;   ///< PROTOCOL_INFO_SIGNATURE \r
-  LIST_ENTRY                  Link;        ///< standard lined list helper member\r
+  UINTN                       Signature;   ///< PROTOCOL_INFO_SIGNATURE.\r
+  LIST_ENTRY                  Link;        ///< Standard lined list helper member.\r
   //\r
-  // parsing info for the protocol\r
+  // The parsing info for the protocol.\r
   //\r
-  EFI_GUID                    ProtocolId;  ///< GUID for the protocol\r
-  CHAR16                      *IdString;   ///< Name of the protocol\r
-  SHELLENV_DUMP_PROTOCOL_INFO DumpToken;   ///< pointer to DumpToken function for the protocol\r
-  SHELLENV_DUMP_PROTOCOL_INFO DumpInfo;    ///< pointer to DumpInfo function for the protocol\r
+  EFI_GUID                    ProtocolId;  ///< GUID for the protocol.\r
+  CHAR16                      *IdString;   ///< Name of the protocol.\r
+  SHELLENV_DUMP_PROTOCOL_INFO DumpToken;   ///< Pointer to DumpToken function for the protocol.\r
+  SHELLENV_DUMP_PROTOCOL_INFO DumpInfo;    ///< Pointer to DumpInfo function for the protocol.\r
   //\r
-  // database info on which handles are supporting this protocol\r
+  // Patabase info on which handles are supporting this protocol.\r
   //\r
-  UINTN                       NoHandles;   ///< how many handles produce this protocol\r
-  EFI_HANDLE                  *Handles;    ///< array of handles\r
+  UINTN                       NoHandles;   ///< How many handles produce this protocol.\r
+  EFI_HANDLE                  *Handles;    ///< The array of handles.\r
 \r
 } PROTOCOL_INFO;\r
 \r
 //\r
-// declarations of protocol info enumerator\r
+// Declarations of protocol info enumerator.\r
 //\r
 /**\r
-  this is an internal shell function to initialize the protocol enumerator.\r
+  This is an internal shell function to initialize the protocol enumerator.\r
 \r
-  this must be called before NEXT_PROTOCOL_INFO, SKIP_PROTOCOL_INFO, \r
+  This must be called before NEXT_PROTOCOL_INFO, SKIP_PROTOCOL_INFO, \r
   RESET_PROTOCOL_INFO_ENUMERATOR, and CLOSE_PROTOCOL_INFO_ENUMERATOR are\r
   called.\r
 **/\r
@@ -651,7 +647,7 @@ VOID
   );\r
 \r
 /**\r
-  this function is an internal shell function for enumeration of protocols.  \r
+  This function is an internal shell function for enumeration of protocols.  \r
 \r
   This functiol will return the next protocol in the list.  If this is called \r
   immediately after initialization it will return the first.  If this is called\r
@@ -660,10 +656,10 @@ VOID
   This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be \r
   called after INIT_PROTOCOL_INFO_ENUMERATOR.\r
 \r
-  @param ProtocolInfo           pointer to pointer to protocol information structure.\r
+  @param ProtocolInfo           Pointer to pointer to protocol information structure.\r
 \r
-  @retval EFI_SUCCESS           the next protocol's information was sucessfully returned.  \r
-                                If there were no more protocols NULL was returned.\r
+  @retval EFI_SUCCESS           The next protocol's information was sucessfully returned.\r
+  @retval NULL                  There are no more protocols.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -672,14 +668,14 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function is an internal shell function for enumeration of protocols.  \r
+  This function is an internal shell function for enumeration of protocols.  \r
 \r
   This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be \r
   called after INIT_PROTOCOL_INFO_ENUMERATOR.\r
 \r
-  this function does nothing and always returns EFI_SUCCESS.\r
+  This function does nothing and always returns EFI_SUCCESS.\r
 \r
-  @retval EFI_SUCCESS           always returned (see note).\r
+  @retval EFI_SUCCESS           always returned (see above).\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -688,12 +684,12 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function is an internal shell function for enumeration of protocols.  \r
+  This function is an internal shell function for enumeration of protocols.  \r
 \r
   This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be \r
   called after INIT_PROTOCOL_INFO_ENUMERATOR.\r
 \r
-  this function resets the list of protocols such that the next one in the \r
+  This function resets the list of protocols such that the next one in the \r
   list is the begining of the list.\r
 **/\r
 typedef\r
@@ -704,12 +700,12 @@ VOID
 \r
 \r
 /**\r
-  this function is an internal shell function for enumeration of protocols.  \r
+  This function is an internal shell function for enumeration of protocols.  \r
 \r
   This must be called after INIT_PROTOCOL_INFO_ENUMERATOR.  After this call\r
   no protocol enumerator calls except INIT_PROTOCOL_INFO_ENUMERATOR may be made.\r
 \r
-  this function frees any memory or resources associated with the protocol\r
+  This function frees any memory or resources associated with the protocol\r
   enumerator.\r
 **/\r
 typedef\r
@@ -719,18 +715,18 @@ VOID
   );\r
 \r
 /**\r
-*  protocol enumerator structure of function pointers.\r
+  Protocol enumerator structure of function pointers.\r
 **/\r
 typedef struct {\r
-  INIT_PROTOCOL_INFO_ENUMERATOR   Init;   ///< pointer to INIT_PROTOCOL_INFO_ENUMERATOR function\r
-  NEXT_PROTOCOL_INFO              Next;   ///< pointer to NEXT_PROTOCOL_INFO function\r
-  SKIP_PROTOCOL_INFO              Skip;   ///< pointer to SKIP_PROTOCOL_INFO function\r
-  RESET_PROTOCOL_INFO_ENUMERATOR  Reset;  ///< pointer to RESET_PROTOCOL_INFO_ENUMERATOR function\r
-  CLOSE_PROTOCOL_INFO_ENUMERATOR  Close;  ///< pointer to CLOSE_PROTOCOL_INFO_ENUMERATOR function\r
+  INIT_PROTOCOL_INFO_ENUMERATOR   Init;   ///< Pointer to INIT_PROTOCOL_INFO_ENUMERATOR function.\r
+  NEXT_PROTOCOL_INFO              Next;   ///< Pointer to NEXT_PROTOCOL_INFO function.\r
+  SKIP_PROTOCOL_INFO              Skip;   ///< Pointer to SKIP_PROTOCOL_INFO function.\r
+  RESET_PROTOCOL_INFO_ENUMERATOR  Reset;  ///< Pointer to RESET_PROTOCOL_INFO_ENUMERATOR function.\r
+  CLOSE_PROTOCOL_INFO_ENUMERATOR  Close;  ///< Pointer to CLOSE_PROTOCOL_INFO_ENUMERATOR function.\r
 } PROTOCOL_INFO_ENUMERATOR;\r
 \r
 /**\r
-  this function is used to retrieve a user-friendly display name for a handle.  \r
+  This function is used to retrieve a user-friendly display name for a handle.  \r
 \r
   If UseComponentName is TRUE then the component name protocol for this device \r
   or it's parent device (if required) will be used to obtain the name of the \r
@@ -748,17 +744,17 @@ typedef struct {
   \r
   Upon sucessful return the memory for *BestDeviceName is up to the caller to free.\r
 \r
-  @param DeviceHandle           the device handle whose name is desired\r
-  @param UseComponentName       whether to use the ComponentName protocol at all\r
-  @param UseDevicePath          whether to use the DevicePath protocol at all\r
-  @param Language               pointer to language string to use\r
-  @param BestDeviceName         pointer to pointer to string allocated with the name\r
-  @param ConfigurationStatus    pointer to status for opening a Configuration protocol\r
-  @param DiagnosticsStatus      pointer to status for opening a Diagnostics protocol\r
-  @param Display                Whether to Print this out to default Print location\r
-  @param Indent                 how many characters to indent the printing\r
+  @param DeviceHandle           The device handle whose name is desired.\r
+  @param UseComponentName       Whether to use the ComponentName protocol at all.\r
+  @param UseDevicePath          Whether to use the DevicePath protocol at all.\r
+  @param Language               Pointer to language string to use.\r
+  @param BestDeviceName         Pointer to pointer to string allocated with the name.\r
+  @param ConfigurationStatus    Pointer to status for opening a Configuration protocol.\r
+  @param DiagnosticsStatus      Pointer to status for opening a Diagnostics protocol.\r
+  @param Display                Whether to Print this out to default Print location.\r
+  @param Indent                 How many characters to indent the printing.\r
 \r
-  @retval EFI_SUCCESS           this function always returns EFI_SUCCESS\r
+  @retval EFI_SUCCESS           This function always returns EFI_SUCCESS.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -778,13 +774,13 @@ EFI_STATUS
 #define EFI_SHELL_ENHANCED_MODE_VER   L"1.1.2" ///< string for highest version this shell supports\r
 \r
 /**\r
-  this function gets the shell mode as stored in the shell environment \r
-  "efishellmode".  it will not fail.\r
+  This function gets the shell mode as stored in the shell environment \r
+  "efishellmode".  It will not fail.\r
 \r
-  @param Mode                   returns a string representing one of the \r
+  @param Mode                   Returns a string representing one of the \r
                                 2 supported modes of the shell.\r
 \r
-  @retval EFI_SUCCESS           this function always returns success\r
+  @retval EFI_SUCCESS           This function always returns success.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -793,17 +789,17 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Convert a file system style name to an file path\r
+  Convert a file system style name to a device path.\r
 \r
   This function will convert a shell path name to a Device Path Protocol path.\r
   This function will allocate any required memory for this operation and it \r
   is the responsibility of the caller to free that memory when no longer required.\r
 \r
-  if anything prevents the complete conversion free any allocated memory and \r
+  If anything prevents the complete conversion free any allocated memory and \r
   return NULL.\r
 \r
-  @retval !NULL                 a pointer to the callee allocated Device Path\r
-  @retval NULL                  the operation could not be completed.\r
+  @retval !NULL                 A pointer to the callee allocated Device Path.\r
+  @retval NULL                  The operation could not be completed.\r
 **/\r
 typedef \r
 EFI_DEVICE_PATH_PROTOCOL* \r
@@ -812,25 +808,26 @@ EFI_DEVICE_PATH_PROTOCOL*
   );\r
 \r
 /**\r
-  converts a device path into a file system map name.\r
+  Converts a device path into a file system map name.\r
+\r
+  If DevPath is NULL, then ASSERT.\r
 \r
-  if DevPath is NULL then ASSERT\r
   This function looks through the shell environment map for a map whose device\r
   path matches the DevPath parameter.  If one is found the Name is returned via \r
   Name parameter.  If sucessful the caller must free the memory allocated for\r
   Name.\r
 \r
-  this function will use the internal lock to prevent changes to the map during \r
+  This function will use the internal lock to prevent changes to the map during \r
   the lookup operation.\r
   \r
-  @param DevPath                The device path to search for a name for\r
-  @param ConsistMapping         what state to verify map flag VAR_ID_CONSIST\r
-  @param Name                   on sucessful return the name of that device path\r
+  @param DevPath                The device path to search for a name for.\r
+  @param ConsistMapping         What state to verify map flag VAR_ID_CONSIST.\r
+  @param Name                   On sucessful return the name of that device path.\r
 \r
-  @retval EFI_SUCCESS           the DevPath was found and the name returned\r
+  @retval EFI_SUCCESS           The DevPath was found and the name returned\r
                                 in Name.  \r
   @retval EFI_OUT_OF_RESOURCES  A required memory allocation failed.\r
-  @retval EFI_UNSUPPORTED       the DevPath was not found in the map\r
+  @retval EFI_UNSUPPORTED       The DevPath was not found in the map.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -841,23 +838,23 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function will open a group of files that match the Arg path, but will not \r
-  support the wildcard characters ('?' and '*') in the Arg path.  if there are \r
+  This function will open a group of files that match the Arg path, but will not \r
+  support the wildcard characters ('?' and '*') in the Arg path.  If there are \r
   any wildcard characters in the path this function will return \r
-  EFI_INVALID_PARAMETER.  the return is a double linked list based on the \r
-  LIST_ENTRY linked list structure.  use this in conjunction with the \r
+  EFI_INVALID_PARAMETER.  The return is a double linked list based on the \r
+  LIST_ENTRY linked list structure.  Use this in conjunction with the \r
   SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.\r
   The memory allocated by the callee for this list is freed by making a call to \r
   SHELLENV_FREE_FILE_LIST.\r
 \r
-  @param Arg                    pointer Path to files to open\r
-  @param ListHead               pointer to allocated and initialized list head \r
+  @param Arg                    Pointer Path to files to open.\r
+  @param ListHead               Pointer to allocated and initialized list head \r
                                 upon which to append all the opened file structures.\r
 \r
   @retval EFI_SUCCESS           1 or more files was opened and a struct of each file's\r
                                 information was appended to ListHead.\r
-  @retval EFI_OUT_OF_RESOURCES  a memory allocation failed.\r
-  @retval EFI_NOT_FOUND         no matching files could be found.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_NOT_FOUND         No matching files could be found.\r
   @sa SHELLENV_FREE_FILE_LIST\r
 **/\r
 typedef\r
@@ -868,18 +865,18 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  this function removes duplicate file listings from lists.\r
+  This function removes duplicate file listings from lists.\r
 \r
-  this is a function for use with SHELLENV_FILE_META_ARG_NO_WILDCARD and \r
-  SHELLENV_FILE_META_ARG.  this function will verify that there are no duplicate\r
-  files in the list of returned files.  any file listed twice will have one of its\r
+  This is a function for use with SHELLENV_FILE_META_ARG_NO_WILDCARD and \r
+  SHELLENV_FILE_META_ARG.  This function will verify that there are no duplicate\r
+  files in the list of returned files.  Any file listed twice will have one of its\r
   instances removed.\r
 \r
-  @param ListHead               pointer to linked list head that was returned from \r
+  @param ListHead               Pointer to linked list head that was returned from \r
                                 SHELLENV_FILE_META_ARG_NO_WILDCARD or\r
                                 SHELLENV_FILE_META_ARG.\r
 \r
-  @retval EFI_SUCCESS           this function always returns success.\r
+  @retval EFI_SUCCESS           This function always returns success.\r
 \r
 **/\r
 typedef\r
@@ -891,24 +888,24 @@ EFI_STATUS
 /**\r
   Converts a File System map name to a device path.\r
 \r
-  if DevPath is NULL then ASSERT()\r
+  if DevPath is NULL, then ASSERT().\r
 \r
   This function looks through the shell environment map for a map whose Name \r
   matches the Name parameter.  If one is found the device path pointer is \r
-  updated to point to that file systems device path.  the caller should not \r
+  updated to point to that file systems device path.  The caller should not \r
   free the memory from that device path.\r
 \r
-  this function will use the internal lock to prevent changes to the map during \r
+  This function will use the internal lock to prevent changes to the map during \r
   the lookup operation.\r
 \r
-  @param Name                   pointer to NULL terminated UNICODE string of the \r
-                                file system name\r
-  @param DevPath                pointer to pointer to DevicePath.  only valid on \r
-                                OUT if sucessful\r
+  @param Name                   Pointer to NULL terminated UNICODE string of the \r
+                                file system name.\r
+  @param DevPath                Pointer to pointer to DevicePath.  only valid on \r
+                                OUT if sucessful.\r
 \r
-  @retval EFI_SUCCESS           the conversion was successful and the device \r
+  @retval EFI_SUCCESS           The conversion was successful and the device \r
                                 path was returned.\r
-  @retval EFI_NOT_FOUND         the file system could not be found in the map.\r
+  @retval EFI_NOT_FOUND         The file system could not be found in the map.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -917,8 +914,7 @@ EFI_STATUS
   OUT EFI_DEVICE_PATH_PROTOCOL     **DevPath\r
   );\r
 \r
-/// EFI_SHELL_ENVIRONMENT2 protocol structure\r
-/// contains pointers to functions\r
+/// EFI_SHELL_ENVIRONMENT2 protocol structure.\r
 typedef struct {\r
   SHELLENV_EXECUTE                        Execute;\r
   SHELLENV_GET_ENV                        GetEnv;\r
@@ -931,7 +927,7 @@ typedef struct {
   SHELLENV_FREE_FILE_LIST                 FreeFileList;\r
 \r
   //\r
-  // The following services are only used by the shell itself\r
+  // The following services are only used by the shell itself.\r
   //\r
   SHELLENV_NEW_SHELL                      NewShell;\r
   SHELLENV_BATCH_IS_ACTIVE                BatchIsActive;\r
@@ -939,11 +935,11 @@ typedef struct {
   SHELLENV_FREE_RESOURCES                 FreeResources;\r
 \r
   //\r
-  // GUID to differentiate ShellEnvironment2 from ShellEnvironment\r
+  // GUID to differentiate ShellEnvironment2 from ShellEnvironment.\r
   //\r
   EFI_GUID                                SESGuid;\r
   //\r
-  // Major Version grows if shell environment interface has been changes\r
+  // Major Version grows if shell environment interface has been changes.\r
   //\r
   UINT32                                  MajorVersion;\r
   UINT32                                  MinorVersion;\r
@@ -973,4 +969,5 @@ typedef struct {
 \r
 extern EFI_GUID gEfiShellEnvironment2Guid;\r
 extern EFI_GUID gEfiShellEnvironment2ExtGuid;\r
-#endif // _SHELLENV_H_\r
+\r
+#endif // _SHELL_ENVIRONMENT_2_PROTOCOL_H_\r