summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-03-06 08:43:16 +0200
committerGitHub <noreply@github.com>2024-03-06 08:43:16 +0200
commitbb5a2a9375b89c936246e7af41fa255dd7bf29a8 (patch)
treecd431e337a2213db4241eae68565a34e191aa751 /lib/vty.c
parent7338aa601cf109d28a43d4711b95a4c623dc8627 (diff)
parent1853ccdb0fc8c99fe023a5dc246347236f6917b8 (diff)
Merge pull request #15489 from idryzhov/vty-mgmt-error
vty: change output of errors from mgmtd
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 1c9cff478d..912c893556 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -3570,8 +3570,9 @@ static void vty_mgmt_set_config_result_notified(
zlog_err("SET_CONFIG request for client 0x%" PRIx64
" failed, Error: '%s'",
client_id, errmsg_if_any ? errmsg_if_any : "Unknown");
- vty_out(vty, "ERROR: SET_CONFIG request failed, Error: %s\n",
- errmsg_if_any ? errmsg_if_any : "Unknown");
+ vty_out(vty, "%% Configuration failed.\n\n");
+ if (errmsg_if_any)
+ vty_out(vty, "%s\n", errmsg_if_any);
} else {
debug_fe_client("SET_CONFIG request for client 0x%" PRIx64
" req-id %" PRIu64 " was successfull",
@@ -3602,8 +3603,9 @@ static void vty_mgmt_commit_config_result_notified(
zlog_err("COMMIT_CONFIG request for client 0x%" PRIx64
" failed, Error: '%s'",
client_id, errmsg_if_any ? errmsg_if_any : "Unknown");
- vty_out(vty, "ERROR: COMMIT_CONFIG request failed, Error: %s\n",
- errmsg_if_any ? errmsg_if_any : "Unknown");
+ vty_out(vty, "%% Configuration failed.\n\n");
+ if (errmsg_if_any)
+ vty_out(vty, "%s\n", errmsg_if_any);
} else {
debug_fe_client("COMMIT_CONFIG request for client 0x%" PRIx64
" req-id %" PRIu64 " was successfull",