]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix non-integrated config error display
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Oct 2017 02:35:35 +0000 (22:35 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Oct 2017 02:35:35 +0000 (22:35 -0400)
When using a non-integrated config and starting up
of a protocol daemon, we were not properly handling
all possible cases and as such when an user hit
an actual error they were getting (null) listed
for the message string.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/vty.c

index 12c3c12394a6774cb614002fdb72005e232ffb92..4026e0cf8ab1a389d3cd7b93fe14526326e560df 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2279,6 +2279,21 @@ static void vty_read_file(FILE *confp)
                case CMD_ERR_NO_MATCH:
                        message = "No such command";
                        break;
+               case CMD_WARNING:
+                       message = "Command returned Warning";
+                       break;
+               case CMD_WARNING_CONFIG_FAILED:
+                       message = "Command returned Warning Config Failed";
+                       break;
+               case CMD_ERR_INCOMPLETE:
+                       message = "Command returned Incomplete";
+                       break;
+               case CMD_ERR_EXEED_ARGC_MAX:
+                       message = "Command exceeded maximum number of Arguments";
+                       break;
+               default:
+                       message = "Command returned unhandled error message";
+                       break;
                }
 
                nl = strchr(vty->error_buf, '\n');