From c10c5926cbe10abcc5b4b4655e2b13c5b4622f5f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 9 Nov 2016 15:05:14 +0100 Subject: vtysh: improve config-write error reporting Signed-off-by: David Lamparter --- watchquagga/watchquagga_vty.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'watchquagga') diff --git a/watchquagga/watchquagga_vty.c b/watchquagga/watchquagga_vty.c index bf413376a..b96011b76 100644 --- a/watchquagga/watchquagga_vty.c +++ b/watchquagga/watchquagga_vty.c @@ -113,6 +113,12 @@ void integrated_write_sigchld(int status) zlog_warn("configuration write terminated"); } + if (reply[3] != CMD_SUCCESS) { + /* failure might be silent in vtysh without this */ + static const char msg[] = "% Configuration write failed.\n"; + write(integrated_result_fd, msg, strlen(msg)); + } + /* don't care about failures here, if the connection is broken the * return value will just be lost. */ write(integrated_result_fd, reply, sizeof(reply)); -- cgit v1.2.3