diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-11-09 15:05:14 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-11-10 10:15:30 +0100 |
commit | c10c5926cbe10abcc5b4b4655e2b13c5b4622f5f (patch) | |
tree | ae4cbc2406ce9dbc6efe6397561965bfad337841 /watchquagga/watchquagga_vty.c | |
parent | lib: add minimal no-config VTY mode (diff) | |
download | frr-c10c5926cbe10abcc5b4b4655e2b13c5b4622f5f.tar.xz frr-c10c5926cbe10abcc5b4b4655e2b13c5b4622f5f.zip |
vtysh: improve config-write error reporting
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r-- | watchquagga/watchquagga_vty.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)); |