]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: stop hardcoding numad path
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 28 Apr 2025 10:47:34 +0000 (11:47 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 2 May 2025 08:31:27 +0000 (09:31 +0100)
Change the meson rules to always enable numad if on a Linux host, unless
the meson options say not to.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build
src/util/virnuma.c

index 00aff4cd69e776a7bac16c5ed55a7aea3ab251f2..fd1800bbd9c8a3f116dc7748ec4b285066aab95f 100644 (file)
@@ -2028,14 +2028,10 @@ if not get_option('nss').disabled()
   endif
 endif
 
-if not get_option('numad').disabled() and numactl_dep.found()
-  numad_prog = find_program('numad', required: get_option('numad'), dirs: libvirt_sbin_path)
-  if numad_prog.found()
-    conf.set('WITH_NUMAD', 1)
-    conf.set_quoted('NUMAD', numad_prog.full_path())
-  endif
+if not get_option('numad').disabled() and numactl_dep.found() and host_machine.system() == 'linux'
+  conf.set('WITH_NUMAD', 1)
 elif get_option('numad').enabled()
-  error('You must have numactl enabled for numad support.')
+  error('You must have a Linux host with numactl enabled for numad support.')
 endif
 
 # nwfilter should only be compiled for linux, and only if the
index 9393c20875f85e13a702417f9536defddcb9a8f8..67c51630c7b387daf86b0bdeeea2c1687e3727fe 100644 (file)
@@ -61,7 +61,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus,
     g_autoptr(virCommand) cmd = NULL;
     char *output = NULL;
 
-    cmd = virCommandNewArgList(NUMAD, "-w", NULL);
+    cmd = virCommandNewArgList("numad", "-w", NULL);
     virCommandAddArgFormat(cmd, "%d:%llu", vcpus,
                            VIR_DIV_UP(balloon, 1024));