-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unsafe_protocol
is not necessary?
#1573
Comments
I think what you want to do is already done in our tests:
You can use the code as template. And yep, you don't need |
The We should indeed make this clear in the documentation. |
Closing now, as the docs have been updated. |
Thanks! |
I wrote a little stub loader for the Linux kernel which exposes an initrd for it.
I had to implement the
EFI_LOAD_FILE2_PROTOCOL
protocol with astruct
as follows:It was not clear to me why
unsafe_protocol
was required, and inspecting the source in uefi-rs didn't reveal this being used. This GUID is unused, and the actual one that is used is the one passed toinstall_protocol_interface
.I deleted the line and my service still compiles and runs perfectly. Is this macro no longer required? Is it only for specific situations? The documentation indicates that it implements a couple of Traits, but the documentation for these traits doesn't specify when they are required either. Protocols work fine without them too.
The text was updated successfully, but these errors were encountered: