File tree 1 file changed +4
-13
lines changed
1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -134,25 +134,16 @@ impl LoadedImage {
134
134
self . 0 . image_size = size;
135
135
}
136
136
137
- /// Set the callback handler to unload the image.
138
- ///
139
- /// Drivers that wish to support unloading have to register their unload handler
140
- /// using this protocol. It is responsible for cleaning up any resources the
141
- /// image is using before returning. Unloading a driver is done with
142
- /// [`boot::unload_image`].
143
- ///
144
- /// # Safety
145
- ///
146
- /// Only the driver that this [`LoadedImage`] is attached to should register an
147
- /// unload handler.
137
+ /// Registers a cleanup function that is called when [`boot::unload_image`]
138
+ /// is called.
148
139
///
149
140
/// [`boot::unload_image`]: crate::boot::unload_image
150
141
pub unsafe fn set_unload (
151
142
& mut self ,
152
143
unload : extern "efiapi" fn ( image_handle : Handle ) -> Status ,
153
144
) {
154
- type RawFn = unsafe extern "efiapi" fn ( image_handle : uefi_raw:: Handle ) -> uefi_raw:: Status ;
155
- let unload : RawFn = mem:: transmute ( unload) ;
145
+ let unload : unsafe extern "efiapi" fn ( image_handle : uefi_raw:: Handle ) -> uefi_raw:: Status =
146
+ mem:: transmute ( unload) ;
156
147
self . 0 . unload = Some ( unload) ;
157
148
}
158
149
You can’t perform that action at this time.
0 commit comments