Keep boot and grub directory names in sync with utils scripts
PATCH 1/1 Keep boot and grub directory names in sync with utils scripts
* configure.ac: Define GRUB_BOOT_DIR_NAME and GRUB_DIR_NAME macros.
* include/grub/emu/misc.h (DEFAULT_DIRECTORY): Use previous macros.
--- configure.ac | 4 ++++ include/grub/emu/misc.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)
configure.ac +4 -0
@@ -185,9 +185,13 @@ case "$host_os" in esac bootdirname=`echo "$bootdirname" | sed "$program_transform_name"` AC_SUBST(bootdirname) +AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname", + [Default boot directory name]") grubdirname=`echo "$PACKAGE" | sed "$program_transform_name"` AC_SUBST(grubdirname) +AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname", + [Default grub directory name]) # # Checks for build programs.
include/grub/emu/misc.h +3 -2
@@ -19,6 +19,7 @@#ifndef GRUB_EMU_MISC_H #define GRUB_EMU_MISC_H 1 +#include <config.h> #include <grub/symbol.h> #include <grub/types.h> #include <grub/util/libzfs.h>
@@ -32,9 +33,9 @@#ifdef __NetBSD__/* NetBSD uses /boot for its boot block. */ -# define DEFAULT_DIRECTORY "/grub" +# define DEFAULT_DIRECTORY "/"GRUB_DIR_NAME#else -# define DEFAULT_DIRECTORY "/boot/grub" +# define DEFAULT_DIRECTORY "/"GRUB_BOOT_DIR_NAME"/"GRUB_DIR_NAME#endif #define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"