diff --git a/uefi/CHANGELOG.md b/uefi/CHANGELOG.md index 31b4df6d7..06f70bc44 100644 --- a/uefi/CHANGELOG.md +++ b/uefi/CHANGELOG.md @@ -10,6 +10,8 @@ ## Changed - Changed ordering of `proto::pci::PciIoAddress` to (bus -> dev -> fun -> reg -> ext_reg). - Return request with status as error data object for `proto::ata::pass_thru::AtaDevice`. +- **Breaking:** `proto::network::snp::SimpleNetwork::wait_for_packet` now + returns `Option` instead of `&Event`. # uefi - v0.36.1 (2025-11-05) diff --git a/uefi/src/proto/network/snp.rs b/uefi/src/proto/network/snp.rs index 4c93189fb..75538abff 100644 --- a/uefi/src/proto/network/snp.rs +++ b/uefi/src/proto/network/snp.rs @@ -270,8 +270,8 @@ impl SimpleNetwork { /// On QEMU, this event seems to never fire; it is suggested to verify that your implementation /// of UEFI properly implements this event before using it. #[must_use] - pub const fn wait_for_packet(&self) -> &Event { - unsafe { &*(ptr::from_ref(&self.0.wait_for_packet).cast::()) } + pub fn wait_for_packet(&self) -> Option { + unsafe { Event::from_ptr(self.0.wait_for_packet) } } /// Returns a reference to the Simple Network mode.