File tree 1 file changed +26
-0
lines changed
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(
362
362
. to_result ( )
363
363
}
364
364
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
+
365
391
/// Returns an array of handles that support the requested protocol in a
366
392
/// pool-allocated buffer.
367
393
///
You can’t perform that action at this time.
0 commit comments