Revision: 14667
http://sourceforge.net/p/edk2/code/14667
Author: jljusten
Date: 2013-09-13 08:14:51 +0000 (Fri, 13 Sep 2013)
Log Message:
-----------
OvmfPkg: QemuBootOrder: mark UEFI boot options selected by fw_cfg
This will allow us to identify those UEFI boot options (while keeping
their relative order) that have *not* been selected by fw_cfg.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Tested-by: Michael Chang <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Modified Paths:
--------------
trunk/edk2/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
Modified: trunk/edk2/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
===================================================================
--- trunk/edk2/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c 2013-09-13
08:14:45 UTC (rev 14666)
+++ trunk/edk2/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c 2013-09-13
08:14:51 UTC (rev 14667)
@@ -244,20 +244,22 @@
**/
typedef struct {
CONST BDS_COMMON_OPTION *BootOption; // reference only, no ownership
+ BOOLEAN Appended; // has been added to a BOOT_ORDER?
} ACTIVE_OPTION;
/**
- Append BootOptionId to BootOrder, reallocating the latter if needed.
+ Append an active boot option to BootOrder, reallocating the latter if needed.
@param[in out] BootOrder The structure pointing to the array and holding
allocation and usage counters.
- @param[in] BootOptionId The value to append to the array.
+ @param[in] ActiveOption The active boot option whose ID should be
+ appended to the array.
- @retval RETURN_SUCCESS BootOptionId appended.
+ @retval RETURN_SUCCESS ID of ActiveOption appended.
@retval RETURN_OUT_OF_RESOURCES Memory reallocation failed.
@@ -265,8 +267,8 @@
STATIC
RETURN_STATUS
BootOrderAppend (
- IN OUT BOOT_ORDER *BootOrder,
- IN UINT16 BootOptionId
+ IN OUT BOOT_ORDER *BootOrder,
+ IN OUT ACTIVE_OPTION *ActiveOption
)
{
if (BootOrder->Produced == BootOrder->Allocated) {
@@ -287,7 +289,9 @@
BootOrder->Data = DataNew;
}
- BootOrder->Data[BootOrder->Produced++] = BootOptionId;
+ BootOrder->Data[BootOrder->Produced++] =
+ ActiveOption->BootOption->BootCurrent;
+ ActiveOption->Appended = TRUE;
return RETURN_SUCCESS;
}
@@ -343,6 +347,7 @@
if (IS_LOAD_OPTION_TYPE (Current->Attribute, LOAD_OPTION_ACTIVE)) {
if (ScanMode == 1) {
(*ActiveOption)[*Count].BootOption = Current;
+ (*ActiveOption)[*Count].Appended = FALSE;
}
++*Count;
}
@@ -1119,8 +1124,7 @@
//
// match found, store ID and continue with next OpenFirmware path
//
- Status = BootOrderAppend (&BootOrder,
- ActiveOption[Idx].BootOption->BootCurrent);
+ Status = BootOrderAppend (&BootOrder, &ActiveOption[Idx]);
if (Status != RETURN_SUCCESS) {
goto ErrorFreeActiveOption;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits