diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-06-21 01:46:27 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-06-21 01:46:27 +0200 |
commit | 1021b21bc6f8dd522b46116e8598b17f9f93f1b7 (patch) | |
tree | 7e8cbbb8210056562eb6a7669e1060df4e78c97b /src/test/test-cgroup-util.c | |
parent | ed002560a1945fb8765c5559c293a19bc9e132d8 (diff) |
login: add an api to determine the slice a PID is located in to libsystemd-login
Diffstat (limited to 'src/test/test-cgroup-util.c')
-rw-r--r-- | src/test/test-cgroup-util.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index aea8a7a1c3..f6317e5d33 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); } } |