2
0
mirror of git://github.com/lxc/lxc synced 2025-09-01 23:10:03 +00:00

cgfsng: fix is_lxcfs() and is_cgroupfs()

Both functions advertise that they return true when strncmp() == 0 and false
when strncmp() != 0 but so far they returned the exact opposite.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
This commit is contained in:
Christian Brauner
2016-07-25 17:10:47 +02:00
parent 9d206b25f5
commit 2f62fb005b

View File

@@ -438,7 +438,7 @@ static bool is_lxcfs(const char *line)
char *p = strstr(line, " - "); char *p = strstr(line, " - ");
if (!p) if (!p)
return false; return false;
return strncmp(p, " - fuse.lxcfs ", 14); return strncmp(p, " - fuse.lxcfs ", 14) == 0;
} }
/* /*
@@ -488,7 +488,7 @@ static bool is_cgroupfs(char *line)
char *p = strstr(line, " - "); char *p = strstr(line, " - ");
if (!p) if (!p)
return false; return false;
return strncmp(p, " - cgroup ", 10); return strncmp(p, " - cgroup ", 10) == 0;
} }
/* Add a controller to our list of hierarchies */ /* Add a controller to our list of hierarchies */