]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootOptionSupport.c
ArmPlatformPkg/Bds: Added update of Pxe boot option
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootOptionSupport.c
index dc70dc4a1efbd22a9a6aebc41bbddc5d43fecf05..8708d306f36f0c5db2782c797e1fd53bc1619541 100644 (file)
@@ -727,6 +727,17 @@ BdsLoadOptionPxeCreateDevicePath (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Update the parameters of a Pxe boot option\r
+\r
+  @param[in]   OldDevicePath  Current complete device path of the Pxe boot option.\r
+                              This has to be a valid complete Pxe boot option path.\r
+  @param[in]   FileName       Description of the file the path is asked for\r
+  @param[out]  NewDevicePath  Pointer to the new complete device path.\r
+\r
+  @retval  EFI_SUCCESS            Update completed\r
+  @retval  EFI_OUT_OF_RESOURCES   Fail to perform the update due to lack of resource\r
+**/\r
 EFI_STATUS\r
 BdsLoadOptionPxeUpdateDevicePath (\r
   IN EFI_DEVICE_PATH            *OldDevicePath,\r
@@ -735,8 +746,17 @@ BdsLoadOptionPxeUpdateDevicePath (
   OUT BOOLEAN                   *RequestBootType\r
   )\r
 {\r
-  ASSERT (0);\r
-  return EFI_UNSUPPORTED;\r
+  //\r
+  // Make a copy of the complete device path that is made of :\r
+  // the device path of the device supporting the Pxe base code protocol\r
+  // followed by an end node.\r
+  //\r
+  *NewDevicePath = DuplicateDevicePath (OldDevicePath);\r
+  if (*NewDevicePath == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  } else {\r
+    return EFI_SUCCESS;\r
+  }\r
 }\r
 \r
 BOOLEAN\r