Hi all, I'm trying to selectively update key/value pairs in an existing BGENV.DAT file while preserving all other settings. However, all other settings are lost in the update process since the whole BGENV struct is memset to zero before the new k/v pairs are applied to it.
An obvious workaround is to use bg_printenv to query the current settings and then to pass along the current settings to bg_setenv. While this is possible, it's also error-prone and somewhat counterintuitive, e.g. compared to U-Boot's fw_setenv. I have a simple patch which resolves the above issues which I'd like to contribute upstream, hence this e-mail. Kind regards, Michael Michael Adler (1): bg_setenv: preserve existing env tools/bg_setenv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.33.0 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20211005073709.1019435-1-michael.adler%40siemens.com.
