]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Protocol/EfiShellEnvironment2.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShellEnvironment2.h
index 9271786372781fde54e954b16171c56cd8db9313..8b7c86dc24fcbafeed5ee6fcb9d178b47cc2fbbf 100644 (file)
 /** @file\r
   Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)\r
 \r
-Copyright (c) 2005, 2009 Intel Corporation\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
+  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\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
-\r
-#define DEFAULT_INIT_ROW    1\r
-#define DEFAULT_AUTO_LF     FALSE\r
+#ifndef _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
-  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
+  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[in] Handle                 The handle the protocol is on.\r
+  @param[in] Interface              The interface to the protocol.\r
 \r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_DUMP_PROTOCOL_INFO) (\r
+(EFIAPI *SHELLENV_DUMP_PROTOCOL_INFO)(\r
   IN EFI_HANDLE                   Handle,\r
   IN VOID                         *Interface\r
   );\r
 \r
 /**\r
-  this function is a prototype foe each command internal to the EFI shell \r
-  implementation.  the specific command depends on the implementation.  This is \r
+  This function is a prototype for each command internal to the EFI shell\r
+  implementation.  The specific command depends on the implementation.  This is\r
   used when programatically adding shell commands.\r
 \r
-  @param ImageHandle            The handle to the binary shell\r
-  @param SystemTable            pointer to the system table.\r
+  @param[in] ImageHandle        The handle to the binary shell.\r
+  @param[in] SystemTable        The pointer to the system table.\r
 \r
-  @retval EFI_SUCCESS           the command ran to completion\r
-  @return other                 an error ocurred.  any error is possible \r
-                                depending on the implementation of the shell \r
+  @retval EFI_SUCCESS           The command completed.\r
+  @retval other                 An error occurred.  Any error is possible\r
+                                depending on the implementation of the shell\r
                                 command.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SHELLENV_INTERNAL_COMMAND) (\r
+(EFIAPI *SHELLENV_INTERNAL_COMMAND)(\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   );\r
 \r
 /**\r
-  This function is a prototype for one that gets a help string for a given command. \r
-  This is used when programatically adding shell commands.  Upon successful return \r
+  This function is a prototype for one that gets a help string for a given command.\r
+  This is used when programatically adding shell commands.  Upon successful return\r
   the memory allocated is up to the caller to free.\r
 \r
-  @param Str                      pointer to pointer to string to display for help.\r
+  @param[in, out] Str              Pointer to pointer to string to display for help.\r
 \r
-  @retval EFI_SUCCESS             the help string is in the parameter Str.\r
+  @retval EFI_SUCCESS             The help string is in the parameter Str.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SHELLCMD_GET_LINE_HELP) (\r
+(EFIAPI *SHELLCMD_GET_LINE_HELP)(\r
   IN OUT CHAR16                 **Str\r
   );\r
 \r
 /**\r
-* Structure returned from functions that open multiple files\r
+Structure returned from functions that open multiple files.\r
 **/\r
 typedef struct {\r
-  UINT32                    Signature;            ///< SHELL_FILE_ARG_SIGNATURE\r
-  LIST_ENTRY                Link;                 ///< linked list helper\r
-  EFI_STATUS                Status;               ///< File's status\r
+  UINT32                      Signature;          ///< SHELL_FILE_ARG_SIGNATURE.\r
+  LIST_ENTRY                  Link;               ///< Linked list helper.\r
+  EFI_STATUS                  Status;             ///< File's status.\r
 \r
-  EFI_FILE_HANDLE           Parent;               ///< what is the Parent file of this file\r
-  UINT64                    OpenMode;             ///< how was the file opened\r
-  CHAR16                    *ParentName;          ///< string representation of parent\r
-  EFI_DEVICE_PATH_PROTOCOL  *ParentDevicePath;    ///< DevicePath for Parent\r
+  EFI_FILE_HANDLE             Parent;             ///< What is the Parent file of this file.\r
+  UINT64                      OpenMode;           ///< How was the file opened.\r
+  CHAR16                      *ParentName;        ///< String representation of parent.\r
+  EFI_DEVICE_PATH_PROTOCOL    *ParentDevicePath;  ///< DevicePath for Parent.\r
 \r
-  CHAR16                    *FullName;            ///< path and file name for this file\r
-  CHAR16                    *FileName;            ///< file name for this file\r
+  CHAR16                      *FullName;          ///< Path and file name for this file.\r
+  CHAR16                      *FileName;          ///< File name for this file.\r
 \r
-  EFI_FILE_HANDLE           Handle;               ///< handle to this file\r
-  EFI_FILE_INFO             *Info;                ///< pointer to file info for this file\r
+  EFI_FILE_HANDLE             Handle;             ///< Handle to this file.\r
+  EFI_FILE_INFO               *Info;              ///< Pointer to file info for this file.\r
 } SHELL_FILE_ARG;\r
 \r
