]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
MdeModulePkg RegularExpressionDxe: Remove unknown build option for XCODE
[mirror_edk2.git] / MdeModulePkg / Universal / PlatformDriOverrideDxe / PlatDriOverrideLib.c
index bad8ecc35fa5dd95f53dab5335760fe0763ef289..d49f6c9953f5f8afc4a1cd8c36bbd4a67f1a3588 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of the shared functions to do the platform driver vverride mapping.\r
 \r
-  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 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
@@ -147,7 +147,7 @@ CheckExistInStack (
 \r
   According to a file GUID, check a Fv file device path is valid. If it is invalid,\r
   try to return the valid device path.\r
-  FV address maybe changes for memory layout adjust from time to time, use this funciton\r
+  FV address maybe changes for memory layout adjust from time to time, use this function\r
   could promise the Fv file device path is right.\r
 \r
   @param  DevicePath               On input, the FV file device path to check\r
@@ -751,7 +751,7 @@ InitOverridesMapping (
       //\r
       // Check buffer overflow.\r
       //\r
-      if ((OverrideItem->ControllerDevicePath == NULL) || (VariableIndex < (UINT8 *) ControllerDevicePath) || \r
+      if ((OverrideItem->ControllerDevicePath == NULL) || (VariableIndex < (UINT8 *) ControllerDevicePath) ||\r
           (VariableIndex > (UINT8 *) VariableBuffer + BufferSize)) {\r
         Corrupted = TRUE;\r
         break;\r
@@ -781,7 +781,7 @@ InitOverridesMapping (
         //\r
         // Check buffer overflow\r
         //\r
-        if ((DriverImageInfo->DriverImagePath == NULL) || (VariableIndex < (UINT8 *) DriverDevicePath) || \r
+        if ((DriverImageInfo->DriverImagePath == NULL) || (VariableIndex < (UINT8 *) DriverDevicePath) ||\r
             (VariableIndex < (UINT8 *) VariableBuffer + BufferSize)) {\r
           Corrupted = TRUE;\r
           break;\r
@@ -1004,7 +1004,6 @@ SaveOverridesMapping (
       //\r
       if ((VariableNeededSize +\r
            OneItemNeededSize +\r
-           sizeof (VARIABLE_HEADER) +\r
            StrSize (L"PlatDriOver ")\r
            ) >= MaximumVariableSize\r
           ) {\r
@@ -1095,7 +1094,7 @@ SaveOverridesMapping (
     if (EFI_ERROR (Status)) {\r
       if (NumIndex > 0) {\r
         //\r
-        // Delete all PlatDriOver variables when full mapping can't be set.  \r
+        // Delete all PlatDriOver variables when full mapping can't be set.\r
         //\r
         DeleteOverridesVariables ();\r
       }\r
@@ -1113,10 +1112,10 @@ SaveOverridesMapping (
 \r
   @param  ImageHandle          The Image handle\r
   @param  BindingHandle        The BindingHandle of the found Driver Binding protocol.\r
-                               If Binding protocol is not found, it is set to NULL. \r
+                               If Binding protocol is not found, it is set to NULL.\r
 \r
   @return                      Pointer into the Binding Protocol interface\r
-  @retval NULL                 The paramter is not valid or the binding protocol is not found.\r
+  @retval NULL                 The parameter is not valid or the binding protocol is not found.\r
 \r
 **/\r
 EFI_DRIVER_BINDING_PROTOCOL *\r
@@ -1316,7 +1315,7 @@ GetDriverFromMapping (
   //\r
   if (CheckExistInStack (OverrideItem->ControllerDevicePath)) {\r
     //\r
-    // There is a dependecy dead loop if the ControllerDevicePath appear in stack twice\r
+    // There is a dependency dead loop if the ControllerDevicePath appear in stack twice\r
     //\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -1338,7 +1337,7 @@ GetDriverFromMapping (
         // If the image device path contains an FV node, check the FV file device path is valid.\r
         // If it is invalid, try to return the valid device path.\r
         // FV address maybe changes for memory layout adjust from time to time,\r
-        // use this funciton could promise the FV file device path is right.\r
+        // use this function could promise the FV file device path is right.\r
         //\r
         Status = UpdateFvFileDevicePath (&TempDriverImagePath, NULL, CallerImageHandle);\r
         if (!EFI_ERROR (Status)) {\r
@@ -1552,8 +1551,8 @@ GetDriverFromMapping (
 \r
   @retval EFI_INVALID_PARAMETER    ControllerDevicePath or MappingDataBase is NULL.\r
   @retval EFI_NOT_FOUND            ControllerDevicePath is not found in MappingDataBase or\r
-                                   DriverImageDevicePath is not found in the found DriverImage Info list. \r
-  @retval EFI_SUCCESS              The controller's total override driver number and \r
+                                   DriverImageDevicePath is not found in the found DriverImage Info list.\r
+  @retval EFI_SUCCESS              The controller's total override driver number and\r
                                    input DriverImage's order number is correctly return.\r
 **/\r
 EFI_STATUS\r
@@ -1669,14 +1668,14 @@ CheckMapping (
                                    override driver image item\r
   @param  DriverImageDevicePath    The driver image device path need to be insert\r
   @param  MappingDataBase          Mapping database list entry pointer\r
-  @param  DriverImageNO            The inserted order number. If this number is taken, \r
+  @param  DriverImageNO            The inserted order number. If this number is taken,\r
                                    the larger available number will be used.\r
 \r
   @retval EFI_INVALID_PARAMETER    ControllerDevicePath is NULL, or DriverImageDevicePath is NULL\r
                                    or MappingDataBase is NULL\r
-  @retval EFI_ALREADY_STARTED      The input Controller to input DriverImage has been \r
+  @retval EFI_ALREADY_STARTED      The input Controller to input DriverImage has been\r
                                    recorded into the mapping database.\r
-  @retval EFI_SUCCESS              The Controller and DriverImage are inserted into \r
+  @retval EFI_SUCCESS              The Controller and DriverImage are inserted into\r
                                    the mapping database successfully.\r
 \r
 **/\r
@@ -1800,7 +1799,7 @@ InsertDriverImage (
 /**\r
   Delete a controller's override driver from the mapping database.\r
 \r
-  @param  ControllerDevicePath     The controller device path will be deleted \r
+  @param  ControllerDevicePath     The controller device path will be deleted\r
                                    when all drivers images on it are removed.\r
   @param  DriverImageDevicePath    The driver image device path will be delete.\r
                                    If NULL, all driver image will be delete.\r
@@ -1808,7 +1807,7 @@ InsertDriverImage (
 \r
   @retval EFI_INVALID_PARAMETER    ControllerDevicePath is NULL, or MappingDataBase is NULL\r
   @retval EFI_NOT_FOUND            ControllerDevicePath is not found in MappingDataBase or\r
-                                   DriverImageDevicePath is not found in the found DriverImage Info list. \r
+                                   DriverImageDevicePath is not found in the found DriverImage Info list.\r
   @retval EFI_SUCCESS              Delete the specified driver successfully.\r
 \r
 **/\r