summaryrefslogtreecommitdiff
path: root/src/systemd-cgls.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-12 18:16:44 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-12 18:16:44 +0200
commit35d2e7ec19f8d3960a14dc04642060ccee3faa43 (patch)
treeec7b2c683f18f477a1dbc9af98b29273de17149e /src/systemd-cgls.c
parentdbd821acb4d91181b309860bb4d4b711b38da7b4 (diff)
cgroup: reimplement the last bit of libcgroup functionality natively
Diffstat (limited to 'src/systemd-cgls.c')
-rw-r--r--src/systemd-cgls.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/systemd-cgls.c b/src/systemd-cgls.c
index bd8d263d0e..cd03e91b83 100644
--- a/src/systemd-cgls.c
+++ b/src/systemd-cgls.c
@@ -83,11 +83,6 @@ int main(int argc, char *argv[]) {
goto finish;
}
- if (cg_init() < 0) {
- log_error("Failed to initialize libcg: %s", strerror(-r));
- goto finish;
- }
-
if (optind < argc) {
unsigned i;
@@ -95,7 +90,7 @@ int main(int argc, char *argv[]) {
int q;
printf("%s:\n", argv[i]);
- if ((q = show_cgroup_recursive(argv[i], NULL, 0)) < 0)
+ if ((q = show_cgroup_by_path(argv[i], NULL, 0)) < 0)
r = q;
}
@@ -109,9 +104,9 @@ int main(int argc, char *argv[]) {
if (path_startswith(p, "/cgroup")) {
printf("Working Directory %s:\n", p);
- r = show_cgroup_recursive(p, NULL, 0);
+ r = show_cgroup_by_path(p, NULL, 0);
} else
- r = show_cgroup_recursive(NULL, NULL, 0);
+ r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, "/", NULL, 0);
free(p);
}