Remove the definition of `struct cmdline` from public header.
Deprecation notice:
https://mails.dpdk.org/archives/dev/2020-September/183310.html
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
-* cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
- content. On Linux and FreeBSD, supported prior to DPDK 20.11,
- original structure will be kept until DPDK 21.11.
-
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
removed. Its usages have been replaced by a new function
``rte_kvargs_get_with_value()``.
+* cmdline: Made ``cmdline`` structure definition hidden on Linux and FreeBSD.
+
* mempool: Added ``RTE_MEMPOOL_F_NON_IO`` flag to give a hint to DPDK components
that objects from this pool will not be used for device IO (e.g. DMA).
#ifndef _CMDLINE_H_
#define _CMDLINE_H_
-#ifndef RTE_EXEC_ENV_WINDOWS
-#include <termios.h>
-#endif
-
#include <rte_common.h>
#include <rte_compat.h>
extern "C" {
#endif
-#ifndef RTE_EXEC_ENV_WINDOWS
-
-struct cmdline {
- int s_in;
- int s_out;
- cmdline_parse_ctx_t *ctx;
- struct rdline rdl;
- char prompt[RDLINE_PROMPT_SIZE];
- struct termios oldterm;
-};
-
-#else
-
struct cmdline;
-#endif /* RTE_EXEC_ENV_WINDOWS */
-
struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
void cmdline_set_prompt(struct cmdline *cl, const char *prompt);
void cmdline_free(struct cmdline *cl);
#include <rte_os_shim.h>
#ifdef RTE_EXEC_ENV_WINDOWS
#include <rte_windows.h>
+#else
+#include <termios.h>
#endif
#include <cmdline.h>
int is_console_input;
int is_console_output;
};
+#endif
struct cmdline {
int s_in;
cmdline_parse_ctx_t *ctx;
struct rdline rdl;
char prompt[RDLINE_PROMPT_SIZE];
+#ifdef RTE_EXEC_ENV_WINDOWS
struct terminal oldterm;
char repeated_char;
WORD repeat_count;
-};
+#else
+ struct termios oldterm;
#endif
+};
/* Disable buffering and echoing, save previous settings to oldterm. */
void terminal_adjust(struct cmdline *cl);