aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/std-formats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/std-formats.c')
-rw-r--r--src/vppinfra/std-formats.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vppinfra/std-formats.c b/src/vppinfra/std-formats.c
index da3c54cc07e..b771b947e27 100644
--- a/src/vppinfra/std-formats.c
+++ b/src/vppinfra/std-formats.c
@@ -108,6 +108,22 @@ format_hex_bytes (u8 * s, va_list * va)
return s;
}
+u8 *
+format_hex_bytes_no_wrap (u8 * s, va_list * va)
+{
+ u8 *bytes = va_arg (*va, u8 *);
+ int n_bytes = va_arg (*va, int);
+ uword i;
+
+ if (n_bytes == 0)
+ return s;
+
+ for (i = 0; i < n_bytes; i++)
+ s = format (s, "%02x", bytes[i]);
+
+ return s;
+}
+
/* Add variable number of spaces. */
u8 *
format_white_space (u8 * s, va_list * va)