summaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-11-17 15:56:10 -0800
committerDave Wallace <dwallacelf@gmail.com>2021-01-29 14:22:38 +0000
commit150bf5ac6b067a9051bcce7f6126bbededbc4c1b (patch)
treed4dd6d7dcef0a0205e483cf85c0933deaf5523f6 /src/vat
parentced43e28ed89172f68de5655d114b289233b2581 (diff)
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 <sluong@cisco.com> Change-Id: I9f5dd523400473b4881b01b8e6cecf439a8060d9
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c11
1 files changed, 5 insertions, 6 deletions
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);