Allow configuration to override the default ENV_FILE_NAME to support scenarios with multiple distributions or architectures.
Signed-off-by: Earl Chew <[email protected]> --- configure.ac | 12 ++++++++++++ include/envdata.h | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 20fcf32..9fc7157 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,17 @@ AC_ARG_WITH([env-backend], AC_SUBST([env_api_file], [${ENV_API_FILE}]) +AC_ARG_WITH([env-file-name], + AS_HELP_STRING([--with-env-file-name=STRING], + [override the boot environment file name]), + [ + ENV_FILE_NAME="$withval" + ], + [ ENV_FILE_NAME="BGENV.DAT" ]) + +AC_DEFINE_UNQUOTED( + [ENV_FILE_NAME], [L"${ENV_FILE_NAME}"], [Boot environment file name]) + AC_ARG_WITH([boot-delay], AS_HELP_STRING([--with-boot-delay=INT], [specify the additional boot delay in seconds, defaults to 3]), @@ -268,6 +279,7 @@ AC_MSG_RESULT([ efi libs: ${GNUEFI_LIB_DIR} environment backend: ${ENV_API_FILE}.c + environment file name: ${ENV_FILE_NAME} number of config parts: ${ENV_NUM_CONFIG_PARTS} reserved for uservars: ${ENV_MEM_USERVARS} bytes boot delay: ${ENV_BOOT_DELAY} seconds diff --git a/include/envdata.h b/include/envdata.h index 9c4ad44..fddfa7f 100644 --- a/include/envdata.h +++ b/include/envdata.h @@ -16,7 +16,6 @@ #include <stdint.h> -#define ENV_FILE_NAME L"BGENV.DAT" #define FAT_ENV_FILENAME "BGENV.DAT" #define ENV_STRING_LENGTH 255 -- 2.39.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 view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20240405230116.2140690-1-earl_chew%40yahoo.com.
