diff options
| author | Ayush Singh <ayush@beagleboard.org> | 2025-09-24 13:26:03 +0530 |
|---|---|---|
| committer | Ayush Singh <ayush@beagleboard.org> | 2025-09-24 13:26:03 +0530 |
| commit | 03fd823dbf39ebbd69f6e20e9d44c0cb893140c3 (patch) | |
| tree | 73f5b48ad6559c2f0823dbf1dc48356c9065aa77 /library/std/src | |
| parent | ae12bc21d8ec76bbb753d4da168e9b08e1b09ebf (diff) | |
| download | rust-03fd823dbf39ebbd69f6e20e9d44c0cb893140c3.tar.gz rust-03fd823dbf39ebbd69f6e20e9d44c0cb893140c3.zip | |
library: std: sys: pal: uefi: Add some comments
I seemed to have forgotten that since I am using GET_PROTOCOL attribute for the std usecases, I did not need to close the protocols explicitly. So adding these comments as a note to future self not to waste time on the same thing again. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/pal/uefi/helpers.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/uefi/helpers.rs b/library/std/src/sys/pal/uefi/helpers.rs index b50574de937..c0d69c3e002 100644 --- a/library/std/src/sys/pal/uefi/helpers.rs +++ b/library/std/src/sys/pal/uefi/helpers.rs @@ -92,6 +92,9 @@ pub(crate) fn locate_handles(mut guid: Guid) -> io::Result<Vec<NonNull<crate::ff /// /// Queries a handle to determine if it supports a specified protocol. If the protocol is /// supported by the handle, it opens the protocol on behalf of the calling agent. +/// +/// The protocol is opened with the attribute GET_PROTOCOL, which means the caller is not required +/// to close the protocol interface with `EFI_BOOT_SERVICES.CloseProtocol()` pub(crate) fn open_protocol<T>( handle: NonNull<crate::ffi::c_void>, mut protocol_guid: Guid, @@ -473,6 +476,7 @@ impl<'a> crate::fmt::Debug for DevicePathNode<'a> { } } +/// Protocols installed by Rust side on a handle. pub(crate) struct OwnedProtocol<T> { guid: r_efi::efi::Guid, handle: NonNull<crate::ffi::c_void>, |
