]> git.ipfire.org Git - thirdparty/systemd.git/commit
boot: Unify protocol opening
authorJan Janssen <medhefgo@web.de>
Mon, 12 Jun 2023 13:12:05 +0000 (15:12 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 12 Jun 2023 20:12:11 +0000 (21:12 +0100)
commitb4eb2de7e3ec01cd9fb2b8cda8793da64a6ef027
tree316b330384b62f3a3e1c89a3b7b7dac948175357
parent2efddcb24551521b75542043d033e39338207de8
boot: Unify protocol opening

We are using HandleProtocol everywhere except in these few cases. This
unifies on HandleProtocol as it is simpler to use and equivalent to
OpenProtocol.

The only difference between the two is that OpenProtocol attributes the
opened protocol to a firmware-owned handle instead of our image handle.
This has no real use for regular UEFI applications as any protocols
opened via BY_HANDLE or GET_PROTOCOL is not required to be closed. In
fact, when a protocol is uninstalled it will do nothing more than reduce
the open count for these.
src/boot/efi/boot.c
src/boot/efi/initrd.c
src/boot/efi/stub.c