From d3e8277d5004163c725a895778c3a9dce9ca091e Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Feb 2017 20:26:58 -0500 Subject: 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 ... --- src/shared/cgroup-show.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared/cgroup-show.h') diff --git a/src/shared/cgroup-show.h b/src/shared/cgroup-show.h index 0574f40552..1445c05f1f 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); -- cgit v1.2.3-54-g00ecf