Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: Make parameter of ebg_env_getglobalstate obsolete
ebg_env_getglobalstate neither used nor needs a concrete environment for retrieving the effective state over all envs. The passed parameter has always been ignored and was probably only introduced to have a consistent signature compared to ebg_env_setglobalstate or other functions. At the same time, opening and closing an env via ebg_env_open_current and ebg_env_close is unfortunately not side-effect free which can cause surprises to users, see e.g. [1]. It is therefore better to avoid any needless opening of envs by officially declaring the parameter as reserved, just asking the user to pass NULL from now on. We do not want to change our API for existing users, though, and therefore do not enforce the parameter to be actually NULL. Thus, users can continue to pass valid envs as well. However, we now need to make sure that bgenv_init is also called from ebg_env_getglobalstate as this is otherwise done by ebg_env_create_new or ebg_env_open_current. [1] https://groups.google.com/g/efibootguard-dev/c/hAFE-LQ5cvc Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
- Loading branch information