File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,32 @@ pub unsafe fn reinstall_protocol_interface(
362362 . to_result ( )
363363}
364364
365+ /// Removes a protocol interface from a device handle.
366+ ///
367+ /// # Safety
368+ ///
369+ /// The caller is responsible for ensuring that there are no references to a protocol interface
370+ /// that has been removed. Some protocols may not be able to be removed as there is no information
371+ /// available regarding the references. This includes Console I/O, Block I/O, Disk I/o, and handles
372+ /// to device protocols.
373+ ///
374+ /// The caller is responsible for ensuring that they pass a valid `Guid` for `protocol`.
375+ ///
376+ /// # Errors
377+ ///
378+ /// * [`Status::NOT_FOUND`]: the interface was not found on the handle.
379+ /// * [`Status::ACCESS_DENIED`]: the interface is still in use and cannot be uninstalled.
380+ pub unsafe fn uninstall_protocol_interface (
381+ handle : Handle ,
382+ protocol : & Guid ,
383+ interface : * const c_void ,
384+ ) -> Result < ( ) > {
385+ let bt = boot_services_raw_panicking ( ) ;
386+ let bt = unsafe { bt. as_ref ( ) } ;
387+
388+ ( bt. uninstall_protocol_interface ) ( handle. as_ptr ( ) , protocol, interface) . to_result ( )
389+ }
390+
365391/// Returns an array of handles that support the requested protocol in a
366392/// pool-allocated buffer.
367393///
You can’t perform that action at this time.
0 commit comments