diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-10 23:48:48 +0100 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-11 00:19:56 +0100 |
commit | 3257ed4b66a48c2bbd3e558cce7990df937c7d21 (patch) | |
tree | dd9985ba65ae964aae3ea8eefad22150c3154f6d /src | |
parent | a2a9afb4247c61efb68db222374530e12f4c35e8 (diff) |
Honour the -n for -bP config
Diffstat (limited to 'src')
-rw-r--r-- | src/src/exim.c | 2 | ||||
-rw-r--r-- | src/src/functions.h | 2 | ||||
-rw-r--r-- | src/src/readconf.c | 13 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/src/exim.c b/src/src/exim.c index 3b6a9ba69..9cafc9a73 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -4572,7 +4572,7 @@ if (list_options) if (list_config) { set_process_info("listing config"); - readconf_print(US"config", NULL, FALSE); + readconf_print(US"config", NULL, flag_n); exim_exit(EXIT_SUCCESS); } diff --git a/src/src/functions.h b/src/src/functions.h index 53ed64345..a5278a620 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -313,7 +313,7 @@ extern void readconf_driver_init(uschar *, driver_instance **, driver_info *, int, void *, int, optionlist *, int); extern uschar *readconf_find_option(void *); extern void readconf_main(void); -extern void readconf_print(uschar *, uschar *, BOOL); +extern void readconf_print(uschar *, uschar *, BOOL no_labels); extern uschar *readconf_printtime(int); extern uschar *readconf_readname(uschar *, int, uschar *); extern int readconf_readtime(const uschar *, int, BOOL); diff --git a/src/src/readconf.c b/src/src/readconf.c index d0b8e0bcf..328d49558 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -16,7 +16,7 @@ extern char **environ; static void fn_smtp_receive_timeout(const uschar * name, const uschar * str); static void save_config_line(const uschar* line); static void save_config_position(const uschar *file, int line); -static void print_config(BOOL admin); +static void print_config(BOOL admin, BOOL terse); #define CSTATE_STACK_SIZE 10 @@ -2649,7 +2649,7 @@ if (type == NULL) if (Ustrcmp(name, "config") == 0) { - print_config(admin_user); + print_config(admin_user, no_labels); return; } @@ -4303,10 +4303,10 @@ current = next; /* List the parsed config lines, care about nice formatting and hide the <hide> values unless we're the admin user */ void -print_config(BOOL admin) +print_config(BOOL admin, BOOL terse) { config_line_item *i; -const int TS = 2; +const int TS = terse ? 0 : 2; int indent = 0; for (i = config_lines; i; i = i->next) @@ -4346,7 +4346,7 @@ for (i = config_lines; i; i = i->next) /* begin lines are left aligned */ else if (Ustrncmp(current, "begin", 5) == 0 && isspace(current[5])) { - puts(""); + if (!terse) puts(""); puts(CCS current); indent = TS; } @@ -4354,7 +4354,8 @@ for (i = config_lines; i; i = i->next) /* router/acl/transport block names */ else if (current[Ustrlen(current)-1] == ':' && !Ustrchr(current, '=')) { - printf("\n%*s%s\n", TS, "", current); + if (!terse) puts(""); + printf("%*s%s\n", TS, "", current); indent = 2 * TS; } |