-
-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Description
I want to use GOP protocol. So I have to write something like this:
// Get GOP protocol when boot services are still avaliable
let mut gop = system_table
.boot_services()
.open_protocol_exclusive::<GraphicsOutput>(handle)?;
/* some code */
// Exit boot services later
let (system_table, memory_map) = exit_boot_services(handle, system_table)?;
I get compile error. system_table
is borrowed by ScopedProtocol
structure stored in gop
variable. So I need to drop gop
variable to be able to move system_table
. But ScopedProtocol
implements Drop
. Its drop
function closes protocol, so I have no way to use GOP in runtime without usage of deprecated functions to get raw UnsafeCell
without unneeded auto-closing.
Metadata
Metadata
Assignees
Labels
No labels