Merge remote-tracking branch 'github/pr/413' into collectd-5.4
authorFlorian Forster <octo@collectd.org>
Wed, 28 Aug 2013 13:22:37 +0000 (15:22 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 28 Aug 2013 13:22:37 +0000 (15:22 +0200)
src/cgroups.c
src/utils_mount.c

index a28f4e9..17b12d0 100644 (file)
@@ -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,
index cae3706..3cede01 100644 (file)
@@ -752,9 +752,6 @@ cu_mount_getoptionvalue(char *line, char *keyword)
                r += strlen(keyword);
                p = strchr(r, ',');
                if(p == NULL) {
-                       if(strlen(r) == 0) {
-                               return NULL;
-                       }
                        return sstrdup(r);
                } else {
                        char *m;