vlib: revert exec cmd handle scripts with blank lines
This reverts commit
Type: fix
@@ -3436,29 +3436,11 @@ unix_cli_exec (vlib_main_t * vm,
vec_free (expanded);
}
- while (1)
- {
- int rv = unformat_user (&sub_input, unformat_line_input, line_input);
-
- /* No match? */
- if (rv == 0)
+ while (unformat_user (&sub_input, unformat_line_input, line_input))
{
- /* Out of input, we're done... */
- if (sub_input.index == UNFORMAT_END_OF_INPUT)
- {
- unformat_free (line_input);
- break;
- }
- /* Blank line... */
- sub_input.index++;
- }
- else
- {
- /* Process the line we just read */
vlib_cli_input (vm, line_input, 0, 0);
unformat_free (line_input);
}
- }
unformat_free (&sub_input);
done:
