|
@@ -126,13 +126,27 @@ static void efi_tick_startup ( void ) {
|
126
|
126
|
*/
|
127
|
127
|
static void efi_tick_shutdown ( int booting __unused ) {
|
128
|
128
|
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
|
129
|
+ EFI_STATUS efirc;
|
|
130
|
+ int rc;
|
129
|
131
|
|
130
|
132
|
/* Stop timer tick */
|
131
|
|
- bs->SetTimer ( efi_tick_event, TimerCancel, 0 );
|
|
133
|
+ if ( ( efirc = bs->SetTimer ( efi_tick_event, TimerCancel, 0 ) ) != 0 ){
|
|
134
|
+ rc = -EEFI ( efirc );
|
|
135
|
+ DBGC ( colour, "EFI could not stop timer tick: %s\n",
|
|
136
|
+ strerror ( rc ) );
|
|
137
|
+ /* Self-destruct initiated */
|
|
138
|
+ return;
|
|
139
|
+ }
|
132
|
140
|
DBGC ( colour, "EFI timer stopped\n" );
|
133
|
141
|
|
134
|
142
|
/* Destroy timer tick event */
|
135
|
|
- bs->CloseEvent ( efi_tick_event );
|
|
143
|
+ if ( ( efirc = bs->CloseEvent ( efi_tick_event ) ) != 0 ) {
|
|
144
|
+ rc = -EEFI ( efirc );
|
|
145
|
+ DBGC ( colour, "EFI could not destroy timer tick: %s\n",
|
|
146
|
+ strerror ( rc ) );
|
|
147
|
+ /* Probably non-fatal */
|
|
148
|
+ return;
|
|
149
|
+ }
|
136
|
150
|
}
|
137
|
151
|
|
138
|
152
|
/** Timer tick startup function */
|