On 05.08.25 07:51, 'Jan Kiszka' via EFI Boot Guard wrote:
> On 04.08.25 16:42, Michael Adler wrote:
>> Hi,
>>
>>> The Use/Test case is the following 
>>> - Config partions are mounted
>>> - Call bg_printenv with none or any option (-c, -p 0)
>>> - prints all fields set to 0, no error.
>>
>> I just tried this and could reproduce the issue. The suggested patch 
>> resolves the problem.
>>
>> Tested-by: Michael Adler <[email protected]>
>>
> 
> But all this is still missing the reasoning why the original issue
> reported by Felix was never an issue. Just reverting is too simple.
> Reading [1] again, we at least need to address release issues when
> probing fails somewhere.
> 
> Yeah, our APIs are horribly designed, making all this not a simple task...
> 
> Jan
> 
> [1]
> https://groups.google.com/g/efibootguard-dev/c/iYkr2K0ywl4/m/2mRRAlQtBgAJ
> 

I suspect this is the real fix:

diff --git a/env/env_config_file.c b/env/env_config_file.c
index b0cf043..03c618a 100644
--- a/env/env_config_file.c
+++ b/env/env_config_file.c
@@ -85,7 +85,7 @@ bool probe_config_file(CONFIG_PART *cfgpart)
                }
                if (do_unmount) {
                        unmount_partition(cfgpart);
-               } else {
+               } else if (!result) {
                        free(cfgpart->mountpoint);
                        cfgpart->mountpoint = NULL;
                }

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
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 visit 
https://groups.google.com/d/msgid/efibootguard-dev/71450406-3c37-4441-8db0-5136b0fd6a96%40siemens.com.

Reply via email to