From: Andreas Reichel <[email protected]> * bg_utils is actually a core API, thus rename it to env_api * move include files to include directory * adapt Makefiles
This patch is a preparation step for a later patch which will simplify the API structure. Signed-off-by: Andreas Reichel <[email protected]> --- Makefile.am | 16 ++++++++-------- tools/bg_utils.c => env/env_api_fat.c | 2 +- {tools => include}/ebgpart.h | 0 tools/bg_utils.h => include/env_api.h | 0 {tools => include}/test-interface.h | 2 +- swupdate-adapter/ebgenv.c | 2 +- tools/bg_setenv.c | 2 +- tools/tests/test_api.c | 2 +- tools/tests/test_environment.c | 2 +- tools/tests/test_partitions.c | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) rename tools/bg_utils.c => env/env_api_fat.c (99%) rename {tools => include}/ebgpart.h (100%) rename tools/bg_utils.h => include/env_api.h (100%) rename {tools => include}/test-interface.h (96%) diff --git a/Makefile.am b/Makefile.am index 426a17f..2335d4d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,10 +39,10 @@ CLEANFILES = # # Static libraries # -lib_LIBRARIES = libebgenv.a libbg_utils.a +lib_LIBRARIES = libebgenv.a libenv_api.a libebgenv_a_SOURCES = \ - tools/bg_utils.c \ + env/env_api_fat.c \ tools/ebgpart.c \ swupdate-adapter/ebgenv.c @@ -53,16 +53,16 @@ libebgenv_a_CPPFLAGS = \ libebgenv_a_CFLAGS = \ $(AM_CFLAGS) -libbg_utils_a_SOURCES = \ +libenv_api_a_SOURCES = \ tools/ebgpart.c \ - tools/bg_utils.c + env/env_api_fat.c -libbg_utils_a_CFLAGS = \ +libenv_api_a_CFLAGS = \ $(AM_CFLAGS) pkginclude_HEADERS = \ swupdate-adapter/ebgenv.h \ - tools/bg_utils.h + include/env_api.h # # bg_setenv binary @@ -77,11 +77,11 @@ bg_setenv_CFLAGS = \ $(AM_CFLAGS) bg_setenv_LDADD = \ - -lbg_utils \ + -lenv_api \ -lz bg_setenv_DEPENDENCIES = \ - libbg_utils.a + libenv_api.a install-exec-hook: $(LN_S) -f bg_setenv$(EXEEXT) \ diff --git a/tools/bg_utils.c b/env/env_api_fat.c similarity index 99% rename from tools/bg_utils.c rename to env/env_api_fat.c index 528e43b..8056ab3 100644 --- a/tools/bg_utils.c +++ b/env/env_api_fat.c @@ -10,7 +10,7 @@ * the COPYING file in the top-level directory. */ -#include "bg_utils.h" +#include "env_api.h" #include "test-interface.h" const char *tmp_mnt_dir = "/tmp/mnt-XXXXXX"; diff --git a/tools/ebgpart.h b/include/ebgpart.h similarity index 100% rename from tools/ebgpart.h rename to include/ebgpart.h diff --git a/tools/bg_utils.h b/include/env_api.h similarity index 100% rename from tools/bg_utils.h rename to include/env_api.h diff --git a/tools/test-interface.h b/include/test-interface.h similarity index 96% rename from tools/test-interface.h rename to include/test-interface.h index 6b27943..36b0a62 100644 --- a/tools/test-interface.h +++ b/include/test-interface.h @@ -13,7 +13,7 @@ #ifndef __TEST_INTERFACE_H__ #define __TEST_INTERFACE_H__ -#include "bg_utils.h" +#include "env_api.h" bool read_env(CONFIG_PART *part, BG_ENVDATA *env); bool write_env(CONFIG_PART *part, BG_ENVDATA *env); diff --git a/swupdate-adapter/ebgenv.c b/swupdate-adapter/ebgenv.c index 4c767ee..9ac42fc 100644 --- a/swupdate-adapter/ebgenv.c +++ b/swupdate-adapter/ebgenv.c @@ -10,7 +10,7 @@ * the COPYING file in the top-level directory. */ -#include "bg_utils.h" +#include "env_api.h" #include "ebgdefs.h" #include "ebgenv.h" diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c index 5cc6403..570ae6d 100644 --- a/tools/bg_setenv.c +++ b/tools/bg_setenv.c @@ -10,7 +10,7 @@ * the COPYING file in the top-level directory. */ -#include "bg_utils.h" +#include "env_api.h" static char doc[] = "bg_setenv/bg_printenv - Environment tool for the EFI Boot Guard"; diff --git a/tools/tests/test_api.c b/tools/tests/test_api.c index fb6e658..cca4573 100644 --- a/tools/tests/test_api.c +++ b/tools/tests/test_api.c @@ -18,7 +18,7 @@ #include <cmocka.h> #include <string.h> #include <error.h> -#include "bg_utils.h" +#include "env_api.h" #include "ebgenv.h" static BGENV env = {0}; diff --git a/tools/tests/test_environment.c b/tools/tests/test_environment.c index caecd72..56395b7 100644 --- a/tools/tests/test_environment.c +++ b/tools/tests/test_environment.c @@ -17,7 +17,7 @@ #include <setjmp.h> #include <cmocka.h> #include <string.h> -#include "bg_utils.h" +#include "env_api.h" #include "test-interface.h" /* Mock functions from libparted */ diff --git a/tools/tests/test_partitions.c b/tools/tests/test_partitions.c index 6765e32..4203480 100644 --- a/tools/tests/test_partitions.c +++ b/tools/tests/test_partitions.c @@ -16,7 +16,7 @@ #include <stdbool.h> #include <setjmp.h> #include <cmocka.h> -#include "bg_utils.h" +#include "env_api.h" #include "test-interface.h" static PedDevice ped_devices[32] = {0}; -- 2.14.1 -- 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/20170926115638.2006-4-andreas.reichel.ext%40siemens.com. For more options, visit https://groups.google.com/d/optout.
