[systemd-commits] src/cgtop
Lennart Poettering
lennart at kemper.freedesktop.org
Tue May 29 13:00:21 PDT 2012
src/cgtop/cgtop.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 63210a15e1efdbda3fb3abd9a6ae9961fd0ea153
Author: Shawn Landden <shawnlandden at gmail.com>
Date: Mon May 21 22:54:41 2012 -0700
cgtop: work even if not all cgroups are available
cgtop quits on startup if all the cgroup mounts it expects are not available.
Just continue without nonexistant ones.
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index ddb5709..f988adb 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -341,17 +341,22 @@ static int refresh(Hashmap *a, Hashmap *b, unsigned iteration) {
r = refresh_one("name=systemd", "/", a, b, iteration, 0);
if (r < 0)
- return r;
-
+ if (r != -ENOENT)
+ return r;
r = refresh_one("cpuacct", "/", a, b, iteration, 0);
if (r < 0)
- return r;
-
+ if (r != -ENOENT)
+ return r;
r = refresh_one("memory", "/", a, b, iteration, 0);
if (r < 0)
- return r;
+ if (r != -ENOENT)
+ return r;
- return refresh_one("blkio", "/", a, b, iteration, 0);
+ r = refresh_one("blkio", "/", a, b, iteration, 0);
+ if (r < 0)
+ if (r != -ENOENT)
+ return r;
+ return 0;
}
static int group_compare(const void*a, const void *b) {
More information about the systemd-commits
mailing list