From 380cd4e6d296cde9d203ce6c4fa01be189fbf34c Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Sun, 24 May 2009 23:05:11 +0000 Subject: booster: Clear up env var usage Signed-off-by: Anand V. Avati --- booster/src/booster.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'booster') diff --git a/booster/src/booster.c b/booster/src/booster.c index 264d6772b47..40dac43eed7 100644 --- a/booster/src/booster.c +++ b/booster/src/booster.c @@ -236,9 +236,19 @@ booster_get_process_fd () return real_dup (process_piped_fd); } +/* The following two define which file contains + * the FSTAB configuration for VMP-based usage. + */ #define DEFAULT_BOOSTER_CONF CONFDIR"/booster.conf" #define BOOSTER_CONF_ENV_VAR "GLUSTERFS_BOOSTER_FSTAB" + +/* The following define which log file is used when + * using the old mount point bypass approach. + */ +#define BOOSTER_DEFAULT_LOG CONFDIR"/booster.log" +#define BOOSTER_LOG_ENV_VAR "GLUSTERFS_BOOSTER_LOG" + static int32_t booster_put_handle (booster_mount_table_t *table, dev_t st_dev, @@ -398,7 +408,10 @@ do_open (int fd, int flags, mode_t mode) fseek (specfp, 0L, SEEK_SET); - ctx.logfile = getenv (BOOSTER_CONF_ENV_VAR); + ctx.logfile = getenv (BOOSTER_LOG_ENV_VAR); + if (!ctx.logfile) + ctx.logfile = strdup (BOOSTER_DEFAULT_LOG); + ctx.specfp = specfp; handle = glusterfs_init (&ctx); -- cgit