[syslinux:firmware] efi: Pass correct pointer to BS->CreateEvent()

syslinux-bot for Matt Fleming matt.fleming at intel.com
Mon Nov 12 07:00:03 PST 2012


Commit-ID:  1cf1c0c827008cb1af7b06dc1a7496072756c518
Gitweb:     http://www.syslinux.org/commit/1cf1c0c827008cb1af7b06dc1a7496072756c518
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 12 Nov 2012 14:15:23 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Mon, 12 Nov 2012 14:35:54 +0000

efi: Pass correct pointer to BS->CreateEvent()

setup_default_timer() should be taking an EFI_EVENT * as its paramter,
since that's what CreateEvent() expects.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 efi/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/efi/main.c b/efi/main.c
index 7c9a821..059ad59 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -627,14 +627,14 @@ void timer_handler(EFI_EVENT ev, VOID *ctx)
 }
 
 /* Setup a default periodic timer */
-static EFI_STATUS setup_default_timer(EFI_EVENT ev)
+static EFI_STATUS setup_default_timer(EFI_EVENT *ev)
 {
 	EFI_STATUS efi_status;
 
-	ev = NULL;
-    	efi_status = uefi_call_wrapper( BS->CreateEvent, 5, EVT_TIMER|EVT_NOTIFY_SIGNAL, TPL_NOTIFY, (EFI_EVENT_NOTIFY)timer_handler, NULL, &ev);
+	*ev = NULL;
+	efi_status = uefi_call_wrapper( BS->CreateEvent, 5, EVT_TIMER|EVT_NOTIFY_SIGNAL, TPL_NOTIFY, (EFI_EVENT_NOTIFY)timer_handler, NULL, ev);
 	if (efi_status == EFI_SUCCESS) {
-		efi_status = uefi_call_wrapper(BS->SetTimer, 3, ev, TimerPeriodic, DEFAULT_TIMER_TICK_DURATION); 
+		efi_status = uefi_call_wrapper(BS->SetTimer, 3, *ev, TimerPeriodic, DEFAULT_TIMER_TICK_DURATION);
 	}
 	return efi_status;
 }
@@ -1099,7 +1099,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table)
 		goto out;
 	}
 	/* setup timer for boot menu system support */
-	status = setup_default_timer(timer_ev);
+	status = setup_default_timer(&timer_ev);
 	if (status != EFI_SUCCESS) {
 		printf("Failed to set up EFI timer support, bailing out\n");
 		goto out;


More information about the Syslinux-commits mailing list