From 1021b21bc6f8dd522b46116e8598b17f9f93f1b7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 21 Jun 2013 01:46:27 +0200 Subject: login: add an api to determine the slice a PID is located in to libsystemd-login --- src/test/test-cgroup-util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index aea8a7a1c..f6317e5d3 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -134,7 +134,7 @@ static void test_proc(void) { assert_se(d); FOREACH_DIRENT(de, d, break) { - _cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *prefix = NULL; + _cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *prefix = NULL, *slice = NULL; pid_t pid; uid_t uid = (uid_t) -1; @@ -156,8 +156,9 @@ static void test_proc(void) { cg_pid_get_unit(pid, &unit); cg_pid_get_user_unit(pid, &user_unit); cg_pid_get_machine_name(pid, &machine); + cg_pid_get_slice(pid, &slice); - printf("%lu\t%s\t%s\t%s\t%lu\t%s\t%s\t%s\t%s\n", + printf("%lu\t%s\t%s\t%s\t%lu\t%s\t%s\t%s\t%s\t%s\n", (unsigned long) pid, path, prefix, @@ -166,7 +167,8 @@ static void test_proc(void) { session, unit, user_unit, - machine); + machine, + slice); } } -- cgit v1.2.3