Use kvm_openfiles with KVM_NO_FILES on OpenBSD (#2061)
[collectd.git] / src / processes.c
index 86f690f..4f61351 100644 (file)
@@ -1916,7 +1916,7 @@ static int ps_read(void) {
   ps_list_reset();
 
   /* Open the kvm interface, get a descriptor */
-  kd = kvm_open(NULL, NULL, NULL, 0, errbuf);
+  kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf);
   if (kd == NULL) {
     ERROR("processes plugin: Cannot open kvm interface: %s", errbuf);
     return (0);