summaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/rdma/format.c')
-rw-r--r--src/plugins/rdma/format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/rdma/format.c b/src/plugins/rdma/format.c
index 7ef65d43957..fbd40676639 100644
--- a/src/plugins/rdma/format.c
+++ b/src/plugins/rdma/format.c
@@ -29,6 +29,9 @@ format_rdma_device_name (u8 * s, va_list * args)
rdma_main_t *rm = &rdma_main;
rdma_device_t *rd = vec_elt_at_index (rm->devices, i);
+ if (rd->name)
+ return format (s, "%s", rd->name);
+
s = format (s, "rdma-%u", rd->dev_instance);
return s;
}