diff options
| author | bors <bors@rust-lang.org> | 2024-07-28 18:49:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-28 18:49:55 +0000 |
| commit | 2cbbe8b8bb2be672b14cf741a2f0ec24a49f3f0b (patch) | |
| tree | 2b2d6044bc2153a15d65e9ae7abd307f52c9adef /library/std/src/sys/pal/uefi/helpers.rs | |
| parent | 188ddf4d6a694fa263c2ff8be8f8eade659599d6 (diff) | |
| parent | eeb76ccaf0f20819c1e4360420e7b1aff94c5c9d (diff) | |
| download | rust-2cbbe8b8bb2be672b14cf741a2f0ec24a49f3f0b.tar.gz rust-2cbbe8b8bb2be672b14cf741a2f0ec24a49f3f0b.zip | |
Auto merge of #128313 - GuillaumeGomez:rollup-kacb489, r=GuillaumeGomez
Rollup of 6 pull requests Successful merges: - #125779 ([rustdoc] Add copy code feature) - #127765 (Fix doc nits) - #127860 (deps: dedup object, wasmparser, wasm-encoder) - #128103 (add `is_multiple_of` for unsigned integer types) - #128228 (Stabilize `const_waker`) - #128240 (Add links from `assert_eq!` docs to `debug_assert_eq!`, etc.) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/pal/uefi/helpers.rs')
| -rw-r--r-- | library/std/src/sys/pal/uefi/helpers.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/library/std/src/sys/pal/uefi/helpers.rs b/library/std/src/sys/pal/uefi/helpers.rs index 29984a915b8..586dbd84af2 100644 --- a/library/std/src/sys/pal/uefi/helpers.rs +++ b/library/std/src/sys/pal/uefi/helpers.rs @@ -30,8 +30,9 @@ type BootUninstallMultipleProtocolInterfaces = const BOOT_SERVICES_UNAVAILABLE: io::Error = const_io_error!(io::ErrorKind::Other, "Boot Services are no longer available"); -/// Locate Handles with a particular Protocol GUID -/// Implemented using `EFI_BOOT_SERVICES.LocateHandles()` +/// Locates Handles with a particular Protocol GUID. +/// +/// Implemented using `EFI_BOOT_SERVICES.LocateHandles()`. /// /// Returns an array of [Handles](r_efi::efi::Handle) that support a specified protocol. pub(crate) fn locate_handles(mut guid: Guid) -> io::Result<Vec<NonNull<crate::ffi::c_void>>> { @@ -148,8 +149,9 @@ pub(crate) unsafe fn close_event(evt: NonNull<crate::ffi::c_void>) -> io::Result if r.is_error() { Err(crate::io::Error::from_raw_os_error(r.as_usize())) } else { Ok(()) } } -/// Get the Protocol for current system handle. -/// Note: Some protocols need to be manually freed. It is the callers responsibility to do so. +/// Gets the Protocol for current system handle. +/// +/// Note: Some protocols need to be manually freed. It is the caller's responsibility to do so. pub(crate) fn image_handle_protocol<T>(protocol_guid: Guid) -> io::Result<NonNull<T>> { let system_handle = uefi::env::try_image_handle().ok_or(io::const_io_error!( io::ErrorKind::NotFound, @@ -220,7 +222,7 @@ pub(crate) fn device_path_to_text(path: NonNull<device_path::Protocol>) -> io::R Err(io::const_io_error!(io::ErrorKind::NotFound, "No device path to text protocol found")) } -/// Get RuntimeServices +/// Gets RuntimeServices. pub(crate) fn runtime_services() -> Option<NonNull<r_efi::efi::RuntimeServices>> { let system_table: NonNull<r_efi::efi::SystemTable> = crate::os::uefi::env::try_system_table()?.cast(); |
