]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Update comments for functions to clarify buffer origin.
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 12 Nov 2011 00:35:11 +0000 (00:35 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 12 Nov 2011 00:35:11 +0000 (00:35 +0000)
Signed-off-by: darylm503
Reviewed-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12687 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Include/Library/FileHandleLib.h
ShellPkg/Include/Library/ShellLib.h
ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
ShellPkg/Library/UefiShellLib/UefiShellLib.c

index a21e20ed95ef112c943c8a64f7c3ccc885cfaf03..6c79397570911a7db2e2ccdb04859db1eafbe617 100644 (file)
@@ -49,20 +49,20 @@ FileHandleGetInfo (
 \r
   @param[in]  FileInfo          The information to set.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
+  @retval EFI_SUCCESS           The information was set.\r
   @retval EFI_INVALID_PARAMETER A parameter was out of range or invalid.\r
   @retval EFI_UNSUPPORTED       The FileHandle does not support FileInfo.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 FileHandleSetInfo (\r
-  IN EFI_FILE_HANDLE           FileHandle,\r
+  IN EFI_FILE_HANDLE            FileHandle,\r
   IN CONST EFI_FILE_INFO        *FileInfo\r
   );\r
 \r
@@ -87,11 +87,11 @@ FileHandleSetInfo (
                                  the number of bytes written.\r
   @param[out] Buffer             The buffer to put read data into.\r
 \r
-  @retval EFI_SUCCESS          Data was read.\r
-  @retval EFI_NO_MEDIA         The device has no media.\r
-  @retval EFI_DEVICE_ERROR     The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_BUFFER_TO_SMALL  Buffer is too small. ReadSize contains required\r
+  @retval EFI_SUCCESS         Data was read.\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
+  @retval EFI_DEVICE_ERROR  The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required\r
                                 size.\r
 \r
 **/\r
@@ -118,14 +118,14 @@ FileHandleRead(
                                  the number of bytes written.\r
   @param[in] Buffer              The buffer containing data to write is stored.\r
 \r
-  @retval EFI_SUCCESS          Data was written.\r
+  @retval EFI_SUCCESS         Data was written.\r
   @retval EFI_UNSUPPORTED       Writes to an open directory are not supported.\r
-  @retval EFI_NO_MEDIA         The device has no media.\r
-  @retval EFI_DEVICE_ERROR     The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED  The device is write-protected.\r
-  @retval EFI_ACCESS_DENIED    The file was opened for read only.\r
-  @retval EFI_VOLUME_FULL      The volume is full.\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
+  @retval EFI_DEVICE_ERROR  The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED The device is write-protected.\r
+  @retval EFI_ACCESS_DENIED The file was opened for read only.\r
+  @retval EFI_VOLUME_FULL The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -164,12 +164,12 @@ FileHandleClose (
   @retval EFI_SUCCESS               The file was closed successfully.\r
   @retval EFI_WARN_DELETE_FAILURE   The handle was closed, but the file was not\r
                                     deleted.\r
-  @retval INVALID_PARAMETER                One of the parameters has an invalid value.\r
+  @retval INVALID_PARAMETER         One of the parameters has an invalid value.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 FileHandleDelete (\r
-  IN EFI_FILE_HANDLE           FileHandle\r
+  IN EFI_FILE_HANDLE    FileHandle\r
   );\r
 \r
 /**\r
@@ -194,8 +194,8 @@ FileHandleDelete (
 EFI_STATUS\r
 EFIAPI\r
 FileHandleSetPosition (\r
-  IN EFI_FILE_HANDLE           FileHandle,\r
-  IN UINT64            Position\r
+  IN EFI_FILE_HANDLE    FileHandle,\r
+  IN UINT64             Position\r
   );\r
 \r
 /**\r
@@ -259,14 +259,18 @@ FileHandleIsDirectory (
   IN EFI_FILE_HANDLE            DirHandle\r
   );\r
 \r
-/**\r
-  Retrieves the first file from a directory.\r
+/** Retrieve first entry from a directory.\r
 \r
-  This function opens a directory and gets the first file's information in the\r
-  directory. The caller the uses FileHandleFindNextFile() to get other files.  When\r
-  complete, the caller is responsible for calling FreePool() on *Buffer.\r
+  This function takes an open directory handle and gets information from the\r
+  first entry in the directory.  A buffer is allocated to contain\r
+  the information and a pointer to the buffer is returned in *Buffer.  The\r
+  caller can use FileHandleFindNextFile() to get subsequent directory entries.\r
 \r
-  @param[in] DirHandle          The file handle of the directory to search.\r
+  The buffer will be freed by FileHandleFindNextFile() when the last directory\r
+  entry is read.  Otherwise, the caller must free the buffer, using FreePool,\r
+  when finished with it.\r
+\r
+  @param[in]  DirHandle         The file handle of the directory to search.\r
   @param[out] Buffer            The pointer to pointer to buffer for file's information.\r
 \r
   @retval EFI_SUCCESS           Found the first file.\r
@@ -283,17 +287,17 @@ FileHandleFindFirstFile (
   IN EFI_FILE_HANDLE            DirHandle,\r
   OUT EFI_FILE_INFO             **Buffer\r
   );\r
-/**\r
-  Retrieves the next file in a directory.\r
 \r
-  To use this function, caller must call the FileHandleFindFirstFile() to get the\r
-  first file, and then use this function get other files. This function can be\r
-  called for several times to get each file's information in the directory. If\r
-  the call of FileHandleFindNextFile() got the last file in the directory, the next\r
-  call of this function has no file to get. *NoFile will be set to TRUE and the\r
-  Buffer memory will be automatically freed.\r
+/** Retrieve next entries from a directory.\r
+\r
+  To use this function, the caller must first call the FileHandleFindFirstFile()\r
+  function to get the first directory entry.  Subsequent directory entries are\r
+  retrieved by using the FileHandleFindNextFile() function.  This function can\r
+  be called several times to get each entry from the directory.  If the call of\r
+  FileHandleFindNextFile() retrieved the last directory entry, the next call of\r
+  this function will set *NoFile to TRUE and free the buffer.\r
 \r
-  @param[in] DirHandle          The file handle of the directory.\r
+  @param[in]  DirHandle         The file handle of the directory.\r
   @param[out] Buffer            The pointer to buffer for file's information.\r
   @param[out] NoFile            The pointer to boolean when last file is found.\r
 \r
index 5f3c5588bba4b6122ed12e6263c98aaa9ad1749e..70006266f4c3be2d7d2aebdc37020d2b130a582f 100644 (file)
@@ -59,20 +59,20 @@ ShellGetFileInfo (
 \r
   @param[in]  FileInfo          The information to set.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
+  @retval EFI_SUCCESS           The information was set.\r
   @retval EFI_INVALID_PARAMETER A parameter was out of range or invalid.\r
   @retval EFI_UNSUPPORTED       The FileHandle does not support FileInfo.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellSetFileInfo (\r
-  IN SHELL_FILE_HANDLE         FileHandle,\r
+  IN SHELL_FILE_HANDLE          FileHandle,\r
   IN EFI_FILE_INFO              *FileInfo\r
   );\r
 \r
@@ -89,31 +89,31 @@ ShellSetFileInfo (
   @param[in]    OpenMode         The mode to open the file with.\r
   @param[in]    Attributes       The file's file attributes.\r
 \r
-  @retval EFI_SUCCESS          The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
+  @retval EFI_SUCCESS         The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
   @retval EFI_UNSUPPORTED       Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device or the file system could not be found on\r
                                 the device.\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
   @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellOpenFileByDevicePath(\r
-  IN OUT EFI_DEVICE_PATH_PROTOCOL        **FilePath,\r
-  OUT EFI_HANDLE                       *DeviceHandle,\r
-  OUT SHELL_FILE_HANDLE                *FileHandle,\r
-  IN UINT64                            OpenMode,\r
-  IN UINT64                            Attributes\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL     **FilePath,\r
+  OUT EFI_HANDLE                      *DeviceHandle,\r
+  OUT SHELL_FILE_HANDLE               *FileHandle,\r
+  IN UINT64                           OpenMode,\r
+  IN UINT64                           Attributes\r
   );\r
 \r
 /**\r
@@ -128,30 +128,30 @@ ShellOpenFileByDevicePath(
   @param[in] OpenMode           The mode to open the file with.\r
   @param[in] Attributes         The file's file attributes.\r
 \r
-  @retval EFI_SUCCESS          The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
+  @retval EFI_SUCCESS         The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
   @retval EFI_UNSUPPORTED       Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device or the file system could not be found\r
                                 on the device.\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
   @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellOpenFileByName(\r
-  IN CONST CHAR16                          *FilePath,\r
+  IN CONST CHAR16               *FilePath,\r
   OUT SHELL_FILE_HANDLE         *FileHandle,\r
   IN UINT64                     OpenMode,\r
-  IN UINT64                            Attributes\r
+  IN UINT64                     Attributes\r
   );\r
 \r
 /**\r
@@ -164,20 +164,20 @@ ShellOpenFileByName(
   @param[in]  DirectoryName     The pointer to Directory name.\r
   @param[out] FileHandle        The pointer to the file handle.\r
 \r
-  @retval EFI_SUCCESS          The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
+  @retval EFI_SUCCESS         The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
   @retval EFI_UNSUPPORTED       Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device, or the file system could not be found\r
                                 on the device.\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
   @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
@@ -210,9 +210,9 @@ ShellCreateDirectory(
   @param[out] Buffer             The buffer to put read data into.\r
 \r
   @retval EFI_SUCCESS           Data was read.\r
-  @retval EFI_NO_MEDIA         The device has no media.\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
   @retval EFI_BUFFER_TO_SMALL   Buffer is too small. ReadSize contains required\r
                                 size.\r
 \r
@@ -244,7 +244,7 @@ ShellReadFile(
 \r
   @retval EFI_SUCCESS           Data was written.\r
   @retval EFI_UNSUPPORTED       Writes to an open directory are not supported.\r
-  @retval EFI_NO_MEDIA         The device has no media.\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED   The device is write-protected.\r
@@ -289,7 +289,7 @@ ShellCloseFile (
   @retval EFI_SUCCESS               The file was closed sucessfully.\r
   @retval EFI_WARN_DELETE_FAILURE   The handle was closed, but the file was not\r
                                     deleted.\r
-  @retval INVALID_PARAMETER                One of the parameters has an invalid value.\r
+  @retval INVALID_PARAMETER         One of the parameters has an invalid value.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -320,8 +320,8 @@ ShellDeleteFile (
 EFI_STATUS\r
 EFIAPI\r
 ShellSetFilePosition (\r
-  IN SHELL_FILE_HANDLE         FileHandle,\r
-  IN UINT64            Position\r
+  IN SHELL_FILE_HANDLE  FileHandle,\r
+  IN UINT64             Position\r
   );\r
 \r
 /**\r
@@ -366,16 +366,18 @@ ShellFlushFile (
   IN SHELL_FILE_HANDLE          FileHandle\r
   );\r
 \r
-/**\r
-  Retrieves the first file from a directory\r
+/** Retrieve first entry from a directory.\r
 \r
-  This function takes an open directory handle and gets the first file\r
-  in the directory's info. Caller can use ShellFindNextFile() to get\r
-  subsequent files.\r
+  This function takes an open directory handle and gets information from the\r
+  first entry in the directory.  A buffer is allocated to contain\r
+  the information and a pointer to the buffer is returned in *Buffer.  The\r
+  caller can use ShellFindNextFile() to get subsequent directory entries.\r
 \r
-  Caller must use FreePool on *Buffer opon completion of all file searching.\r
+  The buffer will be freed by ShellFindNextFile() when the last directory\r
+  entry is read.  Otherwise, the caller must free the buffer, using FreePool,\r
+  when finished with it.\r
 \r
-  @param[in] DirHandle          The file handle of the directory to search.\r
+  @param[in]  DirHandle         The file handle of the directory to search.\r
   @param[out] Buffer            The pointer to the buffer for the file's information.\r
 \r
   @retval EFI_SUCCESS           Found the first file.\r
@@ -383,41 +385,44 @@ ShellFlushFile (
   @retval EFI_NO_MEDIA          The device has no media.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @return Others                Status of ShellGetFileInfo, ShellSetFilePosition,\r
+                                or ShellReadFile.\r
+\r
   @sa ShellReadFile\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellFindFirstFile (\r
-  IN SHELL_FILE_HANDLE          DirHandle,\r
-  OUT EFI_FILE_INFO             **Buffer\r
+  IN      SHELL_FILE_HANDLE       DirHandle,\r
+     OUT  EFI_FILE_INFO         **Buffer\r
   );\r
 \r
-/**\r
-  Retrieves the next file in a directory.\r
+/** Retrieve next entries from a directory.\r
 \r
-  To use this function, caller must call the ShellFindFirstFile() to get the\r
-  first file, and then use this function get other files. This function can be\r
-  called for several times to get each file's information in the directory. If\r
-  the call of ShellFindNextFile() got the last file in the directory, the next\r
-  call of this function has no file to get. *NoFile will be set to TRUE, and the\r
-  data in Buffer is meaningless.\r
+  To use this function, the caller must first call the ShellFindFirstFile()\r
+  function to get the first directory entry.  Subsequent directory entries are\r
+  retrieved by using the ShellFindNextFile() function.  This function can\r
+  be called several times to get each entry from the directory.  If the call of\r
+  ShellFindNextFile() retrieved the last directory entry, the next call of\r
+  this function will set *NoFile to TRUE and free the buffer.\r
 \r
-  @param[in] DirHandle           The file handle of the directory.\r
-  @param[in, out] Buffer         The pointer to buffer for file's information.\r
-  @param[in, out] NoFile         The pointer to boolean when last file is found.\r
+  @param[in]  DirHandle         The file handle of the directory.\r
+  @param[out] Buffer            The pointer to buffer for file's information.\r
+  @param[out] NoFile            The pointer to boolean when last file is found.\r
 \r
   @retval EFI_SUCCESS           Found the next file.\r
   @retval EFI_NO_MEDIA          The device has no media.\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+\r
   @sa ShellReadFile\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellFindNextFile(\r
-  IN SHELL_FILE_HANDLE           DirHandle,\r
-  IN OUT EFI_FILE_INFO           *Buffer,\r
-  IN OUT BOOLEAN                 *NoFile\r
+  IN      SHELL_FILE_HANDLE       DirHandle,\r
+  IN OUT  EFI_FILE_INFO          *Buffer,\r
+  IN OUT  BOOLEAN                *NoFile\r
   );\r
 \r
 /**\r
@@ -988,7 +993,7 @@ ShellIsFileInPath(
   Function to determine whether a string is decimal or hex representation of a number\r
   and return the number converted from the string.\r
 \r
-  Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid \r
+  Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid\r
   result.  Use ShellConvertStringToUint64 instead.\r
 \r
   @param[in] String   String representation of a number.\r
@@ -1235,9 +1240,9 @@ ShellIsHexOrDecimalNumber (
   @param[in] String       The string to evaluate.\r
   @param[out] Value       Upon a successful return the value of the conversion.\r
   @param[in] ForceHex     TRUE - always assume hex.\r
-  @param[in] StopAtSpace  TRUE to halt upon finding a space, FALSE to \r
+  @param[in] StopAtSpace  TRUE to halt upon finding a space, FALSE to\r
                           process the entire String.\r
-  \r
+\r
   @retval EFI_SUCCESS             The conversion was successful.\r
   @retval EFI_INVALID_PARAMETER   String contained an invalid character.\r
   @retval EFI_NOT_FOUND           String was a number, but Value was NULL.\r
index 116c78f38b0316ecce2368d1ebd3ae6ed4321658..0e2f93debc27beaff64df48fa6556809b09daf23 100644 (file)
@@ -101,20 +101,20 @@ FileHandleGetInfo (
 \r
   @param[in]  FileInfo          The information to set.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
+  @retval EFI_SUCCESS           The information was set.\r
   @retval EFI_INVALID_PARAMETER A parameter was out of range or invalid.\r
   @retval EFI_UNSUPPORTED       The FileHandle does not support FileInfo.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 FileHandleSetInfo (\r
-  IN EFI_FILE_HANDLE           FileHandle,\r
+  IN EFI_FILE_HANDLE            FileHandle,\r
   IN CONST EFI_FILE_INFO        *FileInfo\r
   )\r
 {\r
@@ -198,14 +198,14 @@ FileHandleRead(
                               the number of bytes written.\r
   @param Buffer               the buffer containing data to write is stored.\r
 \r
- @retval EFI_SUCCESS           Data was written.\r
- @retval EFI_UNSUPPORTED           Writes to an open directory are not supported.\r
- @retval EFI_NO_MEDIA          The device has no media.\r
- @retval EFI_DEVICE_ERROR          The device reported an error.\r
- @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
- @retval EFI_WRITE_PROTECTED   The device is write-protected.\r
- @retval EFI_ACCESS_DENIED       The file was open for read only.\r
- @retval EFI_VOLUME_FULL           The volume is full.\r
+ @retval EFI_SUCCESS          Data was written.\r
+ @retval EFI_UNSUPPORTED      Writes to an open directory are not supported.\r
+ @retval EFI_NO_MEDIA         The device has no media.\r
+ @retval EFI_DEVICE_ERROR     The device reported an error.\r
+ @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+ @retval EFI_WRITE_PROTECTED  The device is write-protected.\r
+ @retval EFI_ACCESS_DENIED    The file was open for read only.\r
+ @retval EFI_VOLUME_FULL      The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -266,12 +266,12 @@ FileHandleClose (
   @retval EFI_SUCCESS           the file was closed sucessfully\r
   @retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not\r
                                 deleted\r
-  @retval INVALID_PARAMETER            One of the parameters has an invalid value.\r
+  @retval INVALID_PARAMETER     One of the parameters has an invalid value.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 FileHandleDelete (\r
-  IN EFI_FILE_HANDLE           FileHandle\r
+  IN EFI_FILE_HANDLE    FileHandle\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -308,8 +308,8 @@ FileHandleDelete (
 EFI_STATUS\r
 EFIAPI\r
 FileHandleSetPosition (\r
-  IN EFI_FILE_HANDLE           FileHandle,\r
-  IN UINT64            Position\r
+  IN EFI_FILE_HANDLE    FileHandle,\r
+  IN UINT64             Position\r
   )\r
 {\r
   //\r
@@ -441,15 +441,19 @@ FileHandleIsDirectory (
   return (EFI_SUCCESS);\r
 }\r
 \r
-/**\r
-  Retrieves the first file from a directory\r
+/** Retrieve first entry from a directory.\r
+\r
+  This function takes an open directory handle and gets information from the\r
+  first entry in the directory.  A buffer is allocated to contain\r
+  the information and a pointer to the buffer is returned in *Buffer.  The\r
+  caller can use FileHandleFindNextFile() to get subsequent directory entries.\r
 \r
-  This function opens a directory and gets the first file's info in the\r
-  directory. Caller can use FileHandleFindNextFile() to get other files.  When\r
-  complete the caller is responsible for calling FreePool() on Buffer.\r
+  The buffer will be freed by FileHandleFindNextFile() when the last directory\r
+  entry is read.  Otherwise, the caller must free the buffer, using FreePool,\r
+  when finished with it.\r
 \r
-  @param DirHandle              The file handle of the directory to search\r
-  @param Buffer                 Pointer to buffer for file's information\r
+  @param[in]  DirHandle         The file handle of the directory to search.\r
+  @param[out] Buffer            The pointer to pointer to buffer for file's information.\r
 \r
   @retval EFI_SUCCESS           Found the first file.\r
   @retval EFI_NOT_FOUND         Cannot find the directory.\r
@@ -512,19 +516,19 @@ FileHandleFindFirstFile (
   }\r
   return (EFI_SUCCESS);\r
 }\r
-/**\r
-  Retrieves the next file in a directory.\r
 \r
-  To use this function, caller must call the FileHandleFindFirstFile() to get the\r
-  first file, and then use this function get other files. This function can be\r
-  called for several times to get each file's information in the directory. If\r
-  the call of FileHandleFindNextFile() got the last file in the directory, the next\r
-  call of this function has no file to get. *NoFile will be set to TRUE and the\r
-  Buffer memory will be automatically freed.\r
+/** Retrieve next entries from a directory.\r
+\r
+  To use this function, the caller must first call the FileHandleFindFirstFile()\r
+  function to get the first directory entry.  Subsequent directory entries are\r
+  retrieved by using the FileHandleFindNextFile() function.  This function can\r
+  be called several times to get each entry from the directory.  If the call of\r
+  FileHandleFindNextFile() retrieved the last directory entry, the next call of\r
+  this function will set *NoFile to TRUE and free the buffer.\r
 \r
-  @param DirHandle              the file handle of the directory\r
-  @param Buffer                                    pointer to buffer for file's information\r
-  @param NoFile                                    pointer to boolean when last file is found\r
+  @param[in]  DirHandle         The file handle of the directory.\r
+  @param[out] Buffer            The pointer to buffer for file's information.\r
+  @param[out] NoFile            The pointer to boolean when last file is found.\r
 \r
   @retval EFI_SUCCESS           Found the next file, or reached last file\r
   @retval EFI_NO_MEDIA          The device has no media.\r
@@ -534,9 +538,9 @@ FileHandleFindFirstFile (
 EFI_STATUS\r
 EFIAPI\r
 FileHandleFindNextFile(\r
-  IN EFI_FILE_HANDLE             DirHandle,\r
-  OUT EFI_FILE_INFO              *Buffer,\r
-  OUT BOOLEAN                    *NoFile\r
+  IN EFI_FILE_HANDLE          DirHandle,\r
+  OUT EFI_FILE_INFO          *Buffer,\r
+  OUT BOOLEAN                *NoFile\r
   )\r
 {\r
   EFI_STATUS    Status;\r
index d131f9b189ea920b1455f43713940cff03c0ffe1..77cf5e77950065706729a6b5cd4cbffaed5d1216 100644 (file)
@@ -163,7 +163,7 @@ ShellFindSE2 (
 }\r
 \r
 /**\r
-  Function to do most of the work of the constructor.  Allows for calling \r
+  Function to do most of the work of the constructor.  Allows for calling\r
   multiple times without complete re-initialization.\r
 \r
   @param[in] ImageHandle  A copy of the ImageHandle.\r
@@ -421,20 +421,20 @@ ShellGetFileInfo (
 \r
   @param[in]  FileInfo          The information to set.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
+  @retval EFI_SUCCESS           The information was set.\r
   @retval EFI_INVALID_PARAMETER A parameter was out of range or invalid.\r
   @retval EFI_UNSUPPORTED       The FileHandle does not support FileInfo.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED     The file was opened read only.\r
   @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellSetFileInfo (\r
-  IN SHELL_FILE_HANDLE                         FileHandle,\r
+  IN SHELL_FILE_HANDLE                    FileHandle,\r
   IN EFI_FILE_INFO              *FileInfo\r
   )\r
 {\r
@@ -447,38 +447,38 @@ ShellSetFileInfo (
   This function opens a file with the open mode according to the file path. The\r
   Attributes is valid only for EFI_FILE_MODE_CREATE.\r
 \r
-  @param  FilePath                 on input the device path to the file.  On output\r
+  @param  FilePath        on input the device path to the file.  On output\r
                           the remaining device path.\r
-  @param  DeviceHandle         pointer to the system device handle.\r
-  @param  FileHandle             pointer to the file handle.\r
-  @param  OpenMode                 the mode to open the file with.\r
-  @param  Attributes             the file's file attributes.\r
-\r
-  @retval EFI_SUCCESS                  The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @param  DeviceHandle    pointer to the system device handle.\r
+  @param  FileHandle      pointer to the file handle.\r
+  @param  OpenMode        the mode to open the file with.\r
+  @param  Attributes      the file's file attributes.\r
+\r
+  @retval EFI_SUCCESS           The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
+  @retval EFI_UNSUPPORTED       Could not open the file path.\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device or the file system could not be found on\r
                                 the device.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
-  @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
+  @retval EFI_ACCESS_DENIED     The file was opened read only.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
-  @retval EFI_VOLUME_FULL            The volume is full.\r
+  @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellOpenFileByDevicePath(\r
-  IN OUT EFI_DEVICE_PATH_PROTOCOL        **FilePath,\r
-  OUT EFI_HANDLE                       *DeviceHandle,\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL     **FilePath,\r
+  OUT EFI_HANDLE                      *DeviceHandle,\r
   OUT SHELL_FILE_HANDLE               *FileHandle,\r
-  IN UINT64                            OpenMode,\r
-  IN UINT64                            Attributes\r
+  IN UINT64                           OpenMode,\r
+  IN UINT64                           Attributes\r
   )\r
 {\r
   CHAR16                          *FileName;\r
@@ -605,35 +605,35 @@ ShellOpenFileByDevicePath(
 \r
   if FileName is NULL then ASSERT()\r
 \r
-  @param  FileName               pointer to file name\r
-  @param  FileHandle           pointer to the file handle.\r
-  @param  OpenMode               the mode to open the file with.\r
-  @param  Attributes           the file's file attributes.\r
+  @param  FileName      pointer to file name\r
+  @param  FileHandle    pointer to the file handle.\r
+  @param  OpenMode      the mode to open the file with.\r
+  @param  Attributes    the file's file attributes.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @retval EFI_SUCCESS           The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
+  @retval EFI_UNSUPPORTED       Could not open the file path.\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device or the file system could not be found\r
                                 on the device.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
-  @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
+  @retval EFI_ACCESS_DENIED     The file was opened read only.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
-  @retval EFI_VOLUME_FULL            The volume is full.\r
+  @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellOpenFileByName(\r
-  IN CONST CHAR16                          *FileName,\r
+  IN CONST CHAR16               *FileName,\r
   OUT SHELL_FILE_HANDLE         *FileHandle,\r
   IN UINT64                     OpenMode,\r
-  IN UINT64                            Attributes\r
+  IN UINT64                     Attributes\r
   )\r
 {\r
   EFI_HANDLE                    DeviceHandle;\r
@@ -692,25 +692,25 @@ ShellOpenFileByName(
   otherwise, the Filehandle is NULL. If the directory already existed, this\r
   function opens the existing directory.\r
 \r
-  @param  DirectoryName                pointer to directory name\r
-  @param  FileHandle             pointer to the file handle.\r
+  @param  DirectoryName   pointer to directory name\r
+  @param  FileHandle      pointer to the file handle.\r
 \r
-  @retval EFI_SUCCESS                  The information was set.\r
-  @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.\r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+  @retval EFI_SUCCESS           The information was set.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
+  @retval EFI_UNSUPPORTED       Could not open the file path.\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the\r
                                 device or the file system could not be found\r
                                 on the device.\r
-  @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the\r
                                 medium is no longer supported.\r
-  @retval EFI_DEVICE_ERROR         The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
-  @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   The file or medium is write protected.\r
+  @retval EFI_ACCESS_DENIED     The file was opened read only.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the\r
                                 file.\r
-  @retval EFI_VOLUME_FULL            The volume is full.\r
+  @retval EFI_VOLUME_FULL       The volume is full.\r
   @sa ShellOpenFileByName\r
 **/\r
 EFI_STATUS\r
@@ -758,11 +758,11 @@ ShellCreateDirectory(
                                 the number of bytes written.\r
   @param Buffer                 the buffer to put read data into.\r
 \r
-  @retval EFI_SUCCESS            Data was read.\r
-  @retval EFI_NO_MEDIA         The device has no media.\r
-  @retval EFI_DEVICE_ERROR     The device reported an error.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_BUFFER_TO_SMALL  Buffer is too small. ReadSize contains required\r
+  @retval EFI_SUCCESS           Data was read.\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
+  @retval EFI_DEVICE_ERROR  The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required\r
                                 size.\r
 \r
 **/\r
@@ -793,14 +793,14 @@ ShellReadFile(
                               the number of bytes written.\r
   @param Buffer               the buffer containing data to write is stored.\r
 \r
- @retval EFI_SUCCESS           Data was written.\r
- @retval EFI_UNSUPPORTED           Writes to an open directory are not supported.\r
- @retval EFI_NO_MEDIA          The device has no media.\r
- @retval EFI_DEVICE_ERROR          The device reported an error.\r
- @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
- @retval EFI_WRITE_PROTECTED   The device is write-protected.\r
- @retval EFI_ACCESS_DENIED       The file was open for read only.\r
- @retval EFI_VOLUME_FULL           The volume is full.\r
+ @retval EFI_SUCCESS          Data was written.\r
+ @retval EFI_UNSUPPORTED      Writes to an open directory are not supported.\r
+ @retval EFI_NO_MEDIA         The device has no media.\r
+ @retval EFI_DEVICE_ERROR     The device reported an error.\r
+ @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+ @retval EFI_WRITE_PROTECTED  The device is write-protected.\r
+ @retval EFI_ACCESS_DENIED    The file was open for read only.\r
+ @retval EFI_VOLUME_FULL      The volume is full.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -845,12 +845,12 @@ ShellCloseFile (
   @retval EFI_SUCCESS           the file was closed sucessfully\r
   @retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not\r
                                 deleted\r
-  @retval INVALID_PARAMETER            One of the parameters has an invalid value.\r
+  @retval INVALID_PARAMETER     One of the parameters has an invalid value.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 ShellDeleteFile (\r
-  IN SHELL_FILE_HANDLE                         *FileHandle\r
+  IN SHELL_FILE_HANDLE            *FileHandle\r
   )\r
 {\r
   return (FileFunctionMap.DeleteFile(*FileHandle));\r
@@ -878,8 +878,8 @@ ShellDeleteFile (
 EFI_STATUS\r
 EFIAPI\r
 ShellSetFilePosition (\r
-  IN SHELL_FILE_HANDLE                 FileHandle,\r
-  IN UINT64            Position\r
+  IN SHELL_FILE_HANDLE              FileHandle,\r
+  IN UINT64             Position\r
   )\r
 {\r
   return (FileFunctionMap.SetFilePosition(FileHandle, Position));\r
@@ -932,15 +932,19 @@ ShellFlushFile (
   return (FileFunctionMap.FlushFile(FileHandle));\r
 }\r
 \r
-/**\r
-  Retrieves the first file from a directory\r
+/** Retrieve first entry from a directory.\r
 \r
-  This function opens a directory and gets the first file's info in the\r
-  directory. Caller can use ShellFindNextFile() to get other files.  When\r
-  complete the caller is responsible for calling FreePool() on Buffer.\r
+  This function takes an open directory handle and gets information from the\r
+  first entry in the directory.  A buffer is allocated to contain\r
+  the information and a pointer to the buffer is returned in *Buffer.  The\r
+  caller can use ShellFindNextFile() to get subsequent directory entries.\r
 \r
-  @param DirHandle              The file handle of the directory to search\r
-  @param Buffer                 Pointer to buffer for file's information\r
+  The buffer will be freed by ShellFindNextFile() when the last directory\r
+  entry is read.  Otherwise, the caller must free the buffer, using FreePool,\r
+  when finished with it.\r
+\r
+  @param[in]  DirHandle         The file handle of the directory to search.\r
+  @param[out] Buffer            The pointer to the buffer for the file's information.\r
 \r
   @retval EFI_SUCCESS           Found the first file.\r
   @retval EFI_NOT_FOUND         Cannot find the directory.\r
@@ -962,19 +966,18 @@ ShellFindFirstFile (
   //\r
   return (FileHandleFindFirstFile(DirHandle, Buffer));\r
 }\r
-/**\r
-  Retrieves the next file in a directory.\r
+/** Retrieve next entries from a directory.\r
 \r
-  To use this function, caller must call the ShellFindFirstFile() to get the\r
-  first file, and then use this function get other files. This function can be\r
-  called for several times to get each file's information in the directory. If\r
-  the call of ShellFindNextFile() got the last file in the directory, the next\r
-  call of this function has no file to get. *NoFile will be set to TRUE and the\r
-  Buffer memory will be automatically freed.\r
+  To use this function, the caller must first call the ShellFindFirstFile()\r
+  function to get the first directory entry.  Subsequent directory entries are\r
+  retrieved by using the ShellFindNextFile() function.  This function can\r
+  be called several times to get each entry from the directory.  If the call of\r
+  ShellFindNextFile() retrieved the last directory entry, the next call of\r
+  this function will set *NoFile to TRUE and free the buffer.\r
 \r
-  @param DirHandle              the file handle of the directory\r
-  @param Buffer                                    pointer to buffer for file's information\r
-  @param NoFile                                    pointer to boolean when last file is found\r
+  @param[in]  DirHandle         The file handle of the directory.\r
+  @param[out] Buffer            The pointer to buffer for file's information.\r
+  @param[out] NoFile            The pointer to boolean when last file is found.\r
 \r
   @retval EFI_SUCCESS           Found the next file, or reached last file\r
   @retval EFI_NO_MEDIA          The device has no media.\r
@@ -1807,7 +1810,7 @@ InternalIsOnCheckList (
     // If the Type is TypeStart only check the first characters of the passed in param\r
     // If it matches set the type and return TRUE\r
     //\r
-    if (TempListItem->Type == TypeStart) { \r
+    if (TempListItem->Type == TypeStart) {\r
       if (StrnCmp(Name, TempListItem->Name, StrLen(TempListItem->Name)) == 0) {\r
         *Type = TempListItem->Type;\r
         return (TRUE);\r
@@ -2031,7 +2034,7 @@ InternalCommandLineParse (
       //\r
 \r
       TempPointer = Argv[LoopCounter];\r
-      if ((*TempPointer == L'^' && *(TempPointer+1) == L'-') \r
+      if ((*TempPointer == L'^' && *(TempPointer+1) == L'-')\r
        || (*TempPointer == L'^' && *(TempPointer+1) == L'/')\r
        || (*TempPointer == L'^' && *(TempPointer+1) == L'+')\r
       ){\r
@@ -2061,7 +2064,7 @@ InternalCommandLineParse (
       if (ProblemParam != NULL) {\r
         *ProblemParam = AllocateZeroPool(StrSize(Argv[LoopCounter]));\r
         if (*ProblemParam != NULL) {\r
-          StrCpy(*ProblemParam, Argv[LoopCounter]);      \r
+          StrCpy(*ProblemParam, Argv[LoopCounter]);\r
         }\r
       }\r
       ShellCommandLineFreeVarList(*CheckPackage);\r
@@ -3418,7 +3421,7 @@ InternalShellIsHexOrDecimalNumber (
   if (String != NULL && *String == L'-') {\r
     String++;\r
   }\r
-  \r
+\r
   if (String == NULL) {\r
     return (FALSE);\r
   }\r
@@ -3497,7 +3500,7 @@ ShellFileExists(
 }\r
 \r
 /**\r
-  Convert a Unicode character to upper case only if \r
+  Convert a Unicode character to upper case only if\r
   it maps to a valid small-case ASCII character.\r
 \r
   This internal function only deal with Unicode character\r
@@ -3529,7 +3532,7 @@ InternalShellCharToUpper (
 \r
   This internal function only deal with Unicode character\r
   which maps to a valid hexadecimal ASII character, i.e.\r
-  L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other \r
+  L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other\r
   Unicode character, the value returned does not make sense.\r
 \r
   @param  Char  The character to convert.\r
@@ -3593,9 +3596,9 @@ InternalShellStrHexToUint64 (
   if (String == NULL || StrSize(String) == 0 || Value == NULL) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
-  \r
+\r
   //\r
-  // Ignore the pad spaces (space or tab) \r
+  // Ignore the pad spaces (space or tab)\r
   //\r
   while ((*String == L' ') || (*String == L'\t')) {\r
     String++;\r
@@ -3619,17 +3622,17 @@ InternalShellStrHexToUint64 (
   }\r
 \r
   Result = 0;\r
-  \r
+\r
   //\r
   // Skip spaces if requested\r
   //\r
   while (StopAtSpace && *String == L' ') {\r
     String++;\r
   }\r
-  \r
+\r
   while (ShellIsHexaDecimalDigitCharacter (*String)) {\r
     //\r
-    // If the Hex Number represented by String overflows according \r
+    // If the Hex Number represented by String overflows according\r
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     if (!(Result <= (RShiftU64((((UINT64) ~0) - InternalShellHexCharToUintn (*String)), 4)))) {\r
@@ -3720,10 +3723,10 @@ InternalShellStrDecimalToUint64 (
   }\r
   while (ShellIsDecimalDigitCharacter (*String)) {\r
     //\r
-    // If the number represented by String overflows according \r
+    // If the number represented by String overflows according\r
     // to the range defined by UINT64, then ASSERT().\r
     //\r
-    \r
+\r
     if (!(Result <= (DivU64x32((((UINT64) ~0) - (*String - L'0')),10)))) {\r
       return (EFI_DEVICE_ERROR);\r
     }\r
@@ -3740,7 +3743,7 @@ InternalShellStrDecimalToUint64 (
   }\r
 \r
   *Value = Result;\r
-  \r
+\r
   return (EFI_SUCCESS);\r
 }\r
 \r
@@ -3753,7 +3756,7 @@ InternalShellStrDecimalToUint64 (
   @param[out] Value       Upon a successful return the value of the conversion.\r
   @param[in] ForceHex     TRUE - always assume hex.\r
   @param[in] StopAtSpace  FALSE to skip spaces.\r
-  \r
+\r
   @retval EFI_SUCCESS             The conversion was successful.\r
   @retval EFI_INVALID_PARAMETER   String contained an invalid character.\r
   @retval EFI_NOT_FOUND           String was a number, but Value was NULL.\r
@@ -3795,7 +3798,7 @@ ShellConvertStringToUint64(
   //\r
   if (Walker == NULL || *Walker == CHAR_NULL || !InternalShellIsHexOrDecimalNumber(Walker, Hex, StopAtSpace)) {\r
     return (EFI_INVALID_PARAMETER);\r
-  } \r
+  }\r
 \r
   //\r
   // do the conversion.\r
@@ -3880,7 +3883,7 @@ ShellFileHandleReturnLine(
       return (NULL);\r
     }\r
     Status = ShellFileHandleReadLine(Handle, RetVal, &Size, FALSE, Ascii);\r
-    \r
+\r
   }\r
   if (EFI_ERROR(Status) && (RetVal != NULL)) {\r
     FreePool(RetVal);\r