diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/libsystemd-login.sym | 2 | ||||
-rw-r--r-- | src/login/sd-login.c | 6 | ||||
-rw-r--r-- | src/login/sd-login.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/login/libsystemd-login.sym b/src/login/libsystemd-login.sym index bac46f4064..15e505e83b 100644 --- a/src/login/libsystemd-login.sym +++ b/src/login/libsystemd-login.sym @@ -36,5 +36,5 @@ local: LIBSYSTEMD_LOGIN_38 { global: - sd_pid_get_service; + sd_pid_get_unit; } LIBSYSTEMD_LOGIN_31; diff --git a/src/login/sd-login.c b/src/login/sd-login.c index e857ae08d2..8893b1de80 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -121,11 +121,11 @@ _public_ int sd_pid_get_session(pid_t pid, char **session) { return 0; } -_public_ int sd_pid_get_service(pid_t pid, char **service) { +_public_ int sd_pid_get_unit(pid_t pid, char **unit) { int r; char *cgroup, *p; - if (!service) + if (!unit) return -EINVAL; r = pid_get_cgroup(pid, NULL, &cgroup); @@ -144,7 +144,7 @@ _public_ int sd_pid_get_service(pid_t pid, char **service) { if (!p) return -ENOMEM; - *service = p; + *unit = p; return 0; } diff --git a/src/login/sd-login.h b/src/login/sd-login.h index 1d8a55e906..00de6716b0 100644 --- a/src/login/sd-login.h +++ b/src/login/sd-login.h @@ -53,9 +53,9 @@ int sd_pid_get_session(pid_t pid, char **session); * return an error for system processes. */ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid); -/* Get service name from PID. This will return an error for - * non-service processes. */ -int sd_pid_get_service(pid_t, char **service); +/* Get systemd unit (i.e. service) name from PID. This will return an + * error for non-service processes. */ +int sd_pid_get_unit(pid_t, char **unit); /* Get state from uid. Possible states: offline, lingering, online, active */ int sd_uid_get_state(uid_t uid, char**state); |