X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlib%2Funix%2Fcli.c;h=3eb1d9ee86c966d8f1411ac4313c4e43ec56d0f7;hb=59b2565cd91a67ced650739f36129650830211ac;hp=ffe5de6d5b295654d88c6c96b3f8e402747c0140;hpb=03add7f5b5e5351790187ea6d7e83803d5be2440;p=vpp.git diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c index ffe5de6d5b2..3eb1d9ee86c 100644 --- a/src/vlib/unix/cli.c +++ b/src/vlib/unix/cli.c @@ -2776,8 +2776,14 @@ unix_cli_config (vlib_main_t * vm, unformat_input_t * input) cf->height = ws.ws_row; if (cf->width == 0 || cf->height == 0) - /* We have a tty, but no size. Stick to line mode. */ - goto notty; + { + /* + * We have a tty, but no size. Use defaults. + * vpp "unix interactive" inside emacs + gdb ends up here. + */ + cf->width = 80; + cf->height = 24; + } /* Setup the history */ cf->history_limit = um->cli_history_limit; @@ -2816,7 +2822,6 @@ unix_cli_config (vlib_main_t * vm, unformat_input_t * input) } else { - notty: /* No tty, so make sure the session doesn't have tty-like features */ unix_cli_set_session_noninteractive (cf); } @@ -2986,7 +2991,7 @@ unix_cli_exec (vlib_main_t * vm, } } - unformat_init_unix_file (&sub_input, fd); + unformat_init_clib_file (&sub_input, fd); vlib_cli_input (vm, &sub_input, 0, 0); unformat_free (&sub_input);