From: Daniel P. Berrangé <berrange(a)redhat.com>
Allow virCommand to find 'mm-ctl' in $PATH. This command is only used
when running privileged in which case both 'bin' and 'sbin' dirs will
be in $PATH, so virFindFileInPath will do the right thing to find it.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
meson.build | 2 --
src/util/virnetdevmidonet.c | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 9759a3322b..2a7c264114 100644
--- a/meson.build
+++ b/meson.build
@@ -854,8 +854,6 @@ optional_test_programs = [
]
optional_programs = [
- 'mdevctl',
- 'mm-ctl',
'modprobe',
'ovs-vsctl',
'rmmod',
diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c
index 7a285d2bab..a6f1dd1a8f 100644
--- a/src/util/virnetdevmidonet.c
+++ b/src/util/virnetdevmidonet.c
@@ -43,7 +43,7 @@ virNetDevMidonetBindPort(const char *ifname,
virUUIDFormat(virtualport->interfaceID, virtportuuid);
- cmd = virCommandNew(MM_CTL);
+ cmd = virCommandNew("mm-ctl");
virCommandAddArgList(cmd, "--bind-port", virtportuuid, ifname, NULL);
@@ -73,7 +73,7 @@ virNetDevMidonetUnbindPort(const virNetDevVPortProfile *virtualport)
virUUIDFormat(virtualport->interfaceID, virtportuuid);
- cmd = virCommandNew(MM_CTL);
+ cmd = virCommandNew("mm-ctl");
virCommandAddArgList(cmd, "--unbind-port", virtportuuid, NULL);
if (virCommandRun(cmd, NULL) < 0) {
--
2.49.0