[efi] Report failures to stop the EFI timer tick event
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
c9176878ef
commit
694c18addc
@ -126,13 +126,27 @@ static void efi_tick_startup ( void ) {
|
|||||||
*/
|
*/
|
||||||
static void efi_tick_shutdown ( int booting __unused ) {
|
static void efi_tick_shutdown ( int booting __unused ) {
|
||||||
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
||||||
|
EFI_STATUS efirc;
|
||||||
|
int rc;
|
||||||
|
|
||||||
/* Stop timer tick */
|
/* Stop timer tick */
|
||||||
bs->SetTimer ( efi_tick_event, TimerCancel, 0 );
|
if ( ( efirc = bs->SetTimer ( efi_tick_event, TimerCancel, 0 ) ) != 0 ){
|
||||||
|
rc = -EEFI ( efirc );
|
||||||
|
DBGC ( colour, "EFI could not stop timer tick: %s\n",
|
||||||
|
strerror ( rc ) );
|
||||||
|
/* Self-destruct initiated */
|
||||||
|
return;
|
||||||
|
}
|
||||||
DBGC ( colour, "EFI timer stopped\n" );
|
DBGC ( colour, "EFI timer stopped\n" );
|
||||||
|
|
||||||
/* Destroy timer tick event */
|
/* Destroy timer tick event */
|
||||||
bs->CloseEvent ( efi_tick_event );
|
if ( ( efirc = bs->CloseEvent ( efi_tick_event ) ) != 0 ) {
|
||||||
|
rc = -EEFI ( efirc );
|
||||||
|
DBGC ( colour, "EFI could not destroy timer tick: %s\n",
|
||||||
|
strerror ( rc ) );
|
||||||
|
/* Probably non-fatal */
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Timer tick startup function */
|
/** Timer tick startup function */
|
||||||
|
Reference in New Issue
Block a user