On 2017-09-11 13:35, [ext] Andreas J. Reichel wrote: > From: Reichel Andreas <[email protected]> > > * bg_setenv uses a virtual environment as a working copy. Changes are > stored as a temporary state. > However this makes it rather complicated to implement deletion of user > variables. A similarly ugly implementation is the use of a special > marker byte to indicate a part of the working copy to not be updated > to the real environment. By using a list as journal for outstanding > tasks, tasks can be accumulated while parsing the arguments and > applied in the end. > > * Furthermore, the structure of the main function is simplified. > > Signed-off-by: Andreas Reichel <[email protected]> > --- > docs/TODO.md | 10 -- > tools/bg_setenv.c | 432 > ++++++++++++++++++++++++++++++------------------------ > 2 files changed, 242 insertions(+), 200 deletions(-) > > diff --git a/docs/TODO.md b/docs/TODO.md > index 6f104ab..fe5edd2 100644 > --- a/docs/TODO.md > +++ b/docs/TODO.md > @@ -6,16 +6,6 @@ > the current working environment to the (latest-1) environment, so > that if the current environment breaks, there is a backup with the > latest values. > - * Currently, `bg_setenv` generates a virtual environment copy while > - parsing arguments and later uses an algorithm to find out, how to > - merge this with the actual environment being modified. This led to > - the introduction of a special marker byte which tells the algorithm > - to not touch the original content. Deletion of user variables led to > - another special case, where *negative* variables had to be defined by > - a special `DELETED` type to tell the algorithm that the specific user > - variable has to be deleted. This is rather complicated and a better > - aproach has already been discussed using a journal with actions > - instead of a prebuilt state.
Didn't you just add this section in the last patch? That's overkill. Reasoning should go into the changelog instead (but it looks like you did this already). Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/42d7aa1a-de6f-4017-2a6a-33860d05c6ca%40siemens.com. For more options, visit https://groups.google.com/d/optout.
