From: Daniel P. Berrangé Date: Mon, 28 Apr 2025 16:22:14 +0000 (+0100) Subject: util: remove use hardcoded MM_CTL path X-Git-Tag: v11.4.0-rc1~123 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19f2b047d3dc5ee9ff3ba640b70e3b71c497824f;p=thirdparty%2Flibvirt.git util: remove use hardcoded MM_CTL path 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é --- 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) {