From 150bf5ac6b067a9051bcce7f6126bbededbc4c1b Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Tue, 17 Nov 2020 15:56:10 -0800 Subject: misc: fix a trunccation on vhost dump feature is u64. We need to print it with %llx and enough precision to avoid truncation Type: fix Signed-off-by: Steven Luong Change-Id: I9f5dd523400473b4881b01b8e6cecf439a8060d9 --- src/vat/api_format.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 90f79079fbe..cf9c7742d46 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -10199,10 +10199,9 @@ static void vl_api_sw_interface_vhost_user_details_t_handler (mp->features_last_32) << 32); - print (vam->ofp, "%-25s %3" PRIu32 " %6" PRIu32 " %8x %6d %7d %s", - (char *) mp->interface_name, - ntohl (mp->sw_if_index), ntohl (mp->virtio_net_hdr_sz), - features, mp->is_server, + print (vam->ofp, "%-25s %3" PRIu32 " %6" PRIu32 " %16llx %6d %7d %s", + (char *) mp->interface_name, ntohl (mp->sw_if_index), + ntohl (mp->virtio_net_hdr_sz), features, mp->is_server, ntohl (mp->num_regions), (char *) mp->sock_filename); print (vam->ofp, " Status: '%s'", strerror (ntohl (mp->sock_errno))); } @@ -10255,8 +10254,8 @@ api_sw_interface_vhost_user_dump (vat_main_t * vam) break; } - print (vam->ofp, - "Interface name idx hdr_sz features server regions filename"); + print (vam->ofp, "Interface name idx hdr_sz features " + "server regions filename"); /* Get list of vhost-user interfaces */ M (SW_INTERFACE_VHOST_USER_DUMP, mp); -- cgit 1.2.3-korg