]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / FileExplorerLib / FileExplorer.c
index 9182751ad75bdaaee0f01a10bd132fc0bf4bc43b..d9ce57f8f40852a926b6236dea24c7868ad0b0ba 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 File explorer related functions.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH  FeHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -554,7 +554,7 @@ LibFileInfo (
 \r
   Buffer      = NULL;\r
   BufferSize  = 0;\r
-  \r
+\r
   Status = FHand->GetInfo (\r
                     FHand,\r
                     InfoType,\r
@@ -691,19 +691,19 @@ LibAppendFileName (
 \r
   Size1 = StrSize (Str1);\r
   Size2 = StrSize (Str2);\r
-  \r
+\r
   //\r
   // Check overflow\r
   //\r
   if (((MAX_UINTN - Size1) < Size2) || ((MAX_UINTN - Size1 - Size2) < sizeof(CHAR16))) {\r
     return NULL;\r
   }\r
-  \r
+\r
   MaxLen = (Size1 + Size2 + sizeof (CHAR16))/ sizeof (CHAR16);\r
   Str   = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16));\r
   ASSERT (Str != NULL);\r
 \r
-  TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); \r
+  TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16));\r
   ASSERT (TmpStr != NULL);\r
 \r
   StrCpyS (Str, MaxLen, Str1);\r
@@ -724,7 +724,7 @@ LibAppendFileName (
       //\r
 \r
       //\r
-      // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings \r
+      // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings\r
       // that overlap.\r
       //\r
       StrCpyS (TmpStr, MaxLen, Ptr + 3);\r
@@ -736,7 +736,7 @@ LibAppendFileName (
       //\r
 \r
       //\r
-      // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings \r
+      // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings\r
       // that overlap.\r
       //\r
       StrCpyS (TmpStr, MaxLen, Ptr + 2);\r
@@ -750,7 +750,7 @@ LibAppendFileName (
   }\r
 \r
   FreePool (TmpStr);\r
-  \r
+\r
   return Str;\r
 }\r
 \r
@@ -845,7 +845,7 @@ LibFindFileSystem (
         VolumeLabel,\r
         MenuEntry->HelpString\r
         );\r
-         MenuEntry->DisplayStringToken = HiiSetString (\r
+      MenuEntry->DisplayStringToken = HiiSetString (\r
                                              gFileExplorerPrivate.FeHiiHandle,\r
                                              0,\r
                                              MenuEntry->DisplayString,\r
@@ -871,16 +871,16 @@ LibFindFileSystem (
 \r
 /**\r
   Find the file handle from the input menu info.\r
-  \r
+\r
   @param  MenuEntry        Input Menu info.\r
   @param  RetFileHandle    Return the file handle for the input device path.\r
-  \r
+\r
   @retval EFI_SUCESS       Find the file handle success.\r
   @retval Other            Find the file handle failure.\r
 **/\r
 EFI_STATUS\r
 LibGetFileHandleFromMenu (\r
-  IN  MENU_ENTRY                *MenuEntry,  \r
+  IN  MENU_ENTRY                *MenuEntry,\r
   OUT EFI_FILE_HANDLE           *RetFileHandle\r
   )\r
 {\r
@@ -917,18 +917,18 @@ LibGetFileHandleFromMenu (
 \r
 /**\r
   Find the file handle from the input device path info.\r
-  \r
+\r
   @param  RootDirectory    Device path info.\r
   @param  RetFileHandle    Return the file handle for the input device path.\r
   @param  ParentFileName   Parent file name.\r
   @param  DeviceHandle     Driver handle for this partition.\r
-  \r
+\r
   @retval EFI_SUCESS       Find the file handle success.\r
   @retval Other            Find the file handle failure.\r
 **/\r
 EFI_STATUS\r
 LibGetFileHandleFromDevicePath (\r
-  IN  EFI_DEVICE_PATH_PROTOCOL  *RootDirectory,  \r
+  IN  EFI_DEVICE_PATH_PROTOCOL  *RootDirectory,\r
   OUT EFI_FILE_HANDLE           *RetFileHandle,\r
   OUT UINT16                    **ParentFileName,\r
   OUT EFI_HANDLE                *DeviceHandle\r
@@ -953,12 +953,12 @@ LibGetFileHandleFromDevicePath (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID**)&Volume);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Open the Volume to get the File System handle\r
   //\r
@@ -974,7 +974,7 @@ LibGetFileHandleFromDevicePath (
     *RetFileHandle = FileHandle;\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Duplicate the device path to avoid the access to unaligned device path node.\r
   // Because the device path consists of one or more FILE PATH MEDIA DEVICE PATH\r
@@ -990,7 +990,7 @@ LibGetFileHandleFromDevicePath (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
   }\r
-        \r
+\r
   //\r
   // Parse each MEDIA_FILEPATH_DP node. There may be more than one, since the\r
   // directory information and filename can be seperate. The goal is to inch\r
@@ -1123,11 +1123,11 @@ LibCreateNewFile (
 \r
 /**\r
   Find files under current directory.\r
-  \r
+\r
   All files and sub-directories in current directory\r
   will be stored in DirectoryMenu for future use.\r
 \r
-  @param FileHandle    Parent file handle. \r
+  @param FileHandle    Parent file handle.\r
   @param FileName      Parent file name.\r
   @param DeviceHandle  Driver handle for this partition.\r
 \r
@@ -1223,7 +1223,7 @@ LibFindFiles (
       } else {\r
         NewMenuEntry->DisplayString = LibStrDuplicate (DirInfo->FileName);\r
       }\r
-      \r
+\r
       NewMenuEntry->DisplayStringToken = HiiSetString (\r
                                            gFileExplorerPrivate.FeHiiHandle,\r
                                            0,\r
@@ -1459,7 +1459,7 @@ LibGetDevicePath (
 }\r
 \r
 /**\r
-  Choose a file in the specified directory. \r
+  Choose a file in the specified directory.\r
 \r
   If user input NULL for the RootDirectory, will choose file in the system.\r
 \r
@@ -1612,7 +1612,7 @@ FileExplorerLibConstructor (
   //\r
   Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFileExplorerPrivate.FormBrowser2);\r
   ASSERT_EFI_ERROR (Status);\r
-    \r
+\r
   InitializeListHead (&gFileExplorerPrivate.FsOptionMenu->Head);\r
 \r
   return EFI_SUCCESS;\r
@@ -1647,7 +1647,7 @@ FileExplorerLibDestructor (
                     NULL\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
-    \r
+\r
     HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);\r
   }\r
 \r