diff options
Diffstat (limited to 'src/systemd-cgls.c')
-rw-r--r-- | src/systemd-cgls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemd-cgls.c b/src/systemd-cgls.c index 6614f0fd25..bd8d263d0e 100644 --- a/src/systemd-cgls.c +++ b/src/systemd-cgls.c @@ -27,6 +27,7 @@ #include <string.h> #include "cgroup-show.h" +#include "cgroup-util.h" #include "log.h" #include "util.h" @@ -82,6 +83,11 @@ 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; @@ -105,7 +111,7 @@ int main(int argc, char *argv[]) { printf("Working Directory %s:\n", p); r = show_cgroup_recursive(p, NULL, 0); } else - r = show_cgroup_recursive("", NULL, 0); + r = show_cgroup_recursive(NULL, NULL, 0); free(p); } |