checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.\r
\r
@param Event Event whose notification function is being invoked.\r
- @param Context Pointer to the notification function's context,\r
+ @param Context The pointer to the notification function's context,\r
which is implementation-dependent.\r
\r
**/\r
VOID\r
EFIAPI\r
-InternalEmptyFuntion (\r
+InternalEmptyFunction (\r
IN EFI_EVENT Event,\r
IN VOID *Context\r
)\r
{\r
return EfiCreateEventLegacyBootEx (\r
TPL_CALLBACK,\r
- InternalEmptyFuntion,\r
+ InternalEmptyFunction,\r
NULL,\r
LegacyBootEvent\r
);\r
OUT EFI_EVENT *LegacyBootEvent\r
)\r
{\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
+ EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
ASSERT (LegacyBootEvent != NULL);\r
\r
//\r
// For UEFI 2.0 and the future use an Event Group\r
//\r
+ if (NotifyFunction == NULL) {\r
+ //\r
+ // CreateEventEx will check NotifyFunction is NULL or not and return error.\r
+ // Use dummy routine for the case NotifyFunction is NULL.\r
+ //\r
+ WorkerNotifyFunction = InternalEmptyFunction;\r
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
+ }\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
NotifyTpl,\r
- NotifyFunction,\r
+ WorkerNotifyFunction,\r
NotifyContext,\r
&gEfiEventLegacyBootGuid,\r
LegacyBootEvent\r
change with the version of the specification supported.\r
If ReadyToBootEvent is NULL, then ASSERT().\r
\r
- @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+ @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
\r
@retval EFI_SUCCESS Event was created.\r
@retval Other Event was not created.\r
{\r
return EfiCreateEventReadyToBootEx (\r
TPL_CALLBACK,\r
- InternalEmptyFuntion,\r
+ InternalEmptyFunction,\r
NULL,\r
ReadyToBootEvent\r
);\r
OUT EFI_EVENT *ReadyToBootEvent\r
)\r
{\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
+ EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
ASSERT (ReadyToBootEvent != NULL);\r
\r
//\r
// For UEFI 2.0 and the future use an Event Group\r
//\r
+ if (NotifyFunction == NULL) {\r
+ //\r
+ // CreateEventEx will check NotifyFunction is NULL or not and return error.\r
+ // Use dummy routine for the case NotifyFunction is NULL.\r
+ //\r
+ WorkerNotifyFunction = InternalEmptyFunction;\r
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
+ }\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
NotifyTpl,\r
- NotifyFunction,\r
+ WorkerNotifyFunction,\r
NotifyContext,\r
&gEfiEventReadyToBootGuid,\r
ReadyToBootEvent\r
the differences from the caller.\r
If FvDevicePathNode is NULL, then ASSERT().\r
\r
- @param FvDevicePathNode Pointer to FV device path to check.\r
+ @param FvDevicePathNode The pointer to FV device path to check.\r
\r
@retval NULL FvDevicePathNode is not valid.\r
@retval Other FvDevicePathNode is valid and pointer to NameGuid was returned.\r
If FvDevicePathNode is NULL, then ASSERT().\r
If NameGuid is NULL, then ASSERT().\r
\r
- @param FvDevicePathNode Pointer to a FV device path node to initialize\r
+ @param FvDevicePathNode The pointer to a FV device path node to initialize\r
@param NameGuid FV file name to use in FvDevicePathNode\r
\r
**/\r