]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / DeviceManagerUiLib / DeviceManager.c
index ac8a975bf6f1ed6612075c077dbb15a252cdccab..d39736764c5e7aba1a5dbc365b0e4040d354c266 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The device manager reference implementation\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\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
@@ -58,7 +58,7 @@ HII_VENDOR_DEVICE_PATH  mDeviceManagerHiiVendorDevicePath = {
   {\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
@@ -101,12 +101,12 @@ DmExtractDevicePathFromHiiHandle (
 /**\r
   Get the mac address string from the device path.\r
   if the device path has the vlan, get the vanid also.\r
-  \r
-  @param MacAddressNode              Device path begin with mac address \r
+\r
+  @param MacAddressNode              Device path begin with mac address\r
   @param PBuffer                     Output string buffer contain mac address.\r
 \r
 **/\r
-BOOLEAN \r
+BOOLEAN\r
 GetMacAddressString(\r
   IN  MAC_ADDR_DEVICE_PATH   *MacAddressNode,\r
   OUT CHAR16                 **PBuffer\r
@@ -142,7 +142,7 @@ GetMacAddressString(
   *PBuffer = String;\r
   StrCpyS(String, BufferLen / sizeof (CHAR16), L"MAC:");\r
   String += 4;\r
-  \r
+\r
   //\r
   // Convert the MAC address into a unicode string.\r
   //\r
@@ -202,7 +202,7 @@ GetMacAddressString(
   @retval  EFI_SUCCESS               Add the item is successful.\r
   @return  Other values if failed to Add the item.\r
 **/\r
-BOOLEAN \r
+BOOLEAN\r
 AddIdToMacDeviceList (\r
   IN  EFI_STRING        MacAddrString\r
   )\r
@@ -252,7 +252,7 @@ AddIdToMacDeviceList (
     if (TempDeviceList == NULL) {\r
       return FALSE;\r
     }\r
-    TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId;  \r
+    TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId;\r
     TempDeviceList[mMacDeviceList.CurListLen].QuestionId = (EFI_QUESTION_ID) (mMacDeviceList.CurListLen + NETWORK_DEVICE_LIST_KEY_OFFSET);\r
 \r
     mMacDeviceList.NodeList = TempDeviceList;\r
@@ -306,8 +306,8 @@ IsMacAddressDevicePath (
       if (DEVICE_MANAGER_FORM_ID == NextShowFormId) {\r
         *NeedAddItem = TRUE;\r
         break;\r
-      } \r
-      \r
+      }\r
+\r
       if (!GetMacAddressString((MAC_ADDR_DEVICE_PATH*)DevicePath, &Buffer)) {\r
         break;\r
       }\r
@@ -321,7 +321,7 @@ IsMacAddressDevicePath (
 \r
       if (NETWORK_DEVICE_LIST_FORM_ID == NextShowFormId) {\r
         //\r
-        // Same handle may has two network child handle, so the questionid \r
+        // Same handle may has two network child handle, so the questionid\r
         // has the offset of SAME_HANDLE_KEY_OFFSET.\r
         //\r
         if (AddIdToMacDeviceList (Buffer)) {\r
@@ -351,7 +351,7 @@ IsMacAddressDevicePath (
   @return  FALSE         Do not need to add the menu about the network.\r
 \r
 **/\r
-BOOLEAN \r
+BOOLEAN\r
 IsNeedAddNetworkMenu (\r
   IN      EFI_HII_HANDLE      Handle,\r
   IN      EFI_FORM_ID         NextShowFormId,\r
@@ -360,7 +360,7 @@ IsNeedAddNetworkMenu (
 {\r
   EFI_STATUS     Status;\r
   UINTN          EntryCount;\r
-  UINTN          Index;  \r
+  UINTN          Index;\r
   EFI_HANDLE     DriverHandle;\r
   EFI_HANDLE     ControllerHandle;\r
   EFI_DEVICE_PATH_PROTOCOL   *DevicePath;\r
@@ -389,9 +389,9 @@ IsNeedAddNetworkMenu (
   }\r
   TmpDevicePath = DevicePath;\r
 \r
-  // \r
+  //\r
   // Check whether this device path include mac address device path.\r
-  // If this path has mac address path, get the value whether need \r
+  // If this path has mac address path, get the value whether need\r
   // add this info to the menu and return.\r
   // Else check more about the child handle devcie path.\r
   //\r
@@ -413,7 +413,7 @@ IsNeedAddNetworkMenu (
   }\r
 \r
   if (!IsDevicePathEnd (TmpDevicePath)) {\r
-    return FALSE;    \r
+    return FALSE;\r
   }\r
 \r
   //\r
@@ -452,7 +452,7 @@ IsNeedAddNetworkMenu (
         continue;\r
       }\r
 \r
-      // \r
+      //\r
       // Check whether this device path include mac address device path.\r
       //\r
       if (!IsMacAddressDevicePath(ChildDevicePath, NextShowFormId,&IsNeedAdd)) {\r
@@ -472,7 +472,7 @@ IsNeedAddNetworkMenu (
         } else {\r
           //\r
           // If need to update other form, return whether need to add to the menu.\r
-          //          \r
+          //\r
           goto Done;\r
         }\r
       }\r
@@ -481,9 +481,9 @@ IsNeedAddNetworkMenu (
 \r
 Done:\r
   if (OpenInfoBuffer != NULL) {\r
-    FreePool (OpenInfoBuffer);  \r
+    FreePool (OpenInfoBuffer);\r
   }\r
-  return IsNeedAdd; \r
+  return IsNeedAdd;\r
 }\r
 \r
 /**\r
@@ -514,10 +514,10 @@ CreateDeviceManagerForm(
   EFI_STRING                  NewStringTitle;\r
   CHAR16                      *DevicePathStr;\r
   EFI_STRING_ID               DevicePathId;\r
-  EFI_IFR_FORM_SET            *Buffer;      \r
-  UINTN                       BufferSize;   \r
-  UINT8                       ClassGuidNum; \r
-  EFI_GUID                    *ClassGuid;   \r
+  EFI_IFR_FORM_SET            *Buffer;\r
+  UINTN                       BufferSize;\r
+  UINT8                       ClassGuidNum;\r
+  EFI_GUID                    *ClassGuid;\r
   UINTN                       TempSize;\r
   UINT8                       *Ptr;\r
   EFI_STATUS                  Status;\r
@@ -599,7 +599,7 @@ CreateDeviceManagerForm(
       if (((EFI_IFR_OP_HEADER *) Ptr)->Length <= OFFSET_OF (EFI_IFR_FORM_SET, Flags)){\r
         Ptr += ((EFI_IFR_OP_HEADER *) Ptr)->Length;\r
         continue;\r
-      } \r
+      }\r
 \r
       ClassGuidNum = (UINT8) (((EFI_IFR_FORM_SET *)Ptr)->Flags & 0x3);\r
       ClassGuid = (EFI_GUID *) (VOID *)(Ptr + sizeof (EFI_IFR_FORM_SET));\r
@@ -629,7 +629,7 @@ CreateDeviceManagerForm(
 \r
         //\r
         // Network device process\r
-        // \r
+        //\r
         if (IsNeedAddNetworkMenu (HiiHandles[Index], NextShowFormId,&AddItemCount)) {\r
           if (NextShowFormId == DEVICE_MANAGER_FORM_ID) {\r
             //\r
@@ -679,7 +679,7 @@ CreateDeviceManagerForm(
               0,\r
               (EFI_QUESTION_ID) (Index + DEVICE_KEY_OFFSET),\r
               0,\r
-              &FormSetGuid,    \r
+              &FormSetGuid,\r
               DevicePathId\r
             );\r
           }\r
@@ -899,7 +899,7 @@ DeviceManagerUiLibConstructor (
   ASSERT (gDeviceManagerPrivate.HiiHandle != NULL);\r
 \r
   //\r
-  // Update boot manager page \r
+  // Update boot manager page\r
   //\r
   CreateDeviceManagerForm (DEVICE_MANAGER_FORM_ID);\r
 \r