aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/ping/ping.c5
-rw-r--r--src/vlib/unix/cli.c7
-rw-r--r--src/vlib/unix/unix.h8
3 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/ping/ping.c b/src/plugins/ping/ping.c
index 98add533407..f3e238b9cd7 100644
--- a/src/plugins/ping/ping.c
+++ b/src/plugins/ping/ping.c
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <vlib/vlib.h>
+#include <vlib/unix/unix.h>
#include <vnet/fib/ip6_fib.h>
#include <vnet/fib/ip4_fib.h>
#include <vnet/fib/fib_sas.h>
@@ -1173,11 +1174,11 @@ run_ping_ip46_address (vlib_main_t * vm, u32 table_id, ip4_address_t * pa4,
}
}
break;
- default:
+ case UNIX_CLI_PROCESS_EVENT_READ_READY:
+ case UNIX_CLI_PROCESS_EVENT_QUIT:
/* someone pressed a key, abort */
vlib_cli_output (vm, "Aborted due to a keypress.");
goto double_break;
- break;
}
vec_free (event_data);
}
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 8120befef71..96e22a25313 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -449,13 +449,6 @@ static unix_cli_parse_actions_t unix_cli_parse_pager[] = {
#undef _
-/** CLI session events. */
-typedef enum
-{
- UNIX_CLI_PROCESS_EVENT_READ_READY, /**< A file descriptor has data to be read. */
- UNIX_CLI_PROCESS_EVENT_QUIT, /**< A CLI session wants to close. */
-} unix_cli_process_event_type_t;
-
/** CLI session telnet negotiation timer events. */
typedef enum
{
diff --git a/src/vlib/unix/unix.h b/src/vlib/unix/unix.h
index 44dcf712e8d..4b5f98a2e66 100644
--- a/src/vlib/unix/unix.h
+++ b/src/vlib/unix/unix.h
@@ -111,6 +111,14 @@ typedef struct
} unix_main_t;
+/** CLI session events. */
+typedef enum
+{
+ UNIX_CLI_PROCESS_EVENT_READ_READY, /**< A file descriptor has data to be
+ read. */
+ UNIX_CLI_PROCESS_EVENT_QUIT, /**< A CLI session wants to close. */
+} unix_cli_process_event_type_t;
+
/* Global main structure. */
extern unix_main_t unix_main;
extern clib_file_main_t file_main;