-/// signature for SHELL_FILE_ARG\r
-#define SHELL_FILE_ARG_SIGNATURE  SIGNATURE_32 ('g', 'r', 'a', 'f') \r
+/// Signature for SHELL_FILE_ARG.\r
+#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
-    0x47c7b221, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \\r
+    0x47c7b221, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \\r
   }\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
     0xd2c18636, 0x40e5, 0x4eb5, {0xa3, 0x1b, 0x36, 0x69, 0x5f, 0xd4, 0x2c, 0x87} \\r
   }\r
 \r
-#define EFI_SHELL_MAJOR_VER 0x00000001 ///< Major version of the EFI_SHELL_ENVIRONMENT2\r
-#define EFI_SHELL_MINOR_VER 0x00000000 ///< Minor version of the EFI_SHELL_ENVIRONMENT2\r
+#define EFI_SHELL_MAJOR_VER  0x00000001 ///< Major version of the EFI_SHELL_ENVIRONMENT2.\r
+#define EFI_SHELL_MINOR_VER  0x00000000 ///< Minor version of the EFI_SHELL_ENVIRONMENT2.\r
 \r
 /**\r
-  execute a command line\r
+  Execute a command line.\r
 \r
-  this function will run the CommandLine.  This includes loading any required images, \r
-  parsing any requires scripts, and it DebugOutput is TRUE printing errors \r
+  This function will run the CommandLine.  This includes loading any required images,\r
+  parsing any requires scripts, and if DebugOutput is TRUE printing errors\r
   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 DebugOutput            TRUE indicates that errors should be printed directly.\r
-                                FALSE supresses error messages.\r
-\r
-  @retval EFI_SUCCESS           the command line executed and completed.\r
-  @retval EFI_ABORTED           the operation did not complete due to abort.\r
+\r
+  @param[in] ParentImageHandle  Handle of the image executing this operation.\r
+  @param[in] CommandLine        The string command line to execute.\r
+  @param[in] DebugOutput        TRUE indicates that errors should be printed directly.\r
+                                FALSE suppresses error messages.\r
+\r
+  @retval EFI_SUCCESS           The command line executed and completed.\r
+  @retval EFI_ABORTED           The operation aborted.\r
   @retval EFI_INVALID_PARAMETER A parameter did not have a valid value.\r
   @retval EFI_OUT_OF_RESOURCES  A required memory allocation failed.\r
 \r
@@ -140,41 +128,41 @@ typedef struct {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SHELLENV_EXECUTE) (\r
+(EFIAPI *SHELLENV_EXECUTE)(\r
   IN EFI_HANDLE   *ParentImageHandle,\r
   IN CHAR16       *CommandLine,\r
   IN BOOLEAN      DebugOutput\r
   );\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[in] Name               The 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
-CHAR16 * \r
-(EFIAPI *SHELLENV_GET_ENV) (\r
+typedef\r
+CHAR16 *\r
+(EFIAPI *SHELLENV_GET_ENV)(\r
   IN CHAR16 *Name\r
   );\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[in] Name               The 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
-CHAR16 * \r
-(EFIAPI *SHELLENV_GET_MAP) (\r
+typedef\r
+CHAR16 *\r
+(EFIAPI *SHELLENV_GET_MAP)(\r
   IN CHAR16 *Name\r
   );\r
 \r
@@ -184,18 +172,18 @@ 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[in] Handler                The handler function to call when the command gets called.\r
+  @param[in] Cmd                    The command name.\r
+  @param[in] GetLineHelp            The function to call of type "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
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SHELLENV_ADD_CMD) (\r
+(EFIAPI *SHELLENV_ADD_CMD)(\r
   IN SHELLENV_INTERNAL_COMMAND    Handler,\r
   IN CHAR16                       *Cmd,\r
   IN SHELLCMD_GET_LINE_HELP       GetLineHelp\r
@@ -208,17 +196,16 @@ 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 DumpToken              The function pointer to dump token function or \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
+  @param[in] Protocol           The pointer to the protocol's GUID.\r
+  @param[in] DumpToken          The function pointer to dump token function or\r
+                                NULL.\r
+  @param[in] DumpInfo           The function pointer to dump infomation function\r
+                                or NULL.\r
+  @param[in] IdString           The English name of the protocol.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_ADD_PROT) (\r
+(EFIAPI *SHELLENV_ADD_PROT)(\r
   IN EFI_GUID                     *Protocol,\r
   IN SHELLENV_DUMP_PROTOCOL_INFO  DumpToken OPTIONAL,\r
   IN SHELLENV_DUMP_PROTOCOL_INFO  DumpInfo OPTIONAL,\r
@@ -226,144 +213,145 @@ 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
+  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
   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[in] Protocol          The GUID of the protocol to look for.\r
+  @param[in] GenId             Whether to generate a name string if it is 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
-(EFIAPI *SHELLENV_GET_PROT) (\r
-  IN EFI_GUID *Protocol, \r
+typedef\r
+CHAR16 *\r
+(EFIAPI *SHELLENV_GET_PROT)(\r
+  IN EFI_GUID *Protocol,\r
   IN BOOLEAN GenId\r
   );\r
 \r
 /**\r
-  this function returns the current directory on a given device\r
+  This function returns a string array containing the current directory on\r
+  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
+  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
+  no longer required.\r
 \r
-  @param DeviceName             the name of the device to get the current \r
-                                directory on or NULL for current device\r
+  @param[in] 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
+  @return String array with the current directory on the current or specified device.\r
 \r
 **/\r
