mirror of https://github.com/acidanthera/audk.git
1. Fix a bug when comparing two timestamp in auth-variable driver.
2. Remove the TimeCompare function in Bds since it's not used anymore. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Dong Guo <guo.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13731 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
89799ec954
commit
42ed76042a
|
@ -357,40 +357,6 @@ EfiReallocatePool (
|
|||
return NewPool;
|
||||
}
|
||||
|
||||
/**
|
||||
Compare two EFI_TIME data.
|
||||
|
||||
|
||||
@param FirstTime - A pointer to the first EFI_TIME data.
|
||||
@param SecondTime - A pointer to the second EFI_TIME data.
|
||||
|
||||
@retval TRUE The FirstTime is not later than the SecondTime.
|
||||
@retval FALSE The FirstTime is later than the SecondTime.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
TimeCompare (
|
||||
IN EFI_TIME *FirstTime,
|
||||
IN EFI_TIME *SecondTime
|
||||
)
|
||||
{
|
||||
if (FirstTime->Year != SecondTime->Year) {
|
||||
return (BOOLEAN) (FirstTime->Year < SecondTime->Year);
|
||||
} else if (FirstTime->Month != SecondTime->Month) {
|
||||
return (BOOLEAN) (FirstTime->Month < SecondTime->Month);
|
||||
} else if (FirstTime->Day != SecondTime->Day) {
|
||||
return (BOOLEAN) (FirstTime->Day < SecondTime->Day);
|
||||
} else if (FirstTime->Hour != SecondTime->Hour) {
|
||||
return (BOOLEAN) (FirstTime->Hour < SecondTime->Hour);
|
||||
} else if (FirstTime->Minute != SecondTime->Minute) {
|
||||
return (BOOLEAN) (FirstTime->Minute < FirstTime->Minute);
|
||||
} else if (FirstTime->Second != SecondTime->Second) {
|
||||
return (BOOLEAN) (FirstTime->Second < SecondTime->Second);
|
||||
}
|
||||
|
||||
return (BOOLEAN) (FirstTime->Nanosecond <= SecondTime->Nanosecond);
|
||||
}
|
||||
|
||||
/**
|
||||
Get a string from the Data Hub record based on
|
||||
a device path.
|
||||
|
|
|
@ -216,23 +216,6 @@ GetProducerString (
|
|||
OUT CHAR16 **String
|
||||
);
|
||||
|
||||
/**
|
||||
Compare two EFI_TIME data.
|
||||
|
||||
|
||||
@param FirstTime - A pointer to the first EFI_TIME data.
|
||||
@param SecondTime - A pointer to the second EFI_TIME data.
|
||||
|
||||
@retval TRUE The FirstTime is not later than the SecondTime.
|
||||
@retval FALSE The FirstTime is later than the SecondTime.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
TimeCompare (
|
||||
IN EFI_TIME *FirstTime,
|
||||
IN EFI_TIME *SecondTime
|
||||
);
|
||||
|
||||
/**
|
||||
This function is the main entry of the platform setup entry.
|
||||
The function will present the main menu of the system setup,
|
||||
|
|
|
@ -1381,7 +1381,7 @@ CompareTimeStamp (
|
|||
} else if (FirstTime->Hour != SecondTime->Hour) {
|
||||
return (BOOLEAN) (FirstTime->Hour < SecondTime->Hour);
|
||||
} else if (FirstTime->Minute != SecondTime->Minute) {
|
||||
return (BOOLEAN) (FirstTime->Minute < FirstTime->Minute);
|
||||
return (BOOLEAN) (FirstTime->Minute < SecondTime->Minute);
|
||||
}
|
||||
|
||||
return (BOOLEAN) (FirstTime->Second <= SecondTime->Second);
|
||||
|
|
Loading…
Reference in New Issue