Skip to content

Commit

Permalink
DasharoModulePkg/DasharoVariablesLib: fix build due to QuickSort()
Browse files Browse the repository at this point in the history
The change ported from a newer EDK version used QuickSort() which
doesn't exist in this one.

Signed-off-by: Sergii Dmytruk <[email protected]>
  • Loading branch information
SergiiDmytruk committed Jul 19, 2024
1 parent 48b3775 commit c4c2c97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Library/DasharoVariablesLib/DasharoVariablesLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/SortLib.h>
#include <Library/TpmMeasurementLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
Expand Down Expand Up @@ -380,7 +381,6 @@ MeasureVariables (
EFI_GUID Guid;
CHAR16 **Names;
UINTN NameCount;
CHAR16 SortBuf;
UINTN MaxNameCount;
UINTN Index;

Expand Down Expand Up @@ -455,13 +455,7 @@ MeasureVariables (
// Achieve predictable ordering of variables by sorting them by name within
// a particular vendor.
//
QuickSort (
Names,
NameCount,
sizeof (*Names),
CompareVariableNames,
&SortBuf
);
PerformQuickSort (Names, NameCount, sizeof (*Names), CompareVariableNames);

for (Index = 0; Index < NameCount; Index++) {
Status = MeasureVariable (Names[Index], Vendor);
Expand Down
1 change: 1 addition & 0 deletions Library/DasharoVariablesLib/DasharoVariablesLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
DebugLib
TpmMeasurementLib
PcdLib
SortLib
UefiLib

[Guids]
Expand Down

0 comments on commit c4c2c97

Please sign in to comment.