@@ -717,7 +717,7 @@ impl BootServices {
717
717
///
718
718
/// This function directly calls the UEFI function `EFI_BOOT_SERVICES.SignalEvent()`.
719
719
///
720
- /// Since the UEFI function does not return any errors, this function shouldn't either .
720
+ /// Currently, (as of UEFI Spec v2.9) this only returns `EFI_SUCCESS` .
721
721
/// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
722
722
pub fn signal_event ( & self , event : & Event ) -> Result {
723
723
// Safety: cloning this event should be safe, as we're directly passing it to firmware
@@ -729,9 +729,17 @@ impl BootServices {
729
729
/// registered with `register_protocol_notify()`, then the corresponding registration will
730
730
/// be removed. It is safe to call this function within the corresponding notify function.
731
731
///
732
+ /// # Errors
733
+ ///
734
+ /// This function directly calls the UEFI function `EFI_BOOT_SERVICES.CloseEvent()`.
732
735
///
733
736
/// Note: The UEFI Specification v2.9 states that this may only return `EFI_SUCCESS`, but,
734
737
/// at least for application based on EDK2 (such as OVMF), it may also return `EFI_INVALID_PARAMETER`.
738
+ /// To be safe, ensure that error codes are handled properly.
739
+ ///
740
+ /// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
741
+ ///
742
+ /// * [`uefi::Status::INVALID_PARAMETER`]
735
743
pub fn close_event ( & self , event : Event ) -> Result {
736
744
unsafe { ( self . close_event ) ( event) . into ( ) }
737
745
}
@@ -740,6 +748,17 @@ impl BootServices {
740
748
///
741
749
/// The returned value will be `true` if the event is in the signaled state,
742
750
/// otherwise `false` is returned.
751
+ ///
752
+ /// # Errors
753
+ ///
754
+ /// This function returns errors from the UEFI function `EFI_BOOT_SERVICES.CheckEvent()`.
755
+ ///
756
+ /// Note: Instead of returning the `EFI_NOT_READY` error from `EFI_BOOT_SERVICES.CheckEvent()`,
757
+ /// as listed in the UEFI Specification, this function will return `false`.
758
+ ///
759
+ /// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
760
+ ///
761
+ /// * [`uefi::Status::INVALID_PARAMETER`]
743
762
pub fn check_event ( & self , event : Event ) -> Result < bool > {
744
763
let status = unsafe { ( self . check_event ) ( event) } ;
745
764
match status {
0 commit comments