aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-01 20:26:58 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-01 20:29:09 -0500
commitd3e8277d5004163c725a895778c3a9dce9ca091e (patch)
tree720be3e42a17fa770a16a3e194d640cc335e692c /src/shared/cgroup-show.h
parentcgls: make function to query cgroup root public (diff)
downloadsystemd-d3e8277d5004163c725a895778c3a9dce9ca091e.tar.gz
systemd-d3e8277d5004163c725a895778c3a9dce9ca091e.tar.bz2
systemd-d3e8277d5004163c725a895778c3a9dce9ca091e.zip
cgtop: use common function to query cgroup root
show_cgroup_get_root_and_warn is renamed to show_cgroup_get_path_and_warn because it now optionally allows querying a non-root path. This removes duplicated code and teaches cgtop to combine -M with a root prefix: $ systemd-cgtop -M myprecious /system.slice ...
Diffstat (limited to 'src/shared/cgroup-show.h')
-rw-r--r--src/shared/cgroup-show.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/cgroup-show.h b/src/shared/cgroup-show.h
index 0574f4055..1445c05f1 100644
--- a/src/shared/cgroup-show.h
+++ b/src/shared/cgroup-show.h
@@ -31,6 +31,7 @@ int show_cgroup(const char *controller, const char *path, const char *prefix, un
int show_cgroup_and_extra_by_spec(const char *spec, const char *prefix, unsigned n_columns, const pid_t extra_pids[], unsigned n_extra_pids, OutputFlags flags);
int show_cgroup_and_extra(const char *controller, const char *path, const char *prefix, unsigned n_columns, const pid_t extra_pids[], unsigned n_extra_pids, OutputFlags flags);
-int show_cgroup_get_root_and_warn(
+int show_cgroup_get_path_and_warn(
const char *machine,
+ const char *prefix,
char **ret);