diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2020-06-17 11:48:34 -0500 |
|---|---|---|
| committer | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2020-06-19 11:15:43 -0500 |
| commit | e063f27136dd493acf1d8b0233d2c2b4c4fd8cd2 (patch) | |
| tree | 1c1c17c17dd99825ee1e915936c5c39327b4b585 /lib/command.c | |
| parent | 8dc1d9258839bb4a709b2b6c667dec9eac0abdae (diff) | |
build: Allow removal of build configs from version string
A new config option `--disable-version-build-config`
allows you to show short version string by dropping
"configured with:" and all of its build configs
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index c9715965aa..80b75d9b23 100644 --- a/lib/command.c +++ b/lib/command.c @@ -144,7 +144,9 @@ void print_version(const char *progname) { printf("%s version %s\n", progname, FRR_VERSION); printf("%s\n", FRR_COPYRIGHT); +#ifdef ENABLE_VERSION_BUILD_CONFIG printf("configured with:\n\t%s\n", FRR_CONFIG_ARGS); +#endif } char *argv_concat(struct cmd_token **argv, int argc, int shift) @@ -1334,8 +1336,9 @@ DEFUN (show_version, vty_out(vty, "%s %s (%s).\n", FRR_FULL_NAME, FRR_VERSION, cmd_hostname_get() ? cmd_hostname_get() : ""); vty_out(vty, "%s%s\n", FRR_COPYRIGHT, GIT_INFO); +#ifdef ENABLE_VERSION_BUILD_CONFIG vty_out(vty, "configured with:\n %s\n", FRR_CONFIG_ARGS); - +#endif return CMD_SUCCESS; } |
