From 2db16368d1554b3243c7b5c0f81aa226e8932722 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Tue, 15 Jul 2014 09:17:36 +0000 Subject: [PATCH] ArmPlatformPkg/Bds: Added update of Pxe boot option Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron Reviewed-By: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15656 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BootOptionSupport.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c b/ArmPlatformPkg/Bds/BootOptionSupport.c index dc70dc4a1e..8708d306f3 100644 --- a/ArmPlatformPkg/Bds/BootOptionSupport.c +++ b/ArmPlatformPkg/Bds/BootOptionSupport.c @@ -727,6 +727,17 @@ BdsLoadOptionPxeCreateDevicePath ( return EFI_SUCCESS; } +/** + Update the parameters of a Pxe boot option + + @param[in] OldDevicePath Current complete device path of the Pxe boot option. + This has to be a valid complete Pxe boot option path. + @param[in] FileName Description of the file the path is asked for + @param[out] NewDevicePath Pointer to the new complete device path. + + @retval EFI_SUCCESS Update completed + @retval EFI_OUT_OF_RESOURCES Fail to perform the update due to lack of resource +**/ EFI_STATUS BdsLoadOptionPxeUpdateDevicePath ( IN EFI_DEVICE_PATH *OldDevicePath, @@ -735,8 +746,17 @@ BdsLoadOptionPxeUpdateDevicePath ( OUT BOOLEAN *RequestBootType ) { - ASSERT (0); - return EFI_UNSUPPORTED; + // + // Make a copy of the complete device path that is made of : + // the device path of the device supporting the Pxe base code protocol + // followed by an end node. + // + *NewDevicePath = DuplicateDevicePath (OldDevicePath); + if (*NewDevicePath == NULL) { + return EFI_OUT_OF_RESOURCES; + } else { + return EFI_SUCCESS; + } } BOOLEAN -- 2.39.2