diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/libsystemd-login.sym | 5 | ||||
-rw-r--r-- | src/login/sd-login.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/login/libsystemd-login.sym b/src/login/libsystemd-login.sym index 925fb91095..417dbb18dc 100644 --- a/src/login/libsystemd-login.sym +++ b/src/login/libsystemd-login.sym @@ -75,3 +75,8 @@ LIBSYSTEMD_LOGIN_203 { global: sd_get_machine_names; } LIBSYSTEMD_LOGIN_202; + +LIBSYSTEMD_LOGIN_204 { +global: + sd_pid_get_slice; +} LIBSYSTEMD_LOGIN_203; diff --git a/src/login/sd-login.c b/src/login/sd-login.c index 875d134efc..06587921cd 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -72,6 +72,16 @@ _public_ int sd_pid_get_machine_name(pid_t pid, char **name) { return cg_pid_get_machine_name(pid, name); } +_public_ int sd_pid_get_slice(pid_t pid, char **slice) { + + if (pid < 0) + return -EINVAL; + if (!slice) + return -EINVAL; + + return cg_pid_get_slice(pid, slice); +} + _public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) { if (pid < 0) |