-typedef \r
-CHAR16*\r
-(EFIAPI *SHELLENV_CUR_DIR) (\r
+typedef\r
+CHAR16 *\r
+(EFIAPI *SHELLENV_CUR_DIR)(\r
   IN CHAR16 *DeviceName OPTIONAL\r
   );\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.  It returns 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
+  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
-                                upon which to append all the opened file structures.\r
+  @param[in] Arg                 The pointer Path to files to open.\r
+  @param[in, out] ListHead       The pointer to the allocated and initialized list head\r
+                                 upon which to append all opened file structures.\r
 \r
-  @retval EFI_SUCCESS           1 or more files was opened and a struct of each file's\r
+  @retval EFI_SUCCESS           One 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
-(EFIAPI *SHELLENV_FILE_META_ARG) (\r
+(EFIAPI *SHELLENV_FILE_META_ARG)(\r
   IN CHAR16               *Arg,\r
   IN OUT LIST_ENTRY       *ListHead\r
   );\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
+  @param[in, out] ListHead       Pointer to list to free all nodes of.\r
 \r
-  @retval EFI_SUCCESS           always returned.\r
+  @retval EFI_SUCCESS           This function always returns EFI_SUCCESS.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SHELLENV_FREE_FILE_LIST) (\r
+(EFIAPI *SHELLENV_FREE_FILE_LIST)(\r
   IN OUT LIST_ENTRY       *ListHead\r
   );\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[in] ImageHandle        The handle which will use the new ShellInterface\r
                                 protocol.\r
 \r
-  @return the newly allocated shell interface protocol.\r
+  @return The newly allocated shell interface protocol.\r
 \r
 **/\r
-typedef \r
-EFI_SHELL_INTERFACE\r
-(EFIAPI *SHELLENV_NEW_SHELL) (\r
+typedef\r
+EFI_SHELL_INTERFACE *\r
+(EFIAPI *SHELLENV_NEW_SHELL)(\r
   IN EFI_HANDLE ImageHandle\r
   );\r
 \r
 /**\r
-  this function determins whether a script file is currently being processed.\r
+  This function determines 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
-  know for some shell commands whether they are being run manually or as part of a \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
-(EFIAPI *SHELLENV_BATCH_IS_ACTIVE) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_BATCH_IS_ACTIVE)(\r
+  VOID\r
   );\r
 \r
 /**\r
-  This is an internal shell function to free any and all allocated resources.  \r
-  This should be called just closing the shell.\r
+  This is an internal shell function to free any and all allocated resources.\r
+  This should be called immediately prior to closing the shell.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_FREE_RESOURCES) (\r
+(EFIAPI *SHELLENV_FREE_RESOURCES)(\r
   VOID\r
   );\r
 \r
 /**\r
   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
+  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
   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[in] StartRow               The row number to start this on.\r
+  @param[in] AutoWrap               Whether to auto wrap rows that are too long.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_ENABLE_PAGE_BREAK) (\r
+(EFIAPI *SHELLENV_ENABLE_PAGE_BREAK)(\r
   IN INT32      StartRow,\r
   IN BOOLEAN    AutoWrap\r
   );\r
@@ -371,123 +359,123 @@ 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
+  Disabling this causes the output to print out exactly as coded, with no breaks\r
   for readability.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_DISABLE_PAGE_BREAK) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_DISABLE_PAGE_BREAK)(\r
+  VOID\r
   );\r
 \r
 /**\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
-(EFIAPI *SHELLENV_GET_PAGE_BREAK) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_GET_PAGE_BREAK)(\r
+  VOID\r
   );\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
   #define EFI_OUTPUT_PAUSE    0x00000002\r
   #define EFI_EXECUTION_BREAK 0x00000004\r
 \r
-  @param KeyFilter              The new key filter to use.\r
+  @param[in] KeyFilter              The new key filter to use.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_SET_KEY_FILTER) (\r
+(EFIAPI *SHELLENV_SET_KEY_FILTER)(\r
   IN UINT32      KeyFilter\r
   );\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
 \r
-  @retval the current filter mask.\r
+  @retval The current filter mask.\r
 **/\r
 typedef\r
 UINT32\r
-(EFIAPI *SHELLENV_GET_KEY_FILTER) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_GET_KEY_FILTER)(\r
+  VOID\r
   );\r
 \r
 /**\r
-  this function determins if the shell application should break.\r
+  This function determines 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
+  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
 \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
-(EFIAPI *SHELLENV_GET_EXECUTION_BREAK) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_GET_EXECUTION_BREAK)(\r
+  VOID\r
   );\r
 \r
 /**\r
-  This is an internal-shell function used to increment the shell nesting level.\r
+  This is an internal shell function used to increment the shell nesting level.\r
 \r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_INCREMENT_SHELL_NESTING_LEVEL) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_INCREMENT_SHELL_NESTING_LEVEL)(\r
+  VOID\r
   );\r
 \r
 /**\r
-  This is an internal-shell function used to decrement the shell nesting level.\r
+  This is an internal shell function used to decrement the shell nesting level.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_DECREMENT_SHELL_NESTING_LEVEL) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_DECREMENT_SHELL_NESTING_LEVEL)(\r
+  VOID\r
   );\r
 \r
 /**\r
-  this function determins if the caller is running under the root shell.\r
+  This function determines 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
 BOOLEAN\r
-(EFIAPI *SHELLENV_IS_ROOT_SHELL) (\r
-  IN VOID\r
+(EFIAPI *SHELLENV_IS_ROOT_SHELL)(\r
+  VOID\r
   );\r
 \r
 /**\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
-                                the original console input.\r
-  @param ConOutHandle           The handle of ConOut\r
-  @param ConOut                 pointer to the location to return the pointer to \r
-                                the original console output.\r
+\r
+  @param[in] ConInHandle         The handle of ConIn.\r
+  @param[in, out] ConIn          The pointer to the location to return the pointer to\r
+                                 the original console input.\r
+  @param[in] ConOutHandle        The handle of ConOut\r
+  @param[in, out] ConOut         The pointer to the location to return the pointer to\r
+                                 the original console output.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *SHELLENV_CLOSE_CONSOLE_PROXY) (\r
+(EFIAPI *SHELLENV_CLOSE_CONSOLE_PROXY)(\r
   IN     EFI_HANDLE                       ConInHandle,\r
   IN OUT EFI_SIMPLE_TEXT_INPUT_PROTOCOL   **ConIn,\r
   IN     EFI_HANDLE                       ConOutHandle,\r
@@ -497,480 +485,484 @@ VOID
 //\r
 // declarations of handle enumerator\r
 //\r
+\r
 /**\r
   For ease of use the shell maps handle #'s to short numbers.\r
-  This is only done on request for various internal commands and the references \r
+  This is only done on request for various internal commands and the references\r
   are immediately freed when the internal command completes.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *INIT_HANDLE_ENUMERATOR) (\r
+(EFIAPI *INIT_HANDLE_ENUMERATOR)(\r
   VOID\r
   );\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
-                                on a sucessful return.\r
+  @param[in, out] Handle         The pointer to pointer to Handle.  It is 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
-(EFIAPI *NEXT_HANDLE) (\r
+(EFIAPI *NEXT_HANDLE)(\r
   IN OUT EFI_HANDLE             **Handle\r
   );\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
-  are not enough handles left to skip that many EFI_ACCESS_DENIED is returned and \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
+  @param[in] SkipNum            How many handles to skip\r
 \r
-  @retval EFI_SUCCESS           the next handle in the handle database is *Handle\r
-  @retval EFI_ACCESS_DENIED     there are not SkipNum handles left in the database\r
+  @retval EFI_SUCCESS           The next handle in the handle database is *Handle\r
+  @retval EFI_ACCESS_DENIED     There are not SkipNum handles left in the database\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *SKIP_HANDLE) (\r
+(EFIAPI *SKIP_HANDLE)(\r
   IN UINTN                   SkipNum\r
   );\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
+  will start from EnumIndex on the next call.\r
 \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[in] 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
-(EFIAPI *RESET_HANDLE_ENUMERATOR) (\r
+(EFIAPI *RESET_HANDLE_ENUMERATOR)(\r
   IN UINTN                  EnumIndex\r
   );\r
 \r
 /**\r
-  this is an internal shell function to enumerate the handle database.\r
-  \r
-  this must be called after INIT_HANDLE_ENUMERATOR.\r
+  This is an internal shell function to enumerate the handle database.\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 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
   function properly.\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *CLOSE_HANDLE_ENUMERATOR) (\r
+(EFIAPI *CLOSE_HANDLE_ENUMERATOR)(\r
   VOID\r
   );\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
 \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
-(EFIAPI *GET_NUM) (\r
+(EFIAPI *GET_NUM)(\r
   VOID\r
   );\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;   ///< The pointer to INIT_HANDLE_ENUMERATOR function.\r
+  NEXT_HANDLE                Next;   ///< The pointer to NEXT_HANDLE function.\r
+  SKIP_HANDLE                Skip;   ///< The pointer to SKIP_HANDLE function.\r
+  RESET_HANDLE_ENUMERATOR    Reset;  ///< The pointer to RESET_HANDLE_ENUMERATOR function.\r
+  CLOSE_HANDLE_ENUMERATOR    Close;  ///< The pointer to CLOSE_HANDLE_ENUMERATOR function.\r
+  GET_NUM                    GetNum; ///< The 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
+#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 linked 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; ///< The GUID for the protocol.\r
+  CHAR16                         *IdString;  ///< The name of the protocol.\r
+  SHELLENV_DUMP_PROTOCOL_INFO    DumpToken;  ///< The pointer to DumpToken function for the protocol.\r
+  SHELLENV_DUMP_PROTOCOL_INFO    DumpInfo;   ///< The 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
-\r
+  UINTN                          NoHandles; ///< The number of handles producing this protocol.\r
+  EFI_HANDLE                     *Handles;  ///< The array of handles.\r
 } PROTOCOL_INFO;\r
 \r
 //\r
-// declarations of protocol info enumerator\r
+// Declarations of protocol info enumerator.\r
 //\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
 typedef\r
 VOID\r
-(EFIAPI *INIT_PROTOCOL_INFO_ENUMERATOR) (\r
+(EFIAPI *INIT_PROTOCOL_INFO_ENUMERATOR)(\r
   VOID\r
   );\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
-  immediately after reset it will return the protocol first again.\r
+  This function returns the next protocol on the list.  If this is called\r
+  immediately after initialization, it will return the first protocol on the list.\r
+  If this is called immediately after reset, it will return the first protocol again.\r
 \r
-  This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be \r
+  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[in, out] ProtocolInfo   The 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
-(EFIAPI *NEXT_PROTOCOL_INFO) (\r
+(EFIAPI *NEXT_PROTOCOL_INFO)(\r
   IN OUT PROTOCOL_INFO            **ProtocolInfo\r
   );\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
+  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
-(EFIAPI *SKIP_PROTOCOL_INFO) (\r
+(EFIAPI *SKIP_PROTOCOL_INFO)(\r
   IN UINTN                         SkipNum\r
   );\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
+  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
 VOID\r
-(EFIAPI *RESET_PROTOCOL_INFO_ENUMERATOR) (\r
+(EFIAPI *RESET_PROTOCOL_INFO_ENUMERATOR)(\r
   VOID\r
   );\r
 \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
 VOID\r
-(EFIAPI *CLOSE_PROTOCOL_INFO_ENUMERATOR) (\r
+(EFIAPI *CLOSE_PROTOCOL_INFO_ENUMERATOR)(\r
   VOID\r
   );\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;  ///< The pointer to INIT_PROTOCOL_INFO_ENUMERATOR function.\r
+  NEXT_PROTOCOL_INFO                Next;  ///< The pointer to NEXT_PROTOCOL_INFO function.\r
+  SKIP_PROTOCOL_INFO                Skip;  ///< The pointer to SKIP_PROTOCOL_INFO function.\r
+  RESET_PROTOCOL_INFO_ENUMERATOR    Reset; ///< The pointer to RESET_PROTOCOL_INFO_ENUMERATOR function.\r
+  CLOSE_PROTOCOL_INFO_ENUMERATOR    Close; ///< The 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
+  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
   device.  If UseDevicePath is TRUE it will get the human readable device path\r
   and return that.  If both are TRUE it will try to use component name first\r
-  and device path if that fails. \r
+  and device path if that fails.\r
 \r
-  It will use either ComponentName or ComponentName2 protocol, depending on \r
+  It will use either ComponentName or ComponentName2 protocol, depending on\r
   what is present.\r
 \r
   This function will furthur verify whether the handle in question produced either\r
-  EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also \r
-  whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or \r
+  EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also\r
+  whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or\r
   EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.\r
-  \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
+  Upon successful return, the memory for *BestDeviceName is up to the caller to free.\r
 \r
-  @retval EFI_SUCCESS           this function always returns EFI_SUCCESS\r
+  @param[in] DeviceHandle            The device handle whose name is desired.\r
+  @param[in] UseComponentName        Whether to use the ComponentName protocol at all.\r
+  @param[in] UseDevicePath           Whether to use the DevicePath protocol at all.\r
+  @param[in] Language                The pointer to the language string to use.\r
+  @param[in, out] BestDeviceName     The pointer to pointer to string allocated with the name.\r
+  @param[out] ConfigurationStatus    The pointer to status for opening a Configuration protocol.\r
+  @param[out] DiagnosticsStatus      The pointer to status for opening a Diagnostics protocol.\r
+  @param[in] Display                 Whether to Print this out to default Print location.\r
+  @param[in] Indent                  How many characters to indent the printing.\r
+\r
+  @retval EFI_SUCCESS           This function always returns EFI_SUCCESS.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *GET_DEVICE_NAME) (\r
-  EFI_HANDLE  DeviceHandle,\r
-  BOOLEAN     UseComponentName,\r
-  BOOLEAN     UseDevicePath,\r
-  CHAR8       *Language,\r
-  CHAR16      **BestDeviceName,\r
-  EFI_STATUS  *ConfigurationStatus,\r
-  EFI_STATUS  *DiagnosticsStatus,\r
-  BOOLEAN     Display,\r
-  UINTN       Indent\r
+(EFIAPI *GET_DEVICE_NAME)(\r
+  IN EFI_HANDLE  DeviceHandle,\r
+  IN BOOLEAN     UseComponentName,\r
+  IN BOOLEAN     UseDevicePath,\r
+  IN CHAR8       *Language,\r
+  IN OUT CHAR16  **BestDeviceName,\r
+  OUT EFI_STATUS *ConfigurationStatus,\r
+  OUT EFI_STATUS *DiagnosticsStatus,\r
+  IN BOOLEAN     Display,\r
+  IN UINTN       Indent\r
   );\r
 \r
-#define EFI_SHELL_COMPATIBLE_MODE_VER L"1.1.1" ///< string for lowest version this shell supports\r
-#define EFI_SHELL_ENHANCED_MODE_VER   L"1.1.2" ///< string for highest version this shell supports\r
+#define EFI_SHELL_COMPATIBLE_MODE_VER  L"1.1.1" ///< The string for lowest version this shell supports.\r
+#define EFI_SHELL_ENHANCED_MODE_VER    L"1.1.2" ///< The 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[out] 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
-(EFIAPI *GET_SHELL_MODE) (\r
+(EFIAPI *GET_SHELL_MODE)(\r
   OUT CHAR16     **Mode\r
   );\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
+  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
+  @param[in] Path               The path to convert.\r
+\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
-(EFIAPI *SHELLENV_NAME_TO_PATH) (\r
+typedef\r
+EFI_DEVICE_PATH_PROTOCOL *\r
+(EFIAPI *SHELLENV_NAME_TO_PATH)(\r
   IN CHAR16 *Path\r
   );\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
+  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
 \r
-  @retval EFI_SUCCESS           the DevPath was found and the name returned\r
-                                in Name.  \r
+  @param[in] DevPath                The device path to search for a name for.\r
+  @param[in] ConsistMapping         What state to verify map flag VAR_ID_CONSIST.\r
+  @param[out] Name                  On sucessful return the name of that device path.\r
+\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
-(EFIAPI *SHELLENV_GET_FS_NAME) (\r
-  IN EFI_DEVICE_PATH_PROTOCOL     * DevPath,\r
+(EFIAPI *SHELLENV_GET_FS_NAME)(\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *DevPath,\r
   IN BOOLEAN                      ConsistMapping,\r
   OUT CHAR16                      **Name\r
   );\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
-  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
+  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
   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
+  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
-                                upon which to append all the opened file structures.\r
+  @param[in] Arg                 The pointer to the path of the files to be opened.\r
+  @param[in, out] ListHead       The 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
+  @retval EFI_SUCCESS           One 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
 EFI_STATUS\r
-(EFIAPI *SHELLENV_FILE_META_ARG_NO_WILDCARD) (\r
+(EFIAPI *SHELLENV_FILE_META_ARG_NO_WILDCARD)(\r
   IN CHAR16               *Arg,\r
   IN OUT LIST_ENTRY       *ListHead\r
   );\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[in] ListHead           The 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
 EFI_STATUS\r
-(EFIAPI *SHELLENV_DEL_DUP_FILE) (\r
-  IN LIST_ENTRY   * ListHead\r
+(EFIAPI *SHELLENV_DEL_DUP_FILE)(\r
+  IN LIST_ENTRY   *ListHead\r
   );\r
 \r
 /**\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
+  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
   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[in] Name               The pointer to the NULL terminated UNICODE string of the\r
+                                file system name.\r
+  @param[out] DevPath           The pointer to pointer to DevicePath.  Only valid on\r
+                                successful return.\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
-(EFIAPI *SHELLENV_GET_FS_DEVICE_PATH) (\r
+(EFIAPI *SHELLENV_GET_FS_DEVICE_PATH)(\r
   IN CHAR16                        *Name,\r
   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
-  SHELLENV_GET_MAP                        GetMap;\r
-  SHELLENV_ADD_CMD                        AddCmd;\r
-  SHELLENV_ADD_PROT                       AddProt;\r
-  SHELLENV_GET_PROT                       GetProt;\r
-  SHELLENV_CUR_DIR                        CurDir;\r
-  SHELLENV_FILE_META_ARG                  FileMetaArg;\r
-  SHELLENV_FREE_FILE_LIST                 FreeFileList;\r
+  SHELLENV_EXECUTE                          Execute;\r
+  SHELLENV_GET_ENV                          GetEnv;\r
+  SHELLENV_GET_MAP                          GetMap;\r
+  SHELLENV_ADD_CMD                          AddCmd;\r
+  SHELLENV_ADD_PROT                         AddProt;\r
+  SHELLENV_GET_PROT                         GetProt;\r
+  SHELLENV_CUR_DIR                          CurDir;\r
+  SHELLENV_FILE_META_ARG                    FileMetaArg;\r
+  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
+  SHELLENV_NEW_SHELL                        NewShell;\r
+  SHELLENV_BATCH_IS_ACTIVE                  BatchIsActive;\r
 \r
-  SHELLENV_FREE_RESOURCES                 FreeResources;\r
+  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
+  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
-  SHELLENV_ENABLE_PAGE_BREAK              EnablePageBreak;\r
-  SHELLENV_DISABLE_PAGE_BREAK             DisablePageBreak;\r
-  SHELLENV_GET_PAGE_BREAK                 GetPageBreak;\r
-\r
-  SHELLENV_SET_KEY_FILTER                 SetKeyFilter;\r
-  SHELLENV_GET_KEY_FILTER                 GetKeyFilter;\r
-\r
-  SHELLENV_GET_EXECUTION_BREAK            GetExecutionBreak;\r
-  SHELLENV_INCREMENT_SHELL_NESTING_LEVEL  IncrementShellNestingLevel;\r
-  SHELLENV_DECREMENT_SHELL_NESTING_LEVEL  DecrementShellNestingLevel;\r
-  SHELLENV_IS_ROOT_SHELL                  IsRootShell;\r
-\r
-  SHELLENV_CLOSE_CONSOLE_PROXY            CloseConsoleProxy;\r
-  HANDLE_ENUMERATOR                       HandleEnumerator;\r
-  PROTOCOL_INFO_ENUMERATOR                ProtocolInfoEnumerator;\r
-  GET_DEVICE_NAME                         GetDeviceName;\r
-  GET_SHELL_MODE                          GetShellMode;\r
-  SHELLENV_NAME_TO_PATH                   NameToPath;\r
-  SHELLENV_GET_FS_NAME                    GetFsName;\r
-  SHELLENV_FILE_META_ARG_NO_WILDCARD      FileMetaArgNoWildCard;\r
-  SHELLENV_DEL_DUP_FILE                   DelDupFileArg;\r
-  SHELLENV_GET_FS_DEVICE_PATH             GetFsDevicePath;\r
+  UINT32                                    MajorVersion;\r
+  UINT32                                    MinorVersion;\r
+  SHELLENV_ENABLE_PAGE_BREAK                EnablePageBreak;\r
+  SHELLENV_DISABLE_PAGE_BREAK               DisablePageBreak;\r
+  SHELLENV_GET_PAGE_BREAK                   GetPageBreak;\r
+\r
+  SHELLENV_SET_KEY_FILTER                   SetKeyFilter;\r
+  SHELLENV_GET_KEY_FILTER                   GetKeyFilter;\r
+\r
+  SHELLENV_GET_EXECUTION_BREAK              GetExecutionBreak;\r
+  SHELLENV_INCREMENT_SHELL_NESTING_LEVEL    IncrementShellNestingLevel;\r
+  SHELLENV_DECREMENT_SHELL_NESTING_LEVEL    DecrementShellNestingLevel;\r
+  SHELLENV_IS_ROOT_SHELL                    IsRootShell;\r
+\r
+  SHELLENV_CLOSE_CONSOLE_PROXY              CloseConsoleProxy;\r
+  HANDLE_ENUMERATOR                         HandleEnumerator;\r
+  PROTOCOL_INFO_ENUMERATOR                  ProtocolInfoEnumerator;\r
+  GET_DEVICE_NAME                           GetDeviceName;\r
+  GET_SHELL_MODE                            GetShellMode;\r
+  SHELLENV_NAME_TO_PATH                     NameToPath;\r
+  SHELLENV_GET_FS_NAME                      GetFsName;\r
+  SHELLENV_FILE_META_ARG_NO_WILDCARD        FileMetaArgNoWildCard;\r
+  SHELLENV_DEL_DUP_FILE                     DelDupFileArg;\r
+  SHELLENV_GET_FS_DEVICE_PATH               GetFsDevicePath;\r
 } EFI_SHELL_ENVIRONMENT2;\r
 \r
-extern EFI_GUID gEfiShellEnvironment2Guid;\r
-extern EFI_GUID gEfiShellEnvironment2ExtGuid;\r
-#endif // _SHELLENV_H_\r
+extern EFI_GUID  gEfiShellEnvironment2Guid;\r
+extern EFI_GUID  gEfiShellEnvironment2ExtGuid;\r
+\r
+#endif // _SHELL_ENVIRONMENT_2_PROTOCOL_H_\r