Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git] / src / cgroups.c
index 061aa32..6d41972 100644 (file)
@@ -93,7 +93,7 @@ static int read_cpuacct_procs (const char *dirname, char const *cgroup_name,
        if (fh == NULL)
        {
                char errbuf[1024];
-               ERROR ("cgroups pluign: fopen (\"%s\") failed: %s",
+               ERROR ("cgroups plugin: fopen (\"%s\") failed: %s",
                                abs_path,
                                sstrerror (errno, errbuf, sizeof (errbuf)));
                return (-1);
@@ -144,7 +144,7 @@ static int read_cpuacct_procs (const char *dirname, char const *cgroup_name,
 
 /*
  * Gets called for every file/folder in /sys/fs/cgroup/cpu,cpuacct (or
- * whereever cpuacct is mounted on the system). Calls walk_directory with the
+ * wherever cpuacct is mounted on the system). Calls walk_directory with the
  * read_cpuacct_procs callback on every folder it finds, such as "system".
  */
 static int read_cpuacct_root (const char *dirname, const char *filename,
@@ -221,8 +221,9 @@ static int cgroups_read (void)
        {
                /* Find the cgroup mountpoint which contains the cpuacct
                 * controller. */
-               if (strcmp(mnt_ptr->type, "cgroup") != 0 ||
-                       !cu_mount_getoptionvalue(mnt_ptr->options, "cpuacct"))
+               if ((strcmp(mnt_ptr->type, "cgroup") != 0)
+                               || !cu_mount_checkoption(mnt_ptr->options,
+                                       "cpuacct", /* full = */ 1))
                        continue;
 
                walk_directory (mnt_ptr->dir, read_cpuacct_root,