]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/grammar_sandbox_main.c
staticd: Do not ready prefix for printing till it's decoded
[mirror_frr.git] / lib / grammar_sandbox_main.c
index c236d2c7be774c8a42f0c4e4bac6abbe0c14ca28..c9c942f9bf897a02599dea196ce1dcea5463556a 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "command.h"
 #include "memory_vty.h"
 
-static void vty_do_exit(void)
+static void vty_do_exit(int isexit)
 {
        printf("\nend.\n");
-       exit(0);
+       if (!isexit)
+               exit(0);
 }
 
 struct thread_master *master;
@@ -49,6 +54,7 @@ int main(int argc, char **argv)
        /* Library inits. */
        cmd_init(1);
        host.name = strdup("test");
+       host.domainname = strdup("testdomainname");
 
        vty_init(master);
        memory_init();