/* Delete Boot#### variables that stand for such active boot options that have been dropped (ie. have not been selected by either matching or "survival
policy"). */
STATIC VOID PruneBootVariables(IN CONST ACTIVE_OPTION *ActiveOption, IN UINTN ActiveCount)
/* Delete Boot#### variables that stand for such active boot options that have been dropped (ie. have not been selected by either matching or "survival
policy"). */
STATIC VOID PruneBootVariables(IN CONST ACTIVE_OPTION *ActiveOption, IN UINTN ActiveCount)
{
  UINTN  Idx;
  for (Idx = 0; Idx < ActiveCount; ++Idx) {
    if (!ActiveOption[Idx].Appended) {
      CHAR16  VariableName[9];
      UnicodeSPrintAsciiFormat (
        VariableName,
        sizeof VariableName,
        "Boot%04x",
        ActiveOption[Idx].BootOption->OptionNumber
        );
      gRT->SetVariable (
             VariableName,
             &gEfiGlobalVariableGuid,
             0,
             0,
             NULL
             );
    }
  }
}