From: Matthias Andree Date: Sat, 10 Jun 2006 14:08:18 +0000 (+0200) Subject: Read mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc. X-Git-Tag: E2FSPROGS-1_40-WIP-1114~83 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=abcfdfda7a5932cbb27ff243ed962119db2599a4;p=tools%2Fe2fsprogs.git Read mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc. --- diff --git a/MCONFIG.in b/MCONFIG.in index 4afb80a..e8b0155 100644 --- a/MCONFIG.in +++ b/MCONFIG.in @@ -33,7 +33,7 @@ datadir = @datadir@ CC = @CC@ BUILD_CC = @BUILD_CC@ -DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ +DEFS = -DLOCALEDIR=\"$(localedir)\" -DROOT_SYSCONFDIR=\"$(root_sysconfdir)\" @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @CPPFLAGS@ INTL_FLAGS = @INTL_FLAGS@ diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 9e722f4..77f56f6 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -568,7 +568,7 @@ static void syntax_err_report(const char *filename, long err, int line_num) exit(FSCK_ERROR); } -static const char *config_fn[] = { "/etc/e2fsck.conf", 0 }; +static const char *config_fn[] = { ROOT_SYSCONFDIR "/e2fsck.conf", 0 }; static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) { diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 5c59b48..0004c01 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -870,7 +870,7 @@ static void syntax_err_report(const char *filename, long err, int line_num) exit(1); } -static const char *config_fn[] = { "/etc/mke2fs.conf", 0 }; +static const char *config_fn[] = { ROOT_SYSCONFDIR "/mke2fs.conf", 0 }; static void edit_feature(const char *str, __u32 *compat_array) {