From 3b8643877d94310aa1f9d156045245824763a030 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Mon, 28 Mar 2022 18:06:22 -0700 Subject: [PATCH] Support bare device name --- utils/mqnic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/mqnic.c b/utils/mqnic.c index 98eb1e0fc..403f12235 100644 --- a/utils/mqnic.c +++ b/utils/mqnic.c @@ -374,6 +374,10 @@ struct mqnic *mqnic_open(const char *dev_name) if (mqnic_try_open(dev, "%s", dev_name) == 0) goto open; + // device name + if (mqnic_try_open(dev, "/dev/%s", dev_name) == 0) + goto open; + // network interface if (mqnic_try_open_if_name(dev, dev_name) == 0) goto open;