On 19.10.21 10:57, Michael Adler wrote: >> But this will now dump irrespective of "verbosity", no? > > No, the if-block is only entered for bg_printenv, and (unfortunately) > bg_printenv always implies verbosity [1]. >
Fine, but please add such non-obvious things to the commit log then. I was too lazy to read the whole file, and from that patch loop-hole, that was not clear. Jan >> You rather need to pull this up an share it with the !write_mode case. > > That would reduce code duplication, yes, but I think it's the wrong call, > since verbosity is conceptually wrong here: if > I run bg_printenv, I *always* want to dump the BGENVs - I mean, that's why I > ran bg_printenv in the first place. In > fact, in the case of bg_printenv, verbosity should rather turn on additional > output. As it is now, the variable > verbosity is wasted for bg_printetnv, because it's always true [1]. > > Some background: I'm close to finishing the bg_printenv enhancement which we > discussed here last week and it will > further decouple setenv/printenv (for it is necessary to split the argument > parser). The whole entanglement makes it > difficult to extend one without the other, and this patch addresses one > instance of it. > > [1] > https://github.com/siemens/efibootguard/blob/c01324d0da202727eb0744c0f67a78f9c9b65c46/tools/bg_setenv.c#L670 > -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- 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/23a55745-e629-f336-2d6f-19aacb8003cd%40siemens.com.
