On Mon, Sep 11, 2017 at 04:54:42PM +0200, Jan Kiszka wrote: > On 2017-09-11 13:35, [ext] Andreas J. Reichel wrote: > > From: Reichel Andreas <[email protected]> > > > > * Refactor API > > > > Provide one function to set and one to get the global update state > > instead of six different. > > > > Improve code quality and use a context for API functions instead of > > hidden static global variables. > > > > * env: Remove BGENVTYPE from code > > > > Since different storage backends come with different .c files, there > > is no need for switch cases. > > > > * move some functions to simplify API dependencies > > > > * remove ebgdefs.h, since it only included one define, which better > > fits into the envdata.h > > > > * Add a ebgenv_t structure as a context for all ebg_ API functions. > > This provides better maintainability and future extensibility. > > It helps avoiding ugly global variables. > > One might argue that a context implicitly suggests multi-threading > > capability and needs an implementation for access scheduling for > > multiple environment accesses at the same time, however, the > > introduction of a better coding style per se is independent of this > > idea and all functions remain unsafe regarding threads. > > > > * Update tests > > > > Signed-off-by: Andreas Reichel <[email protected]> > > --- > > docs/API.md | 20 ++- > > env/env_api_fat.c | 294 +++++++++++++++++++++++++--------- > > env/fatvars.c | 1 - > > include/ebgdefs.h | 20 --- > > include/env_api.h | 30 ++-- > > include/envdata.h | 2 + > > swupdate-adapter/ebgenv.c | 398 > > ++++++++-------------------------------------- > > swupdate-adapter/ebgenv.h | 78 +++++---- > > tools/bg_setenv.c | 14 +- > > tools/tests/Makefile | 2 +- > > tools/tests/test_api.c | 128 ++++++++------- > > 11 files changed, 431 insertions(+), 556 deletions(-) > > delete mode 100644 include/ebgdefs.h > > I assume you considered doing this in smaller chunks and can confirm > that this would have been impractical. The patch is huge and, as such, > very hard to review. > > Jan
Yes I did. No intention of torturing reviewers. Andreas > -- > Siemens AG, Corporate Technology, CT RDA ITP SES-DE > Corporate Competence Center Embedded Linux -- Andreas Reichel Dipl.-Phys. (Univ.) Software Consultant [email protected], +49-174-3180074 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082 -- 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/20170911151336.GB26477%40iiotirae. For more options, visit https://groups.google.com/d/optout.
