From 19f2b047d3dc5ee9ff3ba640b70e3b71c497824f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 28 Apr 2025 17:22:14 +0100 Subject: [PATCH] util: remove use hardcoded MM_CTL path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- meson.build | 1 - src/util/virnetdevmidonet.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index a452f0b21e..eb85f93e5d 100644 --- a/meson.build +++ b/meson.build @@ -854,7 +854,6 @@ optional_test_programs = [ ] optional_programs = [ - '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.47.3