aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
Diffstat (limited to 'helper')
-rw-r--r--helper/cli.c9
-rw-r--r--helper/include/odp/helper/cli.h15
2 files changed, 24 insertions, 0 deletions
diff --git a/helper/cli.c b/helper/cli.c
index ef208c64d..81d41a58a 100644
--- a/helper/cli.c
+++ b/helper/cli.c
@@ -528,6 +528,15 @@ int odph_cli_log(const char *fmt, ...)
return r;
}
+ODP_PRINTF_FORMAT(1, 0)
+int odph_cli_log_va(const char *fmt, va_list in_args)
+{
+ int r;
+
+ r = cli_log_va(ODP_LOG_PRINT, fmt, in_args);
+ return r;
+}
+
static int msg_recv(int fd)
{
uint32_t msg;
diff --git a/helper/include/odp/helper/cli.h b/helper/include/odp/helper/cli.h
index 1c7a27bfd..6b8992926 100644
--- a/helper/include/odp/helper/cli.h
+++ b/helper/include/odp/helper/cli.h
@@ -24,6 +24,7 @@ extern "C" {
#include <odp_api.h>
#include <odp/helper/ip.h>
#include <stdint.h>
+#include <stdarg.h>
/**
* @addtogroup odph_cli ODPH CLI
@@ -147,6 +148,20 @@ int odph_cli_stop(void);
int odph_cli_log(const char *fmt, ...);
/**
+ * Print to CLI
+ *
+ * Similar to odph_cli_log(), except that this one takes its arguments as
+ * a va_list.
+ *
+ * @param fmt printf-style message format
+ * @param in_args variadic arguments
+ * @return On success, the number of characters printed or buffered, without
+ * accounting for any line feed conversions. If an error is encountered,
+ * a negative value is returned.
+ */
+int odph_cli_log_va(const char *fmt, va_list in_args);
+
+/**
* Terminate CLI helper
*
* Free any resources allocated by the CLI helper.