]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: remove use hardcoded MM_CTL path
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 28 Apr 2025 16:22:14 +0000 (17:22 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 2 May 2025 08:31:27 +0000 (09:31 +0100)
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 <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build
src/util/virnetdevmidonet.c

index a452f0b21e198492dc05311d424771b7ab30aa20..eb85f93e5d4e2efe301d9b1e1525ee24fb1b9d7e 100644 (file)
@@ -854,7 +854,6 @@ optional_test_programs = [
 ]
 
 optional_programs = [
-  'mm-ctl',
   'modprobe',
   'ovs-vsctl',
   'rmmod',
index 7a285d2bab6025be840e1067583638ddb84b395a..a6f1dd1a8f168afb06f9dabe997b3198f8215c52 100644 (file)
@@ -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) {